TriportRPC

debug_getRawBlock

Last updated:

debug_getRawBlock returns the raw, RLP-encoded serialization of a full block — header plus the body (transactions and uncles) — exactly as it is stored and gossiped on the wire. The result is a single 0x-prefixed hex string.

Use this when you need the canonical byte representation of a block rather than the decoded JSON object that eth_getBlockByNumber returns: for example to recompute the block hash locally, to re-import a block into another client, or to verify block contents against an independent encoder.

This is a debug-namespace method and is available on the Pro tier and above. It is rate limited per tier (5 RPS on Pro, 15 RPS on Business) with a short burst allowance; there is no daily quota.

Parameters

This method takes no parameters.

Returns

debug_getRawBlock return value
FieldType
resultobject

Examples

curl https://triport.io/sol \
  -X POST -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <api-key>' \
  -d '{"id":1,"method":"debug_getRawBlock","params":[],"jsonrpc":"2.0"}'
const res = await fetch("https://triport.io/sol", {
  method: "POST",
  headers: { "Content-Type": "application/json", Authorization: "Bearer <api-key>" },
  body: JSON.stringify({
  "id": 1,
  "method": "debug_getRawBlock",
  "params": [],
  "jsonrpc": "2.0"
}),
});
const data = await res.json();
import requests
resp = requests.post(
    "https://triport.io/sol",
    headers={"Authorization": "Bearer <api-key>"},
    json={"id":1,"method":"debug_getRawBlock","params":[],"jsonrpc":"2.0"},
)
print(resp.json())

Usage

  1. Transport: HTTP (JSON-RPC).
  2. Networks: mainnet.
  3. Credit cost: 5 per call.

FAQ

What does debug_getRawBlock do?
Returns the RLP-encoded bytes of an entire Ethereum block, identified by block number or block hash.
How many credits does debug_getRawBlock cost?
debug_getRawBlock costs 5 credit(s) per call on Triport by default.
Is debug_getRawBlock available over WebSocket?
debug_getRawBlock is an HTTP JSON-RPC method.