Skip to content

rpc: fix in API with request Hash and state processing add check Canonical#19356

Merged
lupin012 merged 5 commits intomainfrom
lupin012/fix_Canonical_for_API_with_HASH_and_state
Mar 2, 2026
Merged

rpc: fix in API with request Hash and state processing add check Canonical#19356
lupin012 merged 5 commits intomainfrom
lupin012/fix_Canonical_for_API_with_HASH_and_state

Conversation

@lupin012
Copy link
Contributor

@lupin012 lupin012 commented Feb 20, 2026

APIs performing state lookups via Hash must implement a canonicality check. Failure to do so may allow access to stale or invalid state data from side-chains/reorgs, compromising the accuracy of the API response

API that was OK:

  • eth_getStorageAt()
  • eth_call ()
  • eth_estimateGas()
  • eth_getWitness()
  • eth_getProof()
  • eth_createAccessList()
  • debug_traceBlockByHash ((
  • debug_accountAt()

API Fixed with this PR:

  • eth_getBalance()
  • eth_getTransactionCount()
  • eth_getCode()
  • eth_getStorageAt()
  • debug_storageRangeAt()
  • otterscan_hasCode()
  • erigon_getBalanceChangesInBlock()
  • debug_traceCall()
  • trace_replayBlockTransactions()
  • debug_accountRange()

@lupin012 lupin012 marked this pull request as ready for review February 20, 2026 13:27
@lupin012 lupin012 requested a review from canepat as a code owner February 20, 2026 13:27
@lupin012 lupin012 marked this pull request as draft February 20, 2026 13:28
@lupin012 lupin012 marked this pull request as draft February 20, 2026 13:28
@lupin012 lupin012 marked this pull request as ready for review February 20, 2026 17:58
@yperbasis yperbasis added the RPC label Feb 23, 2026
@lupin012 lupin012 merged commit 9334e94 into main Mar 2, 2026
25 checks passed
@lupin012 lupin012 deleted the lupin012/fix_Canonical_for_API_with_HASH_and_state branch March 2, 2026 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants