Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,13 @@ services:

# Creates a genesis state for the beacon chain using a YAML configuration file and
# a deterministic set of validators
# TODO: Make num validators customizable
create_beacon_chain_genesis:
image: "gcr.io/prysmaticlabs/prysm/cmd/prysmctl:latest"
command:
- testnet
- generate-genesis
- --fork=deneb
- --num-validators=64
- --num-validators=${NUM_VALIDATORS:-64}
- --genesis-time-delay=15
- --output-ssz=/consensus/genesis.ssz
- --chain-config-file=/config/prysm.yaml
Expand Down Expand Up @@ -135,15 +134,15 @@ services:
- "consensus:/consensus"
- "config:/config"

# We run a validator client with 64, deterministically-generated keys that match
# We run a validator client with deterministically-generated keys that match
# The validator keys present in the beacon chain genesis state generated a few steps above.
prysm_validator:
image: "gcr.io/prysmaticlabs/prysm/validator:stable"
command:
- --beacon-rpc-provider=prysm_beacon_chain:5000
- --datadir=/consensus/validatordata
- --accept-terms-of-use
- --interop-num-validators=64
- --interop-num-validators=${NUM_VALIDATORS:-64}
- --interop-start-index=0
- --chain-config-file=/config/prysm.yaml
depends_on:
Expand Down
15 changes: 15 additions & 0 deletions test-node.bash
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ l1chainid=1337
simple=true
l2anytrust=false
l2timeboost=false
num_validators=64

# Use the dev versions of nitro/blockscout
dev_nitro=false
Expand Down Expand Up @@ -266,6 +267,15 @@ while [[ $# -gt 0 ]]; do
l2timeboost=true
shift
;;
--num-validators)
num_validators=$2
if ! [[ $num_validators =~ ^[0-9]+$ ]] || [ $num_validators -lt 1 ] || [ $num_validators -gt 1000 ]; then
echo "Error: num-validators must be a positive integer between 1 and 1000, got: $num_validators"
exit 1
fi
shift
shift
;;
--redundantsequencers)
simple=false
redundantsequencers=$2
Expand Down Expand Up @@ -310,6 +320,7 @@ while [[ $# -gt 0 ]]; do
echo --l3-token-bridge Deploy L2-L3 token bridge. Only valid if also '--l3node' is provided
echo --l2-anytrust run the L2 as an AnyTrust chain
echo --l2-timeboost run the L2 with Timeboost enabled, including auctioneer and bid validator
echo --num-validators number of validators for proof-of-stake consensus [1-1000] \(default: 64\)
echo --batchposters batch posters [0-3]
echo --redundantsequencers redundant sequencers [0-3]
echo --detach detach from nodes after running them
Expand All @@ -334,6 +345,10 @@ while [[ $# -gt 0 ]]; do
esac
done

# Export NUM_VALIDATORS for docker-compose
export NUM_VALIDATORS=$num_validators
echo "Using NUM_VALIDATORS: $NUM_VALIDATORS"

NODES="sequencer"
INITIAL_SEQ_NODES="sequencer"

Expand Down