-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
L2 genesis generation w/ predeploy (#240)
Co-authored-by: Ujval Misra <[email protected]>
- Loading branch information
Showing
80 changed files
with
7,504 additions
and
2,869 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,37 @@ | ||
# This dotenv contains the env variables for: | ||
# 1. generating a new genesis from a base via `sbin/create_genesis.sh`. | ||
# 2. contract deployment, e.g. via `sbin/start_l1.sh`. | ||
# 1. genesis generation: via `sbin/create_genesis.sh`. | ||
# 2. contract deployment: via `sbin/start_l1.sh` and/or `sbin/deploy_l1_contracts.sh`. | ||
# This file is optional; it is only necessary for new deployments | ||
# (i.e. where the genesis isn't already generated and the | ||
# contracts must be deployed). | ||
# (i.e. where the genesis isn't already generated and the contracts must be deployed). | ||
|
||
# Path to the base (source) genesis. Optional. | ||
# Required only if you want to run `sbin/create_genesis.sh`. | ||
BASE_GENESIS_PATH=./base_genesis.json | ||
# Path to the genesis config. | ||
# Required for genesis generation. | ||
# This config is used to generate the genesis JSON at the configured $GENESIS_PATH. | ||
GENESIS_CFG_PATH=./genesis_config.json | ||
# Path to the actual (target) genesis. | ||
# Required for genesis generation and contract deployment. | ||
# Does not need to exist at configuration-time. | ||
GENESIS_PATH=./genesis.json | ||
# Path to the base rollup config. Optional. | ||
# Required only if you want to run `sbin/create_genesis.sh`. | ||
# Path to the base rollup config. | ||
# Required for genesis generation. | ||
BASE_ROLLUP_CFG_PATH=./base_sp_rollup.json | ||
# Path to the actual (target) rollup config. | ||
# Does not need to exist at configuration-time. | ||
# File does not need to exist at configuration-time (it will be generated). | ||
# Required for genesis generation and contract deployment. | ||
# Note: file name must start with "sp_" to support Magi. | ||
ROLLUP_CFG_PATH=./sp_rollup.json | ||
# Path to the exported genesis hash file | ||
# File does not need to exist at configuration-time (it will be generated). | ||
# Required for genesis generation. | ||
GENESIS_EXPORTED_HASH_PATH=./genesis_hash.json | ||
# L1 network parameters. | ||
# What network to deploy to (using hardhat). Optional. | ||
# Required only by `sbin/deploy_l1_contracts.sh`. | ||
# What network to deploy to (using hardhat). | ||
# Required for contract deployment. | ||
L1_NETWORK=localhost | ||
# What software stack to use to run the L1 network. Optional. | ||
# Required only by `sbin/start_l1.sh`. Options: [geth|hardhat] | ||
# Required for contract deployment. Options: [geth|hardhat] | ||
L1_STACK=geth | ||
# L1 endpoint. | ||
# Required only by `sbin/start_l1.sh` and `sbin/create_genesis.sh` | ||
# Required for contract deployment. | ||
# Note: if L1_STACK=hardhat, use host 127.0.0.1 (local) or 0.0.0.0 (docker) | ||
L1_ENDPOINT=ws://172.17.0.1:8545 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"genesis": { | ||
"l1": { | ||
"hash": "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
"number": 0 | ||
}, | ||
"l2": { | ||
"hash": "0x85d973858306241634c3a5ecbe114a0754be9d25da523cdd7e1968a09e419a32", | ||
"number": 0 | ||
}, | ||
"system_config": { | ||
"batcherAddr": "0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266", | ||
"overhead": "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
"scalar": "0x0000000000000000000000000000000000000000000000000000000000000000", | ||
"gasLimit": 30000000 | ||
} | ||
}, | ||
"block_time": 2, | ||
"max_sequencer_drift": 600, | ||
"seq_window_size": 3600, | ||
"l1_chain_id": 31337, | ||
"l2_chain_id": 13527, | ||
"batch_inbox_address": "0x2E983A1Ba5e8b38AAAeC4B440B9dDcFBf72E15d1" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"l2ChainID": 13527, | ||
"l2GenesisBlockNonce": "0x0", | ||
"l2GenesisBlockGasLimit": "0x0", | ||
"l2GenesisBlockDifficulty": "0x0", | ||
"l2GenesisBlockNumber": "0x0", | ||
"l2GenesisBlockGasUsed": "0x0", | ||
"l2GenesisBlockBaseFeePerGas": "0x0", | ||
"l2GenesisBlockExtraData": "0x", | ||
"l2PredeployOwner": "0x000000000000000000000000000000000000dEaD", | ||
"l1PortalAddress": "0x000000000000000000000000000000000000dEaD", | ||
"l1StandardBridgeAddress": "0x000000000000000000000000000000000000dEaD", | ||
"alloc": { | ||
"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266": { | ||
"balance": "10000000000000000000" | ||
}, | ||
"0x70997970c51812dc3a010c7d01b50e0d17dc79c8": { | ||
"balance": "10000000000000000000" | ||
}, | ||
"0x3c44cdddb6a900fa2b585dd299e03d12fa4293bc": { | ||
"balance": "10000000000000000000" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
ROLLUP_CFG_PATH=sp_rollup.json | ||
ROLLUP_ADDR=0xF6168876932289D073567f347121A267095f3DD6 | ||
L1_ORACLE_ADDR=0x2E983A1Ba5e8b38AAAeC4B440B9dDcFBf72E15d1 | ||
L1_ENDPOINT=ws://127.0.0.1:8545 | ||
L2_ENDPOINT=ws://127.0.0.1:4012 | ||
|
||
DISSEMINATOR=true | ||
DISSEMINATOR_PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 | ||
DISSEMINATOR_PK_PATH=sequencer_pk.txt | ||
DISSEMINATOR_SUB_SAFETY_MARGIN=8 | ||
DISSEMINATOR_TARGET_BATCH_SIZE=1024 | ||
VALIDATOR=true | ||
VALIDATOR_PRIVATE_KEY=0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d | ||
VALIDATOR_PK_PATH=validator_pk.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ DEVNET=true | |
# Local sequencer flags | ||
SEQUENCER=true | ||
SEQUENCER_MAX_SAFE_LAG=0 | ||
SEQUENCER_PK_FILE=./sequencer_pk.txt |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"l2ChainID": 13527, | ||
"l2GenesisBlockNonce": "0x0", | ||
"l2GenesisBlockGasLimit": "0x0", | ||
"l2GenesisBlockDifficulty": "0x0", | ||
"l2GenesisBlockNumber": "0x0", | ||
"l2GenesisBlockGasUsed": "0x0", | ||
"l2GenesisBlockBaseFeePerGas": "0x0", | ||
"l2GenesisBlockExtraData": "0x", | ||
"l2PredeployOwner": "0x000000000000000000000000000000000000dEaD", | ||
"l1PortalAddress": "0x000000000000000000000000000000000000dEaD", | ||
"l1StandardBridgeAddress": "0x000000000000000000000000000000000000dEaD", | ||
"alloc": { | ||
"0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266": { | ||
"balance": "10000000000000000000" | ||
}, | ||
"0x70997970c51812dc3a010c7d01b50e0d17dc79c8": { | ||
"balance": "10000000000000000000" | ||
}, | ||
"0x3c44cdddb6a900fa2b585dd299e03d12fa4293bc": { | ||
"balance": "10000000000000000000" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.