-
Notifications
You must be signed in to change notification settings - Fork 330
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
Fix caching #985
Fix caching #985
Conversation
@bodymindarts would you be able to test this branch against your large test descriptor? |
I fixed a few spelling typos to trigger a new build. Not sure why github wouldn't run the actions pipeline initially. |
Looks like some tests in CI are failing, I'll work on fixing those. |
Just for clarification. It has > 200k addresses. About half and half from the public and the change descriptor. I'm not sure how many transactions but same order-of-magnitude. I will try it out as soon as possible! |
b94f673
to
aed44be
Compare
aed44be
to
ce517a5
Compare
ce517a5
to
7967a9d
Compare
Removed from 0.29 milestone and closing this PR since issues are already fixed in 1.0 syncing mechanism. |
Description
The
Wallet.ensure_addresses_cached()
function was always regenerating and saving new scripts pubkeys starting from index 0. This is inefficient and for very large wallets and can cause sync to fail.Notes to the reviewers
This issue was discovered by @bodymindarts while testing on a 200K+ transaction wallet.
Since this is more of a performance issue than functional/scaling problem I only added a test to verify that with multiple cached batches created during sync, the transaction to addresses in each cached batch are found. An integration test syncing 200K+ tx would take too long to complete.
Changelog notice
Checklists
All Submissions:
cargo fmt
andcargo clippy
before committingBugfixes: