TriportRPC

eth_getRootHash

Last updated:

eth_getRootHash is a legacy alias for bor_getRootHash. It computes the Bor checkpoint root hash over an inclusive block range (fromBlock, toBlock). That root hash is consumed by the Polygon PoS bridge to generate state-sync / withdrawal proofs between Polygon and its L1 settlement layer.

The functionality is a Polygon Bor-consensus extension, not part of the standard EVM eth namespace. Because of that, the method only ever responds on Bor-backed nodes. On standard Geth / Erigon backends — and on all of Triport's free read canals — it returns -32601 (method not found). The spec marks this method deprecated: true.

Use bor_getRootHash instead. The migration is a one-line change: swap the method name from eth_getRootHash to bor_getRootHash. Parameters, result shape, range limits, required scope (polygon_bor), and tier are all identical.

Parameters

This method takes no parameters.

Returns

eth_getRootHash return value
FieldType
resultobject

Examples

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

Usage

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

FAQ

What does eth_getRootHash do?
Legacy eth-namespace alias for the Polygon Bor root-hash call; deprecated — use bor_getRootHash instead.
How many credits does eth_getRootHash cost?
eth_getRootHash costs 1 credit(s) per call on Triport by default.
Is eth_getRootHash available over WebSocket?
eth_getRootHash is an HTTP JSON-RPC method.