Skip to content

Commit

Permalink
Merge pull request #104 from ethpandaops/add-minimal-support
Browse files Browse the repository at this point in the history
adding minimal support
  • Loading branch information
barnabasbusa committed Mar 27, 2024
2 parents aff777d + e6009ec commit 1824e10
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config-example/cl/config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Extends the mainnet preset
PRESET_BASE: 'mainnet'
PRESET_BASE: $PRESET_BASE
CONFIG_NAME: testnet # needs to exist because of Prysm. Otherwise it conflicts with mainnet genesis

# Genesis
Expand Down
1 change: 1 addition & 0 deletions config-example/values.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export PRESET_BASE="mainnet"
export CHAIN_ID="1337"
export DEPOSIT_CONTRACT_ADDRESS="0x6f22fFbC56eFF051aECF839396DD1eD9aD6BBA9D"
export 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"
Expand Down
21 changes: 19 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ source /config/values.env
SERVER_ENABLED="${SERVER_ENABLED:-false}"
SERVER_PORT="${SERVER_PORT:-8000}"
WITHDRAWAL_ADDRESS="${WITHDRAWAL_ADDRESS:-0xf97e180c050e5Ab072211Ad2C213Eb5AEE4DF134}"

PRESET_BASE="${PRESET_BASE:-mainnet}"
gen_shared_files(){
. /apps/el-gen/.venv/bin/activate
set -x
Expand Down Expand Up @@ -60,6 +60,11 @@ gen_cl_config(){
--mnemonics $tmp_dir/mnemonics.yaml
--tranches-dir /data/custom_config_data/tranches
--state-output /data/custom_config_data/genesis.ssz
--preset-phase0 $PRESET_BASE
--preset-altair $PRESET_BASE
--preset-bellatrix $PRESET_BASE
--preset-capella $PRESET_BASE
--preset-deneb $PRESET_BASE
)
if [[ $WITHDRAWAL_TYPE == "0x01" ]]; then
genesis_args+=(--eth1-withdrawal-address $WITHDRAWAL_ADDRESS)
Expand All @@ -79,8 +84,20 @@ gen_cl_config(){
fi
genesis_args+=(--additional-validators $validators_file)
fi
zcli_args=(
pretty
deneb
BeaconState
--preset-phase0 $PRESET_BASE
--preset-altair $PRESET_BASE
--preset-bellatrix $PRESET_BASE
--preset-capella $PRESET_BASE
--preset-deneb $PRESET_BASE
/data/custom_config_data/genesis.ssz
)
/usr/local/bin/eth2-testnet-genesis "${genesis_args[@]}"
/usr/local/bin/zcli pretty deneb BeaconState /data/custom_config_data/genesis.ssz > /data/custom_config_data/parsedBeaconState.json
/usr/local/bin/zcli "${zcli_args[@]}" > /data/custom_config_data/parsedBeaconState.json
echo "Genesis args: ${genesis_args[@]}"
echo "Genesis block number: $(jq -r '.latest_execution_payload_header.block_number' /data/custom_config_data/parsedBeaconState.json)"
echo "Genesis block hash: $(jq -r '.latest_execution_payload_header.block_hash' /data/custom_config_data/parsedBeaconState.json)"
jq -r '.eth1_data.block_hash' /data/custom_config_data/parsedBeaconState.json | tr -d '\n' > /data/custom_config_data/deposit_contract_block_hash.txt
Expand Down

0 comments on commit 1824e10

Please sign in to comment.