Understanding Blockchain Design

Understanding Blockchain Design

By now you know that blockchain is a technology for transaction-related services. 

Blockchain provides a trustless mechanism through which transactions can be carried out in a secure manner. How does that happen? How is security of data guaranteed in the blockchain? To understand this, you will have to first look at the block.

Decoding the Block in Blockchain

The data in a block is cryptographically secured. This means that as a peer, you can only see data that you are authorized to see. The peers digitally sign the encrypted transactions contained in a block.

A block basically contains two parts – block header and list of transactions

Block Header

Block header contains metadata of the block and basically stores the following three information – hash of previous block, mining information and merkle tree root.

Hash of previous block

This hash helps the system identify the previous block. The current block’s hash is created by the previous block’s hash.

For example, we have a Block B0 with hash value H0 which is the first block of the blockchain (also called “Genesis Block”). The next block B1 will have a hash value H1 which is equal to H(H0). The H() is the hashing function.

I will discuss more about hash and hash functions later on.

For now, just understand that if you are on a specific block and want to know what the previous block contains, the hash will take you there. This also ensures that the blockchain is tamper-proof. 

Mining information

This contains various information like complexity of mining the block, timestamp and nonce.

Merkle tree root

This is a data structure that summarizes all the transactions in the block in a proper manner. The root provides a digital fingerprint of the entire set of the transaction in the blockchain. We will discuss more on merkle trees later.

This is how a blockchain header looks like – 

Blockchain block header
Source: https://www.blockchain.com

Transactions in Block

This is how transactions in a block look like – 

transactions in block
Source: https://www.blockchain.com/

Important Points to Remember on the Block Header

The header of the block connects the transactions. All these information is stored in the merkle tree. So any change in any of the transactions will result in a change of the block header. How that happens is discussed in a later section.

Block header is the component that connects the blocks, thus forming the chain of blocks aka blockchain. As I have already mentioned previously, the hash of the previous block is stored in the block header. And the process continues for every block that gets added to the blockchain.

Understanding Blockchain Components

I will explain to you the basic components that help the blockchain function. What does each of the component do? How is it important?

A blockchain platform has many components and these might differ between applications.

I have broadly classified the ecosystem into four basic components. Tony Willenberg has also provided a similar classification of the ecosystem. Each of these components are from a human user point of view. However it is implemented through machines and program code.

Node Application

To understand what a node application is I will give you an example. Today if you want to make a money transfer from your bank account on mobile, say ICICI Bank, what would you do? You would install the app of the bank. You would be provided with a MPIN or mobile pin to login to your account. Once you are logged in, you can easily transfer money from your account to any other account.

But can you use the app of ICICI Bank to make a money transfer from your HDFC Bank account? No, you can’t.

Similarly, in every blockchain ecosystem there exists a node application. A node is nothing but a computer connected to the network or the internet.

This connected computer needs to run an application which is specific to the ecosystem in which it wants to participate in. For example, if the ecosystem is that of a cryptocurrency like bitcoin, then the computer should be running the bitcoin wallet application.

If I try and explain the technical side of a node application, then a SON or Service Overlay Network is an important aspect. In order to be a node in the blockchain ecosystem, the computer that seeks to be a node must be able to process application specific information and participate in affecting the state of the application.

As you have already noticed earlier, there are different types of blockchains and depending on the type, the node application can be run either by all or by a specific subset of the users. For example, in the case of bitcoin which is a public blockchain type, the node application can be run by anyone with an internet connection. However, for a permission blockchain platform, only certain participants will be allowed to access and run the node application.

The important point however is that if you have the node application, you can participate in the blockchain ecosystem.

Shared Ledger

Once you are successfully running the node application, you can view the contents of the blockchain ecosystem.

Accordingly you can interact with the ecosystem. The level of interaction is defined within the ecosystem itself as rules through program code in the application.

It is very important to note that although you can run as many node applications as you want and as per the permissible rules; however you will have one ledger for each ecosystem.

Consensus Algorithm

Thirdly, every blockchain ecosystem has a Consensus Algorithm.

Consensus is agreement. Agreement is nice. It is collective and depends on all the participants.

Now think! With the current traditional banking system, there is monopoly of truth which lies with the central authority. In this case it is the bank. Blockchain takes away this monopoly of truth and replaces it with consensus or agreement.

Consensus algorithm defines the rules on how the ecosystem will arrive at an agreement – in blockchain terms, a single view of the ledger.

Of course different systems take different amount of time to reach consensus. It might be minutes for some, while for others the consensus happens in seconds.

There are different protocols that define how a consensus will be arrived at in the ecosystem. We will read each of these in details later as part of this course.

Virtual Machine

A virtual machine is  the representation of a machine which is created by a computer program. It is the state of a machine held inside another machine.

For example imagine how your bank account statement would appear on your computer, or when you login to the bank’s website.

In a blockchain ecosystem, the virtual machine lives in the node application and can understand instructions. These instructions are in the form of programming code which can enforce the virtual machine in the node application to abide by the terms of the contract and participate in a transaction.

What sort of transaction? It can be in the form of releasing a digital cryptocurrency or consuming one.

All these 4 components work in cohesion to form a blockchain ecosystem.

Now that you know what all the various components of a blockchain are, it will become much easier to understand the developments that take place in this space. Blockchain is new and I expect advancements as ecosystems improve. And understanding these components will make it easier to appreciate and criticize newer capabilities that are packaged in the blockchain.

Understanding Blockchain Design

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top
Copy Protected by Chetan's WP-Copyprotect.