NethermindEth / NethermindEth/juno
Use DB snapshots for consistent starknet_getStorageProof reads
@cicr99 is already working on this.
Since Sep 16, 2026.
- Dominant language
- Go
- Stars
- 444
- Forks
- 244
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 78
Description
Description
starknet_getStorageProof currently resolves the chain height, block hash/header, and state reader through separate database reads. This leaves a possible race where a new block is accepted between those reads, so the response may combine metadata from one block with state/trie data from another.
A recent patch avoids using historical state readers for storage proofs by introducing a trie-capable state accessor pinned by block number where possible. That fixes the immediate regression where StateAtBlockNumber returned historical readers without trie support, but it is still not the complete consistency solution, especially for deprecated state.
The long-term fix should use a database snapshot/read view so all data needed by starknet_getStorageProof is read from the same DB state.
Acceptance criteria
starknet_getStorageProofreads block metadata and trie state from the same DB snapshot.- Existing unsupported historical block behavior remains unchanged.
- Works with deprecated state, since that is still the production path.
Documentation link(s)
Check these comments for reference:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.