Skip to content

debug_getRawBlock ​

served · same as reth

Returns a block in its RLP-encoded form.

When to use ​

Use it to get the exact bytes of a block, for example to check it or to trace it with debug_traceBlock.

Example ​

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

Response ​

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

json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0xf99afef90272a0bc55665795f2e131ed3deff09208c09eb905f813c1e384e3e30810eee84549a5a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347944cda1f90b5bef0827985ecd45c9240dffc7779eca058a9c69bcd5c92270c4b90a9740f61cde43feab4af9350f65263aba3656a412ea027554222f222258bb0300c5d4b70112d9d8a91d44d4faa80933b6129a59e294fa04a6987cfafbed8f8dcc5410eb4376b9a05d254c171d7c2d1e6a5076c0771d707b901000a604c74... 78964 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 block as hex data. A block below the first block of the node gives the error -32603 block #N is not available, history has expired (earliest available: #M). 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_getRawHeader, debug_getRawReceipts, eth_getBlockByNumber.

Schema (OpenRPC) ​

The official specification: debug_getRawBlock 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"
}