Skip to content

Commit

Permalink
Removed Pebble toggle, added NM complete history toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
jclapis committed Jun 5, 2023
1 parent 804e7a0 commit bc3e541
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
15 changes: 6 additions & 9 deletions install/scripts/start-ec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,21 +63,15 @@ if [ "$CLIENT" = "geth" ]; then

fi

# Use Pebble if requested
if [ "$GETH_USE_PEBBLE" = "true" ]; then
DB_ENGINE="--db.engine=pebble"
fi

# Check for the prune flag and run that first if requested
if [ -f "/ethclient/prune.lock" ]; then

$PERF_PREFIX /usr/local/bin/geth $DB_ENGINE snapshot prune-state $GETH_NETWORK --datadir /ethclient/geth ; rm /ethclient/prune.lock
$PERF_PREFIX /usr/local/bin/geth snapshot prune-state $GETH_NETWORK --datadir /ethclient/geth ; rm /ethclient/prune.lock

# Run Geth normally
else

CMD="$PERF_PREFIX /usr/local/bin/geth $GETH_NETWORK \
${DB_ENGINE} \
--datadir /ethclient/geth \
--http \
--http.addr 0.0.0.0 \
Expand Down Expand Up @@ -166,12 +160,15 @@ if [ "$CLIENT" = "nethermind" ]; then
--JsonRpc.EngineHost 0.0.0.0 \
--Init.WebSocketsEnabled true \
--JsonRpc.WebSocketsPort ${EC_WS_PORT:-8546} \
--Sync.AncientBodiesBarrier 1 \
--Sync.AncientReceiptsBarrier 1 \
--Merge.Enabled true \
--JsonRpc.JwtSecretFile=/secrets/jwtsecret \
$EC_ADDITIONAL_FLAGS"

# Add sync barriers
if [ "$RP_NETHERMIND_COMPLETE_HISTORY" = "true" ]; then
CMD="$CMD --Sync.AncientBodiesBarrier 1 --Sync.AncientReceiptsBarrier 1"
fi

# Add optional supplemental primary JSON-RPC modules
if [ ! -z "$RP_NETHERMIND_ADDITIONAL_MODULES" ]; then
RP_NETHERMIND_ADDITIONAL_MODULES=",${RP_NETHERMIND_ADDITIONAL_MODULES}"
Expand Down
2 changes: 1 addition & 1 deletion install/templates/eth1.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ services:
- TTD_OVERRIDE=${TTD_OVERRIDE}
- RP_NETHERMIND_ADDITIONAL_MODULES=${NETHERMIND_ADDITIONAL_MODULES}
- RP_NETHERMIND_ADDITIONAL_URLS=${NETHERMIND_ADDITIONAL_URLS}
- GETH_USE_PEBBLE=${GETH_USE_PEBBLE}
- RP_NETHERMIND_COMPLETE_HISTORY=${NETHERMIND_COMPLETE_HISTORY}
entrypoint: sh
command: "/setup/start-ec.sh"
cap_drop:
Expand Down

0 comments on commit bc3e541

Please sign in to comment.