Skip to content

eth_getUncleCountByBlockNumber ​

served · same as reth

Returns the number of uncles (ommers) of a block. It is 0x0 for blocks after the merge.

When to use ​

Old tools call it. On a node that starts after the merge, it has no use.

Example ​

bash
curl -s -X POST -H 'Content-Type: application/json' \
  --data '{"jsonrpc": "2.0", "id": 1, "method": "eth_getUncleCountByBlockNumber", "params": ["0x18facad"]}' \
  http://127.0.0.1:8547
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_getUncleCountByBlockNumber",
  "params": [
    "0x18facad"
  ]
}

Response ​

Live mainnet, block 26193069, 2026-10-14. Checked against reth 2.7: equal.

json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x0"
}

Full response

Parameters ​

NameTypeRequiredMeaning
blockblock number in hex, or a tag, see Block parameteryesThe block.

Returns ​

0x0, or null when the block is above the head. A block below the first block of the node gives the error 4444.

Compared with reth ​

The live example above gives the same answer on Cinder and on reth 2.7.

eth_getUncleByBlockNumberAndIndex.

Schema (OpenRPC) ​

Parameter block: BlockNumberOrTag
json
{
  "title": "Block number or tag",
  "oneOf": [
    {
      "title": "hex encoded unsigned integer",
      "type": "string",
      "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
    },
    {
      "title": "Block tag",
      "type": "string",
      "enum": [
        "earliest",
        "finalized",
        "safe",
        "latest",
        "pending"
      ],
      "description": "latest is the head of the last forkchoice update, as reth. pending is the block that Cinder builds from its transaction pool after latest, as reth. safe and finalized are the blocks of the last forkchoice update, as reth. Before the first update, they name no block. earliest is the first block that the node stored, as reth."
    }
  ]
}
Result: Quantity or null
json
{
  "oneOf": [
    {
      "title": "hex encoded unsigned integer",
      "type": "string",
      "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$"
    },
    {
      "type": "null"
    }
  ]
}