-
Notifications
You must be signed in to change notification settings - Fork 391
Electrum client Performance issues #1891
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
Comments
Thank you for this. Could you please be a little more specific so it's easier to identify the performance issues? I.e. are you doing full scan or sync? What parameters are you using? How many txs per address and txs in total? However, just off the top of my head, I think it is very likely it's because we are fetching and checking the merkle proofs per tx in the new Not fetching the merkle proofs is a no go, as the electrum API only returns the height that a tx was included in (not the block hash). The old BDK was doing things incorrectly. There are definitely things we can do to help the performance here. The most obvious thing would be to use the Electrum API properly. The Electrum API was intended as a pub-sub API. Work on this is done in an experimental client here: https://github.com/evanlinjin/experiments We can also fetch merkle proofs asynchronously. This would be much easier if could use We can also cache/store/persist the merkle proofs if the tx can already be linked to the current best chain. This requires us to persist/cache headers. For the short term, based on the way I understand the problem, I think the quickest way to speed things up is to fetch merkle proofs and headers in a batch and then do processing later on. Instead of fetch -> process -> fetch -> process as we are doing now. This will reduce round trips. |
thanks for the fast answer. the parameters are:
|
Having a stop gap of 500 means you'll be scanning 500 extra addresses. Does reducing this improve the situation? |
The stop gap is user defined in Bitcoin Safe, and therefore is not up to me to improve performance. |
We also noticed a similar slowdown when upgrading to the latest bdk_electrum crate and determined that it was related to the Merkle proofs validation step. I'm hoping that the resolution of bitcoindevkit/bdk_wallet#56 will improve the performance in this regard. |
Uh oh!
There was an error while loading. Please reload this page.
The electrum client seems to have significantly suffered in performance in the upgrade to bdk 1.0
The full sync takes
My setup: Using a fulcrum server (very performant) and a wallet with a few thousand addresses.
The text was updated successfully, but these errors were encountered: