-
Notifications
You must be signed in to change notification settings - Fork 107
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(state): Refactor the structure of finalizable blocks #7035
Conversation
2a79ee2
to
b7131e1
Compare
7069a86
to
a279938
Compare
This commit adds `FinalizableBlock`, and uses it instead of `ContextuallyVerifiedBlockWithTrees` in `commit_finalized_direct()`
This commit passes `ContextuallyVerifiedBlockWithTrees` instead of passing separate `finalized`, `history_tree` and `note_commitment_trees` when storing blocks in the finalized state.
a279938
to
dac739f
Compare
Rebased onto |
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.
Looks great, thanks!
All my comments are optional, but it would be nice to fix the docs and the type name.
Co-authored-by: teor <[email protected]>
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #7035 +/- ##
==========================================
- Coverage 77.52% 77.37% -0.16%
==========================================
Files 310 310
Lines 41694 41690 -4
==========================================
- Hits 32325 32259 -66
- Misses 9369 9431 +62 |
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.
Let's merge this as it is, then open tickets for any further changes.
Here's the link to the long discussion about what to call "block with trees": |
@Mergifyio update |
✅ Branch has been successfully updated |
Failed due to bug #7077 |
Motivation
Close #6912.
Solution
FinalizableBlock
and use it instead ofContextuallyVerifiedBlockWithTrees
incommit_finalized_direct()
.ContextuallyVerifiedBlockWithTrees
instead of passing separatefinalized
,history_tree
, andnote_commitment_trees
when storing blocks in the finalized state. This also simplifies the internal API when storing blocks since the parameter list is shorter.This PR is based on PR #7025.
Reviewer Checklist