-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
497 lines (468 loc) · 15.7 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
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
version: "3.5"
networks:
default:
name: supernets2
services:
grafana:
container_name: grafana
image: grafana/grafana-oss
volumes:
- ./config/grafana/datasources.yml:/etc/grafana/provisioning/datasources/default.yml:ro
- ./config/grafana/dashboards.yml:/etc/grafana/provisioning/dashboards/default.yml:ro
- ./config/grafana/dashboard-dockers.json:/etc/grafana/provisioning/dashboards/dashboard-dockers.json:ro
- ./config/grafana/dashboard-node.json:/etc/grafana/provisioning/dashboards/dashboard-node.json:ro
environment:
- GF_SECURITY_ADMIN_USER=supernets2
- GF_SECURITY_ADMIN_PASSWORD=supernets2
ports:
- 3000:3000
depends_on:
- telegraf
telegraf:
container_name: telegraf
image: telegraf
volumes:
- ./config/telegraf.conf:/etc/telegraf/telegraf.conf:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
user: telegraf:${DOCKERGID}
environment:
- POSTGRES_HOST=grafana-db
- POSTGRES_USER=user
- POSTGRES_PASSWORD=password
- POSTGRES_DB=grafana
depends_on:
- grafana-db
- supernets2-json-rpc
grafana-db:
container_name: grafana-db
image: postgres
expose:
- 5432
environment:
- POSTGRES_USER=user
- POSTGRES_PASSWORD=password
- POSTGRES_DB=grafana
supernets2-sequencer:
container_name: supernets2-sequencer
image: supernets2-node
ports:
- 9092:9091 # needed if metrics enabled
- 6060:6060
environment:
- SUPERNETS2_NODE_STATEDB_HOST=supernets2-state-db
- SUPERNETS2_NODE_POOL_DB_HOST=supernets2-pool-db
volumes:
- ./config/test.node.config.toml:/app/config.toml
- ./config/test.genesis.config.json:/app/genesis.json
command:
- "/bin/sh"
- "-c"
- "/app/supernets2-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components sequencer"
supernets2-sequence-sender:
container_name: supernets2-sequence-sender
image: supernets2-node
environment:
- SUPERNETS2_NODE_STATEDB_HOST=supernets2-state-db
- SUPERNETS2_NODE_POOL_DB_HOST=supernets2-pool-db
- SUPERNETS2_NODE_SEQUENCER_SENDER_ADDRESS=0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
volumes:
- ./sequencer.keystore:/pk/sequencer.keystore
- ./config/test.node.config.toml:/app/config.toml
- ./config/test.genesis.config.json:/app/genesis.json
command:
- "/bin/sh"
- "-c"
- "/app/supernets2-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components sequence-sender"
supernets2-json-rpc:
container_name: supernets2-json-rpc
image: supernets2-node
ports:
- 8123:8123
- 8133:8133 # needed if WebSockets enabled
- 9091:9091 # needed if metrics enabled
environment:
- SUPERNETS2_NODE_STATEDB_HOST=supernets2-state-db
- SUPERNETS2_NODE_POOL_DB_HOST=supernets2-pool-db
volumes:
- ./config/test.node.config.toml:/app/config.toml
- ./config/test.genesis.config.json:/app/genesis.json
command:
- "/bin/sh"
- "-c"
- "/app/supernets2-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components rpc"
supernets2-aggregator:
container_name: supernets2-aggregator
image: supernets2-node
ports:
- 50081:50081
- 9093:9091 # needed if metrics enabled
environment:
- SUPERNETS2_NODE_STATEDB_HOST=supernets2-state-db
- SUPERNETS2_NODE_AGGREGATOR_SENDER_ADDRESS=0xf39fd6e51aad88f6f4ce6ab8827279cfffb92266
volumes:
- ./config/test.node.config.toml:/app/config.toml
- ./config/test.genesis.config.json:/app/genesis.json
command:
- "/bin/sh"
- "-c"
- "/app/supernets2-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components aggregator"
supernets2-sync:
container_name: supernets2-sync
image: supernets2-node
environment:
- SUPERNETS2_NODE_STATEDB_HOST=supernets2-state-db
volumes:
- ./config/test.node.config.toml:/app/config.toml
- ./config/test.genesis.config.json:/app/genesis.json
command:
- "/bin/sh"
- "-c"
- "/app/supernets2-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components synchronizer"
supernets2-eth-tx-manager:
container_name: supernets2-eth-tx-manager
image: supernets2-node
ports:
- 9094:9091 # needed if metrics enabled
environment:
- SUPERNETS2_NODE_STATEDB_HOST=supernets2-state-db
volumes:
- ./sequencer.keystore:/pk/sequencer.keystore
- ./aggregator.keystore:/pk/aggregator.keystore
- ./config/test.node.config.toml:/app/config.toml
- ./config/test.genesis.config.json:/app/genesis.json
command:
- "/bin/sh"
- "-c"
- "/app/supernets2-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components eth-tx-manager"
supernets2-l2gaspricer:
container_name: supernets2-l2gaspricer
image: supernets2-node
environment:
- SUPERNETS2_NODE_POOL_DB_HOST=supernets2-pool-db
volumes:
- ./test.keystore:/pk/keystore
- ./config/test.node.config.toml:/app/config.toml
- ./config/test.genesis.config.json:/app/genesis.json
command:
- "/bin/sh"
- "-c"
- "/app/supernets2-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components l2gaspricer"
supernets2-state-db:
container_name: supernets2-state-db
image: postgres
deploy:
resources:
limits:
memory: 2G
reservations:
memory: 1G
ports:
- 5432:5432
volumes:
- ./db/scripts/init_prover_db.sql:/docker-entrypoint-initdb.d/init.sql
environment:
- POSTGRES_USER=state_user
- POSTGRES_PASSWORD=state_password
- POSTGRES_DB=state_db
command:
- "postgres"
- "-N"
- "500"
supernets2-pool-db:
container_name: supernets2-pool-db
image: postgres
deploy:
resources:
limits:
memory: 2G
reservations:
memory: 1G
ports:
- 5433:5432
environment:
- POSTGRES_USER=pool_user
- POSTGRES_PASSWORD=pool_password
- POSTGRES_DB=pool_db
command:
- "postgres"
- "-N"
- "500"
supernets2-event-db:
container_name: supernets2-event-db
image: postgres
deploy:
resources:
limits:
memory: 2G
reservations:
memory: 1G
ports:
- 5431:5432
volumes:
- ./db/scripts/init_event_db.sql:/docker-entrypoint-initdb.d/init.sql
environment:
- POSTGRES_USER=event_user
- POSTGRES_PASSWORD=event_password
- POSTGRES_DB=event_db
command:
- "postgres"
- "-N"
- "500"
supernets2-explorer-l1:
container_name: supernets2-explorer-l1
image: hermeznetwork/zkevm-explorer:latest
ports:
- 4000:4000
environment:
- NETWORK=ETH
- SUBNETWORK=Local Ethereum
- COIN=ETH
- ETHEREUM_JSONRPC_VARIANT=geth
- ETHEREUM_JSONRPC_HTTP_URL=http://supernets2-mock-l1-network:8545
- DATABASE_URL=postgres://l1_explorer_user:l1_explorer_password@supernets2-explorer-l1-db:5432/l1_explorer_db
- ECTO_USE_SSL=false
- MIX_ENV=prod
command:
- "/bin/sh"
- "-c"
- "mix do ecto.create, ecto.migrate; mix phx.server"
supernets2-explorer-l1-db:
container_name: supernets2-explorer-l1-db
image: postgres
ports:
- 5435:5432
environment:
- POSTGRES_USER=l1_explorer_user
- POSTGRES_PASSWORD=l1_explorer_password
- POSTGRES_DB=l1_explorer_db
command:
- "postgres"
- "-N"
- "500"
supernets2-explorer-l2:
container_name: supernets2-explorer-l2
image: hermeznetwork/zkevm-explorer:latest
ports:
- 4001:4000
environment:
- NETWORK=POE
- SUBNETWORK=Polygon Hermez
- COIN=ETH
- ETHEREUM_JSONRPC_VARIANT=geth
- ETHEREUM_JSONRPC_HTTP_URL=http://supernets2-explorer-json-rpc:8124
- DATABASE_URL=postgres://l2_explorer_user:l2_explorer_password@supernets2-explorer-l2-db:5432/l2_explorer_db
- ECTO_USE_SSL=false
- MIX_ENV=prod
- LOGO=/images/blockscout_logo.svg
- LOGO_FOOTER=/images/blockscout_logo.svg
command:
- "/bin/sh"
- "-c"
- "mix do ecto.create, ecto.migrate; mix phx.server"
supernets2-explorer-json-rpc:
container_name: supernets2-explorer-json-rpc
image: supernets2-node
ports:
- 8124:8124
- 8134:8134 # needed if WebSockets enabled
environment:
- SUPERNETS2_NODE_STATEDB_HOST=supernets2-state-db
- SUPERNETS2_NODE_POOL_DB_HOST=supernets2-pool-db
- SUPERNETS2_NODE_RPC_PORT=8124
- SUPERNETS2_NODE_RPC_WEBSOCKETS_PORT=8134
volumes:
- ./config/test.node.config.toml:/app/config.toml
- ./config/test.genesis.config.json:/app/genesis.json
command:
- "/bin/sh"
- "-c"
- "/app/supernets2-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components rpc --http.api eth,net,debug,supernets2,txpool,web3"
supernets2-explorer-l2-db:
container_name: supernets2-explorer-l2-db
image: postgres
ports:
- 5436:5432
environment:
- POSTGRES_USER=l2_explorer_user
- POSTGRES_PASSWORD=l2_explorer_password
- POSTGRES_DB=l2_explorer_db
command: [ "postgres", "-N", "500" ]
supernets2-mock-l1-network:
container_name: supernets2-mock-l1-network
image: hermeznetwork/geth-supernets2-contracts:v0.0.1
ports:
- 8545:8545
- 8546:8546
command:
- "--http"
- "--http.api"
- "admin,eth,debug,miner,net,txpool,personal,web3"
- "--http.addr"
- "0.0.0.0"
- "--http.corsdomain"
- "*"
- "--http.vhosts"
- "*"
- "--ws"
- "--ws.origins"
- "*"
- "--ws.addr"
- "0.0.0.0"
- "--dev"
- "--datadir"
- "/geth_data"
- "--syncmode"
- "full"
- "--rpc.allow-unprotected-txs"
supernets2-prover:
container_name: supernets2-prover
image: hermeznetwork/zkevm-prover:v1.1.3-RC2-fork.4
ports:
# - 50051:50051 # Prover
- 50052:50052 # Mock prover
- 50061:50061 # MT
- 50071:50071 # Executor
volumes:
- ./config/test.prover.config.json:/usr/src/app/config.json
command: >
zkProver -c /usr/src/app/config.json
zkprover-mock:
container_name: zkprover-mock
image: hermeznetwork/zkevm-prover:v1.1.3-RC2-fork.4 #hermeznetwork/zkprover-mock:latest
ports:
- 43061:43061 # MT
- 43071:43071 # Executor
volumes:
- ./vectors/src:/app/testvectors
command: >
zkProver -c /usr/src/app/config.json
#/app/zkprover-mock server --statedb-port 43061 --executor-port 43071 --test-vector-path /app/testvectors
supernets2-approve:
container_name: supernets2-approve
image: supernets2-node
environment:
- SUPERNETS2_NODE_STATEDB_HOST=supernets2-state-db
volumes:
- ./sequencer.keystore:/pk/keystore
- ./config/test.node.config.toml:/app/config.toml
- ./config/test.genesis.config.json:/app/genesis.json
command:
- "/bin/sh"
- "-c"
- "/app/supernets2-node approve --network custom --custom-network-file /app/genesis.json --key-store-path /pk/keystore --pw testonly --am 115792089237316195423570985008687907853269984665640564039457584007913129639935 -y --cfg /app/config.toml"
supernets2-permissionless-db:
container_name: supernets2-permissionless-db
image: postgres
deploy:
resources:
limits:
memory: 2G
reservations:
memory: 1G
ports:
- 5434:5432
volumes:
- ./db/scripts/single_db_server.sql:/docker-entrypoint-initdb.d/init.sql
environment:
- POSTGRES_USER=test_user
- POSTGRES_PASSWORD=test_password
- POSTGRES_DB=test_db
command:
- "postgres"
- "-N"
- "500"
supernets2-permissionless-node:
container_name: supernets2-permissionless-node
image: supernets2-node
ports:
- 8125:8125
environment:
- SUPERNETS2_NODE_ISTRUSTEDSEQUENCER=false
- SUPERNETS2_NODE_STATEDB_USER=test_user
- SUPERNETS2_NODE_STATEDB_PASSWORD=test_password
- SUPERNETS2_NODE_STATEDB_NAME=state_db
- SUPERNETS2_NODE_STATEDB_HOST=supernets2-permissionless-db
- SUPERNETS2_NODE_POOL_DB_USER=test_user
- SUPERNETS2_NODE_POOL_DB_PASSWORD=test_password
- SUPERNETS2_NODE_POOL_DB_NAME=pool_db
- SUPERNETS2_NODE_POOL_DB_HOST=supernets2-permissionless-db
- SUPERNETS2_NODE_RPC_PORT=8125
- SUPERNETS2_NODE_RPC_SEQUENCERNODEURI=http://supernets2-json-rpc:8123
- SUPERNETS2_NODE_MTCLIENT_URI=supernets2-permissionless-prover:50061
- SUPERNETS2_NODE_EXECUTOR_URI=supernets2-permissionless-prover:50071
volumes:
- ./config/test.node.config.toml:/app/config.toml
- ./config/test.genesis.config.json:/app/genesis.json
command:
- "/bin/sh"
- "-c"
- "/app/supernets2-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components \"rpc,synchronizer\""
supernets2-permissionless-node-forced-DAC:
container_name: supernets2-permissionless-node-forced-DAC
image: supernets2-node
ports:
- 8126:8125
environment:
- SUPERNETS2_NODE_ISTRUSTEDSEQUENCER=false
- SUPERNETS2_NODE_STATEDB_USER=test_user
- SUPERNETS2_NODE_STATEDB_PASSWORD=test_password
- SUPERNETS2_NODE_STATEDB_NAME=state_db
- SUPERNETS2_NODE_STATEDB_HOST=supernets2-permissionless-db
- SUPERNETS2_NODE_POOL_DB_USER=test_user
- SUPERNETS2_NODE_POOL_DB_PASSWORD=test_password
- SUPERNETS2_NODE_POOL_DB_NAME=pool_db
- SUPERNETS2_NODE_POOL_DB_HOST=supernets2-permissionless-db
- SUPERNETS2_NODE_RPC_PORT=8125
- SUPERNETS2_NODE_RPC_SEQUENCERNODEURI=http://supernets2-json-rpc:8123
- SUPERNETS2_NODE_SYNCHRONIZER_TRUSTEDSEQUENCERURL=http://you-cant-touch-this:8123
- SUPERNETS2_NODE_MTCLIENT_URI=supernets2-permissionless-prover:50061
- SUPERNETS2_NODE_EXECUTOR_URI=supernets2-permissionless-prover:50071
volumes:
- ./config/test.node.config.toml:/app/config.toml
- ./config/test.genesis.config.json:/app/genesis.json
command:
- "/bin/sh"
- "-c"
- "/app/supernets2-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components \"rpc,synchronizer\""
supernets2-permissionless-prover:
container_name: supernets2-permissionless-prover
image: hermeznetwork/zkevm-prover:v1.1.3-RC2-fork.4
ports:
# - 50058:50058 # Prover
- 50059:50052 # Mock prover
- 50068:50061 # MT
- 50078:50071 # Executor
volumes:
- ./config/test.permissionless.prover.config.json:/usr/src/app/config.json
command: >
zkProver -c /usr/src/app/config.json
supernets2-metrics:
image: prom/prometheus:v2.39.1
container_name: supernets2-metrics
restart: unless-stopped
ports:
- 9090:9090
command:
- --config.file=/etc/prometheus/prometheus.yml
- --web.enable-lifecycle
volumes:
- ./config/metrics/prometheus:/etc/prometheus
supernets2-data-availability-db:
container_name: supernets2-data-availability-db
restart: unless-stopped
image: postgres
healthcheck:
test: ["CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}"]
interval: 10s
timeout: 5s
retries: 5
ports:
- 5444:5432
environment:
- POSTGRES_USER=committee_user
- POSTGRES_PASSWORD=committee_password
- POSTGRES_DB=committee_db
command:
- "postgres"
- "-N"
- "500"