It's the procedure through which all the network's peers agree on the network's present state. For example, blockchain networks use different consensus algorithms to decide on the current state of the global ledger.
Different types of consensus algorithms are listed below:
To mine the next block, every miner must solve a complex mathematical problem (which takes a lot of computational power). The miners compute the block's hash, and if their hash is less than the current difficulty level set by the network, they have found the correct solution. Otherwise, they can adjust the value of the
Depending on the network's current difficulty, nodes might have to compute millions or even billions of hashes to find the correct solution. Then they will send their block to all the other nodes on the network. Then they all will
Note: All other fields in a
are fixed except the nonce. candidate block A block that a miner is trying to mine
a. Nonce = nonce + 1 (or you can randomly assign a new value to nonce)
b. Recompute the hash of the block
You can visualize the steps in the following figure:
Free Resources