Skip to content

Commit

Permalink
E3: set pruneNonEssentials=false (#11880)
Browse files Browse the repository at this point in the history
  • Loading branch information
Giulio2002 authored Sep 5, 2024
1 parent 2c3f947 commit 5104af1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions erigon-lib/config3/config3.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ const HistoryV3AggregationStep = 1_562_500 // = 100M / 64. Dividers: 2, 5, 10, 2
const EnableHistoryV4InTest = true

const MaxReorgDepthV3 = 1024

const DefaultPruneDistance = 100_000
7 changes: 4 additions & 3 deletions turbo/cli/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"time"

"github.com/erigontech/erigon-lib/common/hexutil"
"github.com/erigontech/erigon-lib/config3"

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

Expand Down Expand Up @@ -434,10 +435,10 @@ func ApplyFlagsForEthConfigCobra(f *pflag.FlagSet, cfg *ethconfig.Config) {
case "archive":
case "full":
mode.Blocks = prune.Distance(math.MaxUint64)
mode.History = prune.Distance(0)
mode.History = prune.Distance(config3.DefaultPruneDistance)
case "minimal":
mode.Blocks = prune.Distance(2048) // 2048 is just some blocks to allow reorgs
mode.History = prune.Distance(0)
mode.Blocks = prune.Distance(config3.DefaultPruneDistance) // 2048 is just some blocks to allow reorgs and data for rpc
mode.History = prune.Distance(config3.DefaultPruneDistance)
default:
utils.Fatalf("error: --prune.mode must be one of archive, full, minimal")
}
Expand Down

0 comments on commit 5104af1

Please sign in to comment.