-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
12b253c
commit 729ad85
Showing
3 changed files
with
432 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/bin/bash | ||
|
||
set -eu | ||
|
||
# Run this with workdir set as root of the repo | ||
if [ -f "versions.json" ]; then | ||
echo "Running create-chains script." | ||
else | ||
echo "Cannot run create-chains script, must be in root of repository, but currently in:" | ||
echo "$(pwd)" | ||
exit 1 | ||
fi | ||
|
||
# Check if already created | ||
if [ -d ".devnet-interop" ]; then | ||
echo "Already created chains." | ||
exit 1 | ||
else | ||
echo "Creating new interop devnet chain configs" | ||
fi | ||
|
||
mkdir ".devnet-interop" | ||
|
||
export CONTRACTS_ARTIFACTS_DIR="../packages/contracts-bedrock" | ||
|
||
cd "../.devnet-interop/" | ||
|
||
# OTOD: config interop genesis CLI | ||
go run ../op-node interop --todo | ||
|
||
# create L1 CL genesis | ||
eth2-testnet-genesis deneb \ | ||
--config=./beacon-data/config.yaml \ | ||
--preset-phase0=minimal \ | ||
--preset-altair=minimal \ | ||
--preset-bellatrix=minimal \ | ||
--preset-capella=minimal \ | ||
--preset-deneb=minimal \ | ||
--eth1-config=../.devnet-interop/out/l1/genesis.json \ | ||
--state-output=../.devnet-interop/out/l1/beaconstate.ssz \ | ||
--tranches-dir=../.devnet-interop/out/l1/tranches \ | ||
--mnemonics=mnemonics.yaml \ | ||
--eth1-withdrawal-address=0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \ | ||
--eth1-match-genesis-time |
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,353 @@ | ||
# This Compose file is expected to be used with the devnet-up.sh script. | ||
# The volumes below mount the configs generated by the script into each | ||
# service. | ||
|
||
volumes: | ||
l1_data: | ||
l1_bn_data: | ||
l1_vc_data: | ||
l2_a_data: | ||
safedb_a_data: | ||
l2_b_data: | ||
safedb_b_data: | ||
supervisor_data: | ||
|
||
# TODO: reconfigure keys, using interop key CLI | ||
|
||
services: | ||
|
||
l1: | ||
build: | ||
context: . | ||
dockerfile: l1-geth.Dockerfile | ||
ports: | ||
- "8545:8545" | ||
- "8546:8546" | ||
- "7060:6060" | ||
volumes: | ||
- "l1_data:/db" | ||
- "${PWD}/../.devnet-interop/genesis-l1.json:/genesis.json" | ||
- "${PWD}/test-jwt-secret.txt:/config/jwt-secret.txt" | ||
environment: | ||
GETH_MINER_RECOMMIT: 100ms | ||
|
||
l1-bn: | ||
depends_on: | ||
- l1 | ||
build: | ||
context: . | ||
dockerfile: l1-lighthouse.Dockerfile | ||
ports: | ||
- "9000:9000" | ||
- "5052:5052" | ||
volumes: | ||
- "l1_bn_data:/db" | ||
- "${PWD}/test-jwt-secret.txt:/config/jwt-secret.txt" | ||
- "${PWD}/beacon-data/config.yaml:/genesis/config.yaml" | ||
- "${PWD}/beacon-data/deposit_contract_block.txt:/genesis/deposit_contract_block.txt" | ||
- "${PWD}/../.devnet-interop/genesis-l1.ssz:/genesis/genesis.ssz" | ||
environment: | ||
LH_EXECUTION_ENDPOINT: "http://l1:8551" | ||
entrypoint: | ||
- "/bin/sh" | ||
- "/entrypoint-bn.sh" | ||
|
||
l1-vc: | ||
depends_on: | ||
- l1 | ||
- l1-bn | ||
build: | ||
context: . | ||
dockerfile: l1-lighthouse.Dockerfile | ||
volumes: | ||
- "l1_vc_data:/db" | ||
- "${PWD}/beacon-data/data/keys:/validator_setup/validators" | ||
- "${PWD}/beacon-data/data/secrets:/validator_setup/secrets" | ||
- "${PWD}/beacon-data/config.yaml:/genesis/config.yaml" | ||
- "${PWD}/beacon-data/deposit_contract_block.txt:/genesis/deposit_contract_block.txt" | ||
- "${PWD}/../.devnet-interop/genesis-l1.ssz:/genesis/genesis.ssz" | ||
environment: | ||
LH_BEACON_NODES: "http://l1-bn:5052/" | ||
entrypoint: | ||
- "/bin/sh" | ||
- "/entrypoint-vc.sh" | ||
|
||
l2-a: | ||
build: | ||
context: ../ops-bedrock/ | ||
dockerfile: l2-op-geth.Dockerfile | ||
ports: | ||
- "9545:8545" | ||
- "8060:6060" | ||
volumes: | ||
- "l2_a_data:/db" | ||
- "${PWD}/../.devnet-interop/genesis-l2-a.json:/genesis.json" | ||
- "${PWD}/test-jwt-secret.txt:/config/jwt-secret.txt" | ||
entrypoint: # pass the L2 specific flags by overriding the entry-point and adding extra arguments | ||
- "/bin/sh" | ||
- "/entrypoint.sh" | ||
environment: | ||
GETH_MINER_RECOMMIT: 100ms | ||
|
||
l2-b: | ||
build: | ||
context: ../ops-bedrock/ | ||
dockerfile: l2-op-geth.Dockerfile | ||
ports: | ||
- "9545:8545" | ||
- "8060:6060" | ||
volumes: | ||
- "l2_a_data:/db" | ||
- "${PWD}/../.devnet-interop/genesis-l2-b.json:/genesis.json" | ||
- "${PWD}/test-jwt-secret.txt:/config/jwt-secret.txt" | ||
entrypoint: # pass the L2 specific flags by overriding the entry-point and adding extra arguments | ||
- "/bin/sh" | ||
- "/entrypoint.sh" | ||
environment: | ||
GETH_MINER_RECOMMIT: 100ms | ||
|
||
op-supervisor: | ||
depends_on: | ||
- l1 | ||
- l2-a | ||
- l2-b | ||
build: | ||
context: ../ | ||
dockerfile: ops/docker/op-stack-go/Dockerfile | ||
target: op-supervisor-target | ||
ports: | ||
- "8545:8545" | ||
volumes: | ||
- "supervisor_data:/db" | ||
image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-supervisor:devnet | ||
command: > | ||
op-supervisor | ||
--l2-rpcs="ws://l2-a:8546,ws://l2-b:8546" | ||
--datadir="/db" | ||
--rpc.addr="0.0.0.0" | ||
--rpc.port=8545 | ||
--rpc.enable-admin | ||
op-node-a: | ||
depends_on: | ||
- l1 | ||
- l1-bn | ||
- l1-vc | ||
- l2-a | ||
- op-supervisor | ||
build: | ||
context: ../ | ||
dockerfile: ops/docker/op-stack-go/Dockerfile | ||
target: op-node-target | ||
image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-node:devnet | ||
# p2p seq key addr: 0x84c7EAD5EF72Fc376617A8b3c17da24d95Bdc8c2 | ||
command: > | ||
op-node | ||
--l1=ws://l1:8546 | ||
--l1.beacon=http://l1-bn:5052 | ||
--l1.epoch-poll-interval=12s | ||
--l1.http-poll-interval=6s | ||
--l2=http://l2-a:8551 | ||
--l2.jwt-secret=/config/jwt-secret.txt | ||
--sequencer.enabled | ||
--sequencer.l1-confs=0 | ||
--verifier.l1-confs=0 | ||
--p2p.sequencer.key=d6d2d225174aeffe7dec4d6bd8980aaf2b24c5c0fd481ea7191af94ed8b54aca | ||
--rollup.config=/rollup.json | ||
--rpc.addr=0.0.0.0 | ||
--rpc.port=8545 | ||
--p2p.listen.ip=0.0.0.0 | ||
--p2p.listen.tcp=9003 | ||
--p2p.listen.udp=9003 | ||
--p2p.scoring.peers=light | ||
--p2p.ban.peers=true | ||
--p2p.priv.raw=84173a002bde07fa4e3fa989e6fd21707f923d6136e1486fb367ff0e666ecede | ||
--metrics.enabled | ||
--metrics.addr=0.0.0.0 | ||
--metrics.port=7300 | ||
--pprof.enabled | ||
--rpc.enable-admin | ||
--safedb.path=/db | ||
ports: | ||
- "7545:8545" | ||
- "9003:9003" | ||
- "7300:7300" | ||
- "6060:6060" | ||
volumes: | ||
- "safedb_a_data:/db" | ||
- "${PWD}/test-jwt-secret.txt:/config/jwt-secret.txt" | ||
- "${PWD}/../.devnet-interop/rollup-a.json:/rollup.json" | ||
- op_log:/op_log | ||
|
||
op-node-b: | ||
depends_on: | ||
- l1 | ||
- l1-bn | ||
- l1-vc | ||
- l2-b | ||
- op-supervisor | ||
build: | ||
context: ../ | ||
dockerfile: ops/docker/op-stack-go/Dockerfile | ||
target: op-node-target | ||
image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-node:devnet | ||
# p2p seq key addr: 0x35981c5F25A5dc24B148e5c0370833Bb13d9E1C4 | ||
command: > | ||
op-node | ||
--l1=ws://l1:8546 | ||
--l1.beacon=http://l1-bn:5052 | ||
--l1.epoch-poll-interval=12s | ||
--l1.http-poll-interval=6s | ||
--l2=http://l2-b:8551 | ||
--l2.jwt-secret=/config/jwt-secret.txt | ||
--sequencer.enabled | ||
--sequencer.l1-confs=0 | ||
--verifier.l1-confs=0 | ||
--p2p.sequencer.key=693735dd50656650d39861b4afa7bb140fbd01b61e391b2989127c32077c56db | ||
--rollup.config=/rollup.json | ||
--rpc.addr=0.0.0.0 | ||
--rpc.port=8545 | ||
--p2p.listen.ip=0.0.0.0 | ||
--p2p.listen.tcp=9003 | ||
--p2p.listen.udp=9003 | ||
--p2p.scoring.peers=light | ||
--p2p.ban.peers=true | ||
--p2p.priv.raw=e9fe4082a4beb2609c516979c692c667cbd9e0779328ed92574a26678f6cc8dc | ||
--metrics.enabled | ||
--metrics.addr=0.0.0.0 | ||
--metrics.port=7300 | ||
--pprof.enabled | ||
--rpc.enable-admin | ||
--safedb.path=/db | ||
ports: | ||
- "7545:8545" | ||
- "9003:9003" | ||
- "7300:7300" | ||
- "6060:6060" | ||
volumes: | ||
- "safedb_b_data:/db" | ||
- "${PWD}/test-jwt-secret.txt:/config/jwt-secret.txt" | ||
- "${PWD}/../.devnet-interop/rollup-b.json:/rollup.json" | ||
- op_log:/op_log | ||
|
||
op-proposer-a: | ||
depends_on: | ||
- l1 | ||
- op-node-a | ||
build: | ||
context: ../ | ||
dockerfile: ops/docker/op-stack-go/Dockerfile | ||
target: op-proposer-target | ||
image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-proposer:devnet | ||
ports: | ||
- "6062:6060" | ||
- "7302:7300" | ||
- "6546:8545" | ||
# proposer addr: 0x71b4a2d9B91726bdb5849D928967A1654D7F3de7 | ||
environment: | ||
OP_PROPOSER_L1_ETH_RPC: http://l1:8545 | ||
OP_PROPOSER_ROLLUP_RPC: http://op-node-a:8545 | ||
OP_PROPOSER_POLL_INTERVAL: 1s | ||
OP_PROPOSER_NUM_CONFIRMATIONS: 1 | ||
OP_PROPOSER_MNEMONIC: test test test test test test test test test test test junk | ||
OP_PROPOSER_L2_OUTPUT_HD_PATH: "m/44'/60'/0'/1/1" | ||
OP_PROPOSER_GAME_FACTORY_ADDRESS: "${DGF_ADDRESS}" | ||
OP_PROPOSER_GAME_TYPE: "${DG_TYPE}" | ||
OP_PROPOSER_PROPOSAL_INTERVAL: "${PROPOSAL_INTERVAL}" | ||
OP_PROPOSER_PPROF_ENABLED: "true" | ||
OP_PROPOSER_METRICS_ENABLED: "true" | ||
OP_PROPOSER_ALLOW_NON_FINALIZED: "true" | ||
OP_PROPOSER_RPC_ENABLE_ADMIN: "true" | ||
|
||
op-proposer-b: | ||
depends_on: | ||
- l1 | ||
- op-node-b | ||
build: | ||
context: ../ | ||
dockerfile: ops/docker/op-stack-go/Dockerfile | ||
target: op-proposer-target | ||
image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-proposer:devnet | ||
ports: | ||
- "6062:6060" | ||
- "7302:7300" | ||
- "6546:8545" | ||
# proposer addr: 0x8c408c9ce6718F4a3AFa7860f2E7B190B25fBDfA | ||
environment: | ||
OP_PROPOSER_L1_ETH_RPC: http://l1:8545 | ||
OP_PROPOSER_ROLLUP_RPC: http://op-node-b:8545 | ||
OP_PROPOSER_POLL_INTERVAL: 1s | ||
OP_PROPOSER_NUM_CONFIRMATIONS: 1 | ||
OP_PROPOSER_MNEMONIC: test test test test test test test test test test test junk # TODO | ||
OP_PROPOSER_L2_OUTPUT_HD_PATH: "m/44'/60'/0'/2/1" | ||
OP_PROPOSER_GAME_FACTORY_ADDRESS: "${DGF_ADDRESS}" | ||
OP_PROPOSER_GAME_TYPE: "${DG_TYPE}" | ||
OP_PROPOSER_PROPOSAL_INTERVAL: "${PROPOSAL_INTERVAL}" | ||
OP_PROPOSER_PPROF_ENABLED: "true" | ||
OP_PROPOSER_METRICS_ENABLED: "true" | ||
OP_PROPOSER_ALLOW_NON_FINALIZED: "true" | ||
OP_PROPOSER_RPC_ENABLE_ADMIN: "true" | ||
|
||
op-batcher-a: | ||
depends_on: | ||
- l1 | ||
- l2-a | ||
- op-node-a | ||
build: | ||
context: ../ | ||
dockerfile: ops/docker/op-stack-go/Dockerfile | ||
target: op-batcher-target | ||
image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-batcher:devnet | ||
ports: | ||
- "6061:6060" | ||
- "7301:7300" | ||
- "6545:8545" | ||
# batcher addr: 0xCA55aC8514b25C660151a8AE0c90f116DF160daa | ||
environment: | ||
OP_BATCHER_L1_ETH_RPC: http://l1:8545 | ||
OP_BATCHER_L2_ETH_RPC: http://l2-a:8545 | ||
OP_BATCHER_ROLLUP_RPC: http://op-node-a:8545 | ||
OP_BATCHER_MAX_CHANNEL_DURATION: 2 | ||
OP_BATCHER_SUB_SAFETY_MARGIN: 4 # SWS is 15, ChannelTimeout is 40 | ||
OP_BATCHER_POLL_INTERVAL: 1s | ||
OP_BATCHER_NUM_CONFIRMATIONS: 1 | ||
OP_BATCHER_MNEMONIC: test test test test test test test test test test test junk | ||
OP_BATCHER_SEQUENCER_HD_PATH: "m/44'/60'/0'/1/2" | ||
OP_BATCHER_PPROF_ENABLED: "true" | ||
OP_BATCHER_METRICS_ENABLED: "true" | ||
OP_BATCHER_RPC_ENABLE_ADMIN: "true" | ||
OP_BATCHER_BATCH_TYPE: | ||
# uncomment to use blobs | ||
# OP_BATCHER_DATA_AVAILABILITY_TYPE: blobs | ||
|
||
op-batcher-b: | ||
depends_on: | ||
- l1 | ||
- l2-b | ||
- op-node-b | ||
build: | ||
context: ../ | ||
dockerfile: ops/docker/op-stack-go/Dockerfile | ||
target: op-batcher-target | ||
image: us-docker.pkg.dev/oplabs-tools-artifacts/images/op-batcher:devnet | ||
ports: | ||
- "6061:6060" | ||
- "7301:7300" | ||
- "6545:8545" | ||
# batcher addr: 0x252a3336Fb2A4352D1bD3b139f4e540AA45236bd | ||
environment: | ||
OP_BATCHER_L1_ETH_RPC: http://l1:8545 | ||
OP_BATCHER_L2_ETH_RPC: http://l2-b:8545 | ||
OP_BATCHER_ROLLUP_RPC: http://op-node-b:8545 | ||
OP_BATCHER_MAX_CHANNEL_DURATION: 2 | ||
OP_BATCHER_SUB_SAFETY_MARGIN: 4 # SWS is 15, ChannelTimeout is 40 | ||
OP_BATCHER_POLL_INTERVAL: 1s | ||
OP_BATCHER_NUM_CONFIRMATIONS: 1 | ||
OP_BATCHER_MNEMONIC: test test test test test test test test test test test junk | ||
OP_BATCHER_SEQUENCER_HD_PATH: "m/44'/60'/0'/2/2" | ||
OP_BATCHER_PPROF_ENABLED: "true" | ||
OP_BATCHER_METRICS_ENABLED: "true" | ||
OP_BATCHER_RPC_ENABLE_ADMIN: "true" | ||
OP_BATCHER_BATCH_TYPE: | ||
# uncomment to use blobs | ||
# OP_BATCHER_DATA_AVAILABILITY_TYPE: blobs |
Oops, something went wrong.