Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for reducing disk space requirements #146

Merged
merged 3 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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