Skip to main content
The chain commands read a running node through standard Ethereum JSON-RPC methods such as 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 the eth RPC namespace:
Rex connects to the local execution RPC endpoint at http://127.0.0.1:8545 (localhost:8545) by default:
Use the global --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, and earliest
The canonical command accepts a block hash because it compares that hash with the canonical hash at the same block number.