Skip to content

Commit

Permalink
Merge pull request OffchainLabs#21 from kasey/fix-geth-prysmctl-race
Browse files Browse the repository at this point in the history
Fix race between prysmctl and geth genesis
  • Loading branch information
rauljordan authored May 2, 2023
2 parents dbc610c + ddb8d67 commit 93a763f
Showing 1 changed file with 21 additions and 17 deletions.
38 changes: 21 additions & 17 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,33 @@
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=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

# Sets up the genesis configuration for the go-ethereum client from a JSON file.
geth-genesis:
image: "ethereum/client-go:latest"
command: --datadir=/execution init /execution/genesis.json
volumes:
- ./execution:/execution
- ./execution/genesis.json:/execution/genesis.json
depends_on:
create-beacon-chain-genesis:
condition: service_completed_successfully

# Runs the go-ethereum execution client with the specified, unlocked account and necessary
# APIs to allow for proof-of-stake consensus via Prysm.
geth:
Expand Down Expand Up @@ -35,23 +56,6 @@ services:
- ./execution/geth_password.txt:/execution/geth_password.txt
- ./jwtsecret:/execution/jwtsecret

#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=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

# 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
Expand Down

0 comments on commit 93a763f

Please sign in to comment.