# BLOCKCHAIN AND IT LAYERS
## What are Blockchains?
Blockchains are shared, immutable ledgers that facilitates the process of recording transactions and tracking assets in a business network. In other words blockchain is a public list of records, it stores information in batches called blocks.
Put simply, blockchains as fixed, set, unchangable, rigid, unshakeable, irremovable records of transactions that do not require to rely on any external authority like banks, government to validate the authenticity and integrity of the data.
Moreover, a blockchain is not owned by a single entity, but it is owned by everyone participating in validating the transactions. This eliminates a single point of failure, meaning it’s almost impossible to hack a blockchain because there is no point of origin for the blockchain. It ensures transparency, eliminates middlemen and minimizes operational costs.
Now that we have defined the fundamentals of blockchain, let us now dive deep into the layers of blockchain technology and the function of each.
When we talk about the layers of the blockchain, it is important to note that there are two ways to understand blockchain technology. The first way is to comprehend how blockchain architecture works. Blockchain technology consists of five layers—the hardware layer, the data layer, the network layer, the consensus layer and the application layer.
The second is the division of the blockchain network based on protocol. Protocol refers to the [set of rules](https://www.coinbase.com/cloud/discover/dev-foundations/networks-protocols-tokens-coinshttps://) that govern a network. The blockchain protocol is made up of four layers—Layer 0, Layer 1, Layer 2 and Layer 3. Let’s take a look at each of these categories separately.
## 1. Blockchain architecture
### The Hardware Layer
The first layer of the blockchain consists of hardware, like network connections, the computers within the network and data servers. The data stored inside a blockchain is hosted by data servers, and computers on the blockchain network can share this data with each other. This leads to the creation of a P2P network where information is validated by individual nodes (or computers) on the network.
### The Data Layer
The second layer of this house is the data layer, where information stored on the network is managed. This layer is made up of blocks of information with each block connected to the previous one. The only block that is not linked back to another is the genesis block (the first block in the network).
Each transaction written on these blocks is protected through a private key and a public key. A private key is a digital signature known only by the owner for authorizing a transaction; a public key is used to verify who has signed for the transaction. To put it simply, if someone sends you some crypto, they will need to know your public key; for you to receive the crypto, you have to use your private key to verify the transaction and prove your ownership to your blockchain wallet.
### The Network Layer
The network layer deals with the communication between nodes on a blockchain. Since blockchain is an open system, each node has to know about the transactions which other nodes are validating. The network layer enables this communication.
It is also in this layer that blocks are created and added to the blockchain. As a result, this layer is also referred to as the propagation layer.
### The Consensus Layer
This layer [ensures](https://medium.com/@prashunjaveri/blockchain-architecture-3f9f1c6dac5es://) that the rules of the network are effectively enforced to preserve uniformity within the network. One node cannot simply add a transaction to the blockchain; to do so, all nodes within the network need to [agree](https://101blockchains.com/blockchain-technology-explained/#2s://) on it. This level of verification lowers the risk of fraudulent transactions being added to the blockchain.
### The Application Layer
This layer facilitates the use of the blockchain for a wide variety of purposes. It is made up of smart contracts and decentralized applications (DApps). This layer acts as the front end of the blockchain and is essentially what a user would typically encounter when operating within a blockchain network.
## 2. Blockchain protocol
### Layer 0
Blockchain in itself is called [layer zero](https://medium.com/@nick.5montana/blockchain-layers-l0-l1-l2-l3-in-a-diagram-569162398dbs://). The components required to make blockchain real are the internet, hardware, and many other connections. [Layer zero ](https://insights.tokenmetrics.com/layer-0-blockchain-protocols/#:~:text=Layer%200%20protocols%20are%20the,built%20on%20top%20of%20them.)blockchain is the initial stage of blockchain that allows various networks to function, such as Bitcoin, Ethereum, and many more. Layer 0 also provides blockchain with a facility of cross-chain interoperability communication from top to different layers. Layer 0 provides the underlying infrastructure for blockchain.
### Layer 1
The first layer of the protocol consists of the different blockchains (like Bitcoin, Ethereum and Binance Smart Chain) that can process transactions. This layer of the protocol [ensures](https://www.linkedin.com/pulse/crypto-101-4-layers-blockchain-protocol-david-mcneal/?trk=pulse-article_more-articles_related-content-card) the security of the blockchain with different consensus mechanisms, like proof of work and proof of stake being a part of this layer.
### Layer 2
Layer 0 has many interactions that have been removed by layer 2. For specific blockchains, layer 2 is the scaling solution. It works with third-party integration and removes the limitations of layer 1. It is the most popular approach for solving scaling issues attached to POW networks. At present, various industries have begun implementing layer two technologies. This layer is also known as the execution layer. As a blockchain grows, the number of transactions being performed on it increases.
### Layer 3
Layer 3 blockchain is also referred to as the “application layer”. The main task of this layer is to host the DAapps and many other protocols that enable other apps. Here, the blockchain protocol is split into two significant sub-layers, that being, application and execution. It is the most potent solution made to separate blockchains with cross-chain capabilities for achieving the target of real interoperability.
#### In summary...
To sum up, blockchain technology is made possible because of hardware, like data servers and connected devices. The network created by this hardware stores blocks of information in the data layer. The information stored in the data layer is shared inside the network within the network layer and verified within the consensus layer. Finally, in the application layer, the blockchain is provided real-world utility using additional applications and tools.
In contrast to the layers of the blockchain architecture which keep the network up and running, the protocol layers are focused on improving the utility of the blockchain. Layer 0 lays the groundwork for the rest of the protocols, on top of which different blockchains are created. To address issues in these blockchains, scalability solutions are added in Layer 2, and Layer 3 is how users engage with the blockchain.