The Blockchain

Let's discuss the header of a block in blockchain technology in this lesson.

The blockchain serves as Bitcoin’s public ledger, an ordered record of transactions, which protects the users against double-spending and modification of previously released transactions. As shown before, each full node collects incoming transaction data in their unconfirmed transactions’ memory pool and places them in their candidate blocks which are to be mined.

A block consists of a block header that carries all the relevant data and a list of transactions that are included in the block. Once a node has found a valid Proof-of-Work, it broadcasts the corresponding candidate block to the network, and each node validates and subsequently accepts the block, which is then appended to the blockchain. When all nodes of the system maintain the same chain of blocks, the whole system is in consensus.

The block header

A block consists of two parts: a list of transactions included, and a block header that carries all the relevant metadata. The block headers in Bitcoin have a size of 80 bits and are of the following structure shown in this table (Antonopoulos (2014)Andreas M. Antonopoulos. Mastering Bitcoin: Unlocking Digital Cryptocurrencies. Sebastopol, CA, 2014. O’Reilly Media. and Bitcoin Developer Guide (2019)Bitcoin Developer Guide. Transactions. Accessed: 2019-01-07.).

As we can see, a block header contains the hash of the previous block header in the chain, ensuring that no transactions of previous blocks can be changed without also changing the actual block’s header. Also, the root of the Merkle tree of the current block’s transactions is included in the block header, which prevents the modification of transactions without modifying the block header. The block header also contains an arbitrary number called a nonce, which is used in the mining process.

Table 1

Get hands-on with 1200+ tech skills courses.