eth_getProof
eth_getProof is a JSON-RPC method standardised by EIP1186 (opens in a new tab) and implemented by L1 execution clients (opens in a new tab).
The proof returned by eth_getProof RPC call consists of several components:
-
accountProof:- An array of rlp-serialized MerkleTree-Nodes
- Proves the inclusion of the queried account in the state trie
-
balance:- The balance of the account at the specified block
-
codeHash:- The hash of the code of the account at the specified block
0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470for non-contract accounts (This is the output ofkeccak256(''))
-
nonce:- The transaction count of the account at the specified block
-
storageHash:- The hash of the storage trie root of the account
-
storageProof:- An array of storage-entries as requested
- Each entry contains:
key: The requested storage keyvalue: The storage valueproof: An array of rlp-serialized MerkleTree-Nodes proving the inclusion of the storage value
This proof allows verification of account and storage data without needing the entire state trie. It's particularly useful for light clients and cross-chain interactions.
Other chains
Other chains implement eth_getProof in a manner that differs from EIP 1186. For example Blast returns additional additional keys subject to its own proofing mechanisms.
Chains such as Linea and zkSync implement their own chain specific endpoints, linea_getProof and zks_getProof.
Caching
Proof generation is an expensive operation and the Unruggable team as well as client teams, chain operators, and RPC providers are actively considering ways of optimising this process. Given that ultimately proofs are verified against state roots posted on Layer 1, caching seems like an appropriate path to explore. It is plausible that proof delivery providers could exist as a standalone service to support the use cases that Unruggable Gateways unlock.