Skip to main content
TLDR:
  • Provides a Python-based workaround for debug_storageRangeAt RPC method, which is not supported in Reth nodes.
  • Uses standard eth_getStorageAt calls to sequentially query storage slots and replicate debug functionality.
  • Includes pagination support to handle large storage queries efficiently with configurable result limits.
  • Demonstrates practical comparison between native debug_storageRangeAt on Base testinprod vs. the workaround approach on Reth.
In this article, we’ll walk through a practical Python-based workaround script to replicate the essential functionality of debug_storageRangeAt using standard Ethereum RPC calls (eth_getStorageAt). This approach ensures you can still achieve your debugging goals without relying on methods unavailable in Reth. We’ll use Base and Python as an example. We’ll replicate specifically the following call on the Base mainnet:

Workaround overview

The workaround leverages the standard Ethereum RPC method eth_getStorageAt to mimic the storage exploration functionality:
  • Sequentially query storage slots.
  • Retrieve non-zero storage entries.
  • Implement pagination to handle large storage queries efficiently.

Full script in Python

Configuration

Adjust these parameters according to your context:
  1. Interpret the Output: You’ll see a JSON-formatted output similar to what debug_storageRangeAt provides, including storage entries and the next key for pagination.
Use this snippet to identify and query the exact slots needed.

Pagination explained

Due to the potentially massive size of contract storage, the script includes pagination. If more entries exist beyond the queried range, nextKey is returned. Use this as your new START_KEY in the subsequent query.

Limitations & Best Practices

  • Performance: This workaround may be slower than native implementations due to multiple RPC calls.
  • Accuracy: It returns hashed storage keys without preimage (original key). You’ll need additional logic or external knowledge to map these hashes to original keys.

Full example comparison

Let’s do the same parameters call debug_storageRangeAt on Base testinprod and eth_getStorageAt on Reth.

debug_storageRangeAt on Base testinprod

Call:
Output:

eth_getStorageAt

Call: (Note the Chainstack Node URL is a public one for this Developer portal, so it’s rate-limited and suitable for one-off example calls only).
Output:
References & further reading:

Ethereum JSON-RPC specification

Reth JSON-RPC docs

Understanding Ethereum Storage Layout

About the author

Ake

Ake Director of Developer Experience @ Chainstack
Talk to me all things Web3
20 years in technology | 8+ years in Web3 full time years experience
Last modified on June 19, 2026