From 955f78f52db4f53879ba37d4a690a1b53b079551 Mon Sep 17 00:00:00 2001 From: Roberto Bayardo Date: Wed, 12 Jun 2024 14:08:40 -0700 Subject: [PATCH] clarify that HOST_IP should be set to external ip address for better peer connectivity and otherwise use default --nat value --- geth-entrypoint | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/geth-entrypoint b/geth-entrypoint index 32a8908..cc672eb 100755 --- a/geth-entrypoint +++ b/geth-entrypoint @@ -7,7 +7,7 @@ RPC_PORT="${RPC_PORT:-8545}" WS_PORT="${WS_PORT:-8546}" AUTHRPC_PORT="${AUTHRPC_PORT:-8551}" METRICS_PORT="${METRICS_PORT:-6060}" -HOST_IP="0.0.0.0" +HOST_IP="" # put your external IP address here and open port 30303 to improve peer connectivity P2P_PORT="${P2P_PORT:-30303}" ADDITIONAL_ARGS="" OP_GETH_GCMODE="${OP_GETH_GCMODE:-full}" @@ -38,6 +38,10 @@ if [ "${OP_GETH_BOOTNODES+x}" = x ]; then ADDITIONAL_ARGS="$ADDITIONAL_ARGS --bootnodes=$OP_GETH_BOOTNODES" fi +if [ "${HOST_IP:+x}" = x]; then + ADDITIONAL_ARGS="$ADDITIONAL_ARGS --nat=extip:$HOST_IP +fi + exec ./geth \ --datadir="$GETH_DATA_DIR" \ --verbosity="$VERBOSITY" \ @@ -62,7 +66,6 @@ exec ./geth \ --syncmode="$OP_GETH_SYNCMODE" \ --gcmode="$OP_GETH_GCMODE" \ --maxpeers=100 \ - --nat=extip:$HOST_IP \ --rollup.sequencerhttp="$OP_GETH_SEQUENCER_HTTP" \ --rollup.halt=major \ --op-network="$OP_NODE_NETWORK" \