-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
refactor: remove outdated prune-block/pruneancient tool, implement it by tail-deletion #2809
base: develop
Are you sure you want to change the base?
Conversation
validator which has used tool |
eth/backend.go
Outdated
log.Warn("The node enables PruneAncientData, BlockHistory wille force to 0") | ||
config.BlockHistory = 0 | ||
} | ||
if err = eth.blockchain.PruneBlockHistory(config.BlockHistory); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
run PruneBlockHistory when start nodes?
the prune is not revertable, so I think make user to use it as a tool is better.
when they use this tool, they make their purpose unambiguously
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The node runs as normal in default config(BlockHistory=0), they must set BlockHistory>0 that will trigger the pruning.
it would disable the prune-block tool, to avoid impacting the current users, better to be delivered in a separate maintenance release after Pascal hardfork. |
@@ -158,7 +158,7 @@ type FreezerEnv struct { | |||
// AncientFreezer defines the help functions for freezing ancient data | |||
type AncientFreezer interface { | |||
// SetupFreezerEnv provides params.ChainConfig for checking hark forks, like isCancun. | |||
SetupFreezerEnv(env *FreezerEnv) error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
blockHistory is similar to BlobExtraReserve?
if so, maybe can add it as a field of FreezerEnv
Good Job! |
refactor: remove outdated prune-block tools;
freezer: support reset tail meta when restarting from pruned ancient;
a13f681
to
70d074f
Compare
Description
This PR will remove prune-block/pruneancient tool, it can be replaced by tail-deletion, which is more easy & efficient for managing block history.
The PR will auto-detect the legacy offset metadata from db, and reset the tail metadata of freezer tables. So it's safe to run
--history.blocks
with the old pruneancient/prune-block feature.Changes
Notable changes: