Skip to content

chore(spartan): restore 7 day mainnet slash grace period (backport #24804) - #24808

Merged
aminsammara merged 1 commit into
backport-to-v5-next-stagingfrom
cb/backport-24804-v5-next
Jul 20, 2026
Merged

chore(spartan): restore 7 day mainnet slash grace period (backport #24804)#24808
aminsammara merged 1 commit into
backport-to-v5-next-stagingfrom
cb/backport-24804-v5-next

Conversation

@AztecBot

Copy link
Copy Markdown
Collaborator

Summary

Backport of #24804 to v5-next via backport-to-v5-next-staging.

Restores the mainnet SLASH_GRACE_PERIOD_L2_SLOTS default from 1200 to 8400 slots and updates the operator slashing docs to describe the 7-day grace period.

Conflict resolution

The automatic cherry-pick conflicted in:

  • spartan/environments/network-defaults.yml
  • docs/docs-operate/operators/sequencer-management/slashing-configuration.md

Resolved by keeping the v5 branch's surrounding slashing/defaults context and applying only the intended grace-period value and docs wording from the source PR.

Tests

  • yq '.networks.mainnet.SLASH_GRACE_PERIOD_L2_SLOTS' spartan/environments/network-defaults.yml
  • slots=$(yq '.networks.mainnet.SLASH_GRACE_PERIOD_L2_SLOTS' spartan/environments/network-defaults.yml) && slot_duration=$(yq '.networks.mainnet.AZTEC_SLOT_DURATION' spartan/environments/network-defaults.yml) && test "$slots" = 8400 && test "$slot_duration" = 72 && test $((slots * slot_duration)) -eq 604800
  • rg -n 'SLASH_GRACE_PERIOD_L2_SLOTS[:=] ?1200|First 1,200|First 128 slots|1,200 slots' spartan/environments docs/docs-operate (no matches)
  • git diff --check origin/backport-to-v5-next-staging...HEAD

Created by claudebox · group: slackbot · Slack thread

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)*
@AztecBot AztecBot added backport-to-v5-next ci-draft Run CI on draft PRs. ci-no-fail-fast Sets NO_FAIL_FAST in the CI so the run is not aborted on the first failure claudebox Owned by claudebox. it can push to this PR. labels Jul 20, 2026
@aminsammara
aminsammara marked this pull request as ready for review July 20, 2026 12:54
@aminsammara
aminsammara merged commit a6d1b76 into backport-to-v5-next-staging Jul 20, 2026
47 of 51 checks passed
@aminsammara
aminsammara deleted the cb/backport-24804-v5-next branch July 20, 2026 13:06
@AztecBot

Copy link
Copy Markdown
Collaborator Author

❌ Failed to cherry-pick to v5-next due to conflicts. (🤖) View backport run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-to-v5-next ci-draft Run CI on draft PRs. ci-no-fail-fast Sets NO_FAIL_FAST in the CI so the run is not aborted on the first failure claudebox Owned by claudebox. it can push to this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants