BlockHeader

Block headers are serialized in the 140-byte format described below and then hashed as part of Unit-e’s proof-of-stake algorithm, making the serialized header format part of the consensus rules.

Name

Data Type

Bytes

Description

version

int32

4

The block version number indicates which set of block validation rules to follow. See the list of block versions below.

previous block header hash

uint256

32

A SHA256(SHA256()) hash in internal byte order of the previous block’s header. This ensures no previous block can be changed without also changing this block’s header.

merkle root hash

uint256

32

A SHA256(SHA256()) hash in internal byte order. The merkle root is derived from the hashes of all transactions included in this block, ensuring that none of those transactions can be modified without modifying the header. See the merkle trees section for details.

witness merkle root hash

uint256

32

Hash of witness merkle root

finalizer commits merkle root

uint256

32

Hash of merkle root of finalizer commits

time

uint32

4

The block time is a Unix epoch time when the miner started hashing the header (according to the miner). Must be strictly greater than the median time of the previous 11 blocks. Full nodes will not accept blocks with headers more than two hours in the future according to their clock.

nBits

uint32

4

An encoded version of the target threshold this block’s header hash must be less than or equal to. See the nBits format described below.

The hashes are in internal byte order; the other values are all in little-endian order.

An example header in hex:

02000000 ........................... Block version: 2

b6ff0b1b1680a2862a30ca44d346d9e8
910d334beb48ca0c0000000000000000 ... Hash of previous block's header
9d10aa52ee949386ca9385695f04ede2
70dda20810decd12bc9b048aaab31471 ... Merkle root
084c799cd551dd1d8d5c5f9a5d593b2e
931f5e36122ee5c793c1d08a19839cc0 ... Witness Merkle root
95d4c628d3aa681f4f0895281921b339
4f61d7781e9861fba5ecb403311832f4 ... Finalizer commits Merkle root
24d95a54 ........................... [Unix time][unix epoch time]: 1415239972
30c31b18 ........................... Target: 0x1bc330 * 256**(0x18-3)