forked from OffchainLabs/eth-pos-devnet
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
240 lines (228 loc) · 7.98 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
version: "3.9"
services:
#Creates a genesis state for the beacon chain using a YAML configuration file and
# a deterministic set of 64 validators.
create-beacon-chain-genesis:
image: "gcr.io/prysmaticlabs/prysm/cmd/prysmctl:latest"
command:
- testnet
- generate-genesis
- --fork=capella
- --num-validators=64
- --genesis-time-delay=15
- --output-ssz=/consensus/genesis.ssz
- --chain-config-file=/consensus/config.yml
- --geth-genesis-json-in=/execution/genesis.json
- --geth-genesis-json-out=/execution/genesis.json
volumes:
- ./consensus:/consensus
- ./execution:/execution
create-beacon-node-keys:
image: "alpine:latest"
command:
- ./consensus/init.sh
volumes:
- ./consensus:/consensus
- ./execution:/execution
# Sets up the genesis configuration for the go-ethereum client from a JSON file.
geth-genesis:
image: "ethereum/client-go:latest"
command: --datadir=/execution/geth init /execution/genesis.json
volumes:
- ./execution:/execution
- ./execution/genesis.json:/execution/genesis.json
depends_on:
create-beacon-chain-genesis:
condition: service_completed_successfully
geth-import:
image: "ethereum/client-go:latest"
command: --datadir=/execution/geth account import --password /execution/geth_password.txt /execution/sk.json
volumes:
- ./execution:/execution
- ./execution/genesis.json:/execution/genesis.json
depends_on:
create-beacon-chain-genesis:
condition: service_completed_successfully
erigon-genesis:
image: "thorax/erigon:devel"
command: --datadir=/execution/erigon init /execution/genesis.json
volumes:
- ./execution:/execution
- ./execution/genesis.json:/execution/genesis.json
depends_on:
create-beacon-chain-genesis:
condition: service_completed_successfully
# Runs a Prysm beacon chain from a specified genesis state created in the previous step
# and connects to go-ethereum in the same network as the execution client.
# The account used in go-ethereum is set as the suggested fee recipient for transactions
# proposed via the validators attached to the beacon node.
beacon-chain-1:
image: "gcr.io/prysmaticlabs/prysm/beacon-chain:v4.0.8"
command:
- --datadir=/consensus/beacondata
- --min-sync-peers=0
- --genesis-state=/consensus/genesis.ssz
- --bootstrap-node=
- --interop-eth1data-votes
- --chain-config-file=/consensus/config.yml
- --contract-deployment-block=0
- --chain-id=${CHAIN_ID:-32382}
- --rpc-host=0.0.0.0
- --grpc-gateway-host=0.0.0.0
- --execution-endpoint=http://geth:8551
- --accept-terms-of-use
- --jwt-secret=/execution/jwtsecret
- --suggested-fee-recipient=0x85da99c8a7c2c95964c8efd687e95e632fc533d6
- --minimum-peers-per-subnet=0
- --enable-debug-rpc-endpoints
- --p2p-static-id
- --p2p-tcp-port=13000
depends_on:
create-beacon-chain-genesis:
condition: service_completed_successfully
create-beacon-node-keys:
condition: service_completed_successfully
ports:
- 4000:4000
- 3500:3500
- 8080:8080
- 6060:6060
- 9090:9090
- 13000:13000
volumes:
- ./consensus:/consensus
- ./execution:/execution
- ./execution/jwtsecret:/execution/jwtsecret
networks:
polygon-net:
ipv4_address: 10.100.100.10
beacon-chain-2:
image: "gcr.io/prysmaticlabs/prysm/beacon-chain:v4.0.8"
command:
- --datadir=/consensus/beacondata-2
- --bootstrap-node=enr:-MK4QM1Wi7H-T52YEzJ1Ja--DIrqvp1VUMH7CoewzDk5rAIbTO4zfbsY-wOvFqdiPpqki5S1Lj5_nOVpleE_BldN6h-GAYv3b291h2F0dG5ldHOIAAAAAAAAAACEZXRoMpBa8xKTIAAAkv__________gmlkgnY0gmlwhApkZAqJc2VjcDI1NmsxoQI778OxC5HP9v87abs54E1H8n8Jo3fVGH2XsQwmBDEI1ohzeW5jbmV0cwCDdGNwgjLIg3VkcIIu4A
- --peer=enr:-MK4QM1Wi7H-T52YEzJ1Ja--DIrqvp1VUMH7CoewzDk5rAIbTO4zfbsY-wOvFqdiPpqki5S1Lj5_nOVpleE_BldN6h-GAYv3b291h2F0dG5ldHOIAAAAAAAAAACEZXRoMpBa8xKTIAAAkv__________gmlkgnY0gmlwhApkZAqJc2VjcDI1NmsxoQI778OxC5HP9v87abs54E1H8n8Jo3fVGH2XsQwmBDEI1ohzeW5jbmV0cwCDdGNwgjLIg3VkcIIu4A
- --min-sync-peers=1
- --genesis-state=/consensus/genesis.ssz
- --interop-eth1data-votes
- --chain-config-file=/consensus/config.yml
- --contract-deployment-block=0
- --chain-id=${CHAIN_ID:-32382}
- --rpc-host=0.0.0.0
- --grpc-gateway-host=0.0.0.0
- --execution-endpoint=http://erigon:8551
- --accept-terms-of-use
- --jwt-secret=/execution/jwtsecret
- --suggested-fee-recipient=0x85da99c8a7c2c95964c8efd687e95e632fc533d6
- --minimum-peers-per-subnet=0
- --enable-debug-rpc-endpoints
- --p2p-tcp-port=13001
depends_on:
create-beacon-chain-genesis:
condition: service_completed_successfully
create-beacon-node-keys:
condition: service_completed_successfully
ports:
- 13001:13001
volumes:
- ./consensus:/consensus
- ./execution:/execution
- ./execution/jwtsecret:/execution/jwtsecret
networks:
polygon-net:
ipv4_address: 10.100.100.11
# Runs the go-ethereum execution client with the specified, unlocked account and necessary
# APIs to allow for proof-of-stake consensus via Prysm.
geth:
image: "ethereum/client-go:latest"
command:
- --http
- --http.api=eth,net,web3,debug
- --http.addr=0.0.0.0
- --http.corsdomain=*
- --ws
- --ws.api=eth,net,web3
- --ws.addr=0.0.0.0
- --ws.origins=*
- --authrpc.vhosts=*
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/execution/jwtsecret
- --datadir=/execution/geth
- --allow-insecure-unlock
- --unlock=0x85da99c8a7c2c95964c8efd687e95e632fc533d6
- --password=/execution/geth_password.txt
- --nodiscover
- --syncmode=full
ports:
- 8551:8551
- 8545:8545
- 8546:8546
depends_on:
geth-genesis:
condition: service_completed_successfully
geth-import:
condition: service_completed_successfully
beacon-chain-1:
condition: service_started
volumes:
- ./execution:/execution
- ./execution/jwtsecret:/execution/jwtsecret
- ./execution/geth_password.txt:/execution/geth_password.txt
networks:
polygon-net:
ipv4_address: 10.100.100.12
# Runs the go-ethereum execution client with the specified, unlocked account and necessary
# APIs to allow for proof-of-stake consensus via Prysm.
erigon:
image: "thorax/erigon:devel"
command:
- --http
- --http.api=eth,net,web3,erigon,engine,debug
- --http.addr=0.0.0.0
- --http.corsdomain=*
- --ws
- --authrpc.vhosts=*
- --authrpc.addr=0.0.0.0
- --authrpc.jwtsecret=/execution/jwtsecret
- --datadir=/execution/erigon
- --nat=extip:10.100.100.13
ports:
- 18551:8551
- 18545:8545
- 18546:8546
depends_on:
geth-genesis:
condition: service_completed_successfully
beacon-chain-2:
condition: service_started
volumes:
- ./execution:/execution
- ./execution/jwtsecret:/execution/jwtsecret
networks:
polygon-net:
ipv4_address: 10.100.100.13
# We run a validator client with 64, deterministically-generated keys that match
# The validator keys present in the beacon chain genesis state generated a few steps above.
validator:
image: "gcr.io/prysmaticlabs/prysm/validator:v4.0.8"
command:
- --beacon-rpc-provider=beacon-chain-1:4000
- --datadir=/consensus/validatordata
- --accept-terms-of-use
- --interop-num-validators=64
- --interop-start-index=0
- --chain-config-file=/consensus/config.yml
depends_on:
beacon-chain-1:
condition: service_started
volumes:
- ./consensus:/consensus
networks:
polygon-net:
ipv4_address: 10.100.100.14
networks:
polygon-net:
driver: bridge
ipam:
config:
- subnet: 10.100.100.0/24