istanbul

The following API method provide access to the IBFT consensus engine.

istanbul_candidatesarrow-up-right

Returns the current candidates which the node tries to vote in or out.

Parametersarrow-up-right

None

Returnsarrow-up-right

result: map of strings to booleans - current candidates map

  • curl HTTP request

  • JSON result

  • geth console request

  • geth console result

curl -X POST http://localhost:8545 --data '{"jsonrpc":"2.0","method":"istanbul_candidates","id":1}' --header "Content-Type: application/json"

istanbul_discardarrow-up-right

Drops a currently running candidate, stopping further votes from being cast either for or against the candidate.

Parametersarrow-up-right

address: string - address of the candidate

Returnsarrow-up-right

result: null

  • curl HTTP request

  • JSON result

  • geth console request

  • geth console result

istanbul_getSignersFromBlockarrow-up-right

Retrieves the public addresses whose seals are included in the specified block number. This means that they participated in the consensus for this block and attested to its validity.

Parametersarrow-up-right

blockNumber: number - (optional) block number to retrieve; defaults to current block

Returnsarrow-up-right

result: object - result object with the following fields:

  • number: number - retrieved block's number

  • hash: string - retrieved block's hash

  • author: string - address of the block proposer

  • committers: array of strings - list of all addresses whose seal appears in this block

  • curl HTTP request

  • JSON result

  • geth console request

  • geth console result

istanbul_getSignersFromBlockByHasharrow-up-right

Retrieves the public addresses whose seals are included in the specified block number. This means that they participated in the consensus for this block and attested to its validity.

Parametersarrow-up-right

blockHash: string - hash of the block to retrieve (required)

Returnsarrow-up-right

result: object - result object with the following fields:

  • number: number - retrieved block's number

  • hash: string - retrieved block's hash

  • author: string - address of the block proposer

  • committers: array of strings - list of all addresses whose seal appears in this block

  • curl HTTP request

  • JSON result

  • geth console request

  • geth console result

istanbul_getSnapshotarrow-up-right

Retrieves the state snapshot at the specified block number.

Parametersarrow-up-right

blockNumber: number or string - (optional) integer representing a block number or the string tag latest (the last block mined); defaults to latest

Returnsarrow-up-right

result: object - snapshot object

  • curl HTTP request

  • JSON result

  • geth console request

  • geth console result

istanbul_getSnapshotAtHasharrow-up-right

Retrieves the state snapshot at the specified block hash.

Parametersarrow-up-right

blockHash: string - block hash

Returnsarrow-up-right

result: object - snapshot object

  • curl HTTP request

  • JSON result

  • geth console request

  • geth console result

istanbul_getValidatorsarrow-up-right

Retrieves the list of authorized validators at the specified block number.

Parametersarrow-up-right

blockNumber: number or string - (optional) integer representing a block number or the string tag latest (the last block mined); defaults to latest

Returnsarrow-up-right

result: array of strings - list of validator addresses

  • curl HTTP request

  • JSON result

  • geth console request

  • geth console result

istanbul_getValidatorsAtHasharrow-up-right

Retrieves the list of authorized validators at the specified block hash.

Parametersarrow-up-right

blockHash: string - block hash

Returnsarrow-up-right

result: array of strings - list of validator addresses

  • curl HTTP request

  • JSON result

  • geth console request

  • geth console result

istanbul_isValidatorarrow-up-right

Indicates if this node is the validator for the specified block number.

Parametersarrow-up-right

blockNumber: number - (optional) block number; defaults to latest block number

Returnsarrow-up-right

result: boolean - true if this node is the validator for the given blockNumber, otherwise false

  • curl HTTP request

  • JSON result

  • geth console request

  • geth console result

istanbul_nodeAddressarrow-up-right

Retrieves the public address that is used to sign proposals, which is derived from the node's nodekey.

Parametersarrow-up-right

None

Returnsarrow-up-right

result: string - node's public signing address

  • curl HTTP request

  • JSON result

  • geth console request

  • geth console result

istanbul_proposearrow-up-right

Injects a new authorization candidate that the validator attempts to push through. If a majority of the validators vote the candidate in/out, the candidate is added/removed in the validator set.

Parametersarrow-up-right

  • address: string - address of candidate

  • auth: boolean - true votes the candidate in and false votes out

Returnsarrow-up-right

result: null

  • curl HTTP request

  • JSON result

  • geth console request

  • geth console result

istanbul_statusarrow-up-right

Returns the signing status of blocks for the specified block range.

Parametersarrow-up-right

  • startBlockNumber: number - start block number

  • endBlockNumber: number - end block number

If the start block and end block numbers are not provided, the status of the last 64 blocks is returned.

Returnsarrow-up-right

result: object - result object with the following fields:

  • numBlocks: number - number of blocks for which sealer activity is retrieved

  • sealerActivity: map of strings to numbers - key is the validator and value is the number of blocks sealed by the validator

  • curl HTTP request

  • JSON result

  • geth console request

  • geth console result

Last updated

Was this helpful?