Skip to content

Conversation

@qdm12
Copy link
Contributor

@qdm12 qdm12 commented Dec 26, 2024

Why this should be merged

Resolves #714

How this works

  • New option historical-proof-query-window for archive nodes only which:
    • can be set to a strictly positive number to accept get proof queries for a block number above the last accepted block number - historical-proof-query-window
    • defaults to 43200 to accept get proof queries for blocks dating from the last 24 hours approximately
    • can be set to 0 to accept any block number get proof query
  • For non-archive nodes, only the last 32 blocks before the accepted block are accepted for get proof queries (as before pretty much)

How this was tested

  • TestBlockChainAPI_stateQueryBlockNumberAllowed

Need to be documented?

Need to update RELEASES.md?

  • Done in RELEASES.md for the v0.14.1 release

@qdm12 qdm12 force-pushed the qdm12/historical-proofs-options branch from 6deaa8a to bdfbbcd Compare December 26, 2024 15:59
@qdm12 qdm12 marked this pull request as ready for review December 26, 2024 16:36
@qdm12 qdm12 requested review from a team, ceyonur and darioush as code owners December 26, 2024 16:36
@qdm12 qdm12 force-pushed the qdm12/historical-proofs-options branch 2 times, most recently from 1d1a1a1 to 3a7ba07 Compare December 27, 2024 12:39
@qdm12 qdm12 requested a review from darioush December 30, 2024 17:44
@qdm12 qdm12 force-pushed the qdm12/historical-proofs-options branch 4 times, most recently from 5920832 to 534a73e Compare January 3, 2025 13:38
@qdm12 qdm12 force-pushed the qdm12/historical-proofs-options branch from 6cea7d1 to 8a89462 Compare January 3, 2025 14:44
@qdm12 qdm12 requested review from ceyonur and darioush January 3, 2025 14:49
@qdm12 qdm12 changed the title feat(internal/ethapi): historical-proofs and recent-blocks-window options for GetProofs feat(internal/ethapi): historical-state-query-window option for GetProofs Jan 7, 2025
@qdm12 qdm12 force-pushed the qdm12/historical-proofs-options branch 2 times, most recently from 76d1f74 to 8948854 Compare January 8, 2025 14:02
@qdm12 qdm12 force-pushed the qdm12/historical-proofs-options branch from 8948854 to 6e83e97 Compare January 8, 2025 15:54
darioush
darioush previously approved these changes Jan 9, 2025
@qdm12 qdm12 changed the title feat(internal/ethapi): historical-state-query-window option for GetProofs feat(internal/ethapi): historical-proof-query-window option for archive nodes get_proof Jan 9, 2025
@qdm12 qdm12 changed the title feat(internal/ethapi): historical-proof-query-window option for archive nodes get_proof feat(internal/ethapi): historical-proof-query-window option for archive nodes eth_getProof Jan 9, 2025
qdm12 added 18 commits January 10, 2025 15:49
- Dynamic default depending if pruning is true or false
- Replace `historical-proofs` with `historical-state-query-window` set to `0` to allow any block number state query
- Replace `recent-blocks-window` with `historical-state-query-window` which is only applicable for archive nodes
- For non-archive nodes, `historical-state-query-window` defaults to the tip buffer size of 32
- Set eth default HistoricalStateQueryWindow to 43200 (is this necessary?)
- Export core.tipBufferSize
- Update release notes
- remove the need to modify config after reading it
- remove the need to import core from config package
- core.TipBufferSize is used if running in non-archive mode within the function `isHistoricalStateQueryAllowed`
- rename `defaultBlocksWindow` -> `defaultHistoricalProofQueryWindow`
- Chain calls with `s.b.LastAcceptedBlock().NumberU64()`
@qdm12 qdm12 force-pushed the qdm12/historical-proofs-options branch from 1633751 to d09eabb Compare January 10, 2025 14:51
@qdm12 qdm12 enabled auto-merge (squash) January 10, 2025 14:52
@qdm12 qdm12 requested review from ceyonur and darioush January 10, 2025 14:52
@darioush darioush disabled auto-merge January 13, 2025 15:26
@qdm12 qdm12 merged commit 5013851 into master Jan 15, 2025
8 checks passed
@qdm12 qdm12 deleted the qdm12/historical-proofs-options branch January 15, 2025 15:28
qdm12 added a commit to ava-labs/subnet-evm that referenced this pull request Mar 13, 2025
…blocks

- default behavior for pruning mode to reject blocks before the 32 blocks preceding the last accepted block
- default behavior for archive mode to reject blocks before ~24h worth of blocks preceding the last accepted block
- archive mode new option `historical-proof-query-window` to customize the blocks window, or set it to 0 to accept any block number

See ava-labs/coreth#719
node-druidx56y added a commit to node-druidx56y/subnet-evm that referenced this pull request Sep 28, 2025
…blocks

- default behavior for pruning mode to reject blocks before the 32 blocks preceding the last accepted block
- default behavior for archive mode to reject blocks before ~24h worth of blocks preceding the last accepted block
- archive mode new option `historical-proof-query-window` to customize the blocks window, or set it to 0 to accept any block number

See ava-labs/coreth#719
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.

Deprecate historical proofs in eth_getProof API.

3 participants