0

I am going through online Blockchain course and in the course, they have mentioned that uniqueness of a block is defined using hashes with leading zeros as well as timestamp. Since, in the training, they have assumed 18 leading zeros in hashes, the valid hash count is 4 billion. So, with the unique combination, every node has 4 billion valid hashes per second to get the golden nonce. But since all the miners are trying at the same time to generate the nonce, this range gets covered quickly within a second. So for this, the solution is to change block configuration.

My question is - If per second, all the 4 billion hashes are getting covered without finding golden nonce, why cannot we have 1 more field in the block like node id?

So, the uniqueness of the block can be defined using 3 variables - node id, timestamp and hash. Since node id of the node is unique to the node, every node gets free chance to use up to 4 billion hashes per timestamp.

I am sure this must been thought of by designers or probably I am not thinking properly.

3

Blocks include more than just those 3 variables. One of the most important ones is the merkle root. This is the hash of all of the transactions in the block, in a particular order. If different transactions are included or they are included in a different order, that merkle root is going to be different. So if each miner has a different merkle root, then they are going to have their own set of nonces to work with. That is what actually provides uniqueness here.

Miners all have different merkle roots. This is because the merkle root includes the transaction that pays the mining reward - the coinbase transaction. Since every miner wants that reward, they will have a coinbase transaction which is different from every miner as it will include their payout address, not someone else's. So by virtue of having different payout addresses in their coinbase transactions, the blocks that miners are working on will be unique and different from other miners.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.