bor
Accessing Polygon Validator and Bor Consensus Data
The bor namespace provides Polygon-specific RPC methods that are only available when running Erigon on Polygon networks (Mainnet, Amoy testnet, etc.). These methods expose functionality specific to the Bor consensus engine, including validator information, snapshots, and proposer sequences.
The bor namespace must be explicitly enabled using the --http.api flag when starting the RPC daemon and is only functional when running on Polygon networks with the Bor consensus engine.
Network Compatibility
The bor namespace is only available when running Erigon on Polygon networks (Mainnet, Amoy testnet, etc.)
These methods will return errors if called on non-Polygon networks or when the Bor consensus engine is not active
The methods require the underlying Bor consensus engine to be properly configured and running
Consensus Integration
All bor methods interact directly with the Bor consensus engine and validator set management
The methods provide access to Polygon's unique consensus features like validator snapshots and proposer sequences
These APIs are essential for applications that need to understand Polygon's validator dynamics and block production
Usage in Polygon Ecosystem
These methods are commonly used by Polygon validators, delegators, and applications that need validator information
The snapshot and signer methods are particularly useful for understanding the current validator set and their roles
Root hash methods are used for checkpoint verification and cross-chain communication
bor_getSnapshot
Returns the validator snapshot at a given block number, containing information about the current validator set and their voting power.
Parameters
number
QUANTITY|TAG
Block number or "latest", "earliest", "pending"
Example
Returns
Object
Snapshot object containing validator information and voting details
bor_getAuthor
Returns the author (block proposer) of a block at the given block number or hash.
Parameters
blockNrOrHash
QUANTITY|TAG|HASH
Block number, tag, or block hash
Example
Returns
DATA, 20 BYTES
The address of the block author/proposer
bor_getSnapshotAtHash
Returns the validator snapshot at a specific block hash.
Parameters
hash
DATA, 32 BYTES
Hash of the block
Example
Returns
Object
Snapshot object containing validator information at the specified block hash
bor_getSigners
Returns the list of authorized signers (validators) at a given block number.
Parameters
number
QUANTITY|TAG
Block number or "latest", "earliest", "pending"
Example
Returns
Array
Array of validator addresses authorized to sign blocks
bor_getSignersAtHash
Returns the list of authorized signers (validators) at a specific block hash.
Parameters
hash
DATA, 32 BYTES
Hash of the block
Example
Returns
Array
Array of validator addresses authorized to sign blocks at the specified hash
bor_getCurrentProposer
Returns the address of the current block proposer based on the current validator set and proposer selection algorithm.
Parameters
None
Example
Returns
DATA, 20 BYTES
The address of the current proposer
bor_getCurrentValidators
Returns the current validator set with their details including voting power and other metadata.
Parameters
None
Example
Returns
Array
Array of validator objects with their addresses, voting power, and metadata
bor_getSnapshotProposerSequence
Returns the proposer sequence for a given block, showing the order in which validators are expected to propose blocks.
Parameters
blockNrOrHash
QUANTITY|TAG|HASH
Block number, tag, or block hash
Example
Returns
Object
BlockSigners object containing the proposer sequence information
bor_getRootHash
Returns the root hash for a range of blocks, used for checkpoint verification and state synchronization.
Parameters
start
QUANTITY
Starting block number
end
QUANTITY
Ending block number
Example
Returns
STRING
The root hash for the specified block range
bor_getVoteOnHash
Returns voting information for a specific block hash, used in the Bor consensus mechanism.
Parameters
hash
DATA, 32 BYTES
Hash of the block to get voting information for
Example
Returns
Object
Voting information object for the specified block hash
Last updated
Was this helpful?