CTO Insights (IDentifier October 2019)
In the September 2019 IDentifier, I introduced the blockchain concept and explained how it provides a different and superior method of storing data relative to traditional centralized databases. In this second installment, we will adjust our focus and zoom in on the smallest common unit of the chain and explore its anatomical features.
The Purpose and Anatomy of a Block
Just as the cell is the smallest functioning unit of our bodies, the block is the smallest functioning unit of the blockchain. To better appreciate the structure and function of the block, let’s begin with acknowledging that a blockchain is essentially a ledger that records transactions. In that context, blocks are analogous to the pages in a ledger that record the details of individual transactions.
Keeping with the ledger analogy, the purpose of each page is to record transactions. If we are looking at Bitcoin, then the transactions are financial in nature but they could just as easily be entries in a patient’s electronic health record or elements in a legal contract. So part of the anatomy of each block is dedicated to recording transaction data. You can view actual Bitcoin transaction records at https://www.blockchain.com/explorer to see how the data in that blockchain is encrypted and recorded. As you will see, each block can contain a few or many transactions.
But recording transaction data is just one element in the anatomy of each block (or page.) Imagine you are working in an old-fashioned bank and you are tasked with reviewing the day’s transaction records. As you flip through the pages, you note that the page numbers jump from 34 to 40. The sudden change in page numbers alerts you to the possibility the ledger has been compromised.
In the same way, each block contains features that help to ensure the data it contains is accurate and has not been tampered with. One of those elements is an alphanumeric “hash” code that refers to the previous block in the chain. Think of it as a very sophisticated and nearly impossible to replicate or guess page number. (“Hash” is a computer science term that refers to a code that encrypts data.) The point is that if this sequence is missing or inaccurate, you know the block has been compromised and that the data is likely fraudulent. For example, the transaction was for $100 and not $1,000.
The final essential element of each block that serves to provide yet another data-integrity function is known as the “Merkle Tree Hash”. You recall that a hash is a result of an encryption calculation that obscures and protects the data it has encrypted. The Merkle Tree Hash is the result of the transaction data recorded in the block being processed through a series of encryption algorithms. The purpose of this process is the creation of another alphanumeric sequence that is unique to the block and the data it contains. The mathematical probability that someone could decode the hash in an effort to hack the block is infinitesimally smaller than the probability that lightning will strike you while you are in your house lying in bed at a specific date and time wearing a specific set of pajamas.
To review, each block in a blockchain is comprised of three primary elements:
- Transaction data
- The hash code of the previous block
- A Merkle Tree Hash
Taken together, these elements provide an automated method of storing, securing and sharing data that has no peer. But the wonders of blockchain do not end there! In my next article, we will explore the relationship between the blocks to see even more features that further augment the power of blockchain technology to efficiently and securely share data across networks.