mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Working post bellatrix local testnet
This commit is contained in:
@@ -44,7 +44,9 @@ http_port=${@:$OPTIND+2:1}
|
||||
execution_endpoint=${@:$OPTIND+3:1}
|
||||
execution_jwt=${@:$OPTIND+4:1}
|
||||
|
||||
exec lighthouse \
|
||||
lighthouse_binary=lighthouse-4844
|
||||
|
||||
exec $lighthouse_binary \
|
||||
--debug-level $DEBUG_LEVEL \
|
||||
bn \
|
||||
$SUBSCRIBE_ALL_SUBNETS \
|
||||
|
||||
851
scripts/local_testnet/genesis.json
Normal file
851
scripts/local_testnet/genesis.json
Normal file
File diff suppressed because one or more lines are too long
@@ -44,6 +44,7 @@ echo "Completed init"
|
||||
|
||||
exec $geth_binary \
|
||||
--datadir $data_dir \
|
||||
--ipcdisable \
|
||||
--http \
|
||||
--http.api="engine,eth,web3,net,debug" \
|
||||
--networkid=$CHAIN_ID \
|
||||
|
||||
@@ -12,7 +12,7 @@ if [ -f "$1" ]; then
|
||||
[[ -n "$pid" ]] || continue
|
||||
|
||||
echo killing $pid
|
||||
kill $pid
|
||||
kill $pid || true
|
||||
done < $1
|
||||
fi
|
||||
|
||||
|
||||
@@ -13,11 +13,6 @@ set -o nounset -o errexit -o pipefail
|
||||
|
||||
source ./vars.env
|
||||
|
||||
# lcli \
|
||||
# deploy-deposit-contract \
|
||||
# --eth1-http http://localhost:8545 \
|
||||
# --confirmations 1 \
|
||||
# --validator-count $VALIDATOR_COUNT
|
||||
|
||||
NOW=`date +%s`
|
||||
GENESIS_TIME=`expr $NOW + $GENESIS_DELAY`
|
||||
@@ -32,10 +27,11 @@ lcli \
|
||||
--genesis-delay $GENESIS_DELAY \
|
||||
--genesis-fork-version $GENESIS_FORK_VERSION \
|
||||
--altair-fork-epoch $ALTAIR_FORK_EPOCH \
|
||||
--bellatrix-fork-epoch $ALTAIR_FORK_EPOCH \
|
||||
--capella-fork-epoch $ALTAIR_FORK_EPOCH \
|
||||
--eip4844-fork-epoch $ALTAIR_FORK_EPOCH \
|
||||
--eth1-block-hash 0000000000000000000000000000000000000000000000000000000000000000 \
|
||||
--bellatrix-fork-epoch $BELLATRIX_FORK_EPOCH \
|
||||
--capella-fork-epoch $CAPELLA_FORK_EPOCH \
|
||||
--eip4844-fork-epoch $EIP4844_FORK_EPOCH \
|
||||
--ttd $TTD \
|
||||
--eth1-block-hash $ETH1_BLOCK_HASH \
|
||||
--eth1-id $CHAIN_ID \
|
||||
--eth1-follow-distance 1 \
|
||||
--seconds-per-slot $SECONDS_PER_SLOT \
|
||||
@@ -44,7 +40,7 @@ lcli \
|
||||
--interop-genesis-state \
|
||||
--force
|
||||
|
||||
echo Specification generated at $TESTNET_DIR.
|
||||
echo Specification and genesis.ssz generated at $TESTNET_DIR.
|
||||
echo "Generating $VALIDATOR_COUNT validators concurrently... (this may take a while)"
|
||||
|
||||
lcli \
|
||||
@@ -54,13 +50,3 @@ lcli \
|
||||
--node-count $BN_COUNT
|
||||
|
||||
echo Validators generated with keystore passwords at $DATADIR.
|
||||
echo "Building genesis state... (this might take a while)"
|
||||
|
||||
lcli \
|
||||
interop-genesis \
|
||||
--spec $SPEC_PRESET \
|
||||
--genesis-time $GENESIS_TIME \
|
||||
--testnet-dir $TESTNET_DIR \
|
||||
$GENESIS_VALIDATOR_COUNT
|
||||
|
||||
echo Created genesis state in $TESTNET_DIR
|
||||
|
||||
@@ -97,12 +97,6 @@ execute_command_add_PID() {
|
||||
echo "$!" >> $PID_FILE
|
||||
}
|
||||
|
||||
# Start ganache, setup things up and start the bootnode.
|
||||
# The delays are necessary, hopefully there is a better way :(
|
||||
|
||||
# Delay to let ganache to get started
|
||||
execute_command_add_PID ganache_test_node.log ./ganache_test_node.sh
|
||||
sleeping 10
|
||||
|
||||
# Setup data
|
||||
echo "executing: ./setup.sh >> $LOG_DIR/setup.log"
|
||||
@@ -121,7 +115,7 @@ BN_http_port_base=8000
|
||||
|
||||
EL_base_network=7000
|
||||
EL_base_http=6000
|
||||
EL_base_auth_http=6000
|
||||
EL_base_auth_http=5000
|
||||
|
||||
(( $VC_COUNT < $BN_COUNT )) && SAS=-s || SAS=
|
||||
|
||||
@@ -129,8 +123,12 @@ for (( el=1; el<=$BN_COUNT; el++ )); do
|
||||
execute_command_add_PID geth_$el.log ./geth.sh $DATADIR/geth_datadir$el $((EL_base_network + $el)) $((EL_base_http + $el)) $((EL_base_auth_http + $el)) $genesis_file
|
||||
done
|
||||
|
||||
sleeping 20
|
||||
|
||||
for (( bn=1; bn<=$BN_COUNT; bn++ )); do
|
||||
execute_command_add_PID beacon_node_$bn.log ./beacon_node.sh $SAS -d $DEBUG_LEVEL $DATADIR/node_$bn $((BN_udp_tcp_base + $bn)) $((BN_http_port_base + $bn)) http://localhost:$((EL_base_auth_http + $bn)) $DATADIR/geth_datadir$el/geth/jwt.hex
|
||||
secret=$DATADIR/geth_datadir$bn/geth/jwtsecret
|
||||
echo $secret
|
||||
execute_command_add_PID beacon_node_$bn.log ./beacon_node.sh $SAS -d $DEBUG_LEVEL $DATADIR/node_$bn $((BN_udp_tcp_base + $bn)) $((BN_http_port_base + $bn)) http://localhost:$((EL_base_auth_http + $bn)) $secret
|
||||
done
|
||||
|
||||
# Start requested number of validator clients
|
||||
|
||||
@@ -30,4 +30,5 @@ exec lighthouse \
|
||||
--testnet-dir $TESTNET_DIR \
|
||||
--init-slashing-protection \
|
||||
--beacon-nodes ${@:$OPTIND+1:1} \
|
||||
--suggested-fee-recipient 0x690B9A9E9aa1C9dB991C7721a92d351Db4FaC990 \
|
||||
$VC_ARGS
|
||||
|
||||
@@ -4,17 +4,16 @@ DATADIR=~/.lighthouse/local-testnet
|
||||
# Directory for the eth2 config
|
||||
TESTNET_DIR=$DATADIR/testnet
|
||||
|
||||
# Mnemonic for the ganache test network
|
||||
ETH1_NETWORK_MNEMONIC="vast thought differ pull jewel broom cook wrist tribe word before omit"
|
||||
EL_BOOTNODE_ENODE="enode://51ea9bb34d31efc3491a842ed13b8cab70e753af108526b57916d716978b380ed713f4336a80cdb85ec2a115d5a8c0ae9f3247bed3c84d3cb025c6bab311062c@127.0.0.1:0?discport=30301"
|
||||
|
||||
|
||||
# Hardcoded deposit contract based on ETH1_NETWORK_MNEMONIC
|
||||
# DEPOSIT_CONTRACT_ADDRESS=8c594691c0e592ffa21f153a16ae41db5befcaaa
|
||||
# Hardcoded deposit contract
|
||||
DEPOSIT_CONTRACT_ADDRESS=4242424242424242424242424242424242424242
|
||||
|
||||
GENESIS_FORK_VERSION=0x42424242
|
||||
|
||||
# Block hash generated from genesis.json in directory
|
||||
ETH1_BLOCK_HASH=16ef16304456fdacdeb272bd70207021031db355ed6c5e44ebd34c1ab757e221
|
||||
|
||||
VALIDATOR_COUNT=80
|
||||
GENESIS_VALIDATOR_COUNT=80
|
||||
|
||||
@@ -41,6 +40,8 @@ BELLATRIX_FORK_EPOCH=0
|
||||
CAPELLA_FORK_EPOCH=1
|
||||
EIP4844_FORK_EPOCH=2
|
||||
|
||||
TTD=0
|
||||
|
||||
# Spec version (mainnet or minimal)
|
||||
SPEC_PRESET=mainnet
|
||||
|
||||
|
||||
Reference in New Issue
Block a user