test: add test vectors for verifying multi message proofs#810
Merged
tcoratger merged 3 commits intoJun 1, 2026
Merged
Conversation
3 tasks
Mirror the single-message fixture for the Type-2 multi-message aggregate primitive: per-component validator lists, per-component attestation data, emitted parallel lists of messages, slots, public keys, and aggregation bits, plus the merged proof bytes. Three tampers target one component at a time: - RebindComponentToAlternateHeadRoot regenerates one component against an alternate head root and re-merges, so the emitted layout stays honest but the merged proof bytes carry the off-target binding. - IncrementComponentSlot bumps one component's emitted slot past its bound slot. - SwapComponentParticipantPublicKey swaps one participant's key for another validator's, breaking the layout the merged proof verifies against.
Three positive vectors covering two- and three-component bundles with single-, four-, and mixed-sized participant lists; three rejection vectors covering wrong message, wrong slot, and wrong public key applied to one component at a time.
… the verify ladder Add the failure modes that only a multi-message (Type-2) proof can suffer, which the initial vector set did not reach: - SwapComponentMessageBindings transposes two components' emitted message-slot bindings after an honest merge, with distinct head roots per component, so each component's proof faces the other's binding. This is the canonical Type-2 attack the positional binding exists to reject. - DropComponentMessageBinding removes one component's binding while keeping its keys, exercising the verifier's binding-count guard. Add two valid vectors for parity with the single-message suite: a single component bundle (the n=1 boundary) and a non-contiguous committee whose aggregation bits resolve to [1, 0, 1, 1]. Factor the identical expectation-comparison ladder into BaseConsensusFixture.assert_expected_outcome and reuse it from both verify fixtures. Hoist the repeated component-index range check into a helper, and guard the slot-increment tamper against landing on a neighbour's slot. Inline the per-test attestation data to match the single-message sibling files, rename the ambiguous swap field to participant_index, and correct the union docstring. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
676623d to
f06601e
Compare
tcoratger
approved these changes
Jun 1, 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.
🗒️ Description
Add test vectors for verifying multi message proofs for various basic scenarios like 2 attestations from different slots and mixed attester sizes
🔗 Related Issues or PRs
Follows #786