get_info
The get_info RPC method retrieves various details about the blockchain's current state, such as the head block, the last irreversible block, and the chain ID. It is one of the most fundamental calls in the EOSIO blockchain, providing essential information about the network status.
Example use cases:
Checking Blockchain Status
Developers and users often use the get_info method to quickly check the status of the EOS blockchain, such as the head block number and the last irreversible block number, to ensure they are interacting with the most recent and confirmed state of the blockchain.
Synchronization and Validation
For node operators and block producers, get_info is crucial to verify that their node is synchronized with the network, and to compare the chain_id and other details to ensure they are on the correct chain and avoid forks.
Development and Debugging
Developers frequently use get_info during the development and debugging of dApps and smart contracts, to fetch real-time information about the blockchain, validate transactions, and test the behavior of their applications against the current state of the blockchain.
Parameters
The getInfo method does not require any parameters; it is a simple GET request to the endpoint.
Return Object
field | type | description |
|---|---|---|
server_version | string | Version of the nodeos software running on the node. |
chain_id | string | Unique identifier for the EOSIO blockchain. |
head_block_num | integer | Most recent block number. |
head_block_id | string | Unique identifier of the head block. |
head_block_time | string | Timestamp when the head block was produced. |
head_block_producer | string | Producer that generated the head block. |
last_irreversible_block_num | integer | Most recent irreversible block number. |
last_irreversible_block_id | string | Unique identifier of the last irreversible block. |
virtual_block_cpu_limit | integer | Current CPU limit for virtual blocks. |
virtual_block_net_limit | integer | Current NET limit for virtual blocks. |
block_cpu_limit | integer | Block CPU usage limit. |
block_net_limit | integer | Block NET usage limit. |
server_version_string | string | Server version string. |
fork_db_head_block_num | integer | Best known head block number in fork DB. |
fork_db_head_block_id | string | Hash of best known head in fork DB. |
Response Example