Skip to main content
Version: v3.3

bor

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

ParameterTypeDescription
numberQUANTITY|TAGBlock number or "latest", "earliest", "pending"

Example

curl -s --data '{"jsonrpc":"2.0","method":"bor_getSnapshot","params":["latest"],"id":"1"}' -H "Content-Type: application/json" -X POST http://localhost:8545

Returns

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

ParameterTypeDescription
blockNrOrHashQUANTITY|TAG|HASHBlock number, tag, or block hash

Example

curl -s --data '{"jsonrpc":"2.0","method":"bor_getAuthor","params":["0x1b4"],"id":"1"}' -H "Content-Type: application/json" -X POST http://localhost:8545

Returns

TypeDescription
DATA, 20 BYTESThe address of the block author/proposer

bor_getSnapshotAtHash

Returns the validator snapshot at a specific block hash.

Parameters

ParameterTypeDescription
hashDATA, 32 BYTESHash of the block

Example

curl -s --data '{"jsonrpc":"2.0","method":"bor_getSnapshotAtHash","params":["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2"],"id":"1"}' -H "Content-Type: application/json" -X POST http://localhost:8545

Returns

TypeDescription
ObjectSnapshot object containing validator information at the specified block hash

bor_getSigners

Returns the list of authorized signers (validators) at a given block number.

Parameters

ParameterTypeDescription
numberQUANTITY|TAGBlock number or "latest", "earliest", "pending"

Example

curl -s --data '{"jsonrpc":"2.0","method":"bor_getSigners","params":["latest"],"id":"1"}' -H "Content-Type: application/json" -X POST http://localhost:8545

Returns

TypeDescription
ArrayArray of validator addresses authorized to sign blocks

bor_getSignersAtHash

Returns the list of authorized signers (validators) at a specific block hash.

Parameters

ParameterTypeDescription
hashDATA, 32 BYTESHash of the block

Example

curl -s --data '{"jsonrpc":"2.0","method":"bor_getSignersAtHash","params":["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2"],"id":"1"}' -H "Content-Type: application/json" -X POST http://localhost:8545

Returns

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

curl -s --data '{"jsonrpc":"2.0","method":"bor_getCurrentProposer","params":[],"id":"1"}' -H "Content-Type: application/json" -X POST http://localhost:8545

Returns

TypeDescription
DATA, 20 BYTESThe address of the current proposer

bor_getCurrentValidators

Returns the current validator set with their details including voting power and other metadata.

Parameters

None

Example

curl -s --data '{"jsonrpc":"2.0","method":"bor_getCurrentValidators","params":[],"id":"1"}' -H "Content-Type: application/json" -X POST http://localhost:8545

Returns

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

ParameterTypeDescription
blockNrOrHashQUANTITY|TAG|HASHBlock number, tag, or block hash

Example

curl -s --data '{"jsonrpc":"2.0","method":"bor_getSnapshotProposerSequence","params":["latest"],"id":"1"}' -H "Content-Type: application/json" -X POST http://localhost:8545

Returns

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

ParameterTypeDescription
startQUANTITYStarting block number
endQUANTITYEnding block number

Example

curl -s --data '{"jsonrpc":"2.0","method":"bor_getRootHash","params":["0x1", "0x100"],"id":"1"}' -H "Content-Type: application/json" -X POST http://localhost:8545

Returns

TypeDescription
STRINGThe root hash for the specified block range

bor_getVoteOnHash

Returns voting information for a specific block hash, used in the Bor consensus mechanism.

Parameters

ParameterTypeDescription
hashDATA, 32 BYTESHash of the block to get voting information for

Example

curl -s --data '{"jsonrpc":"2.0","method":"bor_getVoteOnHash","params":["0x1d59ff54b1eb26b013ce3cb5fc9dab3705b415a67127a003c3e61eb445bb8df2"],"id":"1"}' -H "Content-Type: application/json" -X POST http://localhost:8545

Returns

TypeDescription
ObjectVoting information object for the specified block hash