-
Notifications
You must be signed in to change notification settings - Fork 17
Optimize wallet and/or monitoring #2158
Comments
Likely a cause of warnings of #2083 |
my bet is that it's the wallet and these scripthashes are the 1000 address we are trying to cache. |
I digged a bit deeper into this:
Conclusion: my understanding is that we cannot easily get around this warning (which is probably harmless) but should reconsider if we really need to sync the wallet 1/m for 1000 addresses. |
I've created bitcoindevkit/bdk#618, let's see what bkd devs say about this. |
Let me summarize the issue: TLDRI propose to sync less often and offer a manual sync button in the UI so that a user can manually trigger sync to speed up his deposits. The issueWhat we want:
What we do:
The issue
There is no big issue in this besides that we bombard public infrastructure or each user's personal electrum server. The solution
Additionally, I believe that bdk could be more performant if we use a proper db and not only store it in memory What I would not doRun infrastructure for users: with the current design this is likely that a few users would exhaust a small machine and we would need to upgrade it fast. This leads to extensive expenses which are probably not worth the hazzle. |
2172: Minor wallet improvements r=bonomat a=bonomat Fixes #2158 Minor UI change: Maker UI: <img width="486" alt="image" src="https://user-images.githubusercontent.com/224613/172093037-b1dfc492-9789-4524-a781-afc77c9de069.png"> Taker UI: <img width="750" alt="image" src="https://user-images.githubusercontent.com/224613/172093106-79a31577-4d09-4e33-9dbb-e2f3a51d3a08.png"> While syncing: <img width="803" alt="image" src="https://user-images.githubusercontent.com/224613/172093127-a58e6f27-44f9-499d-866b-55dcfa2243f6.png"> Co-authored-by: Philipp Hoenisch <[email protected]>
2172: Minor wallet improvements r=bonomat a=bonomat Fixes #2158 Minor UI change: Maker UI: <img width="486" alt="image" src="https://user-images.githubusercontent.com/224613/172093037-b1dfc492-9789-4524-a781-afc77c9de069.png"> Taker UI: <img width="750" alt="image" src="https://user-images.githubusercontent.com/224613/172093106-79a31577-4d09-4e33-9dbb-e2f3a51d3a08.png"> While syncing: <img width="803" alt="image" src="https://user-images.githubusercontent.com/224613/172093127-a58e6f27-44f9-499d-866b-55dcfa2243f6.png"> Co-authored-by: Philipp Hoenisch <[email protected]>
2174: Use file-based db for wallet r=bonomat a=bonomat This will improve performance because - we don't have to generate the addresses on every restart, we can just read them from the db - we don't have to generate 1000 addresses after are restart to miss unspent addresses: if the wallet db grows naturally, i.e. all addresses are cached, we don't have to pre-cache addresses - we use less memory as we don't have to store the whole db in memory: particularly when having 1000s spent addresses this is a significant amount of data - sync is faster because we don't have re-fetch the whole raw tx which is stored in the db Note: if you have used the daemon for some time in the past the first restart can be scary because it will not immediately fetch all addresses. It will take some time until the wallet has caught up because we only sync for 100 addresses at a time. Fixes #2158 Note 2: this depends on a bdk fork "https://github.com/coblox/bdk", branch = "sqlite-version-bumps" because of incompatible dependency versions. I'll see to contribute this upstream Co-authored-by: Philipp Hoenisch <[email protected]>
I'm not sure which part of our code base is causing this, but electrs is printing the following warnings:
It's a never ending flood of these logs and electrs needs 100% cpu
The text was updated successfully, but these errors were encountered: