Skip to content

Conversation

Thegaram
Copy link
Contributor

@Thegaram Thegaram commented Jul 1, 2025

EIP-2935 specifies HISTORY_SERVE_WINDOW = 8191. Geth currently uses 8192 This does not break consensus since the history storage system contract is updated via EVM execution. However, the test function getContractStoredBlockHash could return incorrect results.

Fixes #32458.

@fjl
Copy link
Contributor

fjl commented Jul 1, 2025

Is this even a protocol parameter?

@Thegaram
Copy link
Contributor Author

Thegaram commented Jul 1, 2025

Is this even a protocol parameter?

Technically yes, but it's already included in HistoryStorageCode, so this param is not used explicitly in geth.

@fjl
Copy link
Contributor

fjl commented Jul 1, 2025

We should just remove HistoryServeWindow from params then!

@Thegaram Thegaram changed the title fix: use correct EIP-2935 history serve window parameter fix: remove unused HistoryServeWindow from protocol params Jul 1, 2025
@Thegaram
Copy link
Contributor Author

Thegaram commented Jul 1, 2025

We should just remove HistoryServeWindow from params then!

Sure, done!

@fjl fjl changed the title fix: remove unused HistoryServeWindow from protocol params params: remove HistoryServeWindow Jul 1, 2025
@fjl fjl added this to the 1.16.1 milestone Jul 1, 2025
fjl
fjl previously approved these changes Jul 1, 2025
lightclient
lightclient previously approved these changes Jul 1, 2025
@lightclient
Copy link
Member

While this change is fine for geth as it is today, one thing to mention is that @gballet probably does rely on it in the verkle branch.

@fjl fjl modified the milestones: 1.16.1, 1.16.2 Jul 2, 2025
@lightclient
Copy link
Member

@Thegaram can you resolve the conflict please?

@Thegaram Thegaram dismissed stale reviews from lightclient and fjl via aa62718 July 10, 2025 06:30
BlobTxPointEvaluationPrecompileGas = 50000 // Gas price for the point evaluation precompile.
BlobBaseCost = 1 << 13 // Base execution gas cost for a blob.

HistoryServeWindow = 8192 // Number of blocks to serve historical block hashes for, EIP-2935.
Copy link
Member

Choose a reason for hiding this comment

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

I agree the value is incorrect, but this is still a protocol param and so it should stay defined here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should I add it back? @fjl

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Friendly ping @fjl

Copy link
Member

Choose a reason for hiding this comment

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

Yes please

Copy link
Contributor

Choose a reason for hiding this comment

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

We can't really configure it differently, since it's an internal value in the contract.

Copy link
Contributor

Choose a reason for hiding this comment

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

The value is defined by https://eips.ethereum.org/EIPS/eip-2935, and changing it would change the contract code and its address. So I think it's fair to say, it's not a tunable parameter.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think having HistoryServeWindow = 8191 in protocol_params.go is nice for being explicit about this, even if it is not used in geth (or only used in tests).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed it back as per @gballet and @rjl493456442's suggestion.

@rjl493456442 rjl493456442 modified the milestones: 1.16.2, 1.16.3 Aug 4, 2025
@Thegaram Thegaram changed the title params: remove HistoryServeWindow fix: use correct EIP-2935 history serve window parameter Aug 21, 2025
Copy link
Contributor

@s1na s1na left a comment

Choose a reason for hiding this comment

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

I have followed the conversation on this PR. I see Felix's point on this not being a tunable parameter and sort of agree it can be moved to be local to the test. At the same time the PR is a strict improvement as it fixes a value. And if in its current form is easier for @gballet then LGTM.

@s1na s1na changed the title fix: use correct EIP-2935 history serve window parameter params: fix history serve window for verkle test Aug 25, 2025
@s1na s1na merged commit 42467f1 into ethereum:master Aug 25, 2025
5 of 6 checks passed
@Thegaram Thegaram deleted the patch-1 branch August 26, 2025 06:31
gballet pushed a commit to gballet/go-ethereum that referenced this pull request Sep 11, 2025
Fixes the history serve window parameter for the
test function `getContractStoredBlockHash`.

Fixes ethereum#32458.
joshklop added a commit to ethereum-optimism/optimism that referenced this pull request Sep 21, 2025
joshklop added a commit to ethereum-optimism/optimism that referenced this pull request Sep 21, 2025
joshklop added a commit to ethereum-optimism/optimism that referenced this pull request Sep 21, 2025
github-merge-queue bot pushed a commit to ethereum-optimism/optimism that referenced this pull request Sep 23, 2025
* update op-geth to: merge go-ethereum v1.16.3

https://github.com/ethereum-optimism/op-geth

* bump op-geth

* various fixes

* `params.HistoryServeWindow` changed

8192 -> 8191
ethereum/go-ethereum#32127

* Updated op-geth to v1.101602.4-0.20250922085653-2f0528ba0ed5

* update op-geth

* update op-geth to v1.101603.0-rc.1

---------

Co-authored-by: geoknee <[email protected]>
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.

Misleading constant for EIP-2935
6 participants