Skip to main content

RawHeader

RawHeader is the payload of the block header.

Structure of RawHeader

Fields & Description

NameTypeDescription
versionUint32Version of the block, used to address potential compatibility issues that might arise after a fork
compact_targetUint32PoW difficulty represented in compact target format
timestampUint64Unix time timestamp in milliseconds
numberUint64Indicates block height
epochUint64Information of the current epoch. Assuming number represents the current epoch number, index represents the index of the block in the current epoch (starting at 0), and length represents the length of the current epoch, the value must be (number & 0xFFFFFF) | ((index & 0xFFFF) << 24) | ((length & 0xFFFF) << 40)
parent_hashH256 (hash)Hash of the parent block
transactions_rootH256 (hash)A hash obtained by concatenating the CBMT (Complete Binary Merkle Tree) root of the transaction hashes and the CBMT root of the transaction witness hashes
proposals_hashH256 (hash)Hash of the concatenated proposal IDs. Defaults to all zeros if no proposals exist.
uncles_hashH256 (hash)Hash of the concatenated hashes of uncle block headers. Defaults to all zeros if no proposals exist.
daoBytesContains DAO-related data. Refer to RFC0023: Deposit and Withdraw in Nervos DAO for details.
nonceUint128The solution of the PoW puzzle. Similar to Bitcoin nonce.

Refer to the RawHeader in RFC-0027 for an in-depth explanation.