TriportRPC

bor_getSnapshot

Last updated:

`bor_getSnapshot` returns the complete Polygon **Bor** consensus snapshot as of a given block. A snapshot is the richest of the `bor_*` methods: it bundles the block context (`number`, `hash`), the current `validators` set with their stake weights and proposer-rotation accumulators, and a `recents` map of recently seen signers keyed by block number. It is the single best entry point for observability and indexing tooling that needs the full proposer schedule for an epoch rather than just the current validator list or current proposer.

Use it when you want one authoritative read of consensus state — for building a validator-set dashboard, reconstructing the epoch proposer rotation, or auditing signer behavior. The `recents` map together with `validators` lets you derive who has signed recently and whose turn is coming up, without polling [`bor_getCurrentProposer`](./bor_getCurrentProposer.md) block-by-block.

Bor consensus rotates its validator set roughly every epoch (~1024 blocks, about 36 minutes), so the snapshot is broadly stable within an epoch and changes at epoch boundaries. This is a Polygon-only, Bor-fork-specific method — it does not exist on standard Geth/Erigon Ethereum nodes. The response is heavier than the other `bor_*` methods (roughly **50–100 KB** for a full snapshot), so cache results client-side rather than calling it in a hot loop.

Parameters

This method takes no parameters.

Returns

bor_getSnapshot return value
FieldType
resultobject

Examples

curl https://<your-endpoint>/ \
  -X POST -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"bor_getSnapshot","params":[]}'
const res = await fetch("https://<your-endpoint>/", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
  "id": 1,
  "method": "bor_getSnapshot",
  "params": [],
  "jsonrpc": "2.0"
}),
});
const data = await res.json();
import requests
resp = requests.post("https://<your-endpoint>/", json={"id":1,"method":"bor_getSnapshot","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 bor_getSnapshot do?
Returns the full Bor consensus snapshot at a block — the validator set, the recent-signers map, and the block context — in a single call.
How many credits does bor_getSnapshot cost?
bor_getSnapshot costs 1 credit(s) per call on Triport by default.
Is bor_getSnapshot available over WebSocket?
bor_getSnapshot is an HTTP JSON-RPC method.