forked from privacy-scaling-explorations/zkevm-chain
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
125 lines (117 loc) · 3.85 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
version: '3.9'
services:
#TODO: add additional bootnode
leader-testnet-geth:
image: ghcr.io/appliedzkp/go-ethereum:latest
restart: unless-stopped
volumes:
- leader-testnet-geth:/root
- ./testnet:/host
ports:
- 30303:30303
environment:
- MINER_PRIV_KEY
- MINER_ADDRESS
entrypoint: '/host/init.sh'
command: /host/l2-genesis-template.json /host/l2-genesis-generated.json --gcmode archive --networkid 99 --unlock $MINER_ADDRESS --password /dev/null --miner.gaslimit 10000000 --nodekeyhex abebb96d7d9bbc99730439f230afd0008c0e0cb93eafb6874fecb256572252a4
server-testnet-geth:
deploy:
replicas: 2
image: ghcr.io/appliedzkp/go-ethereum:latest
restart: unless-stopped
volumes:
- ./testnet:/host:ro
environment:
- BOOTNODE=enode://f28f5a7706e5aec836f3136feb7d5e7264a7f0da04ac4984f0ff2421ee1dd2b135894cf0d4f5ff8c412442b95b9bb0780a9c8a8c64de2d4a8c458586fdb20829@leader-testnet-geth:30303
entrypoint: /bin/sh
# normally those serving nodes should not serving the debug namespace + gcmode archive - only for testnet
command: -c 'geth init /host/l2-genesis-generated.json && geth console --exec admin.addTrustedPeer\(\"$$BOOTNODE\"\) && exec geth --gcmode archive --syncmode full --http --http.addr "[::]" --http.port 8545 --http.api eth,net,web3,debug --networkid 99 --bootnodes $$BOOTNODE'
l1-testnet-geth:
image: ghcr.io/appliedzkp/go-ethereum:latest
restart: unless-stopped
volumes:
- l1-testnet-geth:/root
- ./testnet:/host
environment:
- MINER_PRIV_KEY
- MINER_ADDRESS
entrypoint: '/host/init.sh'
command: /host/l1-genesis-template.json /root/genesis.json --networkid 98 --unlock $MINER_ADDRESS --password /dev/null --miner.gaslimit 10000000 --mine
coordinator:
init: true
build:
dockerfile: docker/coordinator/Dockerfile
image: ghcr.io/appliedzkp/zkevm-chain/coordinator:latest
depends_on:
- leader-testnet-geth
- server-testnet-geth
- l1-testnet-geth
- prover-rpcd
restart: unless-stopped
volumes:
- ./testnet:/host:ro
environment:
- LISTEN=[::]:8545
- PARAMS_PATH=/host/params
- RPC_SERVER_NODES=server-testnet-geth:8545
- L2_RPC_URL=http://leader-testnet-geth:8545
- L1_RPC_URL=http://l1-testnet-geth:8545
- L1_BRIDGE=0x936a70c0b28532aa22240dce21f89a8399d6ac60
- L1_PRIV=$MINER_PRIV_KEY
- PROVER_RPCD_URL=http://prover-rpcd:8545
- DUMMY_PROVER=1
prover-rpcd:
init: true
build:
dockerfile: docker/prover/Dockerfile
image: ghcr.io/appliedzkp/zkevm-chain/prover:latest
restart: unless-stopped
volumes:
- ./testnet:/host:ro
environment:
- BIND=[::]:8545
- PARAMS_PATH=/host/params
dev:
profiles:
- dev
depends_on:
- leader-testnet-geth
- server-testnet-geth
- l1-testnet-geth
- prover-rpcd
image: rust:1.58.1
volumes:
- .:/app
- dev-build-cache:/app/coordinator/target:overlay
- dev-cargo-cache:/usr/local:overlay
environment:
- LISTEN=[::]:8000
- PARAMS_PATH=/app/testnet/params
- RPC_SERVER_NODES=server-testnet-geth:8545
- L2_RPC_URL=http://leader-testnet-geth:8545
- L1_RPC_URL=http://l1-testnet-geth:8545
- L1_BRIDGE=0x936a70c0b28532aa22240dce21f89a8399d6ac60
- L1_PRIV=$MINER_PRIV_KEY
- PROVER_RPCD_URL=http://prover-rpcd:8545
- DUMMY_PROVER=1
ports:
- 8000:8000
working_dir: /app/coordinator
entrypoint: /bin/bash
command: -c exit
tty: true
stdin_open: true
web:
depends_on:
- coordinator
restart: unless-stopped
build:
dockerfile: docker/web/Dockerfile
image: ghcr.io/appliedzkp/zkevm-chain/web:latest
ports:
- 8000:8000
volumes:
dev-build-cache:
dev-cargo-cache:
leader-testnet-geth:
l1-testnet-geth: