Now that you know how nodes on a network verify transactions, I will explain how the transactions are 'confirmed' and added to the blockchain. If you missed my other post, take a moment to read it right here so you're in the loop: https://read.cash/@d23711/newbies-come-learn-about-mining-b157ad66
Confirming Verified Transactions
As I mentioned in my previous post, the miners on the network verify the legitimacy of a transaction by validating the digital signature and ensuring funds availability. Once this is completed, the transaction will join all other verified, unconfirmed transactions that are waiting to be added to the ledger in the memory pool. These verified transactions will be grouped together to be added as a "block" of information through the cryptographic hash function. In addition to the verified transactions, the nodes will also add the previous block's hash value to it's transaction data. This creates dependency throughout the blockchain ledger as a layer of security.
The first block created on a chain is called the 'Genesis Block'. Since there is no block before it, the Genesis Block only uses the transaction history to generate its hash value. However, each subsequent block will add the hash value of the previous block to it’s transaction data. This creates a link or “chain” between blocks, where each block is reliant on the previous block’s hash value to access the complete transaction history of the ledger.
Why is Dependency Needed?
Since there is no central authority in charge of approving transactions, the blockchain relies on it’s community of miners to confirm new blocks. This validation is completed through the trust logic in the blockchain’s programming through use of consensus algorithms. The consensus algorithm decides what transactions to approve or deny based on what the majority of the miners agree upon.
As a result, dependency is important for the network’s security. The hash value helps to ensure the blockchain remains immutable, or in other words, unable to be changed. Let’s say someone joins the mining community maliciously. They decide they want to change the transaction history in a confirmed block. If they do, the hash value for that block will change (different data in the block means different hash value).
Since each block uses the previous block’s hash value in it’s transaction data, the fraudster would need to update the hash value of every block thereafter to chain the blocks back together. Depending on the blockchain, the fraudster would either need to own more than 51% stake (Proof of Stake) or control 51% of the network's computing power (Proof of Work). I'll touch more on consensus algorithms in a future post.
What's Next?
Stay tuned for my next post to further your understanding of mining! I really appreciate you taking the time to read my post. I would love your feedback! Please leave any questions or suggestions in the comments.
Come join me on Torum and follow me on Twitter!
https://www.torum.com/signup?referral_code=d23711
https://twitter.com/anotherbotname