feat: Archiver does not sync blocks with invalid attestations#15896
Merged
spalladino merged 3 commits intonextfrom Jul 29, 2025
Merged
feat: Archiver does not sync blocks with invalid attestations#15896spalladino merged 3 commits intonextfrom
spalladino merged 3 commits intonextfrom
Conversation
940acfd to
13b1036
Compare
2b10c89 to
c35f762
Compare
941beed to
4119d4c
Compare
97e4074 to
dd1e4ee
Compare
PhilWindle
reviewed
Jul 29, 2025
| } | ||
|
|
||
| const committeeSet = new Set(committee.map(member => member.toString())); | ||
| const requiredAttestationCount = Math.floor((committee.length * 2) / 3) + 1; |
Collaborator
There was a problem hiding this comment.
Is this 2 thirds configured on the contract somewhere? Should we read it rather than hard-code?
Contributor
Author
There was a problem hiding this comment.
It's hardcoded in the contract as well
PhilWindle
reviewed
Jul 29, 2025
| } | ||
|
|
||
| rollupStatus.lastBlockIsInvalid = false; | ||
| validBlocks.push(block); |
Collaborator
There was a problem hiding this comment.
I was going to ask why we sync blocks after an invalid one. But then I saw the comment that we will fix that in a follow up PR.
Contributor
Author
There was a problem hiding this comment.
Reason for syncing valid blocks after an invalid one is because we expect the valid block to be built following the last valid one. What remains to be fixed in a future PR is syncing an invalid block if it fits the criteria for it (a descendant block must be attested and proven).
PhilWindle
approved these changes
Jul 29, 2025
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
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.
Archiver now checks committee attestations and refuses to sync a block if it does not pass validation.
Note that this addresses scenarios where the proposer is malicious, but does not handle cases where the entire committee is and produces signatures for a block with an unattested parent. That'll be left for a future PR.
Builds on #15813