Skip to content

Commit

Permalink
Cleaner Erigon prune logs for Holesky and custom
Browse files Browse the repository at this point in the history
  • Loading branch information
yorickdowne committed Sep 12, 2023
1 parent e6094b3 commit df0b7aa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
11 changes: 8 additions & 3 deletions erigon/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,8 @@ if [[ "${NETWORK}" =~ ^https?:// ]]; then
networkid="$(jq -r '.config.chainId' "/var/lib/erigon/testnet/${config_dir}/genesis.json")"
set +e
__network="--bootnodes=${bootnodes} --networkid=${networkid} --http.api=eth,erigon,engine,web3,net,debug,trace,txpool,admin"
if [ ! -f /var/lib/erigon/setupdone ]; then
if [ ! -d /var/lib/erigon/chaindata ]; then
erigon init --datadir /var/lib/erigon "/var/lib/erigon/testnet/${config_dir}/genesis.json"
touch /var/lib/erigon/setupdone
fi
else
__network="--chain ${NETWORK} --http.api web3,eth,net,engine"
Expand All @@ -73,8 +72,14 @@ else
elif [[ "${NETWORK}" = "gnosis" ]]; then
echo "gnosis: Running with prune.r.before=19469077 for gno deposit contract"
__prune="--prune=htc --prune.r.before=19469077"
elif [[ "${NETWORK}" = "holesky" ]]; then
echo "holesky: Running without prune.r for eth deposit contract"
__prune="--prune=htc"
elif [[ "${NETWORK}" =~ ^https?:// ]]; then
echo "Custom testnet: Running without prune.r for eth deposit contract"
__prune="--prune=htc"
else
echo "Unable to determine eth deposit contract, running without prune.r.before"
echo "Unable to determine eth deposit contract, running without prune.r"
__prune="--prune=htc"
fi
fi
Expand Down
3 changes: 1 addition & 2 deletions geth/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,8 @@ if [[ "${NETWORK}" =~ ^https?:// ]]; then
networkid="$(jq -r '.config.chainId' "/var/lib/goethereum/testnet/${config_dir}/genesis.json")"
set +e
__network="--bootnodes=${bootnodes} --networkid=${networkid} --http.api=eth,net,web3,debug,admin,txpool"
if [ ! -f /var/lib/goethereum/setupdone ]; then
if [ ! -d "/var/lib/goethereum/geth/chaindata/" ]; then
geth init --state.scheme path --datadir /var/lib/goethereum "/var/lib/goethereum/testnet/${config_dir}/genesis.json"
touch /var/lib/goethereum/setupdone
fi
else
__network="--${NETWORK}"
Expand Down

0 comments on commit df0b7aa

Please sign in to comment.