eth_getBlockByNumber and eth_getBlockByHash.
Use these commands when you want a compact view of canonical chain state without switching to a general-purpose RPC client.
Head
Show latest, safe, and finalized block heads.
Block
Inspect one block by number, hash, or tag.
Ancestry
Walk parent hashes from a starting block.
Canonical
Check whether a block hash is canonical at its number.
Prerequisites
Start a Reth node with theeth RPC namespace:
http://127.0.0.1:8545 (localhost:8545) by default:
--rpc <URL> flag to target a different endpoint.
Block Selectors
Commands that accept--block support:
- decimal block numbers such as
12345 - 0x-prefixed block numbers such as
0x3039 - 32-byte block hashes
- tags:
latest,safe,finalized, andearliest
canonical command accepts a block hash because it compares that hash with the canonical hash at the same block number.