mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Merge unstable 20230925 into deneb-free-blobs.
This commit is contained in:
@@ -39,10 +39,11 @@ done
|
||||
|
||||
# Get positional arguments
|
||||
data_dir=${@:$OPTIND+0:1}
|
||||
network_port=${@:$OPTIND+1:1}
|
||||
http_port=${@:$OPTIND+2:1}
|
||||
execution_endpoint=${@:$OPTIND+3:1}
|
||||
execution_jwt=${@:$OPTIND+4:1}
|
||||
tcp_port=${@:$OPTIND+1:1}
|
||||
quic_port=${@:$OPTIND+2:1}
|
||||
http_port=${@:$OPTIND+3:1}
|
||||
execution_endpoint=${@:$OPTIND+4:1}
|
||||
execution_jwt=${@:$OPTIND+5:1}
|
||||
|
||||
lighthouse_binary=lighthouse
|
||||
|
||||
@@ -56,9 +57,11 @@ exec $lighthouse_binary \
|
||||
--disable-peer-scoring \
|
||||
--staking \
|
||||
--enr-address 127.0.0.1 \
|
||||
--enr-udp-port $network_port \
|
||||
--enr-tcp-port $network_port \
|
||||
--port $network_port \
|
||||
--enr-udp-port $tcp_port \
|
||||
--enr-tcp-port $tcp_port \
|
||||
--enr-quic-port $quic_port \
|
||||
--port $tcp_port \
|
||||
--quic-port $quic_port \
|
||||
--http-port $http_port \
|
||||
--disable-packet-filter \
|
||||
--target-peers $((BN_COUNT - 1)) \
|
||||
|
||||
@@ -103,7 +103,7 @@ echo "executing: ./setup.sh >> $LOG_DIR/setup.log"
|
||||
./setup.sh >> $LOG_DIR/setup.log 2>&1
|
||||
|
||||
# Update future hardforks time in the EL genesis file based on the CL genesis time
|
||||
GENESIS_TIME=$(lcli pretty-ssz --testnet-dir $TESTNET_DIR BeaconState $TESTNET_DIR/genesis.ssz | jq | grep -Po 'genesis_time": "\K.*\d')
|
||||
GENESIS_TIME=$(lcli pretty-ssz --spec $SPEC_PRESET --testnet-dir $TESTNET_DIR BeaconState $TESTNET_DIR/genesis.ssz | jq | grep -Po 'genesis_time": "\K.*\d')
|
||||
echo $GENESIS_TIME
|
||||
CAPELLA_TIME=$((GENESIS_TIME + (CAPELLA_FORK_EPOCH * 32 * SECONDS_PER_SLOT)))
|
||||
echo $CAPELLA_TIME
|
||||
@@ -146,7 +146,7 @@ sed -i 's/"cancunTime".*$/"cancunTime": 0,/g' $genesis_file
|
||||
for (( bn=1; bn<=$BN_COUNT; bn++ )); do
|
||||
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
|
||||
execute_command_add_PID beacon_node_$bn.log ./beacon_node.sh $SAS -d $DEBUG_LEVEL $DATADIR/node_$bn $((BN_udp_tcp_base + $bn)) $((BN_udp_tcp_base + $bn + 100)) $((BN_http_port_base + $bn)) http://localhost:$((EL_base_auth_http + $bn)) $secret
|
||||
done
|
||||
|
||||
# Start requested number of validator clients
|
||||
|
||||
@@ -43,21 +43,21 @@ sleep 10
|
||||
|
||||
echo "Starting local execution nodes"
|
||||
|
||||
exit_if_fails ../local_testnet/geth.sh $HOME/.lighthouse/local-testnet/geth_datadir1 7000 6000 5000 $genesis_file &> geth.log &
|
||||
exit_if_fails ../local_testnet/geth.sh $HOME/.lighthouse/local-testnet/geth_datadir2 7100 6100 5100 $genesis_file &> /dev/null &
|
||||
exit_if_fails ../local_testnet/geth.sh $HOME/.lighthouse/local-testnet/geth_datadir3 7200 6200 5200 $genesis_file &> /dev/null &
|
||||
exit_if_fails ../local_testnet/geth.sh $HOME/.lighthouse/local-testnet/geth_datadir1 6000 5000 4000 $genesis_file &> geth.log &
|
||||
exit_if_fails ../local_testnet/geth.sh $HOME/.lighthouse/local-testnet/geth_datadir2 6100 5100 4100 $genesis_file &> /dev/null &
|
||||
exit_if_fails ../local_testnet/geth.sh $HOME/.lighthouse/local-testnet/geth_datadir3 6200 5200 4200 $genesis_file &> /dev/null &
|
||||
|
||||
sleep 20
|
||||
|
||||
exit_if_fails ../local_testnet/beacon_node.sh -d debug $HOME/.lighthouse/local-testnet/node_1 9000 8000 http://localhost:5000 $HOME/.lighthouse/local-testnet/geth_datadir1/geth/jwtsecret &> beacon1.log &
|
||||
exit_if_fails ../local_testnet/beacon_node.sh $HOME/.lighthouse/local-testnet/node_2 9100 8100 http://localhost:5100 $HOME/.lighthouse/local-testnet/geth_datadir2/geth/jwtsecret &> /dev/null &
|
||||
exit_if_fails ../local_testnet/beacon_node.sh $HOME/.lighthouse/local-testnet/node_3 9200 8200 http://localhost:5200 $HOME/.lighthouse/local-testnet/geth_datadir3/geth/jwtsecret &> /dev/null &
|
||||
exit_if_fails ../local_testnet/beacon_node.sh -d debug $HOME/.lighthouse/local-testnet/node_1 8000 7000 9000 http://localhost:4000 $HOME/.lighthouse/local-testnet/geth_datadir1/geth/jwtsecret &> /dev/null &
|
||||
exit_if_fails ../local_testnet/beacon_node.sh $HOME/.lighthouse/local-testnet/node_2 8100 7100 9100 http://localhost:4100 $HOME/.lighthouse/local-testnet/geth_datadir2/geth/jwtsecret &> /dev/null &
|
||||
exit_if_fails ../local_testnet/beacon_node.sh $HOME/.lighthouse/local-testnet/node_3 8200 7200 9200 http://localhost:4200 $HOME/.lighthouse/local-testnet/geth_datadir3/geth/jwtsecret &> /dev/null &
|
||||
|
||||
echo "Starting local validator clients"
|
||||
|
||||
exit_if_fails ../local_testnet/validator_client.sh $HOME/.lighthouse/local-testnet/node_1 http://localhost:8000 &> /dev/null &
|
||||
exit_if_fails ../local_testnet/validator_client.sh $HOME/.lighthouse/local-testnet/node_2 http://localhost:8100 &> /dev/null &
|
||||
exit_if_fails ../local_testnet/validator_client.sh $HOME/.lighthouse/local-testnet/node_3 http://localhost:8200 &> /dev/null &
|
||||
exit_if_fails ../local_testnet/validator_client.sh $HOME/.lighthouse/local-testnet/node_1 http://localhost:9000 &> /dev/null &
|
||||
exit_if_fails ../local_testnet/validator_client.sh $HOME/.lighthouse/local-testnet/node_2 http://localhost:9100 &> /dev/null &
|
||||
exit_if_fails ../local_testnet/validator_client.sh $HOME/.lighthouse/local-testnet/node_3 http://localhost:9200 &> /dev/null &
|
||||
|
||||
echo "Waiting an epoch before starting the next validator client"
|
||||
sleep $(( $SECONDS_PER_SLOT * 32 ))
|
||||
@@ -68,7 +68,7 @@ if [[ "$BEHAVIOR" == "failure" ]]; then
|
||||
|
||||
# Use same keys as keys from VC1 and connect to BN2
|
||||
# This process should not last longer than 2 epochs
|
||||
timeout $(( $SECONDS_PER_SLOT * 32 * 2 )) ../local_testnet/validator_client.sh $HOME/.lighthouse/local-testnet/node_1_doppelganger http://localhost:8100
|
||||
timeout $(( $SECONDS_PER_SLOT * 32 * 2 )) ../local_testnet/validator_client.sh $HOME/.lighthouse/local-testnet/node_1_doppelganger http://localhost:9100
|
||||
DOPPELGANGER_EXIT=$?
|
||||
|
||||
echo "Shutting down"
|
||||
@@ -94,7 +94,7 @@ if [[ "$BEHAVIOR" == "success" ]]; then
|
||||
|
||||
echo "Starting the last validator client"
|
||||
|
||||
../local_testnet/validator_client.sh $HOME/.lighthouse/local-testnet/node_4 http://localhost:8100 &
|
||||
../local_testnet/validator_client.sh $HOME/.lighthouse/local-testnet/node_4 http://localhost:9100 &
|
||||
DOPPELGANGER_FAILURE=0
|
||||
|
||||
# Sleep three epochs, then make sure all validators were active in epoch 2. Use
|
||||
@@ -108,7 +108,7 @@ if [[ "$BEHAVIOR" == "success" ]]; then
|
||||
cd $HOME/.lighthouse/local-testnet/node_4/validators
|
||||
for val in 0x*; do
|
||||
[[ -e $val ]] || continue
|
||||
curl -s localhost:8100/lighthouse/validator_inclusion/3/$val | jq | grep -q '"is_previous_epoch_target_attester": false'
|
||||
curl -s localhost:9100/lighthouse/validator_inclusion/3/$val | jq | grep -q '"is_previous_epoch_target_attester": false'
|
||||
IS_ATTESTER=$?
|
||||
if [[ $IS_ATTESTER -eq 0 ]]; then
|
||||
echo "$val did not attest in epoch 2."
|
||||
@@ -126,7 +126,7 @@ if [[ "$BEHAVIOR" == "success" ]]; then
|
||||
sleep $(( $SECONDS_PER_SLOT * 32 * 2 ))
|
||||
for val in 0x*; do
|
||||
[[ -e $val ]] || continue
|
||||
curl -s localhost:8100/lighthouse/validator_inclusion/5/$val | jq | grep -q '"is_previous_epoch_target_attester": true'
|
||||
curl -s localhost:9100/lighthouse/validator_inclusion/5/$val | jq | grep -q '"is_previous_epoch_target_attester": true'
|
||||
IS_ATTESTER=$?
|
||||
if [[ $IS_ATTESTER -eq 0 ]]; then
|
||||
echo "$val attested in epoch 4."
|
||||
@@ -152,4 +152,4 @@ if [[ "$BEHAVIOR" == "success" ]]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user