core, triedb, ethdb: remove incremental snapshot (incr db) feature - #3768
Conversation
…feature Delete the incr-db feature end to end: incr downloader/merger, incr freezers and pathdb incr manager, config/flags/subcommands, and the incr-only ethdb interface methods (AncientWriter.ResetTableForIncr, AncientFreezer.CleanBlock). rawdb.NewFreezer and utils.MakeTrieDatabase drop their incr-only parameters accordingly. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Pull Request ReviewThis PR removes the unused incremental snapshot feature from the Go-based Ethereum client, including its downloader, merger, path database manager, raw database accessors, CLI commands, configuration fields, tests, and LZ4 dependency. Legacy Sensitive ContentNo sensitive content detected. Security IssuesNo serious security issues detected. Generated by Hashdit Bot. This tool can absolutely NOT replace manual audits. |
Tolerate the seven removed incr config fields in existing config.toml files via deprecatedConfigFields (previous releases serialized them unconditionally, so startup would hard-fail otherwise). Drop dead code that lost its last caller with the feature: WriteHeaderRLP, WriteTdRLP, WriteBlobSidecarsRLP, InspectAncients, chainFreezer.readHeadNumber, the statesData journal types (restored to upstream function-local form) and the pierrec/lz4 dependency. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
b0fa197 to
aacca22
Compare
Pull Request ReviewThis PR removes the unused incremental snapshot generation, download, merge, storage, and inspection functionality from the Go-based Ethereum client. It also removes the associated CLI flags, configuration fields, database interfaces, tests, and LZ4 dependency while retaining deprecated no-op mappings so legacy configuration files remain loadable. Sensitive ContentNo sensitive content detected. Security IssuesNo serious security issues detected. Generated by Hashdit Bot. This tool can absolutely NOT replace manual audits. |
cmd/keeper replaces the root module with a local path (replace => ../../), so removing the incremental snapshot feature and its lz4 dependency from the root module prunes the corresponding indirect deps here as well. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Pull Request ReviewThis PR removes the incremental snapshot subsystem from the Go-based Ethereum/BSC client, including its downloader, merger, path database manager, raw database accessors, CLI commands, configuration fields, tests, and related dependencies. Existing Sensitive ContentNo sensitive content detected. Security IssuesNo serious security issues detected. Generated by Hashdit Bot. This tool can absolutely NOT replace manual audits. |
…test Revert bnb-chain#3294. It marked the header, canonical hash and total difficulty freezer tables prunable so that the incremental snapshot merger could truncate every chain table; that feature was removed in bnb-chain#3768, so the only thing the flags still do is delete headers on every tail prune. They also broke InsertHeadersBeforeCutoff, which truncates the tail right after writing the pre-cutoff headers: with the headers, hashes and diffs tables prunable that truncation dropped the data it had just written, so the following InsertReceiptChain could not resolve the parent's total difficulty and failed with ErrUnknownAncestor. bnb-chain#3294 disabled TestInsertChainWithCutoff instead; restore it. Datadirs pruned by v1.6.5 - v1.7.7 persist a non-zero virtualTail in the meta file of those three tables, which flipping the flags back cannot undo - the data files are already gone. Freezer.repair panicked and Freezer.validate errored on such a tail, so every node that ran with --pruneancient or --history.blocks would fail to start. Both now log a warning and keep the legacy tail; the freezer tail is already the maximum across tables, and reads below it fail today regardless. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…test Revert bnb-chain#3294. It marked the header, canonical hash and total difficulty freezer tables prunable so that the incremental snapshot merger could truncate every chain table; that feature was removed in bnb-chain#3768, so the only thing the flags still do is delete headers on every tail prune. They also broke InsertHeadersBeforeCutoff, which truncates the tail right after writing the pre-cutoff headers: with the headers, hashes and diffs tables prunable that truncation dropped the data it had just written, so the following InsertReceiptChain could not resolve the parent's total difficulty and failed with ErrUnknownAncestor. bnb-chain#3294 disabled TestInsertChainWithCutoff instead; restore it. Datadirs pruned by v1.6.5 - v1.7.7 persist a non-zero virtualTail in the meta file of those three tables, which flipping the flags back cannot undo - the data files are already gone. Freezer.repair panicked and Freezer.validate errored on such a tail, so every node that ran with --pruneancient or --history.blocks would fail to start. Both now log a warning and keep the legacy tail; the freezer tail is already the maximum across tables, and reads below it fail today regardless. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Description
Removes the incremental snapshot (incr db) feature: the incr downloader/merger, the pathdb incr manager and async state, the rawdb incr snapshot db and accessors, the
IncrSnapshot*config fields, and theEnableIncrSnapshots/ remote-snapshot code paths.Rationale
The feature is unused and was deliberately decoupled from the go-ethereum v1.17.3 merge to keep that PR focused. Now that the merge has landed on
develop(#3760), the removal is submitted on its own. Old config files carryingIncrSnapshot*keys remain loadable — the fields are registered as deprecated no-ops.Changes
IncrSnapshot*fields fromethconfigand their CLI flags; keep deprecated field mappings incmd/geth/config.goso existing configs still load.github.com/pierrec/lz4/v4from the root module — it was used only by the incr snapshot store.cmd/keeper/go.modandgo.sumaccordingly: that submodulereplaces the root module (=> ../../) and inherits its dependency set, so removing incr's deps prunes them here too.