Skip to content

core/history: refactor pruning configuration - #34036

Merged
s1na merged 1 commit into
ethereum:masterfrom
s1na:history-policy-refactor
Mar 18, 2026
Merged

s1na merged 1 commit into
ethereum:masterfrom
s1na:history-policy-refactor

Conversation

@s1na

@s1na s1na commented Mar 17, 2026

Copy link
Copy Markdown
Contributor

This PR introduces a new type HistoryPolicy which captures user intent as opposed to pruning point stored in the blockchain which persists the actual tail of data in the database.

It is in preparation for the rolling history expiry feature.

It comes with a semantic change: if database was pruned and geth is running without a history mode flag (or explicit keep all flag) geth will emit a warning but continue running as opposed to stopping the world.

@s1na
s1na requested a review from rjl493456442 as a code owner March 17, 2026 17:44
BlockHash: common.HexToHash("0x50c8cab760b2948349c590461b166773c45d8f4858cccf5a43025ab2960152e8"),
},
params.SepoliaGenesisHash: {
BlockNumber: 7836331,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WHere did you get this number? Just out of curiosity how to find the first block of a fork

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For mainnet you the info can be found on here https://ethereum.org/ethereum-forks/#pectra but for testnet I haven't found a single source. Once you find the block somewhere it can be double checked on etherscan because they show a banner for the fork blocks.

@s1na s1na added this to the 1.17.2 milestone Mar 18, 2026
@s1na
s1na merged commit 6ae3f9f into ethereum:master Mar 18, 2026
10 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants