Skip to content

feat(L1): pin proof games to their L2 activation schedule - #384

Merged
PelleKrab merged 1 commit into
mainfrom
proof/pin-game-schedule-to-l2-claim
Jul 28, 2026
Merged

feat(L1): pin proof games to their L2 activation schedule#384
PelleKrab merged 1 commit into
mainfrom
proof/pin-game-schedule-to-l2-claim

Conversation

@PelleKrab

Copy link
Copy Markdown
Contributor

Summary

Pins AggregateVerifier games to the ProtocolVersions schedule active at the claimed L2 block timestamp instead
of the schedule at L1 game creation time.

This makes proof verification independent of when the game is created on L1 and prevents newer schedule
registrations from changing the commitment expected by already-created games.

Changes

  • Add L2 timestamp anchoring to AggregateVerifier

    • stores L2_GENESIS_BLOCK_NUMBER
    • stores L2_GENESIS_TIMESTAMP
    • stores L2_BLOCK_TIME
    • derives the claimed L2 block timestamp during game initialization
    • calls ProtocolVersions.activatedScheduleId(claimTimestamp)
  • Flatten AggregateVerifier.ScheduleConfig

    • includes protocolVersions
    • includes genesis block/timestamp and block time
    • avoids extra constructor args / stack-too-deep while keeping the ABI simpler than nested structs
  • Wire deployment config through SystemDeploy

    • reads optional l2BlockTime, l2GenesisBlockNumber, and l2GenesisTimestamp
    • requires l2BlockTime and l2GenesisTimestamp only when multiproof is enabled
  • Update multiproof dev deploy scripts to require explicit timestamp config.

  • Add explicit timestamp anchors in deploy configs where relevant.

  • Add tests for:

    • schedule pinning by claimed L2 block timestamp
    • activation-boundary behavior
    • invalid zero L2 block time
    • L2 block before genesis
    • L2 timestamp overflow
    • multiproof-disabled deploys allowing unset timestamp config
    • multiproof-enabled deploys rejecting missing genesis timestamp

Validation

forge build

forge test --match-contract '(SystemDeploy|AggregateVerifier|DisputeGameFactory|OptimismPortal2|ProtocolVersions)'

Derive each AggregateVerifier game's schedule commitment from its ending L2 block using the configured genesis timestamp and fixed block time. This removes dependence on proof-generation and game-creation L1 timestamps, while checked timestamp arithmetic and deployment assertions keep the onchain calculation aligned with the rollup configuration.

Co-authored-by: Codex <codex-noreply@coinbase.com>
@PelleKrab
PelleKrab requested a review from jackchuma July 27, 2026 21:37
@cb-heimdall

cb-heimdall commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

✅ Heimdall Review Status

Requirement Status More Info
Reviews 1/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 1
Sum 2

@PelleKrab
PelleKrab merged commit 7b881c3 into main Jul 28, 2026
6 checks passed
@PelleKrab
PelleKrab deleted the proof/pin-game-schedule-to-l2-claim branch July 28, 2026 13:38
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