Skip to main content
Use chain canonical to check whether a block hash matches the canonical block at its block number.

Command

Example Output

Canonical:
Not canonical:

How It Works

The command:
  • fetches the requested hash with eth_getBlockByHash
  • reads that block’s number
  • fetches the canonical block at that number with eth_getBlockByNumber
  • compares the two hashes
If the requested hash cannot be fetched by the node, the status is unknown.