Skip to content

chore: tune mainnet slasher penalties and sequencer allocation - #21451

Merged
alexghr merged 2 commits into
v4from
am/alpha-config
Mar 13, 2026
Merged

alexghr merged 2 commits into
v4from
am/alpha-config

Conversation

@aminsammara

Copy link
Copy Markdown
Contributor

Summary

  • Lower SLASH_INACTIVITY_TARGET_PERCENTAGE from 0.8 to 0.7
  • Disable SLASH_DUPLICATE_PROPOSAL_PENALTY and SLASH_DUPLICATE_ATTESTATION_PENALTY (set to 0)
  • Increase SLASH_GRACE_PERIOD_L2_SLOTS from 1200 to 8400
  • Reduce perBlockAllocationMultiplier from 2 to 1.2

Test plan

  • Verify generated config files are updated after running yarn generate in relevant packages
  • Deploy to devnet/testnet and confirm slasher behavior matches new parameters

Lower inactivity target percentage from 0.8 to 0.7, disable duplicate
proposal and attestation penalties, increase grace period from 1200 to
8400 L2 slots, and reduce per-block allocation multiplier from 2 to 1.2.
@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 Mar 12, 2026
…y_method priority fee (#21458)

## Summary
Fixes test failures in PR #21451 caused by changing
`perBlockAllocationMultiplier` from 2 to 1.2 in
`DefaultSequencerConfig`.

- **sequencer-client.test.ts**: Updated expected values in
`computeBlockLimits` tests to reflect multiplier=1.2 instead of 2.
Multi-block mode now correctly expects `maxL2BlockGas=240_000` (was
400_000), `maxTxsPerBlock=24` (was 40), and corresponding DA gas limits.
- **gossip_network.test.ts**: Added comment explaining the proven block
timeout must exceed one full epoch duration plus proving time.

ClaudeBox log: https://claudebox.work/s/95e2c727bf329f12?run=1
@aminsammara
aminsammara requested a review from spalladino March 12, 2026 23:31
buildCheckpointIfEmpty: false,
publishTxsWithProposals: false,
perBlockAllocationMultiplier: 2,
perBlockAllocationMultiplier: 1.2,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good catch 👍

@alexghr
alexghr changed the base branch from v4 to backport-to-v4-staging March 13, 2026 11:44
@alexghr
alexghr requested a review from charlielye as a code owner March 13, 2026 11:44
@alexghr
alexghr changed the base branch from backport-to-v4-staging to v4 March 13, 2026 11:45
@alexghr
alexghr enabled auto-merge (squash) March 13, 2026 11:45
@alexghr
alexghr merged commit 5bb169c into v4 Mar 13, 2026
13 checks passed
@alexghr
alexghr deleted the am/alpha-config branch March 13, 2026 11:45
aminsammara added a commit that referenced this pull request Jul 20, 2026
## Summary

Restores the mainnet `SLASH_GRACE_PERIOD_L2_SLOTS` default from `1200`
to `8400` slots in `spartan/environments/network-defaults.yml`.

At the mainnet `AZTEC_SLOT_DURATION` of 72s:
- `1200 × 72s = 86,400s` = **exactly 24 hours** (the value v5 shipped
with)
- `8400 × 72s = 604,800s` = **exactly 7 days** (the intended value)

## Why

This value was already raised to 8400 in #21451 ("tune mainnet slasher
penalties and sequencer allocation"), but that commit landed directly on
the v4 release branch and never made it onto `next`. `v5` therefore
inherited the stale 1200 from `next`.

Confirmed by diffing the branches:

| branch | mainnet grace | at 72s slot |
| --- | --- | --- |
| `v4-next` | 8400 | 7 days |
| `next` / `v5-next` / `merge-train/spartan` | 1200 | 24 hours |

## Scope notes

- **Only the `networks.mainnet` preset is changed.** The top-level
`slasher` anchor (`0`) and the `devnet` preset (`0`) are unchanged.
- **`testnet` (64 slots) is deliberately left alone.** `v4-next` has
3600 there, but that value traces back to the original `refactor:
centralize network defaults in YAML` commit on the `next` line rather
than to the lost #21451 change — so it is a separate long-standing
divergence, not part of this regression. Worth a follow-up decision, but
out of scope here.
- No generated files are committed:
`yarn-project/slasher/src/generated/` and the CLI network presets are
gitignored and produced at build time from this YAML.
- Operator docs updated to match (8,400 slots / ~7 days). The
`network_versioned_docs/version-v5.0.1` snapshot is intentionally left
untouched, since it documents what v5.0.1 actually shipped.

## Caveat

This changes a **baked-in default for future builds/deployments**. It
does not retroactively alter the grace period on the already-running v5
network — nodes there need `SLASH_GRACE_PERIOD_L2_SLOTS` set explicitly
or a redeploy.

## Test plan

- [x] YAML parses; mainnet resolves to exactly 7.00 days at a 72s slot
- [x] No test or `spartan/environments/*.env` file pins the old `1200`
value


---
*Created by
[claudebox](https://claudebox.work/v2/sessions/849a625af4f2c309/jobs/1)
· group: `slackbot` · [Slack
thread](https://aztecprotocol.slack.com/archives/C0AU8BULZHC/p1784543473010009?thread_ts=1784543473.010009&cid=C0AU8BULZHC)*
spalladino added a commit that referenced this pull request Jul 23, 2026
Restores the mainnet `SLASH_GRACE_PERIOD_L2_SLOTS` default from `1200`
to `8400` slots in `spartan/environments/network-defaults.yml`.

At the mainnet `AZTEC_SLOT_DURATION` of 72s:
- `1200 × 72s = 86,400s` = **exactly 24 hours** (the value v5 shipped
with)
- `8400 × 72s = 604,800s` = **exactly 7 days** (the intended value)

This value was already raised to 8400 in #21451 ("tune mainnet slasher
penalties and sequencer allocation"), but that commit landed directly on
the v4 release branch and never made it onto `next`. `v5` therefore
inherited the stale 1200 from `next`.

Confirmed by diffing the branches:

| branch | mainnet grace | at 72s slot |
| --- | --- | --- |
| `v4-next` | 8400 | 7 days |
| `next` / `v5-next` / `merge-train/spartan` | 1200 | 24 hours |

- **Only the `networks.mainnet` preset is changed.** The top-level
`slasher` anchor (`0`) and the `devnet` preset (`0`) are unchanged.
- **`testnet` (64 slots) is deliberately left alone.** `v4-next` has
3600 there, but that value traces back to the original `refactor:
centralize network defaults in YAML` commit on the `next` line rather
than to the lost #21451 change — so it is a separate long-standing
divergence, not part of this regression. Worth a follow-up decision, but
out of scope here.
- No generated files are committed:
`yarn-project/slasher/src/generated/` and the CLI network presets are
gitignored and produced at build time from this YAML.
- Operator docs updated to match (8,400 slots / ~7 days). The
`network_versioned_docs/version-v5.0.1` snapshot is intentionally left
untouched, since it documents what v5.0.1 actually shipped.

This changes a **baked-in default for future builds/deployments**. It
does not retroactively alter the grace period on the already-running v5
network — nodes there need `SLASH_GRACE_PERIOD_L2_SLOTS` set explicitly
or a redeploy.

- [x] YAML parses; mainnet resolves to exactly 7.00 days at a 72s slot
- [x] No test or `spartan/environments/*.env` file pins the old `1200`
value

---
*Created by
[claudebox](https://claudebox.work/v2/sessions/849a625af4f2c309/jobs/1)
· group: `slackbot` · [Slack
thread](https://aztecprotocol.slack.com/archives/C0AU8BULZHC/p1784543473010009?thread_ts=1784543473.010009&cid=C0AU8BULZHC)*

(cherry picked from commit 38202d9)

# Conflicts:
#	spartan/environments/network-defaults.yml
rangozd pushed a commit to rangozd/aztec-packages that referenced this pull request Aug 5, 2026
The mainnet SLASH_GRACE_PERIOD_L2_SLOTS default was raised from 1200 to
8400 slots in AztecProtocol#21451, but that commit landed directly on the v4 release
branch and never reached next. v5 therefore inherited the old 1200 slot
(24h at a 72s slot) value.

Restore 8400 slots (7 days) and update the operator docs to match.
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.

4 participants