Skip to content

Commit 9ae17a9

Browse files
Thegaramcolinlyguo
andcommitted
fix: disable pruning and prefetch if not flags are provided (#483)
Co-authored-by: colin <102356659+colinlyguo@users.noreply.github.com>
1 parent 9c72dd2 commit 9ae17a9

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

cmd/utils/flags.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -437,7 +437,7 @@ var (
437437
Usage: "Percentage of cache memory allowance to use for snapshot caching (default = 10% full mode, 20% archive mode)",
438438
Value: 10,
439439
}
440-
CacheNoPrefetchFlag = cli.BoolTFlag{
440+
CacheNoPrefetchFlag = cli.BoolFlag{
441441
Name: "cache.noprefetch",
442442
Usage: "Disable heuristic state prefetch during block import (less CPU and disk IO, more time waiting for data)",
443443
}
@@ -1745,15 +1745,15 @@ func SetEthConfig(ctx *cli.Context, stack *node.Node, cfg *ethconfig.Config) {
17451745
stack.Config().L1Confirmations = rpc.FinalizedBlockNumber
17461746
log.Info("Setting flag", "--l1.sync.startblock", "4038000")
17471747
stack.Config().L1DeploymentBlock = 4038000
1748-
// double check correct config
1748+
// disable pruning
17491749
if ctx.GlobalString(GCModeFlag.Name) != GCModeArchive {
17501750
log.Crit("Must use --gcmode=archive")
17511751
}
1752-
log.Info("Setting flag", "--gcmode", ctx.GlobalString(GCModeFlag.Name))
1753-
if !ctx.GlobalBool(CacheNoPrefetchFlag.Name) {
1754-
log.Crit("Must use --cache.noprefetch")
1755-
}
1756-
log.Info("Setting flag", "--cache.noprefetch", ctx.GlobalBool(CacheNoPrefetchFlag.Name))
1752+
log.Info("Pruning disabled")
1753+
cfg.NoPruning = true
1754+
// disable prefetch
1755+
log.Info("Prefetch disabled")
1756+
cfg.NoPrefetch = true
17571757
case ctx.GlobalBool(DeveloperFlag.Name):
17581758
if !ctx.GlobalIsSet(NetworkIdFlag.Name) {
17591759
cfg.NetworkId = 1337

params/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import (
2424
const (
2525
VersionMajor = 4 // Major version component of the current release
2626
VersionMinor = 3 // Minor version component of the current release
27-
VersionPatch = 50 // Patch version component of the current release
27+
VersionPatch = 51 // Patch version component of the current release
2828
VersionMeta = "sepolia" // Version metadata to append to the version string
2929
)
3030

0 commit comments

Comments
 (0)