Block header

Intermediate
The block header is a section in a block that serves as a summary of the rest of the block. It’s made up of all the metadata – such as the time and difficulty when the block was mined, the Merkle root of the included transactions, and the nonce. Also present is the previous block’s hash, which is what allows us to create the “chain” of blocks. In essence, the block header contains any data that isn’t the list of raw transactions itself.
A block header is what the miners hash to try and make the block valid. This is a lot more efficient than hashing the entirety of the block, which can be made up of thousands of transactions. It would be vastly more cumbersome for a miner to change the nonce and to rehash a whole 2MB block for every attempt. Compare this with hashing Bitcoin’s block headers, for instance, which have a fixed length of 80 bytes. 
Block headers are great from a mining point of view, but because of their small size, they’re also ideal for light clients. The Bitcoin blockchain is too large for devices like smartphones to store. If the chain had 100,000 1MB blocks, you’d consume 100GB of space. But with just the block headers for those same blocks, you’d only take up 0.008GB, or 8MB.

In this way, devices with less bandwidth or storage space can still perform some degree of validation. Because the Merkle root encapsulates all of the transactions, they can later check whether a transaction was included in a particular block. This does come at a cost – the user must still rely on a third party to provide them with necessary information. With that said, light clients are preferable to a system where the users perform no verification at all.

Chia sẻ bài đăng
Các thuật ngữ liên quan
Đăng ký tài khoản
Áp dụng kiến thức vào thực tế bằng cách mở tài khoản Binance ngay hôm nay.