Test/stf block max attestations#605
Merged
tcoratger merged 6 commits intoleanEthereum:mainfrom Apr 14, 2026
Merged
Conversation
Collaborator
|
@morelucks Looks like we have a bunch of failures, can you check? |
Contributor
Author
|
@tcoratger on it |
dbc1232 to
b83663a
Compare
Add fork choice fillers testing the MAX_ATTESTATIONS_DATA boundary. - test_block_with_maximum_attestations: block at the exact limit is accepted - test_block_exceeding_maximum_attestations_is_rejected: block with one extra entry is rejected by Store.on_block The limit is enforced in the fork choice layer (Store.on_block), so both tests live as fork choice fillers rather than state transition tests. To support the rejection test, extend build_signed_block_with_store to handle forced_attestations — entries that bypass the block builder's MAX cap but carry valid signatures and state root. Closes leanEthereum#573 Co-Authored-By: morelucks <morelucks@users.noreply.github.com> Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
b83663a to
19d5ef5
Compare
tcoratger
approved these changes
Apr 14, 2026
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.
closes #573
This PR implements a new state transition test case test_block_with_maximum_attestations to verify that the consensus implementation correctly handles blocks containing the maximum allowed number of distinct AttestationData entries (
MAX_ATTESTATIONS_DATA = 16).Context
Verifying the state transition function's behavior at maximum capacity is critical for ensuring robustness against buffer overflows, incorrect iteration, and state tracking limits. This test specifically exercises the multi-stage justification tracking mechanism in the State.
Changes
Verification
The test was verified using the
filltool: