Blockchain: Layer by Layer architecture

If you’ve got looked into blockchain or cryptocurrency-related articles or posts, you may have encountered the word so-called “layers”. Why do they exist? What are the types of layers? Let’s break down layer by layer and understand the architecture of every layer.

The layered structure of blockchain

Blockchains have a layered architecture to facilitate transactions uniquely by combining several innovative technologies. To simplify each different part of the blockchain breaks down into technology layers. 

The layers making up blockchain technology are categorized into five layers: 

1. The Hardware/Infrastructure Layer 

The blockchain data are stored securely in a server. When we raise a request to use this data from application servers while browsing the web or using any application. This is commonly referred to as client-server architecture.

Blockchain is a peer-to-peer (P2P) network where clients can share data with one another to make data sharing faster and easier. This is often how the distributed ledger is created. Each node randomly verifies the transaction data. Precisely node is the core of this layer.

2.The Data Layer

As we know blockchains are a long chain of “blocks” containing transaction data. The blockchain’s data structure contains two basic fundamental elements: Pointers and a Linked list. 

Pointers are the variables that refer to the location of another variable and a linked list is a list of chained blocks where each block has data and pointers to the previous block. The Genesis Block is the first block in the chain and therefore does not need to link with any previous block, and the process is repeated every time a new block is created. For blockchain systems, a Merkle tree provides security, integrity and irrefutability. The blockchain system is built on Merkle trees, cryptography and consensus algorithms.

Every transaction is digitally signed to protect the security and integrity of the data with the private key. A digital signature is encrypted with data thus ensuring maximum security. As a result, any manipulation will render the signature invalid. 

3. The Network Layer

The network layer also referred to as the P2P layer is the one responsible for internode communication. This P2P layer makes communication faster between nodes. It facilitates this ‘inter-node communication’. As node discovery, block creation, and block addition are also managed by this layer, it is also referred to as the ‘Propagation Layer.’

4. The Consensus Layer

The consensus layer is the most essential and it is the core of the existence of blockchain platforms. The consensus layer is responsible for validating the blocks, ordering the blocks and ensuring everyone agrees on them. This framework maintains the blockchain’s decentralized nature as no node has sole control over any transactional data, and the role is distributed. This is called the consensus mechanism.

5. The Application Layer

The application layer is comprised of smart contracts, chain code and decentralized applications (dApps). 

Smart contracts:

Smart contracts make decisions based on certain triggers such as contract expiration dates, achievement of spot prices, etc.

 Chain code:

 A chain code is typically used by administrators to group related smart contracts for deployment, but can also be used for low-level system programming of Fabric. 

Decentralized applications (dApps):

dApps facilitate the communication between user devices and the blockchain. Therefore, the application is like the user-facing front end, while the main blockchain is the backend, where the data remains securely stored.

The actions that follow these decisions are executed by dApps. And all of this happens on the application layer. 

Hopefully, this information will help categorize new developments of blockchain technologies as they emerge.

Related posts

Leave a comment