Skip to content

Commit

Permalink
clarify that HOST_IP should be set to external ip address for better …
Browse files Browse the repository at this point in the history
…peer connectivity and otherwise use default --nat value (#272)
  • Loading branch information
roberto-bayardo authored Jun 12, 2024
1 parent f722031 commit 2dfb660
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions geth-entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down Expand Up @@ -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" \
Expand All @@ -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" \
Expand Down

0 comments on commit 2dfb660

Please sign in to comment.