All posts

What Makes an RPC Truly Verifiable

An RPC response can be trusted, signed, or checked against the chain. Those are three different guarantees, and only the last lets your application verify that the data is actually onchain.

Nearly every app, wallet, bridge, and indexer reads blockchain data through an RPC. But “verifiable RPC” can mean anything from a signed response to a cryptographic proof anchored to the chain itself. Here’s what each approach guarantees, and how Willow built its RPC around proofs.

Most RPC responses are simply trusted

Ethereum is designed so its data can be verified. But when you ask a node for that data, the JSON it returns is an assertion, not proof.

And nodes can get things wrong. While backfilling Ethereum’s history, we saw one provider return empty receipt lists for blocks that actually contained 203 and 257 receipts. To the application receiving the response, a missing event or a total computed from incomplete data can look just like correct data.

The consequences can be much larger than a bad query. In April, KelpDAO’s bridge verifier read Unichain through compromised RPC nodes and signed an attestation for a burn that never happened. About $292 million of rsETH was released against it. Read the full story.

A signature proves who sent the data, not that it’s true

Some providers sign responses using a key held in a trusted execution environment, or TEE, and attest to the software the node is running.

That’s an improvement: a signature can reveal if a response was altered after it was signed. But it doesn’t establish that the node’s response was correct. If the node is behind the chain, following a fork that lost, or running a buggy client, the enclave can sign the wrong response just as readily as the right one.

The application is still trusting the provider’s node.

A proof ties the data to Ethereum

Ethereum block headers commit to transactions, receipts, and state through Merkle roots. A receipt proof, for example, includes the trie nodes needed to verify that the receipt belongs under the header’s receiptsRoot. The header, in turn, hashes to the block hash. If anything was changed along the way, the hashes don’t match.

A receipt's Merkle path leads to the receiptsRoot in the block header, the header hashes to the block hash, and a light client verifies that block hash against Ethereum

A light client can check that block hash against Ethereum’s sync committee, where a false chain would need the signatures of 342 of its 512 validators. With an authenticated header and a valid proof, the application no longer has to trust the RPC provider for the data.

The RPC becomes a transport. It can be buggy or compromised without making the client accept a false proof. It can still refuse to serve data or withhold newer blocks.

Willow’s servers also verify every block against its block hash before serving it. If a block doesn’t verify, they halt rather than serve it.

L2 proofs follow what rollups post to Ethereum

Rollups such as Base, OP Mainnet, and Arbitrum One post transactions to Ethereum and make claims there about their blocks.

An L2's newest blocks are signed by its sequencer, whose key is read from Ethereum; older blocks are committed by a claim the L2 posted to Ethereum, and the oldest are final once that claim settles

The newest L2 blocks rely on the sequencer’s signature, using a key read from Ethereum. Once an Ethereum claim covers a block, that block is committed; once the claim settles, it is final, as with a withdrawal. The guarantee therefore depends on how far the block has progressed through that process.

Different methods need different proofs

The right proof depends on the question being asked:

  • Blocks, transactions, receipts, and account state come with Merkle proofs tied to the block hash.
  • Logs need more than a proof that each returned log exists: the client also needs to know nothing was omitted. For short ranges, Willow provides each block’s full receipts. For long ranges, it provides a single proof from a zkVM program that reads every receipt in the range.
  • Calls, gas estimates, fees, and traces are computed by the client from proven data.

Blocks, transactions, receipts, and account state carry Merkle proofs to the block hash; eth_getLogs carries one proof for a whole block range; eth_call, eth_estimateGas, fees, and traces are computed by the client from proven data

Light clients such as Helios, which Willow uses itself, already verify state, calls, and receipts this way. Long-range logs and traces need proofs that standard RPC methods don’t serve, so Willow adds them through its willow_* methods. The chain list shows which proofs are available on each chain.

Verifying takes a few lines of code

The Willow verifying client works as a viem transport, an ethers provider, or a plain EIP-1193 request function. Without an API key, it uses the public path, so this example runs as written:

npm install @willow-network/rpc viem
import { createPublicClient } from 'viem';
import { mainnet } from 'viem/chains';
import { willowTransport } from '@willow-network/rpc/viem';

const client = createPublicClient({
  chain: mainnet,
  transport: willowTransport({
    chainId: 1,
    onVerification: (e) => console.log(e.method, e.status, e.level),
  }),
});

// Each response is verified against Ethereum before viem returns it.
const block = await client.getBlock();
const receipt = await client.getTransactionReceipt({
  hash: block.transactions[0],
});

The callback prints eth_getBlockByNumber verified signed, followed by eth_getTransactionReceipt verified signed. Both responses have been verified against a head signed by Ethereum’s sync committee.

If verification fails, the client throws a WillowVerificationError. That means the server sent invalid data or there’s a bug in the verification path. Either way, the application should stop rather than act on the response.

That’s what we mean by verifiable RPC: the application checks the response against the chain, regardless of who served it.

Willow’s verifiable RPC is free to start. The docs explain what the client verifies and what it trusts. If you’re building something that moves money based on what a chain says, we’d love to hear from you at [email protected].

Sources: How Willow verifies data · Verifying client · Proofs · LayerZero Labs incident report

Partners

Request a call