Skip to content

fix: limit offenses when voting in tally slashing mode by slashMaxPayloadSize#20683

Merged
AztecBot merged 2 commits intomerge-train/spartanfrom
spy/tally-slasher-max-payload
Mar 2, 2026
Merged

fix: limit offenses when voting in tally slashing mode by slashMaxPayloadSize#20683
AztecBot merged 2 commits intomerge-train/spartanfrom
spy/tally-slasher-max-payload

Conversation

@spypsy
Copy link
Member

@spypsy spypsy commented Feb 19, 2026

Fixes A-507

@spypsy spypsy marked this pull request as ready for review February 19, 2026 13:03
@spypsy spypsy marked this pull request as draft February 19, 2026 13:03
@spypsy spypsy marked this pull request as ready for review February 20, 2026 13:03
@AztecBot AztecBot force-pushed the spy/tally-slasher-max-payload branch from eaee53d to 31085e6 Compare February 20, 2026 13:10
@AztecBot AztecBot enabled auto-merge February 20, 2026 13:10
Copy link
Collaborator

@PhilWindle PhilWindle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks ok to me. @spalladino is this approach sufficient to at least fix the bug?

Copy link
Contributor

@spalladino spalladino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heads up we're limiting the total number of offenses here, but IIRC the gas usage when slashing is dominated by the number of slashed parties, not individual offenses. We should trim the list of offenders rather than the list of offenses.

Also, note that here we're trimming the offenses we load from the store, but those then get expanded with always-slash offenses from config, so we could overrun the max size.

I think the right place to truncate is getSlashConsensusVotesFromOffenses, which is called immediately before computing the tally.

Copy link
Contributor

@spalladino spalladino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Just a few nits:

  • Let's keep the return type of getSlashConsensusVotesFromOffenses to be just the votes, but pass a logger so we can log if we truncate. And most importantly, log which ones we truncated.
  • Let's add a unit test where we have multiple offenses for the same validators, to test that we are indeed truncating validators and not offenders.
  • Update the slasher README to reflect that we truncate validator count.

@AztecBot AztecBot merged commit 0207d0a into merge-train/spartan Mar 2, 2026
10 checks passed
@AztecBot AztecBot deleted the spy/tally-slasher-max-payload branch March 2, 2026 20:43
@spalladino
Copy link
Contributor

Welp, got merged anyway.

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
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