diff --git a/geth/docker-entrypoint.sh b/geth/docker-entrypoint.sh index c4406d8f..ad0a702f 100755 --- a/geth/docker-entrypoint.sh +++ b/geth/docker-entrypoint.sh @@ -60,8 +60,14 @@ fi if [ -d "/var/lib/goethereum/geth/chaindata/" ]; then __pbss="" else - echo "Choosing PBSS for fresh sync" - __pbss="--state.scheme path" + if [ "${ARCHIVE_NODE}" = "true" ]; then + echo "Geth is an archive node. Syncing without PBSS." + _pbss="" + else + echo "Choosing PBSS for fresh sync" + __pbss="--state.scheme path" + touch /var/lib/goethereum/is-pbss + fi fi if [ -f /var/lib/goethereum/prune-marker ]; then @@ -70,6 +76,10 @@ if [ -f /var/lib/goethereum/prune-marker ]; then echo "Geth is an archive node. Not attempting to prune: Aborting." exit 1 fi + if [ -f /var/lib/goethereum/is-pbss ]; then + echo "Geth is using PBSS. Pruning is neither needed nor supported. Aborting." + exit 1 + fi # Word splitting is desired for the command line parameters # shellcheck disable=SC2086 exec "$@" ${EL_EXTRAS} snapshot prune-state