getblockchaininfo

Back to blockchain

Changed params/results since v30.2

Summary

Returns an object containing various state info regarding blockchain processing.

Description

Returns an object containing various state info regarding blockchain processing.

Change Buckets

  • Changed params/results since v30.2

Arguments

None.

Results

  • value (OBJ): No description.
  • chain (STR): current network name (main, test, testnet4, signet, regtest)
  • blocks (NUM): the height of the most-work fully-validated chain. The genesis block has height 0
  • headers (NUM): the current number of headers we have validated
  • bestblockhash (STR): the hash of the currently best block
  • bits (STR_HEX): nBits: compact representation of the block difficulty target
  • target (STR_HEX): The difficulty target
  • difficulty (NUM): the current difficulty
  • time (NUM_TIME): The block time expressed in UNIX epoch time
  • mediantime (NUM_TIME): The median block time expressed in UNIX epoch time
  • verificationprogress (NUM): estimate of verification progress [0..1]
  • initialblockdownload (BOOL): (debug information) estimate of whether this node is in Initial Block Download mode
  • chainwork (STR_HEX): total amount of work in active chain, in hexadecimal
  • size_on_disk (NUM): the estimated size of the block and undo files on disk
  • pruned (BOOL): if the blocks are subject to pruning
  • pruneheight (NUM, optional): height of the last block pruned, plus one (only present if pruning is enabled)
  • automatic_pruning (BOOL, optional): whether automatic pruning is enabled (only present if pruning is enabled)
  • prune_target_size (NUM, optional): the target size used by pruning (only present if automatic pruning is enabled)
  • signet_challenge (STR_HEX, optional): the block challenge (aka. block script), in hexadecimal (only present if the current network is a signet)
  • p2mr_validation_weight (OBJ): P2MR validation-weight activation state
    • legacy_per_sigop (NUM): Legacy P2MR validation debit
    • v2_per_sigop (NUM): Validation-weight-v2 P2MR debit
    • activation_height (NUM): First block using validation-weight-v2
    • active_for_tip (BOOL): Whether validation-weight-v2 applies to the current tip
    • active_for_next_block (BOOL): Whether validation-weight-v2 applies to the next block
    • blocks_remaining (NUM): Blocks until activation, measured from the next block
  • future_block_time (OBJ): Future block-time activation state and next-block timestamp bounds
    • legacy_limit_seconds (NUM): Legacy maximum future block time
    • v2_limit_seconds (NUM): Qbit v2 maximum future block time
    • activation_height (NUM): First block using the qbit v2 future-time limit
    • active_for_tip (BOOL): Whether the qbit v2 limit applies to the current tip
    • active_for_next_block (BOOL): Whether the qbit v2 limit applies to the next block
    • tip_limit_seconds (NUM): Future-time limit applicable to the current tip
    • next_block_limit_seconds (NUM): Future-time limit applicable to the next block
    • blocks_remaining (NUM): Blocks until activation, measured from the next block
    • next_block_min_time (NUM_TIME): Minimum valid timestamp for the next block
    • next_block_max_time (NUM_TIME): Maximum valid timestamp for the next block at current node time
    • next_block_time_headroom_seconds (NUM): Seconds between the next-block minimum and maximum timestamps; negative means no valid timestamp is currently available
  • warnings (ARR): any network and blockchain warnings (run with -deprecatedrpc=warnings to return the latest warning as a single string)
    • value (STR): warning

Examples

qbit-cli getblockchaininfo
curl --user myusername --data-binary '{"jsonrpc": "2.0", "id": "curltest", "method": "getblockchaininfo", "params": []}' -H 'content-type: application/json' http://127.0.0.1:8352/