11# Espresso OP Integration Docker Setup
22
33services :
4- l1 :
4+ l1-geth :
55 healthcheck :
66 test : ["CMD", "curl", "-f", "http://localhost:${ESPRESSO_L1_PORT}"]
77 interval : 3s
88 timeout : 2s
99 retries : 40
1010 build :
11- context : ../ops/ docker/deployment-utils
11+ context : ./ docker/l1-geth
1212 image : l1-geth:espresso
1313 volumes :
14- - ../config/l1-genesis-devnet.json:/l1-genesis-devnet.json:ro
15- - l1-data:/data
16- command :
17- - sh
18- - -c
19- # Initialize with the L1 genesis file.
20- # Enable `dev` to automatically create blocks in the dev mode.
21- # Set `dev.period=1` to create a block every 1 second.
22- - |
23- set -e
24- rm -rf /data/geth || true
25- geth --datadir /data init /l1-genesis-devnet.json
26- exec geth --datadir /data \
27- --http \
28- --http.addr=0.0.0.0 \
29- --http.api=eth,net,web3,admin \
30- --http.port=${ESPRESSO_L1_PORT} \
31- --http.vhosts=* \
32- --http.corsdomain=* \
33- --nodiscover \
34- --dev \
35- --dev.period=12 \
36- --miner.etherbase=0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC \
37- --mine \
38- --allow-insecure-unlock \
39- --rpc.allow-unprotected-txs
14+ - l1-geth-data:/data
15+ environment :
16+ ESPRESSO_L1_PORT : ${ESPRESSO_L1_PORT}
4017 ports :
4118 - " ${ESPRESSO_L1_PORT}:${ESPRESSO_L1_PORT}" # L1 RPC
4219
4320 op-geth :
44- # If the version below is updated, update the version for `images/op-geth` in the Docker
45- # Compose section in README_ESPRESSO.md as well.
46- image : us-docker.pkg.dev/oplabs-tools-artifacts/images/ op-geth:v1.101503.2-rc.3
21+ build :
22+ context : ./docker/op-geth
23+ image : op-geth:espresso
4724 depends_on :
48- l1 :
25+ l1-geth :
4926 condition : service_healthy
5027 volumes :
51- - ../config :/config
28+ - ./docker/op-geth :/config
5229 - op-geth-data:/data
5330 environment :
5431 L1_RPC : ${ESPRESSO_L1_PROVIDER}
55- entrypoint : ["/bin/sh", "-c"]
56- command :
57- # Initialize with the L2 genesis file.
58- - |
59- if [ ! -d "/data/geth" ]; then
60- geth init --datadir=/data /config/l2-genesis-devnet.json
61- fi
62- exec geth \
63- --datadir=/data \
64- --networkid=1 \
65- --http \
66- --http.addr=0.0.0.0 \
67- --http.port=${ESPRESSO_L1_PORT} \
68- --http.api=eth,net,web3,debug,admin,txpool \
69- --http.vhosts=* \
70- --http.corsdomain=* \
71- --authrpc.addr=0.0.0.0 \
72- --authrpc.port=${ESPRESSO_GETH_PORT} \
73- --authrpc.vhosts=* \
74- --authrpc.jwtsecret=/config/jwt.txt \
75- --rollup.disabletxpoolgossip=true \
76- --rollup.halt=major \
77- --nodiscover
32+ ESPRESSO_L1_PORT : ${ESPRESSO_L1_PORT}
33+ ESPRESSO_GETH_PORT : ${ESPRESSO_GETH_PORT}
7834 ports :
7935 - " 8546:${ESPRESSO_L1_PORT}" # L2 RPC
8036 - " ${ESPRESSO_GETH_PORT}:${ESPRESSO_GETH_PORT}" # Engine API
8137
8238 op-node-sequencer :
8339 build :
8440 context : ../
85- dockerfile : ./ops/ docker/op-stack-go /Dockerfile
41+ dockerfile : espresso/ docker/op-stack/Dockerfile
8642 target : op-node-target
8743 image : op-node-sequencer:espresso
8844 depends_on :
@@ -94,19 +50,19 @@ services:
9450 OP_NODE_L2_ENGINE_RPC : ${ESPRESSO_GETH_PROVIDER}
9551 OP_NODE_RPC_PORT : ${ESPRESSO_ROLLUP_PORT}
9652 volumes :
97- - ../config :/config
53+ - ./docker/op-geth :/config
9854 - /etc/localtime:/etc/localtime:ro
9955 command :
10056 - op-node
10157 - --l2.jwt-secret=/config/jwt.txt
102- - --rollup.config=/config/op-node/ rollup-devnet.json
58+ - --rollup.config=/config/rollup-devnet.json
10359 - --sequencer.enabled=true
10460 - --rpc.addr=0.0.0.0
10561
10662 op-node-verifier :
10763 build :
10864 context : ../
109- dockerfile : ./ops/ docker/op-stack-go /Dockerfile
65+ dockerfile : espresso/ docker/op-stack/Dockerfile
11066 target : op-node-target
11167 image : op-node-verifier:espresso
11268 depends_on :
@@ -117,16 +73,16 @@ services:
11773 OP_NODE_L1_ETH_RPC : ${ESPRESSO_L1_PROVIDER}
11874 OP_NODE_L2_ENGINE_RPC : ${ESPRESSO_GETH_PROVIDER}
11975 volumes :
120- - ../config :/config
76+ - ./docker/op-geth :/config
12177 command :
12278 - op-node
12379 - --l2.jwt-secret=/config/jwt.txt
124- - --rollup.config=/config/op-node/ rollup-devnet.json
80+ - --rollup.config=/config/rollup-devnet.json
12581
12682 caff-node :
12783 build :
12884 context : ../
129- dockerfile : ./ops/ docker/op-stack-go /Dockerfile
85+ dockerfile : espresso/ docker/op-stack/Dockerfile
13086 target : op-node-target
13187 image : caff-node:espresso
13288 depends_on :
@@ -141,11 +97,11 @@ services:
14197 CAFF_ESPRESSO_LIGHT_CLIENT_ADDR : " 0x703848f4c85f18e3acd8196c8ec91eb0b7bd0797"
14298 CAFF_HOTSHOT_URLS : ${ESPRESSO_URL}
14399 volumes :
144- - ../config :/config
100+ - ./docker/op-geth :/config
145101 command :
146102 - op-node
147103 - --l2.jwt-secret=/config/jwt.txt
148- - --rollup.config=/config/op-node/ rollup-devnet.json
104+ - --rollup.config=/config/rollup-devnet.json
149105 - --caff.node=true
150106 - --sequencer.enabled=false
151107 - --verifier.l1-confs=0
@@ -161,12 +117,12 @@ services:
161117 op-batcher :
162118 build :
163119 context : ../
164- dockerfile : ./ops/ docker/op-stack-go /Dockerfile
120+ dockerfile : espresso/ docker/op-stack/Dockerfile
165121 target : op-batcher-target
166122 image : op-batcher:espresso
167123 # It is not necessary to specify all dependencies, but a good practice.
168124 depends_on :
169- l1 :
125+ l1-geth :
170126 condition : service_healthy
171127 op-geth :
172128 condition : service_started
@@ -192,11 +148,12 @@ services:
192148 op-proposer :
193149 build :
194150 context : ../
195- dockerfile : ./ops/ docker/op-stack-go /Dockerfile
151+ dockerfile : espresso/ docker/op-stack/Dockerfile
196152 target : op-proposer-target
197153 image : op-proposer:espresso
198154 depends_on :
199- - op-node-sequencer
155+ op-node-sequencer :
156+ condition : service_started
200157 environment :
201158 OP_PROPOSER_L1_ETH_RPC : ${ESPRESSO_L1_PROVIDER}
202159 OP_PROPOSER_ROLLUP_RPC : ${ESPRESSO_ROLLUP_PROVIDER}
@@ -221,15 +178,15 @@ services:
221178 dockerfile : ./op-deployer/Dockerfile.default
222179 image : op-deployer:espresso
223180 depends_on :
224- - l1
181+ - l1-geth
225182 volumes :
226183 - ../packages/contracts-bedrock/lib/superchain-registry/ops/testdata/monorepo:/config
227184 restart : " no"
228185
229186 espresso-dev-node :
230187 image : ghcr.io/espressosystems/espresso-sequencer/espresso-dev-node:release-colorful-snake
231188 depends_on :
232- l1 :
189+ l1-geth :
233190 condition : service_healthy
234191 ports :
235192 - " ${ESPRESSO_SEQUENCER_API_PORT}:${ESPRESSO_SEQUENCER_API_PORT}"
@@ -251,6 +208,6 @@ services:
251208 ESPRESSO_BUILDER_PORT : ${ESPRESSO_BUILDER_PORT}
252209
253210volumes :
254- l1-data :
211+ l1-geth- data :
255212 op-geth-data :
256213 espresso-data :
0 commit comments