Skip to content

debug_getRawHeader ​

served · same as reth

Returns a block header in its RLP-encoded form.

When to use ​

Use it to get the exact bytes of a header, for example to compute its hash yourself.

Example ​

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

Response ​

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

json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0xf90286a005b521e7eb3efcbdbe7082cfdfc5ce1c3275fd597611a866d3fae4241debc251a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347944838b106fce9647bdf1e7877bf73ce8b0bad5f97a026e239000c719435e8d9bc3f995bbf83d710c6203c9f8c4cf58f75279322f1cda011189d9facb85bca3cb26e818541f001d5172bb71244b33f98a7d241f22fe6f0a00dda7fb25a204be283f3e11465284e25b94ecdd901e1b361c282bf96d6bf5878b90100b5fbccf60fdf3f... 900 more characters"
}

Full response

Parameters ​

NameTypeRequiredMeaning
blockblock number in hex, a tag, or a 32-byte block hash, see Block parameteryesThe block.

Returns ​

The RLP-encoded header as hex data. The node keeps no header below its first header, and gives the error 4444 there. pending gives -32001 block not found: pending, as in reth.

Errors ​

CodeMessageWhen
-32001block not found: 0x...The node does not have the block. For a hash, the text is block not found: hash 0x... (with requireCanonical, canonical hash).

Compared with reth ​

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

debug_getRawBlock, eth_getHeaderByNumber.

Schema (OpenRPC) ​

The official specification: debug_getRawHeader in ethereum/execution-apis.

Parameter Block: Block number or Block tag
json
{
  "oneOf": [
    {
      "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$",
      "title": "Block number",
      "type": "string"
    },
    {
      "description": "`earliest`: The lowest numbered block the client has available; `finalized`: The most recent crypto-economically secure block, cannot be re-orged outside of manual intervention driven by community coordination; `safe`: The most recent block that is safe from re-orgs under honest majority and certain synchronicity assumptions; `latest`: The most recent block in the canonical chain observed by the client, this block may be re-orged out of the canonical chain even under healthy/normal conditions; `pending`: A sample next block built by the client on top of `latest` and containing the set of transactions usually taken from local mempool. Before the merge transition is finalized, any call querying for `finalized` or `safe` block MUST be responded to with `-39001: Unknown block` error",
      "enum": [
        "earliest",
        "finalized",
        "safe",
        "latest",
        "pending"
      ],
      "title": "Block tag",
      "type": "string"
    }
  ],
  "title": "Block number or tag"
}
Result: string
json
{
  "pattern": "^0x[0-9a-f]*$",
  "title": "hex encoded bytes",
  "type": "string"
}