Skip to content
Merged
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
1 change: 1 addition & 0 deletions config-example/cl/mnemonics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
wd_address: $WITHDRAWAL_ADDRESS
wd_prefix: $WITHDRAWAL_TYPE
balance: $VALIDATOR_BALANCE
status: 0 # 0: active, 1: slashed, 2: exited
1 change: 1 addition & 0 deletions defaults/defaults.env
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ export CHAIN_ID="${CHAIN_ID:-1337}"
export DEPOSIT_CONTRACT_ADDRESS="${DEPOSIT_CONTRACT_ADDRESS:-0x00000000219ab540356cBB839Cbe05303d7705Fa}"
export EL_AND_CL_MNEMONIC="${EL_AND_CL_MNEMONIC:-sleep moment list remain like wall lake industry canvas wonder ecology elite duck salad naive syrup frame brass utility club odor country obey pudding}"
export CL_ADDITIONAL_VALIDATORS="${CL_ADDITIONAL_VALIDATORS:-}"
export ADDITIONAL_VALIDATOR_MNEMONICS="${ADDITIONAL_VALIDATOR_MNEMONICS:-[]}"
export CL_EXEC_BLOCK="${CL_EXEC_BLOCK:-0}"
export SLOT_DURATION_IN_SECONDS="${SLOT_DURATION_IN_SECONDS:-12}"
export SLOT_DURATION_MS="${SLOT_DURATION_MS:-12000}"
Expand Down
15 changes: 10 additions & 5 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,16 @@ gen_cl_config(){
# Add BLOB_SCHEDULE if needed
add_blob_schedule /data/metadata/config.yaml

# Envsubst mnemonics file
if [ "$WITHDRAWAL_TYPE" == "0x00" ]; then
export WITHDRAWAL_ADDRESS="null"
fi
envsubst < /config/cl/mnemonics.yaml > $tmp_dir/mnemonics.yaml
if [ -n "$ADDITIONAL_VALIDATOR_MNEMONICS" ] && [ "$ADDITIONAL_VALIDATOR_MNEMONICS" != "[]" ]; then
echo "Adding additional validator mnemonics..."
echo "$ADDITIONAL_VALIDATOR_MNEMONICS" | yq --yaml-output >> $tmp_dir/mnemonics.yaml
fi

# Conditionally override values if preset is "minimal"
if [[ "$PRESET_BASE" == "minimal" ]]; then
gen_minimal_config
Expand All @@ -132,11 +141,7 @@ gen_cl_config(){
grep DEPOSIT_CONTRACT_ADDRESS /data/metadata/config.yaml | cut -d " " -f2 > /data/metadata/deposit_contract.txt
echo $CL_EXEC_BLOCK > /data/metadata/deposit_contract_block.txt
echo $BEACON_STATIC_ENR > /data/metadata/bootstrap_nodes.txt
# Envsubst mnemonics
if [ "$WITHDRAWAL_TYPE" == "0x00" ]; then
export WITHDRAWAL_ADDRESS="null"
fi
envsubst < /config/cl/mnemonics.yaml > $tmp_dir/mnemonics.yaml

# Generate genesis
genesis_args+=(
beaconchain
Expand Down