Skip to content

op-deployer: genesis-target L1 deployment with offline forge #23305

Closed

Description

@sebastianst

Used by apply --deployment-target genesis, sysgo's genesis stages and op-e2e/config/init.go; externally by kupcake and other dev-genesis users.

  • Add a state-in/state-out hook in a shared deploy-script base, inside runWithBytes: vm.loadAllocs(STATE_IN), reset the sender nonce, vm.dumpState(STATE_OUT), report the sender nonce. One forge process per stage, because forge rejects pranks combined with broadcasts. State files must sit inside the bundle's fs_permissions.
  • Run with --block-number 0 --block-timestamp 0 --sender <deployer>. Carry the sender account (nonce, balance) outside the dump.
  • Run SetPreinstalls via forge. Keep the geth-param request-queue preinstalls, the prefund, the mock SP1 verifier and the seal as Go-side alloc edits.
  • Reproduce Go-host quirks for parity: Permit2 chain ID 1337, the CREATE2 deployer nonce.
  • Differential test: equal L1 state root on reference intents. Then switch all genesis-target users.
  • Optional follow-up: world caching. sysgo pre-seeds a fixed Create2Salt (EnsureCreate2Salt only fills an empty one); cache key = input calldata + bundle hash + forge version. No foundry change needed.

🤖 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