forked from 0xPolygonHermez/zkevm-node
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
323 lines (304 loc) · 10 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
version: "3.5"
networks:
default:
name: zkevm
services:
zkevm-sequencer:
container_name: zkevm-sequencer
image: zkevm-node
environment:
- ZKEVM_NODE_STATEDB_HOST=zkevm-state-db
- ZKEVM_NODE_POOL_HOST=zkevm-pool-db
- ZKEVM_NODE_ETHERMAN_PRIVATEKEYPATH=/pk/keystore
volumes:
- ./test/test.keystore:/pk/keystore
- ./${CONFIG_MODE}/config/config.${CONFIG_MODE:-local}.toml:/app/config.toml
command:
- "/bin/sh"
- "-c"
- "/app/zkevm-node run --network local --cfg /app/config.toml --components sequencer"
zkevm-json-rpc:
container_name: zkevm-json-rpc
image: zkevm-node
ports:
- 8123:8123
environment:
- ZKEVM_NODE_STATEDB_HOST=zkevm-state-db
- ZKEVM_NODE_POOL_HOST=zkevm-pool-db
- ZKEVM_NODE_RPC_DB_HOST=zkevm-rpc-db
- ZKEVM_NODE_RPC_BROADCASTURI=zkevm-broadcast:61090
- ZKEVM_NODE_ETHERMAN_PRIVATEKEYPATH=/pk/keystore
volumes:
- ./test/test.keystore:/pk/keystore
- ./${CONFIG_MODE}/config/config.${CONFIG_MODE:-local}.toml:/app/config.toml
command:
- "/bin/sh"
- "-c"
- "/app/zkevm-node run --network local --cfg /app/config.toml --components rpc"
zkevm-non-sequencer-json-rpc:
container_name: zkevm-non-sequencer-json-rpc
image: zkevm-node
ports:
- 8125:8125
environment:
- ZKEVM_NODE_STATEDB_HOST=zkevm-state-db
- ZKEVM_NODE_POOL_HOST=zkevm-pool-db
- ZKEVM_NODE_RPC_DB_HOST=zkevm-rpc-db
- ZKEVM_NODE_RPC_SEQUENCERNODEURI=http://zkevm-json-rpc:8123
- ZKEVM_NODE_ETHERMAN_PRIVATEKEYPATH=/pk/keystore
volumes:
- ./test/test.keystore:/pk/keystore
- ./${CONFIG_MODE}/config/config.${CONFIG_MODE:-local}.toml:/app/config.toml
command:
- "/bin/sh"
- "-c"
- "/app/zkevm-node run --network local --cfg /app/config.toml --components rpc"
zkevm-aggregator:
container_name: zkevm-aggregator
image: zkevm-node
environment:
- ZKEVM_NODE_STATEDB_HOST=zkevm-state-db
- ZKEVM_NODE_ETHERMAN_PRIVATEKEYPATH=/pk/keystore
volumes:
- ./test/test.keystore:/pk/keystore
- ./${CONFIG_MODE}/config/config.${CONFIG_MODE:-local}.toml:/app/config.toml
command:
- "/bin/sh"
- "-c"
- "/app/zkevm-node run --network local --cfg /app/config.toml --components aggregator"
zkevm-sync:
container_name: zkevm-sync
image: zkevm-node
environment:
- ZKEVM_NODE_STATEDB_HOST=zkevm-state-db
- ZKEVM_NODE_ETHERMAN_PRIVATEKEYPATH=/pk/keystore
volumes:
- ./test/test.keystore:/pk/keystore
- ./${CONFIG_MODE}/config/config.${CONFIG_MODE:-local}.toml:/app/config.toml
command:
- "/bin/sh"
- "-c"
- "/app/zkevm-node run --network local --cfg /app/config.toml --components synchronizer"
zkevm-broadcast:
container_name: zkevm-broadcast
image: zkevm-node
environment:
- ZKEVM_NODE_STATEDB_HOST=zkevm-state-db
- ZKEVM_NODE_ETHERMAN_PRIVATEKEYPATH=/pk/keystore
ports:
- 61090:61090
volumes:
- ./config/config.local.toml:/app/config.toml
- ./test/test.keystore:/pk/keystore
command:
- "/bin/sh"
- "-c"
- "/app/zkevm-node run --network local --cfg /app/config.toml --components broadcast-trusted-state"
zkevm-state-db:
container_name: zkevm-state-db
image: postgres
deploy:
resources:
limits:
memory: 2G
reservations:
memory: 1G
ports:
- 5432:5432
volumes:
- ./config/initproverdb.sql:/docker-entrypoint-initdb.d/init.sql
environment:
- POSTGRES_USER=state_user
- POSTGRES_PASSWORD=state_password
- POSTGRES_DB=state_db
command: ["postgres", "-N", "500"]
zkevm-pool-db:
container_name: zkevm-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"]
zkevm-rpc-db:
container_name: zkevm-rpc-db
image: postgres
deploy:
resources:
limits:
memory: 2G
reservations:
memory: 1G
ports:
- 5434:5432
environment:
- POSTGRES_USER=rpc_user
- POSTGRES_PASSWORD=rpc_password
- POSTGRES_DB=rpc_db
command: ["postgres", "-N", "500"]
zkevm-explorer-l1:
container_name: zkevm-explorer-l1
image: hermeznetwork/hermez-node-blockscout:latest
ports:
- 4000:4000
environment:
- NETWORK=ETH
- SUBNETWORK=Local Ethereum
- COIN=ETH
- ETHEREUM_JSONRPC_VARIANT=geth
- ETHEREUM_JSONRPC_HTTP_URL=http://zkevm-mock-l1-network:8545
- DATABASE_URL=postgres://l1_explorer_user:l1_explorer_password@zkevm-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"]
zkevm-explorer-l1-db:
container_name: zkevm-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"]
zkevm-explorer-l2:
container_name: zkevm-explorer-l2
image: hermeznetwork/hermez-node-blockscout:latest
ports:
- 4001:4000
environment:
- NETWORK=POE
- SUBNETWORK=Polygon Hermez
- COIN=ETH
- ETHEREUM_JSONRPC_VARIANT=geth
- ETHEREUM_JSONRPC_HTTP_URL=http://zkevm-explorer-json-rpc:8124
- DATABASE_URL=postgres://l2_explorer_user:l2_explorer_password@zkevm-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"]
zkevm-explorer-json-rpc:
container_name: zkevm-explorer-json-rpc
image: zkevm-node
ports:
- 8124:8124
environment:
- ZKEVM_NODE_STATEDB_HOST=zkevm-state-db
- ZKEVM_NODE_POOL_HOST=zkevm-pool-db
- ZKEVM_NODE_RPC_DB_HOST=zkevm-rpc-db
- ZKEVM_NODE_RPC_PORT=8124
- ZKEVM_NODE_ETHERMAN_PRIVATEKEYPATH=/pk/keystore
volumes:
- ./test/test.keystore:/pk/keystore
- ./config/config.local.toml:/app/config.toml
command:
- "/bin/sh"
- "-c"
- "/app/zkevm-node run --network local --cfg /app/config.toml --components rpc --http.api eth,net,debug,zkevm,txpool,web3"
zkevm-explorer-l2-db:
container_name: zkevm-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"]
zkevm-mock-l1-network:
container_name: zkevm-mock-l1-network
image: hermeznetwork/geth-zkevm-contracts@sha256:24754a773b803ce0de8278c02bb756757b09fda65dc993e560a0b76a09b88248
ports:
- 8545:8545
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"]
zkevm-prover:
container_name: zkevm-prover
image: hermeznetwork/zkevm-prover:develop@sha256:408855e37f4751260bfb206e6aeb3b53c773a1615e8d675166b3647770700701
ports:
# - 50051:50051 # Prover
- 50052:50052 # Mock prover
- 50061:50061 # MT
- 50071:50071 # Executor
volumes:
- ./${CONFIG_MODE}/config/prover.config.${CONFIG_MODE:-local}.json:/usr/src/app/config.json
command: >
zkProver -c /usr/src/app/config.json
zkprover-mock:
container_name: zkprover-mock
image: hermeznetwork/zkprover-mock:latest
ports:
- 43061:43061 # MT
- 43071:43071 # Executor
volumes:
- ./test/vectors/src:/app/testvectors
command: >
/app/zkprover-mock server --statedb-port 43061 --executor-port 43071 --test-vector-path /app/testvectors
zkevm-approve:
container_name: zkevm-approve
image: zkevm-node
environment:
- ZKEVM_NODE_STATEDB_HOST=zkevm-state-db
- ZKEVM_NODE_ETHERMAN_PRIVATEKEYPATH=/pk/keystore
volumes:
- ./test/test.keystore:/pk/keystore
- ./config/config.local.toml:/app/config.toml
command:
- "/bin/sh"
- "-c"
- "/app/zkevm-node approve --am 10000000000000000 -y --network local --cfg /app/config.toml"
zkevm-permissionless-db:
container_name: zkevm-permissionless-db
image: postgres
deploy:
resources:
limits:
memory: 2G
reservations:
memory: 1G
ports:
- 5437:5432
environment:
- POSTGRES_USER=test_user
- POSTGRES_PASSWORD=test_password
- POSTGRES_DB=test_db
command: ["postgres", "-N", "500"]
zkevm-permissionless-node:
container_name: zkevm-permissionless-node
image: zkevm-node
ports:
- 8126:8126
environment:
- ZKEVM_NODE_TRUSTED=false
- ZKEVM_NODE_STATEDB_USER=test_user
- ZKEVM_NODE_STATEDB_PASSWORD=test_password
- ZKEVM_NODE_STATEDB_NAME=state_db
- ZKEVM_NODE_STATEDB_HOST=zkevm-permissionless-db
- ZKEVM_NODE_POOL_USER=test_user
- ZKEVM_NODE_POOL_PASSWORD=test_password
- ZKEVM_NODE_POOL_NAME=pool_db
- ZKEVM_NODE_POOL_HOST=zkevm-permissionless-db
- ZKEVM_NODE_RPC_DB_USER=test_user
- ZKEVM_NODE_RPC_DB_PASSWORD=test_password
- ZKEVM_NODE_RPC_DB_NAME=rpc_db
- ZKEVM_NODE_RPC_DB_HOST=zkevm-permissionless-db
- ZKEVM_NODE_ETHERMAN_PRIVATEKEYPATH=/pk/keystore
- ZKEVM_NODE_RPC_PORT=8126
volumes:
- ./test/test.keystore:/pk/keystore
- ./config/config.local.toml:/app/config.toml
- ./config/single_db_server.sql:/docker-entrypoint-initdb.d/init.sql
command:
- "/bin/sh"
- "-c"
- "/app/zkevm-node run --network local --cfg /app/config.toml --components \"rpc,synchronizer\""