Spin up a spare bn for the doppelganger validator

This commit is contained in:
Pawan Dhananjay
2023-03-24 16:19:27 +05:30
parent 9e7002d978
commit eb87a12253

View File

@@ -46,6 +46,7 @@ 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_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_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_datadir3 7200 6200 5200 $genesis_file &> /dev/null &
exit_if_fails ../local_testnet/geth.sh $HOME/.lighthouse/local-testnet/geth_datadir4 7300 6300 5300 $genesis_file &> /dev/null &
sleep 20 sleep 20
@@ -55,9 +56,10 @@ sed -i 's/"shardingForkTime".*$/"shardingForkTime": 0,/g' genesis.json
echo "Starting local beacon nodes" echo "Starting local beacon nodes"
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 &> beacon.log & exit_if_fails ../local_testnet/beacon_node.sh $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_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 $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 $HOME/.lighthouse/local-testnet/node_4 9300 8300 http://localhost:5300 $HOME/.lighthouse/local-testnet/geth_datadir4/geth/jwtsecret &> /dev/null &
echo "Starting local validator clients" echo "Starting local validator clients"
@@ -72,9 +74,9 @@ if [[ "$BEHAVIOR" == "failure" ]]; then
echo "Starting the doppelganger validator client" echo "Starting the doppelganger validator client"
# Use same keys as keys from VC1, but connect to BN2 # Use same keys as keys from VC1 and connect to the spare BN4
# This process should not last longer than 2 epochs # 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:8300
DOPPELGANGER_EXIT=$? DOPPELGANGER_EXIT=$?
echo "Shutting down" echo "Shutting down"
@@ -100,8 +102,7 @@ if [[ "$BEHAVIOR" == "success" ]]; then
echo "Starting the last validator client" 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:8300 &
VALIDATOR_4_PID=$!
DOPPELGANGER_FAILURE=0 DOPPELGANGER_FAILURE=0
# Sleep three epochs, then make sure all validators were active in epoch 2. Use # Sleep three epochs, then make sure all validators were active in epoch 2. Use