forked from 0xPolygonHermez/zkevm-bridge-service
-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.yml
342 lines (324 loc) · 11.2 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
version: "3.5"
networks:
default:
name: xlayer
services:
zkevm-state-db:
container_name: zkevm-state-db
image: postgres
deploy:
resources:
limits:
memory: 2G
reservations:
memory: 1G
ports:
- 5432:5432
volumes:
- ./test/config/prover/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-bridge-db:
container_name: zkevm-bridge-db
image: postgres
deploy:
resources:
limits:
memory: 2G
reservations:
memory: 1G
expose:
- 5435
ports:
- 5435:5432
environment:
- POSTGRES_USER=test_user
- POSTGRES_PASSWORD=test_password
- POSTGRES_DB=test_db
command: ["postgres", "-N", "500"]
xlayer-bridge-redis:
container_name: xlayer-bridge-redis
image: redis
deploy:
resources:
limits:
memory: 2G
reservations:
memory: 1G
expose:
- 6379
ports:
- 6379:6379
environment:
- REDIS_PASSWORD=my_password
- REDIS_PORT=6379
- REDIS_DATABASES=8
# kafka-zookeeper:
# image: wurstmeister/zookeeper
# container_name: kafka-zookeeper
# ports:
# - "2181:2181"
# expose:
# - 2181
# xlayer-bridge-coin-kafka:
# image: wurstmeister/kafka
# container_name: xlayer-bridge-coin-kafka
# expose:
# - 9092
# environment:
# KAFKA_ADVERTISED_LISTENERS: INSIDE://:9092,OUTSIDE://localhost:9123
# KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT
# KAFKA_LISTENERS: INSIDE://0.0.0.0:9092,OUTSIDE://0.0.0.0:9123
# KAFKA_INTER_BROKER_LISTENER_NAME: INSIDE
# KAFKA_ZOOKEEPER_CONNECT: kafka-zookeeper:2181
# KAFKA_CREATE_TOPICS: "explorer_chainAddressPrice_push:1:1"
xlayer-bridge-service-api:
container_name: xlayer-bridge-service-api
image: xlayer-bridge-service
ports:
- 8080:8080
- 9090:9090
- 9300:9091
environment:
- ZKEVM_BRIDGE_DATABASE_USER=test_user
- ZKEVM_BRIDGE_DATABASE_PASSWORD=test_password
- ZKEVM_BRIDGE_DATABASE_NAME=test_db
- ZKEVM_BRIDGE_DATABASE_HOST=zkevm-bridge-db
- ZKEVM_BRIDGE_DATABASE_PORT=5432
volumes:
- ./test/test.keystore.claimtx:/pk/keystore.claimtxmanager
- ./config/config.local.toml:/app/config.toml
- ./sentinel/config.json:/app/sentinel_config.json
command:
- "/bin/sh"
- "-c"
- "/app/xlayer-bridge runAPI --cfg /app/config.toml"
xlayer-bridge-service-task:
container_name: xlayer-bridge-service-task
image: xlayer-bridge-service
ports:
- 9302:9091
environment:
- ZKEVM_BRIDGE_DATABASE_USER=test_user
- ZKEVM_BRIDGE_DATABASE_PASSWORD=test_password
- ZKEVM_BRIDGE_DATABASE_NAME=test_db
- ZKEVM_BRIDGE_DATABASE_HOST=zkevm-bridge-db
- ZKEVM_BRIDGE_DATABASE_PORT=5432
volumes:
- ./test/test.keystore.claimtx:/pk/keystore.claimtxmanager
- ./config/config.local.toml:/app/config.toml
command:
- "/bin/sh"
- "-c"
- "/app/xlayer-bridge runTask --cfg /app/config.toml"
xlayer-bridge-service-push:
container_name: xlayer-bridge-service-push
image: xlayer-bridge-service
ports:
- 9301:9091
environment:
- ZKEVM_BRIDGE_DATABASE_USER=test_user
- ZKEVM_BRIDGE_DATABASE_PASSWORD=test_password
- ZKEVM_BRIDGE_DATABASE_NAME=test_db
- ZKEVM_BRIDGE_DATABASE_HOST=zkevm-bridge-db
- ZKEVM_BRIDGE_DATABASE_PORT=5432
volumes:
- ./test/test.keystore.claimtx:/pk/keystore.claimtxmanager
- ./config/config.local.toml:/app/config.toml
command:
- "/bin/sh"
- "-c"
- "/app/xlayer-bridge runPushTask --cfg /app/config.toml"
zkevm-node:
container_name: zkevm-node
image: hermeznetwork/zkevm-node:v0.5.0
ports:
- 8123:8123
- 61090:61090
environment:
- ZKEVM_NODE_STATE_DB_HOST=zkevm-state-db
- ZKEVM_NODE_POOL_HOST=zkevm-pool-db
- ZKEVM_NODE_RPC_DB_HOST=zkevm-rpc-db
- ZKEVM_NODE_SEQUENCER_FINALIZER_BATCHMAXDELTATIMESTAMP="4s"
- ZKEVM_NODE_SEQUENCER_FINALIZER_L2BLOCKMAXDELTATIMESTAMP="1s"
volumes:
- ./test/test.keystore.sequencer:/pk/keystore.sequencer
- ./test/test.keystore.aggregator:/pk/keystore.aggregator
- ./test/config/node/config.zkevm.node.toml:/app/config.toml
- ./test/config/node/genesis.local.json:/app/genesis.json
command:
- "/bin/sh"
- "-c"
- "/app/zkevm-node approve --network custom --custom-network-file /app/genesis.json --am 115792089237316195423570985008687907853269984665640564039457584007913129639935 -y --cfg /app/config.toml --key-store-path /pk/keystore.sequencer --password testonly &&
/app/zkevm-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components \"synchronizer,rpc,sequencer,sequence-sender,aggregator,eth-tx-manager,l2gaspricer\" --http.api eth,net,debug,zkevm,txpool,web3"
zkevm-node-v1tov2:
container_name: zkevm-node-v1tov2
image: hermeznetwork/zkevm-node:v0.5.0
ports:
- 8123:8123
- 9091:9091 # needed if metrics enabled
environment:
- ZKEVM_NODE_STATE_DB_HOST=zkevm-state-db
- ZKEVM_NODE_POOL_HOST=zkevm-pool-db
- ZKEVM_NODE_RPC_DB_HOST=zkevm-rpc-db
- ZKEVM_NODE_ETHERMAN_URL=http://zkevm-v1tov2-l1-network:8545
- ZKEVM_NODE_EXECUTOR_URI=zkevm-prover-v1tov2:50071
- ZKEVM_NODE_MTCLIENT_URI=zkevm-prover-v1tov2:50061
volumes:
- ./test/test.keystore.sequencer:/pk/keystore.sequencer
- ./test/test.keystore.aggregator:/pk/keystore.aggregator
- ./test/config/node/config.zkevm.node.toml:/app/config.toml
- ./test/config/node/genesis.local-v1tov2.json:/app/genesis.json
command:
- "/bin/sh"
- "-c"
- "/app/zkevm-node approve --network custom --custom-network-file /app/genesis.json --am 115792089237316195423570985008687907853269984665640564039457584007913129639935 -y --cfg /app/config.toml --key-store-path /pk/keystore.sequencer --password testonly &&
/app/zkevm-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components \"synchronizer,rpc,sequencer,sequence-sender,eth-tx-manager,l2gaspricer\" --http.api eth,net,debug,zkevm,txpool,web3"
zkevm-aggregator-v1tov2:
container_name: zkevm-aggregator-v1tov2
image: hermeznetwork/zkevm-node:v0.5.0
ports:
- 9092:9091 # needed if metrics enabled
environment:
- ZKEVM_NODE_STATE_DB_HOST=zkevm-state-db
- ZKEVM_NODE_POOL_HOST=zkevm-pool-db
- ZKEVM_NODE_RPC_DB_HOST=zkevm-rpc-db
- ZKEVM_NODE_ETHERMAN_URL=http://zkevm-v1tov2-l1-network:8545
- ZKEVM_NODE_EXECUTOR_URI=zkevm-prover-v1tov2:50071
- ZKEVM_NODE_MTCLIENT_URI=zkevm-prover-v1tov2:50061
- ZKEVM_NODE_AGGREGATOR_UPGRADEETROGBATCHNUMBER=2
volumes:
- ./test/test.keystore.sequencer:/pk/keystore.sequencer
- ./test/test.keystore.aggregator:/pk/keystore.aggregator
- ./test/config/node/config.zkevm.node.toml:/app/config.toml
- ./test/config/node/genesis.local-v1tov2.json:/app/genesis.json
command:
- "/bin/sh"
- "-c"
- "/app/zkevm-node run --network custom --custom-network-file /app/genesis.json --cfg /app/config.toml --components \"aggregator\""
zkevm-mock-l1-network:
container_name: zkevm-local-l1-network
image: hermeznetwork/geth-zkevm-contracts:v2.1.1-fork.7-geth1.12.0
ports:
- 8545:8545
zkevm-v1tov2-l1-network:
container_name: zkevm-v1tov2-l1-network
image: hermeznetwork/geth-zkevm-contracts:v2.1.1-lxly-updateV1ToV2-etrog-geth1.12.0
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"
- "--dev.period"
- "1"
- "--datadir"
- "/geth_data"
- "--syncmode"
- "full"
- "--rpc.allow-unprotected-txs"
zkevm-prover:
container_name: zkevm-prover
image: hermeznetwork/zkevm-prover:v4.0.1
ports:
- 50051:50051 # Prover
- 50052:50052 # MockProver
- 50061:50061 # MT
- 50071:50071 # Executor
volumes:
- ./test/config/prover/config.prover.json:/usr/src/app/config.json
command: >
zkProver -c /usr/src/app/config.json
zkevm-prover-v1tov2:
container_name: zkevm-prover-v1tov2
image: hermeznetwork/zkevm-prover:v4.0.1
environment:
- AGGREGATOR_CLIENT_HOST=zkevm-aggregator-v1tov2
ports:
- 50051:50051 # Prover
- 50052:50052 # MockProver
- 50061:50061 # MT
- 50071:50071 # Executor
volumes:
- ./test/config/prover/config.prover.json:/usr/src/app/config.json
command: >
zkProver -c /usr/src/app/config.json
xlayer-bridge-service:
container_name: xlayer-bridge-service
image: xlayer-bridge-service
ports:
- 8080:8080
- 9090:9090
- 9300:9091
environment:
- ZKEVM_BRIDGE_DATABASE_USER=test_user
- ZKEVM_BRIDGE_DATABASE_PASSWORD=test_password
- ZKEVM_BRIDGE_DATABASE_NAME=test_db
- ZKEVM_BRIDGE_DATABASE_HOST=zkevm-bridge-db
- ZKEVM_BRIDGE_DATABASE_PORT=5432
volumes:
- ./test/test.keystore.claimtx:/pk/keystore.claimtxmanager
- ./config/config.local.toml:/app/config.toml
- ./sentinel/config.json:/app/sentinel_config.json
command:
- "/bin/sh"
- "-c"
- "/app/xlayer-bridge run --cfg /app/config.toml"
xlayer-bridge-service-v1tov2:
container_name: xlayer-bridge-service-v1tov2
image: xlayer-bridge-service
ports:
- 8080:8080
- 9090:9090
- 9300:9091
environment:
- ZKEVM_BRIDGE_DATABASE_USER=test_user
- ZKEVM_BRIDGE_DATABASE_PASSWORD=test_password
- ZKEVM_BRIDGE_DATABASE_NAME=test_db
- ZKEVM_BRIDGE_DATABASE_HOST=zkevm-bridge-db
- ZKEVM_BRIDGE_DATABASE_PORT=5432
- ZKEVM_BRIDGE_ETHERMAN_L1URL=http://zkevm-v1tov2-l1-network:8545
- ZKEVM_BRIDGE_ETHERMAN_L2URLS=http://zkevm-node-v1tov2:8123
- ZKEVM_BRIDGE_NETWORKCONFIG_POLYGONZKEVMADDRESS=0x3Aa5ebB10DC797CAC828524e59A333d0A371443c
- ZKEVM_BRIDGE_NETWORKCONFIG_POLYGONBRIDGEADDRESS=0x80a540502706aa690476D5534e26939894559c05
- ZKEVM_BRIDGE_NETWORKCONFIG_L2POLYGONBRIDGEADDRESSES=0x80a540502706aa690476D5534e26939894559c05
volumes:
- ./test/test.keystore.claimtx:/pk/keystore.claimtxmanager
- ./config/config.local.toml:/app/config.toml
- ./sentinel/config.json:/app/sentinel_config.json
command:
- "/bin/sh"
- "-c"
- "/app/xlayer-bridge run --cfg /app/config.toml"