From e20f8d71953950bc6da4823e6ba097dfb78e73dc Mon Sep 17 00:00:00 2001 From: Rayyan Alam Date: Wed, 24 Jun 2026 12:09:32 -0400 Subject: [PATCH 1/6] feat: add zeronet system deploy task Adds a new task folder for deploying the full L1 system on zeronet using SystemDeploy.s.sol from the sibling contracts repo. Generated with Claude Code Co-Authored-By: Claude --- zeronet/2026-06-24-system-deploy/Makefile | 32 ++++++++++++ zeronet/2026-06-24-system-deploy/README.md | 50 +++++++++++++++++++ .../deploy-config/zeronet.json | 44 ++++++++++++++++ 3 files changed, 126 insertions(+) create mode 100644 zeronet/2026-06-24-system-deploy/Makefile create mode 100644 zeronet/2026-06-24-system-deploy/README.md create mode 100644 zeronet/2026-06-24-system-deploy/deploy-config/zeronet.json diff --git a/zeronet/2026-06-24-system-deploy/Makefile b/zeronet/2026-06-24-system-deploy/Makefile new file mode 100644 index 00000000..43f05503 --- /dev/null +++ b/zeronet/2026-06-24-system-deploy/Makefile @@ -0,0 +1,32 @@ +include ../../Makefile +include ../../Multisig.mk +include ../.env + +CONTRACTS_REPO := $(abspath ../../../contracts) +TASK_DIR := $(abspath .) +DEPLOY_SCRIPT := scripts/deploy/SystemDeploy.s.sol:SystemDeploy +SALT_MIXER ?= salt mixer + +## +# Simulation (no broadcast) +## +.PHONY: simulate +simulate: + cd $(CONTRACTS_REPO) && \ + DEPLOY_CONFIG_PATH=$(TASK_DIR)/deploy-config/zeronet.json \ + SALT_MIXER="$(SALT_MIXER)" \ + $(MISE_EXEC) forge script -vvvv $(DEPLOY_SCRIPT) \ + --rpc-url $(L1_RPC_URL) + +## +# Deployment (broadcast via Ledger) +## +.PHONY: deploy +deploy: + cd $(CONTRACTS_REPO) && \ + DEPLOY_CONFIG_PATH=$(TASK_DIR)/deploy-config/zeronet.json \ + SALT_MIXER="$(SALT_MIXER)" \ + $(MISE_EXEC) forge script -vvvv $(DEPLOY_SCRIPT) \ + --rpc-url $(L1_RPC_URL) \ + --broadcast \ + --ledger --hd-paths $(LEDGER_HD_PATH) diff --git a/zeronet/2026-06-24-system-deploy/README.md b/zeronet/2026-06-24-system-deploy/README.md new file mode 100644 index 00000000..77dd7ee9 --- /dev/null +++ b/zeronet/2026-06-24-system-deploy/README.md @@ -0,0 +1,50 @@ +# zeronet system deploy + +Full L1 system deployment on zeronet using `SystemDeploy.s.sol` from the sibling `contracts/` repo. + +## Prerequisites + +Fill in all `"TODO"` placeholders in `deploy-config/zeronet.json` before running: + +| Field | How to obtain | +|---|---| +| `finalSystemOwner` | Confirm with team (likely `PROXY_ADMIN_OWNER` or `CB_MULTISIG`) | +| `superchainConfigGuardian` | Confirm with team | +| `p2pSequencerAddress` | Check zeronet node config | +| `sp1Verifier` | Confirm verifier contract address | +| `baseFeeVaultRecipient` / `l1FeeVaultRecipient` / etc. | Confirm fee recipient addresses | +| `operatorFeeVaultRecipient` / `sequencerFeeVaultRecipient` | Confirm fee recipient addresses | +| `l2OutputOracleStartingTimestamp` | Genesis timestamp from chain config | +| `multiproofConfigHash` | Compute from multiproof config | +| `multiproofGenesisOutputRoot` | Fetch from chain at genesis block | +| `zkRangeHash` | `cast call "zkRangeHash()(bytes32)" --rpc-url ` | +| `zkAggregationHash` | `cast call "zkAggregationHash()(bytes32)" --rpc-url ` | + +Active AggregateVerifier on zeronet: check `zeronet/.env` or existing task outputs. + +## Steps + +### 1. Simulate (no broadcast) + +```sh +make simulate +``` + +Runs the deployment script against the live L1 RPC without broadcasting any transactions. Use this to validate configuration before spending gas. + +### 2. Deploy (broadcast via Ledger) + +```sh +make deploy +``` + +Broadcasts all transactions. Requires a Ledger connected and unlocked at account index `LEDGER_ACCOUNT` (set in `zeronet/.env`). + +## Output + +Broadcast records are written by Foundry to the contracts repo under: +``` +contracts/broadcast/SystemDeploy.s.sol//run-latest.json +``` + +Record deployed contract addresses from there and update `zeronet/.env` as needed. diff --git a/zeronet/2026-06-24-system-deploy/deploy-config/zeronet.json b/zeronet/2026-06-24-system-deploy/deploy-config/zeronet.json new file mode 100644 index 00000000..7d5a4bd7 --- /dev/null +++ b/zeronet/2026-06-24-system-deploy/deploy-config/zeronet.json @@ -0,0 +1,44 @@ +{ + "baseFeeVaultMinimumWithdrawalAmount": "0x8ac7230489e80000", + "baseFeeVaultRecipient": "TODO", + "baseFeeVaultWithdrawalNetwork": 0, + "batchSenderAddress": "0x4C810feC547F6C143dB51953af51A1De79BEAD21", + "disputeGameFinalityDelaySeconds": 302400, + "delayedWETHWithdrawalDelay": 604800, + "finalSystemOwner": "TODO", + "gasPriceOracleBaseFeeScalar": 1368, + "gasPriceOracleBlobBaseFeeScalar": 810949, + "l1ChainId": 560048, + "l1FeeVaultMinimumWithdrawalAmount": "0x8ac7230489e80000", + "l1FeeVaultRecipient": "TODO", + "l1FeeVaultWithdrawalNetwork": 0, + "l2ChainId": 763360, + "l2GenesisBlockGasLimit": "0x1c9c380", + "l2OutputOracleStartingBlockNumber": 0, + "l2OutputOracleStartingTimestamp": 0, + "multiproofBlockInterval": 600, + "multiproofConfigHash": "TODO", + "multiproofGameType": 621, + "multiproofGenesisBlockNumber": 0, + "multiproofGenesisOutputRoot": "TODO", + "multiproofIntermediateBlockInterval": 30, + "nitroEnclaveVerifier": "0x4e3E30E148E803667913bE97A8ce9EBA39b65563", + "operatorFeeVaultMinimumWithdrawalAmount": "0x8ac7230489e80000", + "operatorFeeVaultRecipient": "TODO", + "operatorFeeVaultWithdrawalNetwork": 0, + "p2pSequencerAddress": "TODO", + "proofMaturityDelaySeconds": 604800, + "proxyAdminOwner": "0x3d59999977e0896ee1f8783bb8251df16fb483e9", + "respectedGameType": 621, + "sequencerFeeVaultMinimumWithdrawalAmount": "0x8ac7230489e80000", + "sequencerFeeVaultRecipient": "TODO", + "sequencerFeeVaultWithdrawalNetwork": 0, + "sp1Verifier": "TODO", + "superchainConfigGuardian": "TODO", + "superchainConfigIncidentResponder": "0x856611ed7e07d83243b15e93f6321f2df6865852", + "teeChallenger": "0xad3b1402b3ec6a23c3913258d3811f132e7e35e0", + "teeImageHash": "0x0f4c9f7b78162181ab5091680885fd8b657d67dd5aa4a466c78dbf3763ffcfab", + "teeProposer": "0x5679a6b3817a014d6f3dcd64569d6858f4e92f5e", + "zkAggregationHash": "TODO", + "zkRangeHash": "TODO" +} From abbfed2212ec50d15d64386d14a40cf073e088c6 Mon Sep 17 00:00:00 2001 From: Rayyan Alam Date: Wed, 24 Jun 2026 12:20:59 -0400 Subject: [PATCH 2/6] chore: fill in zeronet deploy config fields from .env Populates previously TODO fields using existing zeronet/.env values: - finalSystemOwner <- PROXY_ADMIN_OWNER - superchainConfigGuardian <- CB_MULTISIG - sp1Verifier <- RISC_ZERO_SET_VERIFIER - fee vault recipients <- CB_MULTISIG (all four) Still TODO: p2pSequencerAddress, zkRangeHash, zkAggregationHash, multiproofConfigHash, multiproofGenesisOutputRoot Generated with Claude Code Co-Authored-By: Claude --- .../deploy-config/zeronet.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/zeronet/2026-06-24-system-deploy/deploy-config/zeronet.json b/zeronet/2026-06-24-system-deploy/deploy-config/zeronet.json index 7d5a4bd7..404b689b 100644 --- a/zeronet/2026-06-24-system-deploy/deploy-config/zeronet.json +++ b/zeronet/2026-06-24-system-deploy/deploy-config/zeronet.json @@ -1,16 +1,16 @@ { "baseFeeVaultMinimumWithdrawalAmount": "0x8ac7230489e80000", - "baseFeeVaultRecipient": "TODO", + "baseFeeVaultRecipient": "0x856611ed7e07d83243b15e93f6321f2df6865852", "baseFeeVaultWithdrawalNetwork": 0, "batchSenderAddress": "0x4C810feC547F6C143dB51953af51A1De79BEAD21", "disputeGameFinalityDelaySeconds": 302400, "delayedWETHWithdrawalDelay": 604800, - "finalSystemOwner": "TODO", + "finalSystemOwner": "0x3d59999977e0896ee1f8783bb8251df16fb483e9", "gasPriceOracleBaseFeeScalar": 1368, "gasPriceOracleBlobBaseFeeScalar": 810949, "l1ChainId": 560048, "l1FeeVaultMinimumWithdrawalAmount": "0x8ac7230489e80000", - "l1FeeVaultRecipient": "TODO", + "l1FeeVaultRecipient": "0x856611ed7e07d83243b15e93f6321f2df6865852", "l1FeeVaultWithdrawalNetwork": 0, "l2ChainId": 763360, "l2GenesisBlockGasLimit": "0x1c9c380", @@ -24,17 +24,17 @@ "multiproofIntermediateBlockInterval": 30, "nitroEnclaveVerifier": "0x4e3E30E148E803667913bE97A8ce9EBA39b65563", "operatorFeeVaultMinimumWithdrawalAmount": "0x8ac7230489e80000", - "operatorFeeVaultRecipient": "TODO", + "operatorFeeVaultRecipient": "0x856611ed7e07d83243b15e93f6321f2df6865852", "operatorFeeVaultWithdrawalNetwork": 0, "p2pSequencerAddress": "TODO", "proofMaturityDelaySeconds": 604800, "proxyAdminOwner": "0x3d59999977e0896ee1f8783bb8251df16fb483e9", "respectedGameType": 621, "sequencerFeeVaultMinimumWithdrawalAmount": "0x8ac7230489e80000", - "sequencerFeeVaultRecipient": "TODO", + "sequencerFeeVaultRecipient": "0x856611ed7e07d83243b15e93f6321f2df6865852", "sequencerFeeVaultWithdrawalNetwork": 0, - "sp1Verifier": "TODO", - "superchainConfigGuardian": "TODO", + "sp1Verifier": "0x5492E1ecd7867AeAd78464EbD5def30F96d462ba", + "superchainConfigGuardian": "0x856611ed7e07d83243b15e93f6321f2df6865852", "superchainConfigIncidentResponder": "0x856611ed7e07d83243b15e93f6321f2df6865852", "teeChallenger": "0xad3b1402b3ec6a23c3913258d3811f132e7e35e0", "teeImageHash": "0x0f4c9f7b78162181ab5091680885fd8b657d67dd5aa4a466c78dbf3763ffcfab", From 4bcdeda0de7101e7a00888d790de9c27300e0b8f Mon Sep 17 00:00:00 2001 From: Rayyan Alam Date: Wed, 24 Jun 2026 12:35:28 -0400 Subject: [PATCH 3/6] chore: fill remaining deploy config fields from current zeronet state Populates TODO fields using values from the most recently executed tasks: - zkRangeHash / zkAggregationHash <- 2026-06-13-upgrade-zk-and-tee-hash - multiproofConfigHash <- 2026-04-01-activate-multiproof (CONFIG_HASH) - multiproofGenesisOutputRoot / multiproofGenesisBlockNumber <- most recent anchor reset (2026-06-13) Only remaining TODO: p2pSequencerAddress (not present in any task file) Generated with Claude Code Co-Authored-By: Claude --- .../deploy-config/zeronet.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/zeronet/2026-06-24-system-deploy/deploy-config/zeronet.json b/zeronet/2026-06-24-system-deploy/deploy-config/zeronet.json index 404b689b..28534153 100644 --- a/zeronet/2026-06-24-system-deploy/deploy-config/zeronet.json +++ b/zeronet/2026-06-24-system-deploy/deploy-config/zeronet.json @@ -17,10 +17,10 @@ "l2OutputOracleStartingBlockNumber": 0, "l2OutputOracleStartingTimestamp": 0, "multiproofBlockInterval": 600, - "multiproofConfigHash": "TODO", + "multiproofConfigHash": "0xab64b3118d2d030a3fd3fe3005239a2f332e48848bbedddca9e10df77ac7303e", "multiproofGameType": 621, - "multiproofGenesisBlockNumber": 0, - "multiproofGenesisOutputRoot": "TODO", + "multiproofGenesisBlockNumber": 3792549, + "multiproofGenesisOutputRoot": "0x11eac1622a097a1cb3ca9db19ec1552113836e5905620a73cebb9e5adc8b415d", "multiproofIntermediateBlockInterval": 30, "nitroEnclaveVerifier": "0x4e3E30E148E803667913bE97A8ce9EBA39b65563", "operatorFeeVaultMinimumWithdrawalAmount": "0x8ac7230489e80000", @@ -39,6 +39,6 @@ "teeChallenger": "0xad3b1402b3ec6a23c3913258d3811f132e7e35e0", "teeImageHash": "0x0f4c9f7b78162181ab5091680885fd8b657d67dd5aa4a466c78dbf3763ffcfab", "teeProposer": "0x5679a6b3817a014d6f3dcd64569d6858f4e92f5e", - "zkAggregationHash": "TODO", - "zkRangeHash": "TODO" + "zkAggregationHash": "0x0079eb47fae3287155f38d8733a2f809fcbb28da00063330d3db126a0fb0f274", + "zkRangeHash": "0x0d561a5146c64c983616b7433ad3a4244298c85f27b724d239167ffb1720c160" } From 986204d01bb0dc70a9dce5e795789f1d6374b80a Mon Sep 17 00:00:00 2001 From: Rayyan Alam Date: Wed, 24 Jun 2026 12:40:56 -0400 Subject: [PATCH 4/6] chore: reset genesis anchor values for fresh zeronet regenesis Starting from scratch on Hoodi L1, so multiproofGenesisBlockNumber resets to 0. multiproofGenesisOutputRoot needs to be filled with the actual L2 genesis output root once op-node genesis is created. Generated with Claude Code Co-Authored-By: Claude --- zeronet/2026-06-24-system-deploy/deploy-config/zeronet.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zeronet/2026-06-24-system-deploy/deploy-config/zeronet.json b/zeronet/2026-06-24-system-deploy/deploy-config/zeronet.json index 28534153..0f3b9a6e 100644 --- a/zeronet/2026-06-24-system-deploy/deploy-config/zeronet.json +++ b/zeronet/2026-06-24-system-deploy/deploy-config/zeronet.json @@ -19,8 +19,8 @@ "multiproofBlockInterval": 600, "multiproofConfigHash": "0xab64b3118d2d030a3fd3fe3005239a2f332e48848bbedddca9e10df77ac7303e", "multiproofGameType": 621, - "multiproofGenesisBlockNumber": 3792549, - "multiproofGenesisOutputRoot": "0x11eac1622a097a1cb3ca9db19ec1552113836e5905620a73cebb9e5adc8b415d", + "multiproofGenesisBlockNumber": 0, + "multiproofGenesisOutputRoot": "TODO", "multiproofIntermediateBlockInterval": 30, "nitroEnclaveVerifier": "0x4e3E30E148E803667913bE97A8ce9EBA39b65563", "operatorFeeVaultMinimumWithdrawalAmount": "0x8ac7230489e80000", From 3165a5b99a01c55b518c20c91c995deca4537ba5 Mon Sep 17 00:00:00 2001 From: Rayyan Alam Date: Wed, 24 Jun 2026 12:55:40 -0400 Subject: [PATCH 5/6] chore: set genesis anchor to current finalized block + refresh instructions Sets multiproofGenesisBlockNumber/OutputRoot to current zeronet finalized state (block 4179448). These values must be refreshed to a recent block immediately before deploying since the proof node only retains recent history. README now includes the cast commands to fetch fresh values. Generated with Claude Code Co-Authored-By: Claude --- zeronet/2026-06-24-system-deploy/README.md | 45 ++++++------------- .../deploy-config/zeronet.json | 4 +- 2 files changed, 15 insertions(+), 34 deletions(-) diff --git a/zeronet/2026-06-24-system-deploy/README.md b/zeronet/2026-06-24-system-deploy/README.md index 77dd7ee9..05dcbc52 100644 --- a/zeronet/2026-06-24-system-deploy/README.md +++ b/zeronet/2026-06-24-system-deploy/README.md @@ -2,49 +2,30 @@ Full L1 system deployment on zeronet using `SystemDeploy.s.sol` from the sibling `contracts/` repo. -## Prerequisites - -Fill in all `"TODO"` placeholders in `deploy-config/zeronet.json` before running: - -| Field | How to obtain | -|---|---| -| `finalSystemOwner` | Confirm with team (likely `PROXY_ADMIN_OWNER` or `CB_MULTISIG`) | -| `superchainConfigGuardian` | Confirm with team | -| `p2pSequencerAddress` | Check zeronet node config | -| `sp1Verifier` | Confirm verifier contract address | -| `baseFeeVaultRecipient` / `l1FeeVaultRecipient` / etc. | Confirm fee recipient addresses | -| `operatorFeeVaultRecipient` / `sequencerFeeVaultRecipient` | Confirm fee recipient addresses | -| `l2OutputOracleStartingTimestamp` | Genesis timestamp from chain config | -| `multiproofConfigHash` | Compute from multiproof config | -| `multiproofGenesisOutputRoot` | Fetch from chain at genesis block | -| `zkRangeHash` | `cast call "zkRangeHash()(bytes32)" --rpc-url ` | -| `zkAggregationHash` | `cast call "zkAggregationHash()(bytes32)" --rpc-url ` | - -Active AggregateVerifier on zeronet: check `zeronet/.env` or existing task outputs. ## Steps -### 1. Simulate (no broadcast) +### 0. Refresh genesis anchor values before executing + +`multiproofGenesisBlockNumber` and `multiproofGenesisOutputRoot` must point to a block that is still available in the proof node at the time of deployment. Refresh them immediately before running `make simulate` or `make deploy`: ```sh -make simulate +BLOCK=$(cast rpc optimism_syncStatus --rpc-url https://base-zeronet-reth-proofs-donotuse.cbhq.net:7545 | jq -r '.finalized_l2.number') +OUTPUT_ROOT=$(cast rpc optimism_outputAtBlock "$(printf '0x%x' "$BLOCK")" --rpc-url https://base-zeronet-reth-rpc-donotuse.cbhq.net:7545 | jq -r '.outputRoot') +echo "multiproofGenesisBlockNumber: $BLOCK" +echo "multiproofGenesisOutputRoot: $OUTPUT_ROOT" ``` -Runs the deployment script against the live L1 RPC without broadcasting any transactions. Use this to validate configuration before spending gas. +Update `deploy-config/zeronet.json` with the printed values before proceeding. -### 2. Deploy (broadcast via Ledger) +### 1. Simulate (no broadcast) ```sh -make deploy +make simulate ``` -Broadcasts all transactions. Requires a Ledger connected and unlocked at account index `LEDGER_ACCOUNT` (set in `zeronet/.env`). - -## Output +### 2. Deploy (broadcast via Ledger) -Broadcast records are written by Foundry to the contracts repo under: -``` -contracts/broadcast/SystemDeploy.s.sol//run-latest.json +```sh +make deploy ``` - -Record deployed contract addresses from there and update `zeronet/.env` as needed. diff --git a/zeronet/2026-06-24-system-deploy/deploy-config/zeronet.json b/zeronet/2026-06-24-system-deploy/deploy-config/zeronet.json index 0f3b9a6e..20dbd4c2 100644 --- a/zeronet/2026-06-24-system-deploy/deploy-config/zeronet.json +++ b/zeronet/2026-06-24-system-deploy/deploy-config/zeronet.json @@ -19,8 +19,8 @@ "multiproofBlockInterval": 600, "multiproofConfigHash": "0xab64b3118d2d030a3fd3fe3005239a2f332e48848bbedddca9e10df77ac7303e", "multiproofGameType": 621, - "multiproofGenesisBlockNumber": 0, - "multiproofGenesisOutputRoot": "TODO", + "multiproofGenesisBlockNumber": 4179448, + "multiproofGenesisOutputRoot": "0x56d192e8832cac413dcbbe5156c5476771e90ac7d76d42ef048c168ebe12b63c", "multiproofIntermediateBlockInterval": 30, "nitroEnclaveVerifier": "0x4e3E30E148E803667913bE97A8ce9EBA39b65563", "operatorFeeVaultMinimumWithdrawalAmount": "0x8ac7230489e80000", From e03bce3c6bae7bfed657545b41baa816137a619e Mon Sep 17 00:00:00 2001 From: Rayyan Alam Date: Wed, 24 Jun 2026 12:57:54 -0400 Subject: [PATCH 6/6] chore: set p2pSequencerAddress from live SystemConfig.unsafeBlockSigner() Read directly from SystemConfig (0xcc7c...ea80) on Hoodi L1. deploy-config/zeronet.json now has no remaining TODO fields. Generated with Claude Code Co-Authored-By: Claude --- zeronet/2026-06-24-system-deploy/deploy-config/zeronet.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zeronet/2026-06-24-system-deploy/deploy-config/zeronet.json b/zeronet/2026-06-24-system-deploy/deploy-config/zeronet.json index 20dbd4c2..7291751c 100644 --- a/zeronet/2026-06-24-system-deploy/deploy-config/zeronet.json +++ b/zeronet/2026-06-24-system-deploy/deploy-config/zeronet.json @@ -26,7 +26,7 @@ "operatorFeeVaultMinimumWithdrawalAmount": "0x8ac7230489e80000", "operatorFeeVaultRecipient": "0x856611ed7e07d83243b15e93f6321f2df6865852", "operatorFeeVaultWithdrawalNetwork": 0, - "p2pSequencerAddress": "TODO", + "p2pSequencerAddress": "0xcf17274338d3128f6C96d9af54511a17e8b38a08", "proofMaturityDelaySeconds": 604800, "proxyAdminOwner": "0x3d59999977e0896ee1f8783bb8251df16fb483e9", "respectedGameType": 621,