Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance issue peatio/lib/daemons/blockchain.rb #124

Open
champmine opened this issue Sep 16, 2019 · 1 comment
Open

Performance issue peatio/lib/daemons/blockchain.rb #124

champmine opened this issue Sep 16, 2019 · 1 comment

Comments

@champmine
Copy link

champmine commented Sep 16, 2019

when running about 15 blockchains the sole blockchain.rb process cannot keep up.

when starting multiple threads of it, it can occur that a deposit is credited multiple times

It seems to be happening on the first time deposit only to new wallet deposit addresses

please advise how to solve this performance issue
Not a server problem, server is high end i9

@mezbahalam
Copy link

I didn't test with multiple threads.
But if it solves your performance issue, then you can validate uniqness of deposit creation by transaction id.
This validation already in Peatio deposit coin Model.

peatio/app/models/deposits/coin.rb

validates :txid, uniqueness: { scope: %i[currency_id txout] }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants