Skip to content

Commit

Permalink
Add support for overriding the --state.scheme and --gcmode arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
mdehoog committed Nov 7, 2023
1 parent ee08bad commit 7d70307
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion geth-entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ METRICS_PORT="${METRICS_PORT:-6060}"
HOST_IP="0.0.0.0"
P2P_PORT="${P2P_PORT:-30303}"
ADDITIONAL_ARGS=""
OP_GETH_GCMODE="${OP_GETH_GCMODE:-archive}"

if [[ -z "$OP_NODE_NETWORK" ]]; then
echo "expected OP_NODE_NETWORK to be set" 1>&2
Expand All @@ -28,6 +29,10 @@ if [ "${OP_GETH_ALLOW_UNPROTECTED_TXS+x}" = x ]; then
ADDITIONAL_ARGS="$ADDITIONAL_ARGS --rpc.allow-unprotected-txs=$OP_GETH_ALLOW_UNPROTECTED_TXS"
fi

if [ "${OP_GETH_STATE_SCHEME+x}" = x ]; then
ADDITIONAL_ARGS="$ADDITIONAL_ARGS --state.scheme=$OP_GETH_STATE_SCHEME"
fi

exec ./geth \
--datadir="$GETH_DATA_DIR" \
--verbosity="$VERBOSITY" \
Expand All @@ -50,7 +55,7 @@ exec ./geth \
--metrics.addr=0.0.0.0 \
--metrics.port="$METRICS_PORT" \
--syncmode=full \
--gcmode=archive \
--gcmode="$OP_GETH_GCMODE" \
--nodiscover \
--maxpeers=100 \
--nat=extip:$HOST_IP \
Expand Down

0 comments on commit 7d70307

Please sign in to comment.