Skip to content

chore(sequencer): e2e tests for invalid signature recovery in checkpoint attestations#20971

Open
spalladino wants to merge 1 commit intomerge-train/spartanfrom
palla/a-71-invalid-signature-recovery-e2e
Open

chore(sequencer): e2e tests for invalid signature recovery in checkpoint attestations#20971
spalladino wants to merge 1 commit intomerge-train/spartanfrom
palla/a-71-invalid-signature-recovery-e2e

Conversation

@spalladino
Copy link
Contributor

@spalladino spalladino commented Feb 27, 2026

Test that high-s or invalid ECDSA signatures posted by a malicious proposer can be properly invalidated.

Summary

  • Adds e2e tests for A-71: nodes correctly detect and invalidate checkpoints with malleable (high-s) or unrecoverable attestation signatures
  • Adds injectHighSValueAttestation and injectUnrecoverableSignatureAttestation sequencer config options for testing
  • Updates Signature.random() to produce valid ECDSA signatures with low s-values
  • Adds generateRecoverableSignature / generateUnrecoverableSignature utilities with unit tests
  • Adds unit test for high-s value attestation validation in archiver
  • Refactors e2e invalidate block tests with shared helpers to reduce duplication

Fixes A-71

Test plan

  • Two new e2e tests pass: high-s value attestation invalidation, unrecoverable signature invalidation
  • Unit tests pass: Signature.random() validity, generateRecoverableSignature, generateUnrecoverableSignature, high-s validation
  • Existing e2e invalidate block tests unchanged in behavior (refactored with helpers)

🤖 Generated with Claude Code

…nt attestations

Adds end-to-end tests covering A-71: ensuring nodes correctly detect and
invalidate checkpoints with malleable (high-s value) or unrecoverable
attestation signatures. Also refactors the invalidate block test suite to
reduce code duplication via shared helpers.

- Add `injectHighSValueAttestation` and `injectUnrecoverableSignatureAttestation`
  sequencer config options for testing
- Update `Signature.random()` to produce valid ECDSA signatures with low s-values
- Add `generateRecoverableSignature` and `generateUnrecoverableSignature` utilities
- Refactor e2e invalidate block tests with `runDoubleInvalidationTest` and
  `runSingleInvalidationTest` helpers
- Add unit tests for high-s validation, signature utilities, and Signature.random()

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@spalladino spalladino changed the title feat(sequencer): e2e tests for invalid signature recovery in checkpoint attestations chore(sequencer): e2e tests for invalid signature recovery in checkpoint attestations Feb 27, 2026
@AztecBot
Copy link
Collaborator

Flakey Tests

🤖 says: This CI run detected 1 tests that failed, but were tolerated due to a .test_patterns.yml entry.

\033FLAKED\033 (8;;http://ci.aztec-labs.com/b4ef3704b861abd5�b4ef3704b861abd58;;�):  yarn-project/end-to-end/scripts/run_test.sh simple src/e2e_epochs/epochs_invalidate_block.parallel.test.ts "proposer invalidates previous block with shuffled attestations" (189s) (code: 0) group:e2e-p2p-epoch-flakes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants