-
Notifications
You must be signed in to change notification settings - Fork 121
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
Rename RootHash to Commitment based on ZIP-244 #1957
Rename RootHash to Commitment based on ZIP-244 #1957
Conversation
Interactive replace using: ```sh fastmod RootHash Commitment fastmod root_hash commitment fastmod root_bytes commitment_bytes git mv zebra-chain/src/block/root_hash.rs zebra-chain/src/block/commitment.rs ``` All replacements were accepted.
677f150
to
75e0816
Compare
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.
A thought: in (sapling|orchard)::commitments, because there are several (Note, Value), they are explicitly named as such, even if it's a little redundant based on module paths and context, etc. Would naming this BlockCommitment
work? Or is that possibly a less accurate name than just Commitment
. Hm.
I had expected we would use use path::to::block;
const commitment: block::Commitment = Default::default(); |
OK yeah, sounds good. ✅ |
Motivation
The goal of this PR is to make progress on the outstanding cleanups on the block commitment field from #881.
In ZIP-244, the root hash field is renamed to block commitment. This name is more generic, and will probably stay the same going forward.
Solution
Interactive replace using:
All replacements were accepted.
Review
@dconnolly or @oxarbitrage just a quick search and replace PR that's blocking other issues.
Related Issues
Implements part of #1874 and #881, but doesn't finish either of them.
Follow Up Work
Finish #881
Do design for #1874