Ok lets first understand what exactly is the Blockchain, it is a ledger(khata) a notebook which keeps track of literally everything, now then the question arises, who decides what goes on the ledger, and what doesn’t, and who corrects it, that is where this is different from traditional ledgers,

No one decides. Everyone decides.

Let me explain, imagine Blockchain as just that, a chain of Blocks, each block holding data, for this ledger that we spoke of, now the question here is who decides what goes in as the next, it is decided based on consensus, there are thousands of nodes around the world trying to be the one who approves and creates the next block, and they get a lil gift if they do so, and the solution can be verified easily, by all the nodes.

So once someone proposes a new block, all the nodes, test if its true or not, and if so, then the new block is added,

Now the basis on which the come to the consensus is lil tricky, there are different consensus methods, some are 2/3rd majority, while others so proof of stake, and so on, but rest be assured, that it is always more than the majority of nodes, which if they decide that it is true, then it is added.

Primary Layers

There are two types of layers, on which function and make the blockchain what it is, and another are Blockchain layers, (Layer 0, Layer 1 Layer 2) which you may have heard about.

First lets discuss the layers that the Blockchain is built upon

index.html

  1. Hardware Layer
    1. Blockchains are made up of interconnected nodes, all around the world, which are nothing but a computer or a group of computers responsible for validating and/or processing transactions.
    2. They provide computation for the transaction and form the supporting structure base layer for the entire blockchain.
  2. Data Layer:
    1. The Layer above the Hardware layer, which records all the transaction, the transaction records, are stored in blocks(the basic unit of the blockchain) it stores information about the transaction such as public keys, hashes, transaction details in terms of amounts and type of data.
  3. Network Layer:
    1. This is what manages the communication between the nodes, since each block must be validated by all the other nodes, that it is not malicious. This ensures smooth connection between nodes in safe and secure manner, using p2p(peer to peer) or other cryptographically secure methods of communication.
  4. Consensus Layer:
    1. This is what handles the validation of the proposed blocks.
      • Below is an optional extra explanation :
  5. Application Layer:
    1. This is where all the Dapps(Decentralized Applications) are built. This is where most web3 or “Blockchain Developers” work, Defi apps, NFT platforms and so on come under this. While the UI/UX of these apps are similar to web2 applications, the difference herein lies in the manner of storage and retrieval of the data, which is not stored in a centralized database, but rather it is on the blocks, of the Blockchain.

Blockchain Layers

You can think of each 'layer' as stacking itself on top of the one below it – so a 'layer-0' is the bottom-most layer, while a layer-1 is on top of the layer-0, and a layer-2 is on top of the layer-1. Layers can also be stacked – such as multiple layer-2s on a single layer-1.

Layer 1: Bitcoin, Ethereum, Cardano, Solana, Tezos, Algorand, among many others

  1. Layer 1.
    1. The blockchains we generally here about are usually, Layer 1, These are the most mainstream ones. This is where the blockchain economy thrives, where dApps are built, exchanges, betting and most of the general use cases happen.
    2. an L1’s token or coin is central to it, since they have their own governance, validation, underlying logic for connection, transaction and storage fees, which must be paid for using some amount of those tokens.
    3. A traditional L1 blockchain might have its own set of validators securing the network. However, a L1 can also receive shared security from something called a ‘layer-0’.
  2. Layer 0: A foundation for shared security and interoperability
    1. This is the layer that provides interoperability, security frameworks, and consensus logic
    2. L0 is a protocol that doesn’t have any of the features in L1, this has no bloat whatsoever, without any governance at times as well.
    3. You cant run dApps on layer 0 usually.
    4. The goal of Layer 0 is to make the blockchain function: This layer allows for communication via physical hardware, Internet, communication with telecom providers, handling TPS, and so on..(Layer 0 operates at the protocol level, not the physical layer of the internet.)
    5. Protocols like CCIP, IBC, and XCMP enable cross-chain communication — allowing blockchains to share data and tokens securely. Layer zero allows for sharing of data between all the other Layers, by using something called CCIP(Cross Chain Interoperability Protocol), which are communication rules that allow different blockchains to talk to each other and share information or tokens.
    6. Interoperable blockchains can work together smoothly, making it easy to transfer information and tokens between them, which allows for simultaneous transactions, inbetween blockchains, in a smooth manner.
  3. Layer 2
    1. When someone builds a blockchain of their own over someone else’s L1 Blockchain, it is called a Layer 2 chain, Ethereum has L2 blockchains like, Polygon, Arbitrum, and Optimism which are faster and cheaper.
    2. Now how are they faster and cheaper? By being more centralized. Let me explain,
      1. L2’s typically have two parts, a network that processes the transactions and a smart contract(connected to the L1), which is the underlying logic, which resolves any disputes and achieves consensus.
      2. As a result, the core functions of the smart contract are always to:
        1. Hold and release funds transferred to the layer 2
        2. Receive some kind of proof generated by the layer 2, validate it, resolve disputes, and then finalize transactions
      3. This holding and then rollups back to the layer 1 ledger, is why it is slightly more centralised.
      4. Essentially the L2 does the transaction on behalf of of the base blockchain. In conjunction with a smaller validator set with better hardware, this offers much higher throughput when transacting on the layer-2 network compared to the base blockchains.
    3. These L2 Blockchains are smaller in size, they expand upon the features if their L1 bases, by extending and adding more features and functionalities in their own implementation,
    4. Added security easier time scaling it and more manageable.