-
Notifications
You must be signed in to change notification settings - Fork 252
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
zcash_client_sqlite: Fix incomplete truncation due to bad reorg handling. #1549
Conversation
1fc8848
to
b367c65
Compare
700ca4e
to
54695c2
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1549 +/- ##
==========================================
+ Coverage 61.32% 61.62% +0.30%
==========================================
Files 147 148 +1
Lines 18667 18808 +141
==========================================
+ Hits 11447 11590 +143
+ Misses 7220 7218 -2 ☔ View full report in Codecov by Sentry. |
abe88b4
to
a4217d6
Compare
This branch has been tested with an affected wallet, and resolves the problems that blocked additional scanning. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Flushing comments as of 5f4aef5.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed a4217d6.
zcash_client_sqlite/src/wallet/init/migrations/fix_broken_commitment_trees.rs
Show resolved
Hide resolved
zcash_client_sqlite/src/wallet/init/migrations/fix_broken_commitment_trees.rs
Show resolved
Hide resolved
a4217d6
to
4dd90b7
Compare
force-pushed to address review comments. |
…n truncation. This is a minimal fix for the failing test; however, it it does not fix users' existing wallets, and also does not correctly set retention flags. The correct fix requires a change to the `shardtree` API that will be made in a subsequent commit.
…te commitment trees.
4dd90b7
to
11f5a15
Compare
force-pushed to correctly uncomment tests that were inadvertently left commented out. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK 11f5a15
@@ -2511,21 +2511,22 @@ where | |||
// Truncate back to the reorg height, but retain the block cache. | |||
st.truncate_to_height_retaining_cache(reorg_height); | |||
|
|||
// The following error-prone tree state is generated by the current truncate implementation: | |||
// The following error-prone tree state is generated by the a previous (buggy) truncate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// The following error-prone tree state is generated by the a previous (buggy) truncate | |
// The following error-prone tree state is generated by a previous (buggy) truncate |
orchard = { git = "https://github.com/zcash/orchard", rev = "55fb089a335bbbc1cda186c706bc037073df8eb7" } | ||
incrementalmerkletree = { git = "https://github.com/zcash/incrementalmerkletree", rev = "ffe4234788fd22662b937ba7c6ea01535fcc1293" } | ||
incrementalmerkletree-testing = { git = "https://github.com/zcash/incrementalmerkletree", rev = "ffe4234788fd22662b937ba7c6ea01535fcc1293" } | ||
shardtree = { git = "https://github.com/zcash/incrementalmerkletree", rev = "ffe4234788fd22662b937ba7c6ea01535fcc1293" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked these commits are what I expected.
No description provided.