Skip to content

Commit

Permalink
Support for reducing disk space requirements (#146)
Browse files Browse the repository at this point in the history
* Update disk space requirements in README (fixes #133)

* Add support for overriding the --state.scheme and --gcmode arguments

* Fix missing quote
  • Loading branch information
mdehoog authored Nov 7, 2023
1 parent ec6a778 commit b497411
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ This repository contains the relevant Docker builds to run your own node on the
We recommend you have this configuration to run a node:

- at least 16 GB RAM
- an SSD drive with at least 1 TB free
- an SSD drive with at least 2 TB free

### Troubleshooting

Expand Down
9 changes: 7 additions & 2 deletions 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,12 +55,12 @@ 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 \
--rollup.sequencerhttp="$OP_GETH_SEQUENCER_HTTP" \
--rollup.halt=major \
--op-network=$OP_NODE_NETWORK" \
--op-network="$OP_NODE_NETWORK" \
--port="$P2P_PORT" \
$ADDITIONAL_ARGS # intentionally unquoted

0 comments on commit b497411

Please sign in to comment.