diff --git a/scripts/init-bedrock.sh b/scripts/init-bedrock.sh index ea99df1..c659149 100755 --- a/scripts/init-bedrock.sh +++ b/scripts/init-bedrock.sh @@ -1,5 +1,5 @@ #!/bin/bash -set -eou +set -e # Import utilities. source ./scripts/utils.sh @@ -26,7 +26,7 @@ echo "Fetching download link..." if [ "$NODE_TYPE" = "full" ]; then # Warning: syncmode=full for syncing full node is deprecated and not recommended to use - if [ "${OP_GETH__SYNCMODE+x}" = "full" ]; then + if [ "$OP_GETH__SYNCMODE" = "full" ]; then if [ "$NETWORK_NAME" = "op-mainnet" ]; then BEDROCK_TAR_DOWNLOAD="https://r2-snapshots.fastnode.io/op/$(curl -s https://r2-snapshots.fastnode.io/op/latest-mainnet)" elif [ "$NETWORK_NAME" = "op-goerli" ]; then @@ -45,7 +45,7 @@ elif [ "$NODE_TYPE" = "archive" ]; then fi fi -if [ -n "${BEDROCK_TAR_DOWNLOAD+x}" ]; then +if [ -n "$BEDROCK_TAR_DOWNLOAD" ]; then if [[ "$BEDROCK_TAR_DOWNLOAD" == *.zst ]]; then BEDROCK_TAR_PATH+=".zst" elif [[ "$BEDROCK_TAR_DOWNLOAD" == *.lz4 ]]; then diff --git a/scripts/init-l2geth.sh b/scripts/init-l2geth.sh index e8c3fbd..697a769 100755 --- a/scripts/init-l2geth.sh +++ b/scripts/init-l2geth.sh @@ -1,12 +1,12 @@ #!/bin/sh -set -eou +set -e if [ "$NETWORK_NAME" != "op-mainnet" ]; then echo "Stopping l2geth for a non op-mainnet chain" exit fi -if [ -n "${OP_GETH__HISTORICAL_RPC+x}" ]; then +if [ -n "${OP_GETH__HISTORICAL_RPC}" ]; then echo "Stopping l2geth for using an external historical RPC" exit fi diff --git a/scripts/start-dtl.sh b/scripts/start-dtl.sh index 5426ba6..bfa810a 100755 --- a/scripts/start-dtl.sh +++ b/scripts/start-dtl.sh @@ -1,5 +1,5 @@ #!/bin/sh -set -eou +set -e # Setting both endpoints doesn't hurt. export DATA_TRANSPORT_LAYER__L1_RPC_ENDPOINT=$DATA_TRANSPORT_LAYER__RPC_ENDPOINT diff --git a/scripts/start-l2geth.sh b/scripts/start-l2geth.sh index 798b46c..7c4807a 100755 --- a/scripts/start-l2geth.sh +++ b/scripts/start-l2geth.sh @@ -1,12 +1,12 @@ #!/bin/sh -set -eou +set -e if [ "$NETWORK_NAME" != "op-mainnet" ]; then echo "Stopping l2geth for a non op-mainnet chain" exit fi -if [ -n "${OP_GETH__HISTORICAL_RPC+x}" ]; then +if [ -n "${OP_GETH__HISTORICAL_RPC}" ]; then echo "Stopping l2geth for using an external historical RPC" exit fi diff --git a/scripts/start-op-geth.sh b/scripts/start-op-geth.sh index e623e9b..1d07b51 100755 --- a/scripts/start-op-geth.sh +++ b/scripts/start-op-geth.sh @@ -1,5 +1,5 @@ #!/bin/sh -set -eou +set -e # Wait for the Bedrock flag for this network to be set. echo "Waiting for Bedrock node to initialize..." @@ -7,7 +7,7 @@ while [ ! -f /shared/initialized.txt ]; do sleep 1 done -if [ -z "${IS_CUSTOM_CHAIN+x}" ]; then +if [ -z "${IS_CUSTOM_CHAIN}" ]; then if [ "$NETWORK_NAME" == "op-mainnet" ] || [ "$NETWORK_NAME" == "op-goerli" ]; then export EXTENDED_ARG="${EXTENDED_ARG:-} --rollup.historicalrpc=${OP_GETH__HISTORICAL_RPC:-http://l2geth:8545} --op-network=$NETWORK_NAME" else @@ -16,7 +16,7 @@ if [ -z "${IS_CUSTOM_CHAIN+x}" ]; then fi # Init genesis if custom chain -if [ -n "${IS_CUSTOM_CHAIN+x}" ]; then +if [ -n "${IS_CUSTOM_CHAIN}" ]; then geth init --datadir="$BEDROCK_DATADIR" /chainconfig/genesis.json fi diff --git a/scripts/start-op-node.sh b/scripts/start-op-node.sh index fa9b0e5..e17ad29 100755 --- a/scripts/start-op-node.sh +++ b/scripts/start-op-node.sh @@ -1,5 +1,5 @@ #!/bin/sh -set -eou +set -e # Wait for the Bedrock flag for this network to be set. echo "Waiting for Bedrock node to initialize..." @@ -7,7 +7,7 @@ while [ ! -f /shared/initialized.txt ]; do sleep 1 done -if [ -n "${IS_CUSTOM_CHAIN+x}" ]; then +if [ -n "${IS_CUSTOM_CHAIN}" ]; then export EXTENDED_ARG="${EXTENDED_ARG:-} --rollup.config=/chainconfig/rollup.json" else export EXTENDED_ARG="${EXTENDED_ARG:-} --network=$NETWORK_NAME --rollup.load-protocol-versions=true --rollup.halt=major"