Skip to content

fix: reject aztecSlotDuration not a multiple of ethereumSlotDuration#24481

Merged
spalladino merged 1 commit into
merge-train/spartan-v5from
spl/validate-slot-duration-multiple
Jul 6, 2026
Merged

fix: reject aztecSlotDuration not a multiple of ethereumSlotDuration#24481
spalladino merged 1 commit into
merge-train/spartan-v5from
spl/validate-slot-duration-multiple

Conversation

@spalladino

Copy link
Copy Markdown
Contributor

L2 slot boundaries must land on L1 slot boundaries, but nothing enforced this at runtime. A check for exactly this relationship already existed (validateNetworkConsensusConfig in stdlib), but it was only exercised by a CLI unit test gating the three static mainnet/testnet/devnet config files — never wired into e2e test setup or the L1-contract deployment path itself.

Approach

  • Add validateSlotDurations/assertValidSlotDurations to ethereum/src/config.ts and call it from deployAztecL1Contracts, the shared choke point used by e2e tests, spartan deployments, and CLI deploys, so a bad pairing now fails fast with a clear error.
  • Refactor validateNetworkConsensusConfig to reuse the shared check instead of duplicating it.
  • Fix the three e2e configs this caught: all paired aztecSlotDuration: 36 with ethereumSlotDuration: 8 (4.5 L1 slots per L2 slot). Corrected to ethereumSlotDuration: 12, matching the 36s/12s convention already used elsewhere in the same test suites.

@spalladino spalladino enabled auto-merge (squash) July 6, 2026 11:51
@spalladino spalladino force-pushed the spl/validate-slot-duration-multiple branch from cfc3468 to 2d4e048 Compare July 6, 2026 11:58
L2 slot boundaries must land on L1 slot boundaries, but nothing enforced
this — the one existing check only gated the three static mainnet/
testnet/devnet config files. Add assertValidSlotDurations and call it
from deployAztecL1Contracts, the shared choke point for e2e tests,
spartan deployments, and CLI deploys.

Fixes three e2e configs that paired aztecSlotDuration: 36 with
ethereumSlotDuration: 8 (4.5 L1 slots per L2 slot).
@spalladino spalladino force-pushed the spl/validate-slot-duration-multiple branch from 2d4e048 to 8311837 Compare July 6, 2026 12:24
@spalladino spalladino merged commit a8cfa93 into merge-train/spartan-v5 Jul 6, 2026
12 checks passed
@spalladino spalladino deleted the spl/validate-slot-duration-multiple branch July 6, 2026 12:41
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.

3 participants