debug_getRawBlock - Robinhood

debug_getRawBlock. Returns the RLP-encoded raw block data.

debug_getRawBlock - robinhood [Value: 20CU]
Returns the RLP-encoded bytes of a block, exactly as stored by the node
Use cases

Use cases

  • Export blocks for cross-client verification or backup tooling
  • Feed raw block bytes into custom block explorers or indexers
Constraints

Constraints

  • Requires an archive node for blocks other than recent ones
  • Returns raw bytes, not a decoded block object
Get started
Unlock Access to 100+ chains
Boost your app's speed and reliability with dRPC - get your access API key

Language

Request
Examples
curl https://lb.drpc.live/robinhood/{API-KEY} \
-X POST \
-H "Content-Type: application/json" \
-d '{"method":"debug_getRawBlock",
    "params":["latest"],
    "id":1,
    "jsonrpc":"2.0"}'
Copy
Response
200
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0xf90236a09f73691f6dabca4f0a99b05d0a701995506aa311dcaa9ce9833d6f4ca474c162a01dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d493479..."
}
Copy

Request params

idinteger
jsonrpcstring
methodstring
Parametersarray
array
blockNumberstring
Block number in hex, or a block tag, to fetch the raw block for.
  • latest [default] - The most recent block in the blockchain (default).
  • earliest - The first block, also known as the genesis block.
  • pending - Transactions that have been broadcast but not yet included in a block.

Response

200
The RLP-encoded block, as a hexadecimal string

Response params

object
idinteger
jsonrpcstring
resultstring
The RLP-encoded block as a hexadecimal string.