This repository has been archived by the owner on Dec 5, 2021. It is now read-only.
forked from ethereum-optimism/optimism
-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yml
412 lines (388 loc) · 15.5 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
# # Accounts and their usage
# l1_chain_1 | Account #0: 0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266 (10000 ETH)
# l1_chain_1 | Private Key: 0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
# l1_chain_1 |
# l1_chain_1 | Account #1: 0x70997970c51812dc3a010c7d01b50e0d17dc79c8 (10000 ETH)
# l1_chain_1 | Private Key: 0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d
# l1_chain_1 |
# l1_chain_1 | Account #2: 0x3c44cdddb6a900fa2b585dd299e03d12fa4293bc (10000 ETH)
# l1_chain_1 | Private Key: 0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a
# l1_chain_1 |
# l1_chain_1 | Account #3: 0x90f79bf6eb2c4f870365e785982e1f101e93b906 (10000 ETH)
# l1_chain_1 | Private Key: 0x7c852118294e51e653712a81e05800f419141751be58f605c371e15141b007a6
# l1_chain_1 |
# l1_chain_1 | Account #4: 0x15d34aaf54267db7d7c367839aaf71a00a2c6a65 (10000 ETH)
# l1_chain_1 | Private Key: 0x47e179ec197488593b187f80a00eb0da91f1b9d0b13f8733639f19c30a34926a
# l1_chain_1 |
# l1_chain_1 | Account #5: 0x9965507d1a55bcc2695c58ba16fb37d819b0a4dc (10000 ETH)
# l1_chain_1 | Private Key: 0x8b3a350cf5c34c9194ca85829a2df0ec3153be0318b5e2d3348e872092edffba
# l1_chain_1 |
# l1_chain_1 | Account #6: 0x976ea74026e726554db657fa54763abd0c3a0aa9 (10000 ETH)
# l1_chain_1 | Private Key: 0x92db14e403b83dfe3df233f83dfa3a0d7096f21ca9b0d6d6b8d88b2b4ec1564e
# l1_chain_1 |
# l1_chain_1 | Account #7: 0x14dc79964da2c08b23698b3d3cc7ca32193d9955 (10000 ETH)
# l1_chain_1 | Private Key: 0x4bbbf85ce3377467afe5d46f804f221813b2bb87f24d81f60f1fcdbf7cbf4356
# l1_chain_1 |
# l1_chain_1 | Account #8: 0x23618e81e3f5cdf7f54c3d65f7fbc0abf5b21e8f (10000 ETH)
# l1_chain_1 | Private Key: 0xdbda1821b80551c9d65939329250298aa3472ba22feea921c0cf5d620ea67b97
# l1_chain_1 |
# l1_chain_1 | Account #9: 0xa0ee7a142d267c1f36714e4a8f75612f20a79720 (10000 ETH)
# l1_chain_1 | Private Key: 0x2a871d0798f97d79848a013d4936a73bf4cc922c825d33c1cf7073dff6d409c6
# l1_chain_1 |
# l1_chain_1 | Account #10: 0xbcd4042de499d14e55001ccbb24a551f3b954096 (10000 ETH)
# l1_chain_1 | Private Key: 0xf214f2b2cd398c806f84e317254e0f0b801d0643303237d97a22a48e01628897
# l1_chain_1 |
# l1_chain_1 | Account #11: 0x71be63f3384f5fb98995898a86b02fb2426c5788 (10000 ETH)
# l1_chain_1 | Private Key: 0x701b615bbdfb9de65240bc28bd21bbc0d996645a3dd57e7b12bc2bdf6f192c82
# l1_chain_1 |
# l1_chain_1 | Account #12: 0xfabb0ac9d68b0b445fb7357272ff202c5651694a (10000 ETH)
# l1_chain_1 | Private Key: 0xa267530f49f8280200edf313ee7af6b827f2a8bce2897751d06a843f644967b1
# l1_chain_1 |
# l1_chain_1 | Account #13: 0x1cbd3b2770909d4e10f157cabc84c7264073c9ec (10000 ETH)
# l1_chain_1 | Private Key: 0x47c99abed3324a2707c28affff1267e45918ec8c3f20b8aa892e8b065d2942dd
# l1_chain_1 |
# l1_chain_1 | Account #14: 0xdf3e18d64bc6a983f673ab319ccae4f1a57c7097 (10000 ETH)
# l1_chain_1 | Private Key: 0xc526ee95bf44d8fc405a158bb884d9d1238d99f0612e9f33d006bb0789009aaa
# l1_chain_1 |
# l1_chain_1 | Account #15: 0xcd3b766ccdd6ae721141f452c550ca635964ce71 (10000 ETH)
# l1_chain_1 | Private Key: 0x8166f546bab6da521a8369cab06c5d2b9e46670292d85c875ee9ec20e84ffb61
# l1_chain_1 |
# l1_chain_1 | Account #16: 0x2546bcd3c84621e976d8185a91a922ae77ecec30 (10000 ETH)
# l1_chain_1 | Private Key: 0xea6c44ac03bff858b476bba40716402b03e41b8e97e276d1baec7c37d42484a0
# l1_chain_1 |
# l1_chain_1 | Account #17: 0xbda5747bfd65f08deb54cb465eb87d40e51b197e (10000 ETH)
# l1_chain_1 | Private Key: 0x689af8efa8c651a91ad287602527f3af2fe9f6501a7ac4b061667b5a93e037fd
# l1_chain_1 |
# l1_chain_1 | Account #18: 0xdd2fd4581271e230360230f9337d5c0430bf44c0 (10000 ETH)
# l1_chain_1 | Private Key: 0xde9be858da4a475276426320d5e9262ecfc3ba460bfac56360bfa6c4c28b4ee0
# l1_chain_1 |
# l1_chain_1 | Account #19: 0x8626f6940e2eb28930efb4cef49b2d1f2c9c1199 (10000 ETH)
# l1_chain_1 | Private Key: 0xdf57089febbacf7ba0bc227dafbffa9fc08a93fdc68e1e42411a14efcf23656e
# Account #0
x-deployer_pk: &deployer_pk
DEPLOYER_PRIVATE_KEY: '0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80'
# Account #0
# Same as the deployer - allows the deployer to bypass the fee enforcement
x-gas-price-oracle_pk: &gas-price-oracle_pk
GAS_PRICE_ORACLE_OWNER_PRIVATE_KEY: '0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80'
# Account #1
x-sequencer_pk: &sequencer_pk
SEQUENCER_PRIVATE_KEY: '0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d'
# Account #2
x-proposer_pk: &proposer_pk
PROPOSER_PRIVATE_KEY: '0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a'
# Account #8
x-relayer_pk: &relayer_pk
RELAYER_PRIVATE_KEY: '0xdbda1821b80551c9d65939329250298aa3472ba22feea921c0cf5d620ea67b97'
# Account #18
x-fast-relayer_pk: &fast-relayer_pk
FAST_RELAYER_PRIVATE_KEY: '0xde9be858da4a475276426320d5e9262ecfc3ba460bfac56360bfa6c4c28b4ee0'
# Account 10
x-integration_pk: &integration_pk
PRIVATE_KEY: '0xf214f2b2cd398c806f84e317254e0f0b801d0643303237d97a22a48e01628897'
version: "3"
services:
# base service builder
builder:
image: omgx/builder:latest
build:
context: ..
dockerfile: ./ops/docker/Dockerfile.monorepo
# this is a helper service used because there's no official hardhat image
l1_chain:
image: omgx/hardhat:latest
build:
context: ./docker/hardhat
dockerfile: Dockerfile
ports:
# expose the service to the host for integration testing
- ${L1CHAIN_HTTP_PORT:-9545}:8545
deployer:
depends_on:
- l1_chain
- dtl
image: omgx/deployer:latest
build:
context: ..
dockerfile: ./ops/docker/Dockerfile.deployer
entrypoint: ./deployer.sh
environment:
FRAUD_PROOF_WINDOW_SECONDS: 0
L1_NODE_WEB3_URL: http://l1_chain:8545
CHAIN_ID: 31338
# these keys are hardhat's first accounts, DO NOT use in production
<< : *deployer_pk
<< : *sequencer_pk
<< : *proposer_pk
<< : *relayer_pk
# skip compilation when run in docker-compose, since the contracts
# were already compiled in the builder step
NO_COMPILE: 1
DTL_REGISTRY_URL: http://dtl:8081/addresses.json
ports:
# expose the service to the host for getting the contract addrs
- ${DEPLOYER_PORT:-8099}:8081 # Can eventually remove this now that DTL is serving stuff
# deploys OMGX contracts and serves contract addresses
omgx_deployer:
depends_on:
- l1_chain
- dtl
- l2geth
image: omgx/omgx_deployer
build:
context: ..
dockerfile: ./ops/docker/Dockerfile.omgx_deployer
environment:
L1_NODE_WEB3_URL: http://l1_chain:8545
L2_NODE_WEB3_URL: http://l2geth:8545
URL: http://dtl:8081/addresses.json
# DO NOT use in production
<< : *deployer_pk
<< : *fast-relayer_pk
RETRIES: 70
DTL_REGISTRY_URL: http://dtl:8081/omgx-addr.json
ports:
# expose the service to the host for getting the contract addrs
- ${OMGX_DEPLOYER_PORT:-8078}:8079
dtl:
depends_on:
- l1_chain
image: omgx/data-transport-layer:latest
build:
context: ..
dockerfile: ./ops/docker/Dockerfile.data-transport-layer
env_file:
- ./envs/dtl.env
# set the rest of the env vars for the network whcih do not
# depend on the docker-compose setup
environment:
# connect to the 2 layers
DATA_TRANSPORT_LAYER__L1_RPC_ENDPOINT: http://l1_chain:8545
DATA_TRANSPORT_LAYER__L2_RPC_ENDPOINT: http://l2geth:8545
DATA_TRANSPORT_LAYER__SYNC_FROM_L2: 'true'
DATA_TRANSPORT_LAYER__L2_CHAIN_ID: 31338
ports:
- ${DTL_PORT:-7878}:7878
- ${REGISTRY_PORT:-8080}:8081
l2geth:
depends_on:
- l1_chain
- dtl
image: omgx/l2geth:latest
build:
context: ..
dockerfile: ./ops/docker/Dockerfile.geth
# override with the geth script and the env vars required for it
entrypoint: sh ./geth.sh
env_file:
- ./envs/geth.env
environment:
ETH1_HTTP: http://l1_chain:8545
ROLLUP_TIMESTAMP_REFRESH: 5s
ROLLUP_STATE_DUMP_PATH: http://dtl:8081/state-dump.latest.json
# used for getting the addresses
URL: http://dtl:8081/addresses.json
# connecting to the DTL
ROLLUP_CLIENT_HTTP: http://dtl:7878
ETH1_CTC_DEPLOYMENT_HEIGHT: 8
RETRIES: 60
CHAIN_ID: 31338
ports:
- ${L2GETH_HTTP_PORT:-8545}:8545
- ${L2GETH_WS_PORT:-8546}:8546
relayer:
depends_on:
- l1_chain
- dtl
- l2geth
image: omgx/message-relayer:latest
build:
context: ..
dockerfile: ./ops/docker/Dockerfile.message-relayer
entrypoint: ./relayer.sh
environment:
L1_NODE_WEB3_URL: http://l1_chain:8545
L2_NODE_WEB3_URL: http://l2geth:8545
URL: http://dtl:8081/addresses.json
# a funded hardhat account
<< : *relayer_pk
RETRIES: 60
POLLING_INTERVAL: 500
GET_LOGS_INTERVAL: 500
FILTER_ENDPOINT: http://dtl:8081/omgx-addr.json #this will fail early, but then start to work
FILTER_POLLING_INTERVAL: 30000
# a second relay system for messages that need to get to L1 quickly
# NOTE - all withdrawal messenges use the standard relayer with its 7 day window
omgx_message-relayer-fast:
depends_on:
- l1_chain
- dtl
- l2geth
image: omgx/omgx_message-relayer-fast
build:
context: ..
dockerfile: ./ops/docker/Dockerfile.omgx_message-relayer-fast
environment:
L1_NODE_WEB3_URL: http://l1_chain:8545
L2_NODE_WEB3_URL: http://l2geth:8545
URL: http://dtl:8081/addresses.json
OMGX_URL: http://dtl:8081/omgx-addr.json
# This is who pays for the fast message relayer
<< : *fast-relayer_pk
RETRIES: 70
POLLING_INTERVAL: 1500
GET_LOGS_INTERVAL: 500
FILTER_ENDPOINT: http://dtl:8081/omgx-addr.json
FILTER_POLLING_INTERVAL: 30000
batch_submitter:
depends_on:
- l1_chain
- dtl
- l2geth
image: omgx/batch-submitter:latest
build:
context: ..
dockerfile: ./ops/docker/Dockerfile.batch-submitter
entrypoint: ./batches.sh
env_file:
- ./envs/batches.env
environment:
L1_NODE_WEB3_URL: http://l1_chain:8545
L2_NODE_WEB3_URL: http://l2geth:8545
URL: http://dtl:8081/addresses.json
<< : *sequencer_pk
<< : *proposer_pk
verifier:
depends_on:
- l1_chain
- dtl
image: omgx/l2geth:latest
deploy:
replicas: 0
build:
context: ..
dockerfile: ./ops/docker/Dockerfile.geth
entrypoint: sh ./geth.sh
env_file:
- ./envs/geth.env
environment:
ETH1_HTTP: http://l1_chain:8545
ROLLUP_STATE_DUMP_PATH: http://dtl:8081/state-dump.latest.json
URL: http://dtl:8081/addresses.json
ROLLUP_CLIENT_HTTP: http://dtl:7878
ROLLUP_BACKEND: 'l1'
ETH1_CTC_DEPLOYMENT_HEIGHT: 8
RETRIES: 60
ROLLUP_VERIFIER_ENABLE: 'true'
ports:
- ${VERIFIER_HTTP_PORT:-8547}:8545
- ${VERIFIER_WS_PORT:-8548}:8546
replica:
depends_on:
- dtl
image: omgx/l2geth:latest
deploy:
replicas: 0
build:
context: ..
dockerfile: ./ops/docker/Dockerfile.geth
entrypoint: sh ./geth.sh
env_file:
- ./envs/geth.env
environment:
ETH1_HTTP: http://l1_chain:8545
ROLLUP_STATE_DUMP_PATH: http://dtl:8081/state-dump.latest.json
URL: http://dtl:8081/addresses.json
ROLLUP_CLIENT_HTTP: http://dtl:7878
ROLLUP_BACKEND: 'l2'
ROLLUP_VERIFIER_ENABLE: 'true'
ETH1_CTC_DEPLOYMENT_HEIGHT: 8
RETRIES: 60
ports:
- ${L2GETH_HTTP_PORT:-8549}:8545
- ${L2GETH_WS_PORT:-8550}:8546
integration_tests:
image: omgx/integration-tests:latest
deploy:
replicas: 0
build:
context: ..
dockerfile: ./ops/docker/Dockerfile.integration-tests
entrypoint: ./integration-tests.sh
environment:
L1_URL: http://l1_chain:8545
L2_URL: http://l2geth:8545
URL: http://dtl:8081/addresses.json
ENABLE_GAS_REPORT: 1
NO_NETWORK: 1
L2_CHAINID: 31338 #unfortunately, elsewhere the L2_CHAINID is called CHAIN_ID
<< : *integration_pk
# good idea, but never actually used?
# # and, tests for all the OMGX-specific services
# omgx_test_contracts:
# image: omgx/builder
# deploy:
# replicas: 0
# build:
# context: ..
# dockerfile: ./ops/docker/Dockerfile.monorepo
# entrypoint:
# - "/bin/sh"
# - -ecx
# - |
# cd /optimism/packages/omgx/contracts
# yarn test:integration
# environment:
# L1_NODE_WEB3_URL: http://l1_chain:8545
# L2_NODE_WEB3_URL: http://l2geth:8545
# URL: http://deployer:8081/addresses.json
# OMGX_URL: http://omgx_deployer:8079/addresses.json
# TEST_PRIVATE_KEY_1: "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"
# TEST_PRIVATE_KEY_2: "0x8b3a350cf5c34c9194ca85829a2df0ec3153be0318b5e2d3348e872092edffba"
# TEST_PRIVATE_KEY_3: "0x92db14e403b83dfe3df233f83dfa3a0d7096f21ca9b0d6d6b8d88b2b4ec1564e"
# omgx_test_relayer:
# image: omgx/builder
# deploy:
# replicas: 0
# build:
# context: ..
# dockerfile: ./ops/docker/Dockerfile.monorepo
# entrypoint:
# - "/bin/sh"
# - -ecx
# - |
# cd /optimism/packages/omgx/message-relayer-fast
# yarn test:integration
# environment:
# L1_NODE_WEB3_URL: http://l1_chain:8545
# L2_NODE_WEB3_URL: http://l2geth:8545
# URL: http://deployer:8081/addresses.json
# OMGX_URL: http://omgx_deployer:8079/addresses.json
# TEST_PRIVATE_KEY_1: "0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80"
# TEST_PRIVATE_KEY_2: "0x8b3a350cf5c34c9194ca85829a2df0ec3153be0318b5e2d3348e872092edffba"
# TEST_PRIVATE_KEY_3: "0x92db14e403b83dfe3df233f83dfa3a0d7096f21ca9b0d6d6b8d88b2b4ec1564e"
# gas price system
gas_oracle:
depends_on:
- l1_chain
- l2geth
image: omgx/omgx_gas-price-oracle
build:
context: ..
dockerfile: ./ops/docker/Dockerfile.omgx_gas-price-oracle
environment:
#GAS_PRICE_ORACLE_ETHEREUM_HTTP_URL: http://l2geth:8545 # Defined in the upstream ethereum-optimism .yml file
L1_NODE_WEB3_URL: http://l1_chain:8545
L2_NODE_WEB3_URL: http://l2geth:8545
GAS_PRICE_ORACLE_ADDRESS: "0x420000000000000000000000000000000000000F"
<< : *deployer_pk
<< : *gas-price-oracle_pk #same as the deployer
<< : *sequencer_pk
<< : *proposer_pk
<< : *relayer_pk
<< : *fast-relayer_pk
GAS_PRICE_ORACLE_FLOOR_PRICE:
GAS_PRICE_ORACLE_ROOF_PRICE:
GAS_PRICE_ORACLE_MIN_PERCENT_CHANGE:
POLLING_INTERVAL:
RETRIES: 70