Validator Rounds
The Validator Rounds
resource provides access to information about the rounds of validators in the blockchain. Each round represents a period in which a set of validators is responsible for producing blocks. This resource allows you to retrieve details about specific rounds, as well as the validators involved in each round.
Properties
- Name
round
- Type
- integer
- Description
The unique identifier for the round.
- Name
roundHeight
- Type
- integer
- Description
The block height at which the round starts.
- Name
validators
- Type
- array
- Description
A list of public keys representing the validators involved in the round.
- Name
votes
- Type
- array
- Description
A list of votes corresponding to each validator in the round.
List All Rounds
This endpoint retrieves a list of all validator rounds. Each round represents a period during which a specific set of validators is responsible for producing blocks. The response includes details about the round, the block height associated with the round, and the validators involved along with their respective votes.
Query Parameters
- Name
page
- Type
- integer
- Description
The number of the page that will be returned.
- Name
limit
- Type
- integer
- Description
The number of resources per page.
Request
curl https://testnet.mainsailhq.com/api/rounds?limit=100&page=1
Response
{
"meta": {
"totalCountIsEstimate": false,
"count": 100,
"first": "/rounds?limit=100&page=1",
"last": "/rounds?limit=100&page=16",
"next": "/rounds?limit=100&page=2",
"pageCount": 16,
"previous": null,
"self": "/rounds?limit=100&page=1",
"totalCount": 1598
},
"data": [
{
"round": "1598",
"roundHeight": "84642",
"validators": [
"02b6d4a02e6d4e7e8d5190005e3450bb1d993af563c5229b2ca06c29143f318d07",
// ...
],
"votes": [
"2358846566037735849056603",
// ...
]
},
{
"round": "1596",
"roundHeight": "84536",
"validators": [
"0216accc59f9d143ed562853a28558ed835d3e484d36dd53290a4f7c2752f57c88",
// ...
],
"votes": [
// ...
]
}
// Additional rounds...
]
}
Retrieve a Specific Round
This endpoint retrieves detailed information about a specific validator round, identified by its unique round ID. The response includes the round's block height, the validators involved, and their respective votes.
Path Parameters
- Name
round_id
- Type
- integer
- Description
The unique identifier of the round to be retrieved.
Request
curl https://testnet.mainsailhq.com/api/rounds/1598
Response
{
"data": {
"round": "1598",
"roundHeight": "84642",
"validators": [
"02b6d4a02e6d4e7e8d5190005e3450bb1d993af563c5229b2ca06c29143f318d07",
// Additional validators...
],
"votes": [
"2358846566037740879056603",
// Additional votes...
]
}
}
Retrieve Validators of a Specific Round
This endpoint retrieves the validators involved in a specific round, identified by its unique round ID. The response includes the public keys of the validators and the number of votes they received during the round.
Path Parameters
- Name
round_id
- Type
- integer
- Description
The unique identifier of the round for which to retrieve the validators.
Request
curl https://testnet.mainsailhq.com/api/rounds/1598/validators
Response
{
"data": [
{
"publicKey": "02b6d4a02e6d4e7e8d5190005e3450bb1d993af563c5229b2ca06c29143f318d07",
"votes": "2358846566037740879056603"
},
{
"publicKey": "03d878ed802a26f299c1492e5a5db7615a45bfa05cc703881d7f28286ce8bb96a4",
"votes": "2358854566037735849056603"
}
// Additional validators...
]
}