Archival & R2 Cache

Three-tier storage: 48 hours on the fast node, 45 days in Cloudflare R2, everything else from upstream.

Storage tiers

1

Fast node (48 hours)

The local Reth node keeps 86,400 blocks (48 hours at 2s/block). Requests within this window are served directly at ~10ms latency.

2

R2 cache (48 hours — 45 days)

Historical blocks are cached in Cloudflare R2. Cache hits return in ~130ms. Misses are fetched from upstream, cached for future requests, and returned.

3

Upstream (>45 days)

Deep historical requests (>45 days) are served from public Base archive nodes. These are not cached in R2 and incur the standard 5× surcharge.

How it works

When an RPC request arrives:

  1. Fast node check — If the requested block is within 48 hours, the fast node serves it directly (no surcharge).
  2. R2 cache check — For blocks 48h–45d old, check R2. Cache hits return in ~130ms. Misses fetch from upstream and cache the result.
  3. Upstream fallback — For blocks >45 days, query public Base archives and return (no R2 cache write, 5× surcharge applies).
  4. Proactive backfill — A background process continuously exports blocks to R2 before they are pruned from the fast node.

Response headers

x-rpclaw-archival: true

x-rpclaw-archive-tier: fast | r2 | deep

x-rpclaw-archive-source: fast-node | r2 | upstream

x-rpclaw-fast-window-hours: 48

x-rpclaw-r2-window-days: 45

x-rpclaw-surcharge: 5

Supported methods

eth_getBlockByNumber eth_getBlockByHash eth_getTransactionByHash eth_getTransactionReceipt eth_getBalance eth_getCode eth_getStorageAt eth_call eth_getLogs eth_getTransactionCount