-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
140 lines (134 loc) · 4.26 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
version: '3'
networks:
testnet:
driver: bridge
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:
container_name: prysmctl${RUN_ID}
image: "gcr.io/prysmaticlabs/prysm/cmd/prysmctl:latest"
user: $UID:$GID
command:
- testnet
- generate-genesis
- --fork=bellatrix
- --num-validators=64
- --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
- ./jwtsecret:/execution/jwtsecret
# Starts the go-ethereum client with the genesis configuration.
geth:
container_name: geth${RUN_ID}
image: ethereum/client-go:latest
user: $UID:$GID
command:
- --datadir=/execution
- --dev
- --networkid=${CHAIN_ID:-1337}
- --unlock=0000000c31f7b3221f7e405c8e735abd3b10a78d
- --password=/execution/geth_password.txt
- --allow-insecure-unlock
- --nodiscover
- --syncmode=full
- --authrpc.addr=0.0.0.0
- --authrpc.port=8551
- --authrpc.jwtsecret=/execution/jwtsecret
- --authrpc.vhosts=*
- --http
- --http.addr=0.0.0.0
- --http.api=engine,eth,web3,net,debug,txpool
- --http.corsdomain=*
- --http.port=8545
- --http.vhosts=*
- --ws
- --ws.addr=0.0.0.0
- --ws.origins=*
- --ws.port=8546
- --verbosity=3
- --metrics
- --metrics.addr=0.0.0.0
tty: true
volumes:
- ./execution:/execution
- ./execution/geth_password.txt:/execution/geth_password.txt
- ./jwtsecret:/execution/jwtsecret
environment:
- GID
- RUN_ID
- UID
ports:
- 6060:6060
- 8545:8545
- 8546:8546
- 8551:8551
networks:
- testnet
# 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:
container_name: prysm-beacon-chain${RUN_ID}
image: "gcr.io/prysmaticlabs/prysm/beacon-chain:latest"
user: $UID:$GID
command:
- --datadir=/consensus/beacondata
# No peers to sync with in this testnet, so setting to 0
- --min-sync-peers=0
- --genesis-state=/consensus/genesis.ssz
- --bootstrap-node=
# The chain configuration file used for setting up Prysm
- --chain-config-file=/consensus/config.yml
# We specify the chain id used by our execution client
- --chain-id=${CHAIN_ID:-1337}
- --rpc-host=0.0.0.0
- --contract-deployment-block=0
- --grpc-gateway-host=0.0.0.0
- --execution-endpoint=http://geth:8551
- --accept-terms-of-use
- --jwt-secret=/execution/jwtsecret
- --suggested-fee-recipient=0x123463a4B065722E99115D6c222f267d9cABb524
# We clear the database on startup to ensure we start from a clean state
- --force-clear-db
tty: true
depends_on:
geth:
condition: service_started
create-beacon-chain-genesis:
condition: service_completed_successfully
ports:
- 4000:4000
- 3500:3500
- 8080:8080
volumes:
- ./consensus:/consensus
- ./jwtsecret:/execution/jwtsecret
networks:
- testnet
# 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:
container_name: prysm-validator${RUN_ID}
image: "gcr.io/prysmaticlabs/prysm/validator:latest"
user: $UID:$GID
command:
- --beacon-rpc-provider=beacon-chain:4000
- --datadir=/consensus/validatordata
- --accept-terms-of-use
- --interop-num-validators=64
- --interop-start-index=0
- --chain-config-file=/consensus/config.yml
tty: true
depends_on:
beacon-chain:
condition: service_started
volumes:
- ./consensus:/consensus
networks:
- testnet