Returns increased issuance, miner reward, and the total transaction fee of a block.
This RPC returns null if the block is not in the canonical chain.
CKB delays CKB creation for miners. The output cells in the cellbase of block N are for the miner creating block N - 1 - ProposalWindow.farthest.
In mainnet, ProposalWindow.farthest is 10, so the outputs in block 100 are rewards for miner creating block 89.
Because of the delay, this RPC returns null if the block rewards are not finalized yet. For example, the economic state for block 89 is only available when the number returned by get_tip_block_number is greater than or equal to 100.
Parameters
- block_hash - Specifies the block hash which rewards should be analyzed.
Returns
If the block with the hash block_hash is in the canonical chain and its rewards have been finalized, return the block rewards analysis for this block. A special case is that the return value for genesis block is null.
Example
Request
curl --location --request POST 'https://ckb-mirana.unifra.io/v1/4fb36720a57340d39aee4cf68511064a' \
--header 'Content-Type: application/json' \
--data-raw '{
"id": 42,
"jsonrpc": "2.0",
"method": "get_block_economic_state",
"params": [
"0xb2671d3cc16b7738bbc8902ef11322bc2bfe7c54f5ce4a5cdfdf57b1a02fcb11"
]
}'
Result
{
"jsonrpc": "2.0",
"result": {
"finalized_at": "0x17b22aafb5cfb5408a90fe5e35f9d92ee0f059ba5a2f3f54a5dafa094cbf9262",
"issuance": {
"primary": "0x199e3fb55f",
"secondary": "0x832a3bf28"
},
"miner_reward": {
"committed": "0x3354",
"primary": "0x199e3fb55f",
"proposal": "0x0",
"secondary": "0x13ae60aad"
},
"txs_fee": "0x558c"
},
"id": 42
}