Skip to content

test(e2e): assert no equivocation offenses in HA full test#23496

Merged
spalladino merged 1 commit into
merge-train/spartanfrom
spl/fix-ha-full-equivocation-check
May 22, 2026
Merged

test(e2e): assert no equivocation offenses in HA full test#23496
spalladino merged 1 commit into
merge-train/spartanfrom
spl/fix-ha-full-equivocation-check

Conversation

@spalladino
Copy link
Copy Markdown
Contributor

Motivation

The HA full test failed in CI (20d38a958c951a40) on expect(p2pAttestationsWithSignatures.length).toBeGreaterThan(0). The P2P attestation pool is not a durable record of past-slot attestations under pipelining: the validator rejects late arrivals (slot not in current/next or pipelining window) and the pool prunes via deleteOlderThan on every finalization. By the time the test loop reaches the assertion, attestations for earlier slots have either been rejected or pruned.

Approach

Replace the pool-content assertion with a query of the gossip-detected equivocation offenses tracked by each node's slasher. The pipeline is libp2p_service::duplicateAttestationCallbackvalidator-client::handleDuplicateAttestationWANT_TO_SLASH_EVENTSlashOffensesCollector → offenses store → node.getSlashOffenses('all'). The last-surviving HA node observed every gossiped attestation, so a single query covers all slots. This matches the pattern in epochs_equivocation.test.ts.

Changes

  • end-to-end (test): Drop the racy P2P pool check; add a global assertion that no DUPLICATE_ATTESTATION or DUPLICATE_PROPOSAL offense was collected by any active HA node.
  • .test_patterns.yml: Flag the test as a flake on the specific failure regex.

The P2P attestation pool is not a durable record of past-slot attestations
under pipelining: the validator rejects late arrivals and the pool prunes on
finalization. Replace the racy pool-content assertion with a query of the
gossip-detected DUPLICATE_ATTESTATION/DUPLICATE_PROPOSAL offenses tracked by
each node's slasher, which is the canonical signal that the HA slashing
protection failed.

Also flag the test as a flake on its specific failure regex.
@spalladino spalladino force-pushed the spl/fix-ha-full-equivocation-check branch from 53b7caf to 035ac6a Compare May 22, 2026 12:28
@spalladino spalladino enabled auto-merge (squash) May 22, 2026 12:28
@spalladino spalladino requested a review from spypsy May 22, 2026 12:29
@PhilWindle PhilWindle disabled auto-merge May 22, 2026 12:51
@AztecBot
Copy link
Copy Markdown
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/5a80d056b4f64739�5a80d056b4f647398;;�): yarn-project/end-to-end/scripts/run_test.sh ha src/composed/ha/e2e_ha_full.test.ts (235s) (code: 0)

@spalladino spalladino merged commit a5e3879 into merge-train/spartan May 22, 2026
14 checks passed
@spalladino spalladino deleted the spl/fix-ha-full-equivocation-check branch May 22, 2026 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants