Add restart policies to fixturenet-eth and fixturenet-opimism stacks #396

Merged
prathamesh0 merged 3 commits from pm-restart-policy into main 2023-05-19 08:16:40 +00:00
Showing only changes of commit f1cdb6cb39 - Show all commits

View File

@ -13,22 +13,26 @@ DEBUG_LEVEL=${1:-info}
echo "Starting bootnode"
if [ ! -f "$DATADIR/bootnode/enr.dat" ]; then
echo "Generating bootnode enr"
lcli \
generate-bootnode-enr \
--ip $ENR_IP \
--udp-port $BOOTNODE_PORT \
--tcp-port $BOOTNODE_PORT \
--genesis-fork-version $GENESIS_FORK_VERSION \
--output-dir $DATADIR/bootnode
bootnode_enr=`cat $DATADIR/bootnode/enr.dat`
echo "- $bootnode_enr" > $TESTNET_DIR/boot_enr.yaml
echo "Generated bootnode enr and written to $TESTNET_DIR/boot_enr.yaml"
# Clean up existing ENR dir to avoid node connectivity issues on a restart
if [ -d "$DATADIR/bootnode" ]; then
echo "Removing existing bootnode enr directory"
rm -r "$DATADIR/bootnode"
fi
echo "Generating bootnode enr"
lcli \
generate-bootnode-enr \
--ip $ENR_IP \
--udp-port $BOOTNODE_PORT \
--tcp-port $BOOTNODE_PORT \
--genesis-fork-version $GENESIS_FORK_VERSION \
--output-dir $DATADIR/bootnode
bootnode_enr=`cat $DATADIR/bootnode/enr.dat`
echo "- $bootnode_enr" > $TESTNET_DIR/boot_enr.yaml
echo "Generated bootnode enr and written to $TESTNET_DIR/boot_enr.yaml"
exec lighthouse boot_node \
--testnet-dir $TESTNET_DIR \
--port $BOOTNODE_PORT \