Skip to content

Commit 5104af1

Browse files
authored
E3: set pruneNonEssentials=false (#11880)
1 parent 2c3f947 commit 5104af1

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

erigon-lib/config3/config3.go

+2
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,5 @@ const HistoryV3AggregationStep = 1_562_500 // = 100M / 64. Dividers: 2, 5, 10, 2
2323
const EnableHistoryV4InTest = true
2424

2525
const MaxReorgDepthV3 = 1024
26+
27+
const DefaultPruneDistance = 100_000

turbo/cli/flags.go

+4-3
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import (
2222
"time"
2323

2424
"github.com/erigontech/erigon-lib/common/hexutil"
25+
"github.com/erigontech/erigon-lib/config3"
2526

2627
"github.com/erigontech/erigon-lib/txpool/txpoolcfg"
2728

@@ -434,10 +435,10 @@ func ApplyFlagsForEthConfigCobra(f *pflag.FlagSet, cfg *ethconfig.Config) {
434435
case "archive":
435436
case "full":
436437
mode.Blocks = prune.Distance(math.MaxUint64)
437-
mode.History = prune.Distance(0)
438+
mode.History = prune.Distance(config3.DefaultPruneDistance)
438439
case "minimal":
439-
mode.Blocks = prune.Distance(2048) // 2048 is just some blocks to allow reorgs
440-
mode.History = prune.Distance(0)
440+
mode.Blocks = prune.Distance(config3.DefaultPruneDistance) // 2048 is just some blocks to allow reorgs and data for rpc
441+
mode.History = prune.Distance(config3.DefaultPruneDistance)
441442
default:
442443
utils.Fatalf("error: --prune.mode must be one of archive, full, minimal")
443444
}

0 commit comments

Comments
 (0)