Skip to content

feat(slasher): add duplicate attestation slashing#20218

Merged
spalladino merged 1 commit intomerge-train/spartanfrom
palla/duplicate-attestation-slashing
Feb 9, 2026
Merged

feat(slasher): add duplicate attestation slashing#20218
spalladino merged 1 commit intomerge-train/spartanfrom
palla/duplicate-attestation-slashing

Conversation

@spalladino
Copy link
Contributor

@spalladino spalladino commented Feb 5, 2026

Summary

  • Implements slashing for validators who send duplicate checkpoint attestations (equivocation): signing attestations for different proposals at the same slot
  • Adds per-signer-per-slot tracking in the attestation pool with a cap of 3 attestations per (slot, signer)
  • Detection callback fires on the first duplicate (count goes from 1 to 2), and duplicates are propagated so other nodes can also detect the offense
  • Equivocation prevention in the validator client: shouldAttestToSlot check inside createCheckpointAttestationsFromProposal to minimize the race window
  • Includes E2E test with malicious proposer nodes that share a key (creating duplicate proposals) and attest to both (creating duplicate attestations)
  • Adds SLASH_DUPLICATE_ATTESTATION_PENALTY env var across all spartan deployment configs

Test plan

  • Unit tests for attestation pool duplicate detection, per-signer cap, cross-slot isolation, and cleanup
  • Unit tests for validator client with updated config
  • LibP2P service tests updated for new constant names
  • E2E test e2e_p2p_duplicate_attestation_slash verifies offense detection end-to-end

Fixes A-349

🤖 Generated with Claude Code

@spalladino spalladino added the ci-no-fail-fast Sets NO_FAIL_FAST in the CI so the run is not aborted on the first failure label Feb 5, 2026
Base automatically changed from palla/duplicate-proposal-slashing to merge-train/spartan February 6, 2026 10:50
Implements slashing for validators who send duplicate checkpoint attestations
(equivocation). Mirrors the duplicate proposal slashing but for attestations:
a validator signing attestations for different proposals at the same slot.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@spalladino spalladino force-pushed the palla/duplicate-attestation-slashing branch from 581c320 to fdb8424 Compare February 6, 2026 11:34
@spalladino spalladino enabled auto-merge (squash) February 6, 2026 12:14
@spalladino spalladino merged commit ae5ab65 into merge-train/spartan Feb 9, 2026
11 checks passed
@spalladino spalladino deleted the palla/duplicate-attestation-slashing branch February 9, 2026 12:43
github-merge-queue bot pushed a commit that referenced this pull request Feb 10, 2026
BEGIN_COMMIT_OVERRIDE
chore: add new retention policy to cloudflare R2 (#20276)
fix: k8s enricher opt-in (#20279)
feat(slasher): add duplicate attestation slashing (#20218)
chore: improve HA e2e (#20280)
chore(test): fix p2p integration test (#20283)
chore(claude): minor changes to claude md and rules (#20284)
chore(test): fix p2p message propagation test build error (#20289)
chore(claude): add actor info to analyze-logs (#20290)
feat: tx file store source for tx collector (#20165)
chore(test): fix validator integration test (#20288)
chore(e2e): remove setup with remote env in e2e tests (#20294)
chore: fix test flakes (#20295)
chore: user-perceived latency explorer (#20298)
fix(p2p): fix flaky file store tx collection tests (#20318)
chore(spartan): add mbps-net env definition (#20308)
fix(validator): do not process proposals from self (#20314)
chore(ci): track history in merge-trains (#20321)
fix(e2e): enable broadcastEquivocatedProposals in duplicate proposal
slash test (#20320)
chore: use respective get endpoints for rollup test instead of only
port-forward (#20327)
END_COMMIT_OVERRIDE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-no-fail-fast Sets NO_FAIL_FAST in the CI so the run is not aborted on the first failure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants