Skip to content

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

Merged
spalladino merged 1 commit intomerge-train/spartanfrom
palla/a-71-invalid-signature-recovery-e2e
Mar 2, 2026
Merged

chore(sequencer): e2e tests for invalid signature recovery in checkpoint attestations#20971
spalladino merged 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

@spalladino spalladino merged commit f2355d9 into merge-train/spartan Mar 2, 2026
22 of 26 checks passed
@spalladino spalladino deleted the palla/a-71-invalid-signature-recovery-e2e branch March 2, 2026 14:22
AztecBot pushed a commit that referenced this pull request Mar 2, 2026
…int attestations (#20971)

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
- [x] Two new e2e tests pass: high-s value attestation invalidation, unrecoverable signature invalidation
- [x] Unit tests pass: `Signature.random()` validity, `generateRecoverableSignature`, `generateUnrecoverableSignature`, high-s validation
- [x] Existing e2e invalidate block tests unchanged in behavior (refactored with helpers)

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@AztecBot
Copy link
Collaborator

AztecBot commented Mar 2, 2026

✅ Successfully backported to backport-to-v4-staging #20980.

github-merge-queue bot pushed a commit that referenced this pull request Mar 3, 2026
BEGIN_COMMIT_OVERRIDE
fix: track last seen nonce in case of stale fallback L1 RPC node
(#20855)
feat: Validate num txs in block proposals (#20850)
fix(archiver): enforce checkpoint boundary on rollbackTo (#20908)
fix: tps zero metrics (#20656)
fix: handle scientific notation in bigintConfigHelper (#20929)
feat(aztec): node enters standby mode on genesis root mismatch (#20938)
fix: logging of class instances (#20807)
feat(slasher): make slash grace period relative to rollup upgrade time
(#20942)
chore: add script to find PRs to backport (#20956)
chore: remove unused prover-node dep (#20955)
fix: increase minFeePadding in e2e_bot bridge resume tests and harden
GasFees.mul() (#20962)
feat(sequencer): (A-526) rotate publishers when send fails (#20888)
chore: (A-554) bump reth version 1.6.0 -> 1.11.1 for eth devnet (#20889)
chore: metric on how many epochs validator has been on committee
(#20967)
fix: set wallet minFeePadding in BotFactory constructor (#20992)
chore: deflake epoch invalidate block test (#21001)
chore(sequencer): e2e tests for invalid signature recovery in checkpoint
attestations (#20971)
chore: deflake duplicate proposals and attestations (#20990)
chore: deflake epochs mbps test (#21003)
feat: reenable function selectors in txPublicSetupAllowList (#20909)
fix: limit offenses when voting in tally slashing mode by
slashMaxPayloadSize (#20683)
fix(spartan): wire SEQ_L1_PUBLISHING_TIME_ALLOWANCE_IN_SLOT env var
(#21017)
END_COMMIT_OVERRIDE
ludamad added a commit that referenced this pull request Mar 3, 2026
BEGIN_COMMIT_OVERRIDE
fix(aztec-nr): account for AES PKCS#7 padding in message plaintext
length (#20840)
feat: remove epk sign from message payload (#20926)
chore: increase mainnet local ejection threshold to 190k (#20884)
feat: add pinned-build support for protocol contracts in noir-contracts
(v4) (#20982)
fix!: undo bad fix (#20987)
chore: backport #20967 to v4 (metric on how many epochs validator has
been on committee) (#20989)
chore(sequencer): e2e tests for invalid signature recovery in checkpoint
attestations (#20971)
feat: allow custom addresses to be prefunded with fee juice in local
network (backport #21000) (#21004)
chore: increase max fee bots use in tests (#20867)
END_COMMIT_OVERRIDE
johnathan79717 pushed a commit that referenced this pull request Mar 4, 2026
…int attestations (#20971)

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
- [x] Two new e2e tests pass: high-s value attestation invalidation,
unrecoverable signature invalidation
- [x] Unit tests pass: `Signature.random()` validity,
`generateRecoverableSignature`, `generateUnrecoverableSignature`, high-s
validation
- [x] Existing e2e invalidate block tests unchanged in behavior
(refactored with helpers)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
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.

3 participants