Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E3: set pruneNonEssentials=false #11880

Merged
merged 2 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading