Serialized Block doesn't have all the fields of a Block

1

bitcoin-cli getblock 000000000003b9c88b8a4bf0bac7059913381bba300cdfddffc54a3d8c6e8105 false

This command will give block related data in the form of Hex. This Serialized data doesn't contain certain fields like confirmations, chainwork nextblockhash. Is there any reason for this?

lch

Posted 2018-05-24T04:19:26.360

Reputation: 183

Answers

3

This Serialized data doesn't contain certain fields like confirmations, chainwork nextblockhash. Is there any reason for this?

Those fields are not actually part of a block and cannot be contained in a block.

The number of confirmations for a block constantly changes as more blocks are found on top of that block. Thus it cannot be part of a block in the serialized data.

The chainwork does not need to be included in a block because it can be dynamically calculated, unlike the other data in a block.

The nextblockhash cannot be known at the time of creation for a block because miners can't see the future. The nextblockhash cannot be known wihtout the current block already existing.

Andrew Chow

Posted 2018-05-24T04:19:26.360

Reputation: 40 910