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`](./eth_getBlockByNumber.md) 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
| Field | Type |
|---|---|
| result | object |
Examples
curl https://<your-endpoint>/ \
-X POST -H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"debug_getRawBlock","params":[]}'const res = await fetch("https://<your-endpoint>/", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"id": 1,
"method": "debug_getRawBlock",
"params": [],
"jsonrpc": "2.0"
}),
});
const data = await res.json();import requests
resp = requests.post("https://<your-endpoint>/", json={"id":1,"method":"debug_getRawBlock","params":[],"jsonrpc":"2.0"})
print(resp.json())Usage
- Transport: HTTP (JSON-RPC).
- Networks: mainnet.
- 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.