Candidate Block
What is a Candidate Block?
Candidate blocks are blocks that are being mined by mining nodes (miners) for the purpose of receiving the block reward. That's why "candidate blocks" might be regarded as short-lived blocks that will either be accepted or rejected. To participate in the mining competition, miners first have to construct a candidate block that can be validated and added to the blockchain.
Unconfirmed transactions in the memory pool are used to build candidate blocks by miners. Finally, a Merkle root is formed by hashing all of the transactions in the Merkle tree (or root hash). There is a single Merkle root that reflects all prior hashes of that tree, and hence all transactions in that particular block.
Once the root hash and the previous block's hash are included in the header, a random number known as the nonce is added. Those three hashes (root, preceding block's hash, and nonce) and a few more are used by the miner to generate the block header hash. The block hash generated as a consequence of this operation will be used to identify the newly formed block (candidate block).
There must be a predetermined number of zeros in the output (block hash) before it can be accepted as genuine (less than a target value that is defined by the protocol). Until a valid block hash can be produced, the mining process is dependent on many efforts (trial and error) by the mining nodes to perform a variety of hashing functions with different nonce values. The miner's effort is verified by the block hash (hence Proof of Work).
Each time a miner discovers a valid block hash, their candidate block is sent out to the rest of the network for verification. The candidate block will subsequently be added to the blockchain if all goes well. A miner will receive the block reward at this time, as each validating node changes its copy of the blockchain data to include the latest mined blocks.
Last updated
Was this helpful?