-
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
Move history tree and value balance to typed column families #8115
Conversation
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 solution in this PR contains this item:
- Always pass
ZebraDb
to database methods
I reverted this change because it caused a very tricky bug where Zebra would compile with cargo build
, but not, for example, with cargo build --package zebrad
or in other cases. We'll need a bigger refactor if we want to do that change.
I also manually resolved merge conflicts and fixed some API bugs that the merge introduced.
Otherwise, this PR looks good.
The cause of the bug was that passing |
We could have enabled the But we'll deal with this when we split ZebraDb and DiskDb properly in #7937. |
Motivation
This is another part of ticket #7833, making sure that the new typed column families work for more complex situations in the state. These commits or PRs will become examples in the documentation.
This PR converts the history tree and value balance to typed column families, and cleans up some risky and redundant code.
PR Author Checklist
Check before marking the PR as ready for review:
If a checkbox isn't relevant to the PR, mark it as done.
Database Format Docs
Please check the types in the PR match the existing types in the database:
https://github.com/ZcashFoundation/zebra/blob/main/book/src/dev/state-db-upgrades.md#current-state-database-format
Complex Code or Requirements
This PR removes complexity by using consistent types for reading and writing column families.
Solution
&Key
and&Value
and relying on auto-deref)ZebraDb
to database methodsRelated changes:
zebra-state
exportsUnrelated cleanups:
Testing
Review
Reviewer Checklist
Check before approving the PR:
PR blockers can be dealt with in new tickets or PRs.
And check the PR Author checklist is complete.
Follow Up Work