Skip to content

Layers of Blockchain

Layers of Blockchain

Public blockchains such as Ethereum are in their mature stages, and creating complex applications on top of these blockchains is not a good idea. Remember that blockchain is never just a piece of technology but a combination of business, economics, game theory, cryptography, and computer science engineering. Most real-world applications are very complex in nature, and it is recommended that you create blockchain solutions from scratch. The purpose of this article is to provide a simple overview of the bird from different layers of the blockchain and provide in-depth information on the main principles.

To begin, let us recall our basic understanding of the TCP/ IP protocol stack. The layered approach to the TCP/ IP stack is actually a standard for achieving an open system. Having layers of abstraction not only helps to understand the stack better but also helps to create products that meet the stack to achieve an open system. Besides, the layers are abstract from each other, making the system more robust and easy to maintain. Any changes made to one of the layers do not affect the other layers. Likewise, the TCP/IP analogy should not be confused with the blockchain layer. TCP/IP is a communication protocol used by every Internet application, and so is the blockchain. Pass in the blockchain.

Global standards have not yet been agreed upon to separate the block circuit components into separate layers. A layered heterogeneous architecture is needed, but it is still in the future. Let’s try to design blockchain layers to better understand the technology and create a comparative analogy between the hundreds of blockchain/cryptocurrency alternatives on the market.

Proceeds at the high-level, layered representation of blockchain in the below Figure.

Blockchain Layers

You may be wondering what the five layers are and why there are no more granular layers or fewer layers. Yes, there can’t be too many or too few parts; it becomes a trade-off as an example of the difficulty, honesty, skill, etc., to name a few. The goal is not to standardize blockchain technology but to better understand it. Don’t forget to keep in mind all these layers are present on all the nodes.

1. Application Layer

Several applications are developed due to the characteristics of the blockchain, such as the immutability of the data, the transparency between the participants, the resistance against enemy attacks, etc. Some applications are only incorporated into the application layer, assuming any available “flavor” of blockchain. While some applications are integrated into the application layer and intertwined with other blockchain layers. That’s why the application layer should be considered a blockchain part.

Thus, your target needs and create an application for these final results, which often involves traditional technologies for software development such as programming, scripting, APIs, embedded development, and so on. It may require the development of online pages, server software, and APIs, among other benefits. Blockchain does not have a client-server model, nor does it have a shared server to access the server-client, and this is how Bitcoin works.

You may have heard or already know about non-chain networks. The idea is to build applications that do not use the blockchain for anything and everything but use it sensibly. This concept seeks to ensure that heavy-duty lifting is done at the application layer or the chain takes care of storage requirements so that the blockchain core is light, efficient and network traffic is not excessive.

2. Execution Layer

It is the Exemption Layer where the execution of the instructions mandated by the Application Layer occurs at all nodes in a blockchain network. The instructions can be simple instructions or a set of multiple instructions in the form of an intelligent contract. In the same case, a program or script must be executed to ensure the proper execution of the transaction. All nodes in a blockchain network must run scripts/programs independently. Deterministic execution of scripts/programs on the same set of inputs and conditions always produces the same output across all nodes, which helps to avoid interference.

In the situation of Bitcoins, these are simple scripts that are not complete by Turing and only allow a few instructions. On the other hand, Ethereum and Hyperledger allow for complex executions. Ethereum code or written smart contracts are compiled into Bytecode or machine code, which is executed on its own Ethereum virtual machine. Hyperledger has a much simpler approach to its smart chain code contracts. It supports the execution of compiled machine codes in docking images and supports multiple high-level words such as Java and Go.

3. Semantic Layer

The semantic layer is a logical layer because there is order in transactions and blocks. Whether valid or invalid, the transaction has a series of instructions that are passed through the execution layer but are checked in the semantic layer. In the case of bitcoin, in this layer, it is checked whether it is carrying out a legal transaction, or a double-spending attack, or the execution of this transaction is authorized, etc. Bitcoin is present as a transaction that represents the state of the system. To be able to spend bitcoin, you must spend one or more previous transactions, and there is no concept of an account. It means that when someone executes a transaction, they use one of the previous transactions in which they received at least the amount they are now spending.

All nodes must verify this process by going through previous transactions to see if it is a legitimate business. Ethereum, on the other hand, has an account system, which means that the seller’s account and the recipient’s account have been upgraded. In this layer, the rules of the system can be defined, such as data structures and components. There may be slightly more complex situations compared to simple exchanges. Complex instruction sets are often encoded in smart contracts. The system state is updated when the smart contract is requested upon receipt of the transaction. A smart contract is a special account with executable code and private states. A block usually has several bundles of transactions and several smart contracts.

Data structures such as the Merkle tree are defined in this layer with the Merkle root in the block header to maintain the connection between the block header and the set of transactions in the block (usually key-value storage on disk). Computer models, storage methods, memory / disk-based processing, etc., can be defined in this logical layer. In addition to the above, the semantic layer is what defines how blocks are connected. Each block in the blockchain contains a hash from the previous block, all the way to the genesis block. Although the ultimate blockchain status is achieved through contributions from all levels, the blockchain connection must be explained through this layer. Depending on the application case, you may want to cite another application in this list.

4. Propagation Layer

The back layer is more of a unique phenomenon having no more interaction with other nodes in the system. The propagation layer is a layer of peer-to-peer communication that allows nodes to find each other and communicate and synchronize with each other in relation to current network conditions. When a transaction occurs, we know that it is transmitted over the entire network. Similarly, if a node wants to propose an authentic block, it is immediately divided into networks so that other nodes can create it, assuming it is the latest block. Therefore, the spread of transactions/blocks in the network is determined in this layer, which ensures the entire network’s stability. By design, most blockchains are designed in such a way that they forward a transaction/block immediately to all nodes they are directly connected to when they learn about a new transaction/block.

Transaction delays or deadlocks are common on the asynchronous Internet network. Numerous propagations take a few seconds, and others take longer, depending on node capacity, network bandwidth, and several other factors.

5. Consensus Layer

The consent layer is often the base layer for a blockchain. There can be various ‘ways’ to get community consent, depending on the application of the case—blockchain security and safety in this area. In Bitcoin or Ethereum, consent is obtained through appropriate means to encourage the use of “mining. “For a complete blockchain to last, there must be an incentive that not only helps keep the website alive but also strengthens the agreement. Bitcoin and Ethereum use the Proof of Work method (PoW) to select a mechanism that can create a block.

Once the block is proposed and grown by all nodes, it will be checked whether the block is a valid block with all legal transactions and the PoW problem has been solved correctly. Then, they will increase this block to their copy of the blockchain and build on this basis. There are many different variants of the consensus protocol, such as Proof of Stake (PoS), Delegated PoS (dPoS), Practical Byzantine Fault Tolerance (PBFT), etc.

nv-author-image

Era Innovator

Era Innovator is a growing Technical Information Provider and a Web and App development company in India that offers clients ceaseless experience. Here you can find all the latest Tech related content which will help you in your daily needs.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.