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