Skip to content

op-deployer: generate L2 genesis with forge #23304

Closed

Description

@sebastianst

GenerateL2Genesis always uses the Go host. It runs for every apply target and for prepare.

  • Add a dump wrapper around L2Genesis.s.sol (run(input), etch the script away, vm.dumpState) or a runWithBytes hook. Run it offline from the L2 bundle (a separate forge client when the L1 and L2 locators differ).
  • Go side: wipe the deployer, drop zero storage slots, normalise empty code, keep CheckL2GenesisAllocs.
  • Differential test: forge vs Go host, equal state roots on reference intents (standard, interop, alt-fee configs). Reproduce the deployer wipe (the deployer is also dev account 0).
  • Flip GenerateL2Genesis to forge.

🤖 Co-created with Claude Opus 5.5

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions