Remember Lulu’s transaction? Having been validated, it now sits in something called the memory pool where it will await the authentication of a mining node.
The memory pool (or transaction pool) is a place in the blockchain environment where all the validated transactions temporarily reside while waiting for authentication by mining nodes during the mining process.
The verification process for transactions in a blockchain is also a step-wise process.
Different blockchains utilize diverse mathematical proofs but the focus will be given to the proof-of-work algorithm in this section. This is the mining algorithm used by Bitcoin.
The steps are as follows.
•Identification
Mining nodes search the memory pool, looking for unconfirmed transactions. One of them will come across Lulu’s transaction, alongside a group of other unconfirmed transactions. These transactions are then aggregated into something called a “candidate block.” The candidate block is an aggregation of data structures (transactions) into a single block for mining.
•Computation
This is where the cryptographic hashing process takes place. Mining nodes will seek to find a solution for the proof-of-work algorithm of the candidate block that contains Lulu’s transaction.
This action is being carried out simultaneously by numerous mining nodes on the blockchain. All of them race against each other to arrive at the solution first so that they can claim the reward.
The basic principle in the computation stage is to obtain a value that is less than that of a specific target. Part of the architecture of the blockchain specifies a target that is unique for every candidate block. During the mining process, a mining node has to arrive at a value that is less than this specific target.
Only then can the block be said to have been mined. Think of this specific target to be a picture puzzle. Only by fitting the pieces together can the puzzle be completed. Using hashing techniques, mining nodes will perform multiple trial and error computations using something called “nonce values” until a solution for the proof-of-work algorithm is obtained.
The common hash function used by most blockchains that favor the proof-of-work algorithm is the SHA256 hashing function. During the trial and error hashing process, when a nonce value does not produce a value that is less than that of the specific target value, it is modified.
After modification, the process is repeated until the block header value of the candidate block becomes less than that of the specific target.
Depending on the computing power of the mining hardware being utilized, as many as 1 quadrillion trial and error attempts might be required before the correct nonce value is arrived at. For this reason, a considerable amount of computing power and electricity is utilized by large mining node setups.
•Broadcast
A mining node will eventually be successful in finding the solution to the proof-of-work algorithm for the candidate block that contains Lulu’s transaction. Once this happens, the mining node will broadcast it to the entire network for others to verify.
The verification process involves examining the proof-of-work solution to make sure that it is indeed of a lower value than that of the target. There are also some other checks that are carried out to ascertain the validity of the solution.
The way blockchains are built, the mining process is a complex one but the process of verifying the work done by miners is actually simple and straightforward.
The complexity of the mining operation adds a robust fidelity component to the network while the ease of verifying drastically speeds up transaction lag times. This is one of the many ingenious aspects of blockchain technology that makes it such a revolutionary concept.
•Majority Consensus
At this stage, the mined candidate block containing Lulu’s transaction is being broadcast throughout the entire network.
Other nodes review the solution to see if it is correct. With each successful validation by peer nodes, a distributed consensus begins to develop as these peer nodes add the mined candidate block to their local copy of the blockchain.
Soon, this distributed consensus becomes a majority consensus and the candidate block becomes a legitimate block on the blockchain.
•Addition
Once the majority consensus is formed, the mined candidate block becomes a verified block and it will now reside permanently on the blockchain.
At any time, participants in the network can examine the block and they will find Lulu’s 20 Satocoin payment. The successful mining node also receives a reward for being able to mine the block.