TriportRPC

bor_getSnapshot

POSThttps://api.triport.io/v1/polygon

Returns the full Bor consensus snapshot at a block — the validator set, the recent-signers map, and the block context — in a single call.

Polygonpolygon_borPro and above — metered on the polygon_bor category (sustained RPS per tier, 2× burst)

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 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

Positional parameters: a single optional block reference at which to take the snapshot.

blockstringoptional
The block to snapshot, as a 0x-prefixed hex block number (e.g. "0x2DC6C0") or a block tag such as "latest". When omitted, the snapshot is taken at the latest block.

Response

Response fields

FieldTypeDescription
result.numberintegerBlock number the snapshot was taken at.
result.hashstringHash of that block.
result.validatorsarrayThe validator set in effect at the block.
result.validators[].IDintegerValidator ID within the set.
result.validators[].signerstringValidator's signer address (0x-prefixed).
result.validators[].powerintegerStake weight used for proposer selection.
result.validators[].accumintegerProposer-rotation accumulator; drives which validator proposes next.
result.recentsobjectMap of recent block numbers → the signer address that produced each block. Used to enforce the "no recent re-signing" rule.

Errors

CodeMeaningWhen it happens
-32002tier_insufficientYour API key's tier is below Pro; the polygon_bor namespace is not enabled for it.
-32003rate_limitedYou exceeded your tier's sustained + burst RPS on the polygon_bor category. Back off Retry-After (currently 1) seconds and retry.

See the shared error envelope reference for the full error object shape and handling guidance.

Examples

JavaScript (fetch)

const res = await fetch("https://api.triport.io/v1/polygon", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.TRIPORT_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    jsonrpc: "2.0",
    id: 1,
    method: "bor_getSnapshot",
    params: ["latest"],
  }),
});


const { result } = await res.json();
console.log(`snapshot @ block ${result.number}: ${result.validators.length} validators`);

TypeScript SDK (@triport/sdk)

import { Triport } from "@triport/sdk";


const triport = new Triport({ apiKey: process.env.TRIPORT_API_KEY! });


const snapshot = await triport.polygon.request("bor_getSnapshot", ["latest"]);
console.log(snapshot.validators.map((v) => v.signer));

Python (triport-sdk)

import os
from triport import Triport


triport = Triport(api_key=os.environ["TRIPORT_API_KEY"])


snapshot = triport.polygon.request("bor_getSnapshot", ["latest"])
print(f"{len(snapshot['validators'])} validators @ block {snapshot['number']}")

Notes

  • This is the most complete bor_* method. For lighter, single-purpose reads prefer bor_getCurrentValidators (just the validator set), bor_getCurrentProposer (the current proposer address), or bor_getSigners (the authorized signer list — a subset of validators).
  • validators is broadly stable within an epoch (~1024 blocks, ~36 min) and changes at epoch boundaries. A client-side cache TTL of ~30 minutes is a good default; re-fetch on epoch rollover.
  • Because the full snapshot can be 50–100 KB, avoid calling it per block. If you only need the live proposer, poll bor_getCurrentProposer instead.
  • All bor_* methods are Polygon-specific Bor consensus reads and require the Pro tier. See Rate Limits and Tiers for how the polygon_bor category is metered.