diff --git a/bindings/legacy/v1.3.1/rewards/rewards.go b/bindings/legacy/v1.3.1/rewards/rewards.go index 5542a46e1..70b04e4bf 100644 --- a/bindings/legacy/v1.3.1/rewards/rewards.go +++ b/bindings/legacy/v1.3.1/rewards/rewards.go @@ -833,6 +833,149 @@ func getMainnetIntervalRewardsEvent(rp *rocketpool.RocketPool, index uint64) (Re intervalEndTime = time.Unix(1746682539, 0) submissionTime = time.Unix(1746691523, 0) userETH.SetString("38934754761348367759", 10) + case 36: + treasuryRPL.SetString("22048941282103056576253", 10) + trustedNodeRPL.SetString("2004449207463914234114", 10) + nodeRPL.SetString("56124577808989598554500", 10) + executionBlock = big.NewInt(22636374) + consensusBlock = big.NewInt(11856479) + intervalsPassed = big.NewInt(1) + merkleRoot = common.HexToHash("0x704c7c2f6faeb97b20535a9a325e9ba573ec066ee579853b3e94b175114a8fd7") + intervalStartTime = time.Unix(1746682539, 0) + intervalEndTime = time.Unix(1749101739, 0) + submissionTime = time.Unix(1749113279, 0) + nodeETH.SetString("50039863506253385959", 10) + userETH.SetString("57244908435972245571", 10) + case 37: + treasuryRPL.SetString("22131620846710572152925", 10) + trustedNodeRPL.SetString("2011965531519142922898", 10) + nodeRPL.SetString("56335034882536001840574", 10) + nodeETH.SetString("45418705066756834715", 10) + executionBlock = big.NewInt(22836652) + consensusBlock = big.NewInt(12058079) + intervalsPassed = big.NewInt(1) + merkleRoot = common.HexToHash("0xf4db744c50762a7ae1b19ee26120a582207eb1c535614711aae4cc5c598e42cf") + intervalStartTime = time.Unix(1749101739, 0) + intervalEndTime = time.Unix(1751520939, 0) + submissionTime = time.Unix(1751532611, 0) + userETH.SetString("48318015461156177248", 10) + case 38: + treasuryRPL.SetString("22214610444816577609208", 10) + trustedNodeRPL.SetString("2019510040437870691659", 10) + nodeRPL.SetString("56546281132260379365673", 10) + nodeETH.SetString("40700127824685134045", 10) + executionBlock = big.NewInt(23037044) + consensusBlock = big.NewInt(12259679) + intervalsPassed = big.NewInt(1) + merkleRoot = common.HexToHash("0xf7809e999791fb6c73712c7d281624020ba773dc144fdfbb41c86b2e3cbb42fd") + intervalStartTime = time.Unix(1751520939, 0) + intervalEndTime = time.Unix(1753940139, 0) + submissionTime = time.Unix(1753948367, 0) + userETH.SetString("40528725716465757725", 10) + case 39: + treasuryRPL.SetString("22297911238990936999935", 10) + trustedNodeRPL.SetString("2027082839908266999911", 10) + nodeRPL.SetString("56758319517431475996754", 10) + nodeETH.SetString("34921409718655333629", 10) + executionBlock = big.NewInt(23237567) + consensusBlock = big.NewInt(12461279) + intervalsPassed = big.NewInt(1) + merkleRoot = common.HexToHash("0xec51162c8af79d86e4b8f6546ec0e1ec3b4172b12574893e938c4f5bdd408efe") + intervalStartTime = time.Unix(1753940139, 0) + intervalEndTime = time.Unix(1756359339, 0) + submissionTime = time.Unix(1756395407, 0) + userETH.SetString("31594532680318853963", 10) + case 40: + treasuryRPL.SetString("22381524396162942297937", 10) + trustedNodeRPL.SetString("2034684036014812936091", 10) + nodeRPL.SetString("56971153008414762209929", 10) + nodeETH.SetString("24246940457789627532", 10) + executionBlock = big.NewInt(23438005) + consensusBlock = big.NewInt(12662879) + intervalsPassed = big.NewInt(1) + merkleRoot = common.HexToHash("0x2ad908aa47f988d09dd9884c8026e6213262e231bab0d5051eedb2bef6aefe1e") + intervalStartTime = time.Unix(1756359339, 0) + intervalEndTime = time.Unix(1758778539, 0) + submissionTime = time.Unix(1758785783, 0) + userETH.SetString("13888515305764133572", 10) + case 41: + treasuryRPL.SetString("22465451087637660464639", 10) + trustedNodeRPL.SetString("2042313735239787314880", 10) + nodeRPL.SetString("57184784586714044816063", 10) + nodeETH.SetString("43676270282606810107", 10) + executionBlock = big.NewInt(23638162) + consensusBlock = big.NewInt(12864479) + intervalsPassed = big.NewInt(1) + merkleRoot = common.HexToHash("0xe8af8737484cfd3d3fd5106ef189333e92f9bbc2de0ac057f4c01c473b2ec958") + intervalStartTime = time.Unix(1758778539, 0) + intervalEndTime = time.Unix(1761197739, 0) + submissionTime = time.Unix(1761205211, 0) + userETH.SetString("47268078777290226308", 10) + case 42: + treasuryRPL.SetString("22549692489112341819332", 10) + trustedNodeRPL.SetString("2049972044464758347124", 10) + nodeRPL.SetString("57399217245013233718952", 10) + nodeETH.SetString("25631914712861974454", 10) + executionBlock = big.NewInt(23838215) + consensusBlock = big.NewInt(13066079) + intervalsPassed = big.NewInt(1) + merkleRoot = common.HexToHash("0x9f8c89596b48d377279bf703444a2e0cd5e98ac4cc0f5c490324c394c1ba3ce8") + intervalStartTime = time.Unix(1761197739, 0) + intervalEndTime = time.Unix(1763616939, 0) + submissionTime = time.Unix(1763642831, 0) + userETH.SetString("17561894202841328207", 10) + case 43: + treasuryRPL.SetString("22634249780692889936981", 10) + trustedNodeRPL.SetString("2057659070972080903284", 10) + nodeRPL.SetString("57614453987218265291225", 10) + nodeETH.SetString("18947687367286040081", 10) + executionBlock = big.NewInt(24037441) + consensusBlock = big.NewInt(13267679) + intervalsPassed = big.NewInt(1) + merkleRoot = common.HexToHash("0xa98c94badfa30d41fcde8a3c5ccdadadbe441e43883919567b2d45682e476ca3") + intervalStartTime = time.Unix(1763616939, 0) + intervalEndTime = time.Unix(1766036139, 0) + submissionTime = time.Unix(1766046599, 0) + userETH.SetString("8352566574518930988", 10) + case 44: + treasuryRPL.SetString("22719124146910393305039", 10) + trustedNodeRPL.SetString("2065374922446399391296", 10) + nodeRPL.SetString("57830497828499182955594", 10) + nodeETH.SetString("15367476931278801422", 10) + executionBlock = big.NewInt(24238059) + consensusBlock = big.NewInt(13469279) + intervalsPassed = big.NewInt(1) + merkleRoot = common.HexToHash("0x72ed38107b2b6c1a0469800af741c04adf5563aebe5a0ae5d77fb9b2354c64a5") + intervalStartTime = time.Unix(1766036139, 0) + intervalEndTime = time.Unix(1768455339, 0) + submissionTime = time.Unix(1768461851, 0) + userETH.SetString("4223474559072201135", 10) + case 45: + treasuryRPL.SetString("22804316776737718971210", 10) + trustedNodeRPL.SetString("2073119706976156270036", 10) + nodeRPL.SetString("58047351795332375560374", 10) + nodeETH.SetString("28550894583322805236", 10) + executionBlock = big.NewInt(24438645) + consensusBlock = big.NewInt(13670879) + intervalsPassed = big.NewInt(1) + merkleRoot = common.HexToHash("0x97dc8f589c86c3650a96568ab05c08a9e160aec7eb405e35ec2e62c6e1af559c") + intervalStartTime = time.Unix(1768455339, 0) + intervalEndTime = time.Unix(1770874539, 0) + submissionTime = time.Unix(1770894827, 0) + userETH.SetString("22178758316567204991", 10) + case 46: + treasuryRPL.SetString("22889828863606168413868", 10) + trustedNodeRPL.SetString("2080893533055106219373", 10) + nodeRPL.SetString("58265018925542974141956", 10) + nodeETH.SetString("19997007660595265346", 10) + executionBlock = big.NewInt(24639334) + consensusBlock = big.NewInt(13872479) + intervalsPassed = big.NewInt(1) + merkleRoot = common.HexToHash("0x8cb45bcefd498b8788e6291c4dc086694c85b495fb60e9d5b047e7b921929d48") + intervalStartTime = time.Unix(1770874539, 0) + intervalEndTime = time.Unix(1773293739, 0) + submissionTime = time.Unix(1773299819, 0) + userETH.SetString("12369109587853762785", 10) default: return RewardsEvent{}, false, nil } diff --git a/rocketpool-cli/service/service.go b/rocketpool-cli/service/service.go index 1a9b4069c..465a9cd47 100644 --- a/rocketpool-cli/service/service.go +++ b/rocketpool-cli/service/service.go @@ -929,9 +929,27 @@ func pruneExecutionClient(yes bool) error { return nil } + pruningMode, _ := cfg.ExecutionCommon.PruningMode.Value.(cfgtypes.Mode) + + // Besu rolling expiry is applied continuously at startup; there is no offline prune step. + if selectedEc == cfgtypes.ExecutionClient_Besu && pruningMode == cfgtypes.PruningMode_RollingHistoryExpiry { + fmt.Println("Besu rolling history expiry is applied while the client is running.") + fmt.Println("It will drop block bodies and receipts older than about one year.") + fmt.Println("If you just switched to this mode from a full node, you may need `rocketpool service resync-eth1` before already-stored history is removed.") + return nil + } + // Print the appropriate warnings before pruning if selectedEc == cfgtypes.ExecutionClient_Geth { - color.YellowPrintln("Geth has a new feature that renders pruning obsolete. However, as this is a new feature you may have to resync with `rocketpool service resync-eth1` before this takes effect.") + switch pruningMode { + case cfgtypes.PruningMode_RollingHistoryExpiry: + color.YellowPrintln("Geth does not support rolling history expiry yet. This prune only removes pre-merge bodies and receipts.") + color.YellowPrintln("Geth rolling mode uses pre-Prague expiry on startup (--history.chain postprague). Resync to drop already-stored pre-Prague history.") + case cfgtypes.PruningMode_HistoryExpiry: + fmt.Println("This will shut down Geth and prune pre-merge block bodies and receipts.") + default: + color.YellowPrintln("Geth has a new feature that renders state pruning obsolete. However, as this is a new feature you may have to resync with `rocketpool service resync-eth1` before this takes effect.") + } fmt.Println("This will shut down your main execution client and prune its database, freeing up disk space.") if cfg.UseFallbackClients.Value == false { color.RedPrintln("You do not have a fallback execution client configured.") @@ -941,6 +959,13 @@ func pruneExecutionClient(yes bool) error { fmt.Println("You have fallback clients enabled. Rocket Pool (and your consensus client) will use that while the main client is pruning.") } fmt.Println("Once pruning is complete, your execution client will restart automatically.") + } else if selectedEc == cfgtypes.ExecutionClient_Nethermind && pruningMode == cfgtypes.PruningMode_RollingHistoryExpiry { + fmt.Println("Nethermind rolling history expiry drops bodies and receipts older than about one year while the client is running.") + fmt.Println("This command still starts Nethermind's state prune, which is separate from history expiry.") + fmt.Println("If you just switched to rolling expiry from a full node, you may need `rocketpool service resync-eth1` before already-stored history is removed.") + } else if selectedEc == cfgtypes.ExecutionClient_Reth && pruningMode == cfgtypes.PruningMode_RollingHistoryExpiry { + fmt.Println("This will stop Reth and prune bodies and receipts outside the one-year rolling window.") + fmt.Println("This is a resource intensive operation and may lead to an increase in missed attestations until it finishes.") } else { fmt.Println("This will request your main execution client to prune its database, freeing up disk space. This is a resource intensive operation and may lead to an increase in missed attestations until it finishes.") } diff --git a/shared/services/config/execution-common-config.go b/shared/services/config/execution-common-config.go index 31a70a145..1dd7dc3df 100644 --- a/shared/services/config/execution-common-config.go +++ b/shared/services/config/execution-common-config.go @@ -117,23 +117,27 @@ func NewExecutionCommonConfig(cfg *RocketPoolConfig) *ExecutionCommonConfig { PruningMode: config.Parameter{ ID: "pruningMode", Name: "Pruning Mode", - Description: "Instructs the clients to either prune history, keep it, or act as an archive mode.", + Description: "How much execution-layer history the client keeps. Rolling History Expiry drops block bodies and receipts older than about one year. History Expiry only drops pre-merge bodies and receipts. Full node keeps all history. Archive keeps history and historical state.", Type: config.ParameterType_Choice, - Default: map[config.Network]interface{}{config.Network_All: config.PruningMode_FullNode}, + Default: map[config.Network]interface{}{config.Network_All: config.PruningMode_RollingHistoryExpiry}, AffectsContainers: []config.ContainerID{config.ContainerID_Eth1}, CanBeBlank: true, OverwriteOnUpgrade: false, Options: []config.ParameterOption{{ + Name: "Rolling History Expiry", + Description: "Drop block bodies and receipts older than about one year. Nethermind, Besu, and Reth support this. Geth does not yet and will use pre-Prague history expiry instead.", + Value: config.PruningMode_RollingHistoryExpiry, + }, { Name: "History Expiry", - Description: "Client will drop historical data to save storage", + Description: "Drop pre-merge block bodies and receipts (EIP-4444 partial history expiry). Keeps all post-merge history.", Value: config.PruningMode_HistoryExpiry, }, { Name: "Full node", - Description: "Client will keep the usual full node data (without history expiry)", + Description: "Keep the usual full node data, including all block bodies and receipts.", Value: config.PruningMode_FullNode, }, { Name: "Archive", - Description: "Client will work as an archive node", + Description: "Keep all history and historical state. Uses much more disk.", Value: config.PruningMode_Archive, }}, }, diff --git a/shared/services/rocketpool/assets/install/scripts/start-ec.sh b/shared/services/rocketpool/assets/install/scripts/start-ec.sh index e0f3ad975..07eef90e8 100755 --- a/shared/services/rocketpool/assets/install/scripts/start-ec.sh +++ b/shared/services/rocketpool/assets/install/scripts/start-ec.sh @@ -1,5 +1,7 @@ #!/bin/sh # This script launches ETH1 clients for Rocket Pool's docker stack; only edit if you know what you're doing ;) +# +# Rolling history expiry keeps ~1 year of bodies/receipts (82125 epochs / 2628000 blocks). # Performance tuning for ARM systems define_perf_prefix() { @@ -69,7 +71,11 @@ if [ "$CLIENT" = "geth" ]; then # Check for the prune flag and run that first if requested if [ -f "/ethclient/prune.lock" ]; then - if [ "$EC_PRUNING_MODE" = "historyExpiry" ]; then + if [ "$EC_PRUNING_MODE" = "historyExpiry" ] || [ "$EC_PRUNING_MODE" = "rollingHistoryExpiry" ]; then + if [ "$EC_PRUNING_MODE" = "rollingHistoryExpiry" ]; then + echo "Geth does not support rolling history expiry; prune-history only removes pre-merge data" + echo "A resync is required to drop pre-Prague history" + fi $PERF_PREFIX /usr/local/bin/geth prune-history $GETH_NETWORK --datadir /ethclient/geth ; rm /ethclient/prune.lock fi @@ -106,13 +112,18 @@ if [ "$CLIENT" = "geth" ]; then fi if [ "$EC_PRUNING_MODE" = "archive" ]; then - CMD="$CMD --syncmode=full --gcmode=archive" + CMD="$CMD --syncmode=full --gcmode=archive --history.state=0" fi if [ "$EC_PRUNING_MODE" = "historyExpiry" ]; then CMD="$CMD --history.chain postmerge" fi + if [ "$EC_PRUNING_MODE" = "rollingHistoryExpiry" ]; then + echo "Geth does not support rolling history expiry; using pre-Prague history expiry (--history.chain postprague)" + CMD="$CMD --history.chain postprague" + fi + if [ ! -z "$GETH_EVM_TIMEOUT" ]; then CMD="$CMD --rpc.evmtimeout ${GETH_EVM_TIMEOUT}s" fi @@ -177,6 +188,10 @@ if [ "$CLIENT" = "nethermind" ]; then exit 1 fi + if [ "$EC_PRUNING_MODE" = "archive" ]; then + RP_NETHERMIND_NETWORK="${RP_NETHERMIND_NETWORK}_archive" + fi + CMD="$PERF_PREFIX $NETHERMIND_BINARY \ --config $RP_NETHERMIND_NETWORK \ --data-dir /ethclient/nethermind \ @@ -188,19 +203,22 @@ if [ "$CLIENT" = "nethermind" ]; then --Init.WebSocketsEnabled true \ --JsonRpc.WebSocketsPort ${EC_WS_PORT:-8546} \ --JsonRpc.JwtSecretFile=/secrets/jwtsecret \ - --Pruning.FullPruningTrigger=VolumeFreeSpace \ - --Pruning.FullPruningThresholdMb=$RP_NETHERMIND_FULL_PRUNING_THRESHOLD_MB \ - --Pruning.FullPruningCompletionBehavior AlwaysShutdown \ - --Pruning.FullPruningMaxDegreeOfParallelism=$RP_NETHERMIND_FULL_PRUNING_MAX_DEGREE_PARALLELISM \ $EC_ADDITIONAL_FLAGS" + if [ "$EC_PRUNING_MODE" != "archive" ]; then + CMD="$CMD --Pruning.FullPruningTrigger=VolumeFreeSpace \ + --Pruning.FullPruningThresholdMb=$RP_NETHERMIND_FULL_PRUNING_THRESHOLD_MB \ + --Pruning.FullPruningCompletionBehavior AlwaysShutdown \ + --Pruning.FullPruningMaxDegreeOfParallelism=$RP_NETHERMIND_FULL_PRUNING_MAX_DEGREE_PARALLELISM" + fi + if [ ! -z "$EC_SUGGESTED_BLOCK_GAS_LIMIT" ]; then CMD="$CMD --Blocks.TargetBlockGasLimit $EC_SUGGESTED_BLOCK_GAS_LIMIT" fi if [ "$EC_PRUNING_MODE" = "archive" ]; then CMD="$CMD --Sync.DownloadBodiesInFastSync=false --Sync.DownloadReceiptsInFastSync=false --Sync.FastSync=false --Sync.SnapSync=false --Sync.FastBlocks=false --Sync.PivotNumber=0" - CMD="$CMD --Pruning.Mode=None" + CMD="$CMD --Pruning.Mode=None --Receipt.TxLookupLimit=0" fi if [ "$EC_PRUNING_MODE" = "fullNode" ]; then @@ -210,6 +228,12 @@ if [ "$CLIENT" = "nethermind" ]; then if [ "$EC_PRUNING_MODE" = "historyExpiry" ]; then CMD="$CMD --Sync.AncientBodiesBarrier=15537394 --Sync.AncientReceiptsBarrier=15537394" + CMD="$CMD --History.Pruning=UseAncientBarriers" + CMD="$CMD --Pruning.Mode=Hybrid" + fi + + if [ "$EC_PRUNING_MODE" = "rollingHistoryExpiry" ]; then + CMD="$CMD --History.Pruning=Rolling" CMD="$CMD --Pruning.Mode=Hybrid" fi @@ -245,12 +269,14 @@ if [ "$CLIENT" = "nethermind" ]; then CMD="$CMD --Network.DiscoveryPort $EC_P2P_PORT --Network.P2PPort $EC_P2P_PORT" fi - if [ ! -z "$RP_NETHERMIND_PRUNE_MEM_SIZE" ]; then - CMD="$CMD --Pruning.CacheMb $RP_NETHERMIND_PRUNE_MEM_SIZE" - fi + if [ "$EC_PRUNING_MODE" != "archive" ]; then + if [ ! -z "$RP_NETHERMIND_PRUNE_MEM_SIZE" ]; then + CMD="$CMD --Pruning.CacheMb $RP_NETHERMIND_PRUNE_MEM_SIZE" + fi - if [ ! -z "$RP_NETHERMIND_FULL_PRUNE_MEMORY_BUDGET" ]; then - CMD="$CMD --Pruning.FullPruningMemoryBudgetMb $RP_NETHERMIND_FULL_PRUNE_MEMORY_BUDGET" + if [ ! -z "$RP_NETHERMIND_FULL_PRUNE_MEMORY_BUDGET" ]; then + CMD="$CMD --Pruning.FullPruningMemoryBudgetMb $RP_NETHERMIND_FULL_PRUNE_MEMORY_BUDGET" + fi fi exec ${CMD} @@ -275,14 +301,19 @@ if [ "$CLIENT" = "besu" ]; then echo -n "$(head -c 32 /dev/urandom | od -A n -t x1 | tr -d '[:space:]')" > /secrets/jwtsecret fi - # Check for the prune flag and run that first if requested - if [ -f "/ethclient/prune.lock" ]; then - + # Check for the prune flag and run that first if requested. + # Rolling expiry is applied at startup via Xchain-pruning flags, so skip the + # offline pre-merge prune in that mode. + if [ -f "/ethclient/prune.lock" ] && [ "$EC_PRUNING_MODE" != "rollingHistoryExpiry" ]; then $PERF_PREFIX /opt/besu/bin/besu $BESU_NETWORK --data-path=/ethclient/besu --history-expiry-prune storage trie-log prune ; rm /ethclient/prune.lock # Run Besu normally else + if [ -f "/ethclient/prune.lock" ]; then + echo "Besu rolling history expiry is applied at startup; skipping offline pre-merge prune" + rm -f /ethclient/prune.lock + fi CMD="$PERF_PREFIX /opt/besu/bin/besu \ $BESU_NETWORK \ @@ -300,7 +331,6 @@ if [ "$CLIENT" = "besu" ]; then --engine-rpc-port=${EC_ENGINE_PORT:-8551} \ --engine-host-allowlist=* \ --engine-jwt-secret=/secrets/jwtsecret \ - --Xbonsai-full-flat-db-enabled=true \ $EC_ADDITIONAL_FLAGS" if [ ! -z "$EXTERNAL_IP" ]; then @@ -313,6 +343,8 @@ if [ "$CLIENT" = "besu" ]; then if [ "$EC_PRUNING_MODE" = "archive" ]; then CMD="$CMD --sync-mode=FULL --data-storage-format=FOREST" + else + CMD="$CMD --Xbonsai-full-flat-db-enabled=true" fi if [ "$EC_PRUNING_MODE" = "fullNode" ]; then @@ -323,6 +355,10 @@ if [ "$CLIENT" = "besu" ]; then CMD="$CMD --history-expiry-prune" fi + if [ "$EC_PRUNING_MODE" = "rollingHistoryExpiry" ]; then + CMD="$CMD --snapsync-server-enabled --Xchain-pruning-enabled=ALL --Xchain-pruning-blocks-retained=2628000" + fi + if [ ! -z "$ETHSTATS_LABEL" ] && [ ! -z "$ETHSTATS_LOGIN" ]; then CMD="$CMD --ethstats $ETHSTATS_LABEL:$ETHSTATS_LOGIN" fi @@ -339,7 +375,7 @@ if [ "$CLIENT" = "besu" ]; then CMD="$CMD --p2p-port=$EC_P2P_PORT" fi - if [ ! -z "$BESU_MAX_BACK_LAYERS" ]; then + if [ "$EC_PRUNING_MODE" != "archive" ] && [ ! -z "$BESU_MAX_BACK_LAYERS" ]; then CMD="$CMD --bonsai-historical-block-limit=$BESU_MAX_BACK_LAYERS" fi @@ -360,6 +396,16 @@ if [ "$CLIENT" = "reth" ]; then echo -n "$(head -c 32 /dev/urandom | od -A n -t x1 | tr -d '[:space:]')" > /secrets/jwtsecret fi + # Check for the prune flag and run that first if requested + if [ -f "/ethclient/prune.lock" ]; then + if [ "$EC_PRUNING_MODE" = "archive" ]; then + echo "Reth is an archive node. Not attempting to prune: Aborting." + rm -f /ethclient/prune.lock + exit 1 + fi + $PERF_PREFIX /usr/local/bin/reth prune $RETH_NETWORK --datadir /ethclient/reth ; rm /ethclient/prune.lock + else + CMD="$PERF_PREFIX /usr/local/bin/reth node $RETH_NETWORK \ --datadir /ethclient/reth \ --http \ @@ -403,6 +449,16 @@ if [ "$CLIENT" = "reth" ]; then CMD="$CMD --prune.transaction-lookup.distance=10064" fi + if [ "$EC_PRUNING_MODE" = "rollingHistoryExpiry" ]; then + CMD="$CMD --block-interval 5" + CMD="$CMD --prune.senderrecovery.full" + CMD="$CMD --prune.accounthistory.distance 10064" + CMD="$CMD --prune.storagehistory.distance 10064" + CMD="$CMD --prune.transaction-lookup.distance=10064" + CMD="$CMD --prune.bodies.distance 2628000" + CMD="$CMD --prune.receipts.distance 2628000" + fi + if [ ! -z "$EC_MAX_PEERS" ]; then CMD="$CMD --max-outbound-peers=$EC_MAX_PEERS" fi @@ -417,4 +473,5 @@ if [ "$CLIENT" = "reth" ]; then exec ${CMD} + fi fi diff --git a/shared/types/config/types.go b/shared/types/config/types.go index 7e10970b1..3259ba279 100644 --- a/shared/types/config/types.go +++ b/shared/types/config/types.go @@ -47,9 +47,14 @@ const ( // Enum to describe the mode for a client - local (Docker Mode) or external (Hybrid Mode) const ( - PruningMode_HistoryExpiry Mode = "historyExpiry" - PruningMode_FullNode Mode = "fullNode" - PruningMode_Archive Mode = "archive" + PruningMode_HistoryExpiry Mode = "historyExpiry" + PruningMode_RollingHistoryExpiry Mode = "rollingHistoryExpiry" + PruningMode_FullNode Mode = "fullNode" + PruningMode_Archive Mode = "archive" + + // RollingHistoryBlockRetention is about one year of post-merge slots + // (82125 epochs * 32 slots) + RollingHistoryBlockRetention uint64 = 2628000 ) // Enum to describe which data type a parameter's value will have, which