-
Notifications
You must be signed in to change notification settings - Fork 95
refactor: verify current block commit in conductor; remove last_commit from SequencerBlockData
#560
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
last_commit from SequencerBlockDatalast_commit from SequencerBlockData
sambukowski
approved these changes
Nov 1, 2023
SuperFluffy
reviewed
Nov 6, 2023
| block, | ||
| block::{ | ||
| self, | ||
| Commit, |
Contributor
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.
Don't import Commit directly, just qualify with block::Commit.
SuperFluffy
approved these changes
Nov 6, 2023
Contributor
SuperFluffy
left a comment
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, I like the simplification.
sambukowski
pushed a commit
that referenced
this pull request
Nov 6, 2023
…it` from `SequencerBlockData` (#560) ## Summary previously, we were storing a block's `last_commit` in `SequencerBlockData` and verifying it in the conductor. however, we were never doing anything (correctly) with this commit verification - if it failed, we would reject the *current* block, where we should have rejected the previous. also, we don't want to delay block execution 1 block by waiting for the canonical commit in the next block, as we can retrieve a valid commit for the latest block from our sequencer node the moment the block is finalized. ## Background see summary. also, note that the tendermint latest block is finalized and thus will always have a commit available for it, so this PR changes the verification code in conductor to fetch and use that commit when verifying a block from DA. we don't care if the commit is canonical, as whichever commit we receive will be valid, since the block would not have finalized without it. (canonical meaning the commit all nodes agreed on, aka `last_commit`. at the moment of finalization, nodes on the network will see different sets of >2/3 votes which consist of their local commit for the block, the "canonical commit" is not chosen until the next block is finalized) ## Changes - remove `last_commit` from `SequencerBlockData` - update conductor block verification code to fetch the commit for *that* block from the sequencer and verify it. `last_commit` is no longer used as it is not relevant. ## Testing unit tests ## Breaking Changelist - `SequencerBlockData` no longer contains `last_commit` ## Related Issues closes #401
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
previously, we were storing a block's
last_commitinSequencerBlockDataand verifying it in the conductor. however, we were never doing anything (correctly) with this commit verification - if it failed, we would reject the current block, where we should have rejected the previous. also, we don't want to delay block execution 1 block by waiting for the canonical commit in the next block, as we can retrieve a valid commit for the latest block from our sequencer node the moment the block is finalized.Background
see summary.
also, note that the tendermint latest block is finalized and thus will always have a commit available for it, so this PR changes the verification code in conductor to fetch and use that commit when verifying a block from DA. we don't care if the commit is canonical, as whichever commit we receive will be valid, since the block would not have finalized without it. (canonical meaning the commit all nodes agreed on, aka
last_commit. at the moment of finalization, nodes on the network will see different sets of >2/3 votes which consist of their local commit for the block, the "canonical commit" is not chosen until the next block is finalized)Changes
last_commitfromSequencerBlockDatalast_commitis no longer used as it is not relevant.Testing
unit tests
Breaking Changelist
SequencerBlockDatano longer containslast_commitRelated Issues
closes #401