-
Notifications
You must be signed in to change notification settings - Fork 106
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
change(db): Make the first stable release forward-compatible with planned state changes #6813
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #6813 +/- ##
==========================================
+ Coverage 77.97% 78.15% +0.18%
==========================================
Files 308 308
Lines 41023 41113 +90
==========================================
+ Hits 31988 32133 +145
+ Misses 9035 8980 -55 |
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.
This is very clear, thank you for making it that way. Looks great.
b695461
to
e90b718
Compare
This PR is ready for re-review |
Unrelated failure, possibly #6763 but in the RPC code:
https://github.com/ZcashFoundation/zebra/actions/runs/5182998267/jobs/9341002724?pr=6813#step:8:426 |
@Mergifyio update |
✅ Branch has been successfully updated |
…#6814) * Implement minor and patch database format versions * Log and update database format versions when opening database * Refactor the current list of column families into a constant * Open all available column families, including from future Zebra versions * Refactor note commitment tree lookups to go through the height methods * Make Sapling/Orchard note commitment tree lookup forwards compatible * Ignore errors reading column family lists from disk * Update format version comments and TODOs * Correctly log newly created database formats * Fix a new cargo lint about resolver versions * cargo clippy --fix --all-features --all-targets * cargo fmt --all * Add missing tokio feature in the state, revealed by the new resolver * Add missing dev dependencies in zebra-node-services * Add a missing `tokio` feature from PR #6813 --------- Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Motivation
We're going to change how the state database is implemented in ticket #6642, after the first stable release.
It would be nice if all stable Zebra versions could read those states, even if they have some format changes.
Close #6746
Specifications
https://docs.rs/rocksdb/latest/rocksdb/struct.DBCommon.html#method.list_cf
https://docs.rs/rocksdb/latest/rocksdb/struct.DBIteratorWithThreadMode.html
Complex Code or Requirements
This is all fairly straightforward, the tricky part will be tickets #6642 and #4784, where we actually change the state format.
Solution
lightwalletd
RPCs for "spend before sync" algorithm #6642)Testing
These changes are covered by existing state and RPC tests.
I don't think we should have specific forward compatibility tests, we can just support it on a best-effort basis.
Review
This is a routine change that we'd like to get in the first stable release.
Reviewer Checklist
Follow Up Work
Actually change the state format.