Layers - The Bedrock of Blockchain by@mickey-maler

Layers - The Bedrock of Blockchain

Layers. These technological “wrappers” encapsulate protocols that act as basic building blocks in today's IT technology. And the same goes for blockchain. This article sets out to give you a basic understanding of blockchain scalability basics, and then provides a broader technological overview of the blockchain building blocks. To do this, we will draw on the analogy of a simplified model of a city.
image
Mickey Maler HackerNoon profile picture

Mickey Maler

If You have a Will to Win, You Will Win.

github social iconlinkedin social icontwitter social icon

Much like the roads need traffic lights, and modern states would not work without the rule of law, every blockchain that aims to reach its maximum potential (without congesting, collapsing, or being super expensive on transactions and smart contract interactions) must scale. The essential component of blockchain scaling, and the main topic of this series, is using available and additional blockchain layers above the base layer efficiently.

Introduction to blockchain layers and scalability by - Mickey Maler

Can clever use of blockchain scalability options (available in specific layers) provide a key that would unlock the blockchain scalability trilemma, which causes the blockchain’s inability to achieve a harmonious co-existence of three essential features - security, scalability, and decentralization? Or, failing that, can it at least help soothe the technological pains stemming from scalability issues?


If this is the first time you're reading about the blockchain trilemma and scalability issues, this is the right article series for you. The first chapter of this series, the one you are reading right now, will provide the basic information about layers - the blockchain building blocks. The second chapter will explain what the blockchain trilemma is, what struggles it creates for today's blockchain projects, and how a smart architecture that uses layers properly could play an important role in solving it for good. After getting a necessary background, the following chapters will take a more in-depth look at specific layers and blockchain scalability upgrades and features they could provide for a blockchain.


So let us start with the very basics.

Layers. As blockchain and crypto enthusiasts, you deal with them a lot.


These technological “wrappers” encapsulate protocols that act as basic building blocks in today's IT technology. And the same goes for blockchain.


This article sets out to give you a basic understanding of blockchain scalability basics and then provides a broader technological overview of the blockchain building blocks. To do this, we will draw on the analogy of a simplified model of a city.


Think of blockchain protocols as the infrastructure and laws of a city. Blockchain protocols keep the 'city' moving orderly, regulated, and streamlined. Real-world cities use their elements in various ways:

  • They dedicate streets, zones, and districts to specific functions or purposes.
  • They optimize the load on their individual parts by distributing their people via various types of city transport, such as cars, buses, trains, and others.


In very much the same way, the architecture of a blockchain project assigns certain technologies to different layers.


This similarity also works with expansion. Modern cities expand both horizontally and vertically to accommodate as many citizens as possible and to add functional variety - they are getting wider and taller. Then, the apex of efficient urbanization consists of skyscrapers and blocks of flats, which use the least space to house the most people and facilities.

image

By getting wider, the city can obtain new functionality and also ease the population load. This could be demonstrated, for example, by adding a new city part dedicated to Universities and student accommodation, the purpose of which is to create an area for smart people to operate and live in without overloading the main city traffic and accommodation capabilities.


On the same note, blockchains also tend to put something next to their basic architecture in the form of an addition to the basic layer, or by adding an additional layer to it, to satisfy the exponential growth of user transactions or add new capabilities, such as EVM compatibility to the world of Bitcoin that allows Bitcoin-based networks to utilize Solidity smart contracts.


And that's when, similarly to our city, our blockchains "get wider", which means the application of a side-chain that empowers the capability of a main chain and takes some of its data throughput burdens, while sharing the same ontological layer, Layer 1.

Main-chain and Said-chain connected by the bridge for bridging the main currency from the Main-chain to Side-chain

Main-chain and Said-chain connected by the bridge for bridging the main currency from the Main-chain to Side-chain


A main-chain and a side-chain connected by a cross-chain bridge while sharing the same technological layer is a scalability approach that should enhance the blockchain’s capacity. This approach is not the only thing that could be done to help a blockchain operate better. Adding more blockchain nodes to enhance blockchain effectiveness, such as scalability or throughput, is another way. When we are adding more units of the same meaning to a system with an intention to enhance its capabilities, we are talking about the concept of horizontal scaling.


  • An important meaning of "getting wider" may portend a modification of city rules. More citizens mean more peer-to-peer blockchain users; more users create higher demand for city traffic that could be analogized as possibilities of blockchain transactions. Higher demand for data broadcasted from point A to point B can result in a requirement for bigger blockchain blocks. While bigger blocks, which can be analogized as wider highways with additional driving lanes, can help process more traffic load, in a blockchain, this would be a matter of the number of blocks mined that goes hand in hand with the overall blockchain transaction throughput ability.


Getting taller, or expanding vertically, simply means better use of the space resources the city possesses. Something as a use of a “structure upgrade” that turns big city buildings into Empire State dimensions, the properties of which raise the accommodation function capabilities of the same city area by using the vertical dimension.


Then, the blockchain hardware, nodes and containers that enable the blockchain to run can be upgraded in a similar fashion. Here, we are not adding additional computers to do the same thing as with horizontal scaling but upgrading the current hardware layer to increase the system capabilities. When we are upgrading the hardware requirements to increase capability, we are talking about the concept of vertical scaling.


The difference between the Vertical and Horizontal model

The difference between the Vertical and Horizontal model


Both of these concepts, which came from the database development area, have their pros and cons, but their application in the context of decentralized networks brings additional trade-offs.


  • Scalability trade-offs and overall explanation will follow in the sequel of this article.


To illustrate the aforementioned concept in the simplest manner possible, let me quote Mr. Jonathan R. Brandt, from an interview for a  Cointelegraph article Vertical and Horizontal Blockchain Scaling, Explained:


“In crime-fighting, the Hulk scales vertically, and the Justice League scales horizontally. In Bitcoin, a mining server can be scaled vertically by increasing memory or upgrading its GPU, and it can be scaled horizontally by joining servers together.”



Even though the analogy of city elements with blockchain layers is not pitch-perfect, it is still surprisingly applicable because the blockchain and the structure of a city actually have much in common:


  • Both are systems that grow and evolve organically.
  • City streets, districts, and traffic can have their own tiers, which are part of the same layer; the same way cars, buses, and trains are part of the city traffic.
  • Both follow a set of simple core rules that determine the way they are projected, built, and the way they operate.
  • Both require infrastructure to be built on top of.

They have other similarities from which we can build our analogies:

  • City traffic as a blockchain project
    • Main-chain (L1) as the main ground network with a side-chain as a highway city circuit around the town (L1)
    • Amount of city traffic with the number of blocks mined and the number of people transported with the number of blockchain transactions.

Planning, architecting, and beyond

The base city layouts were originally planned and designed just for their initial years of existence, with some backdoor possibilities for further expansion or development if the population grows exponentially during a short period. After that, the way a city evolves is largely based on emergent conditions, such as populace migrations or work opportunities. Any strict planning happens primarily in reaction to these conditions.


The same also goes for blockchain projects. Each of them is designed to serve a certain purpose, solve a problem, and satisfy as many users as possible. However, everything has its limits, and the limits you are planning for may suddenly be surpassed significantly, for example, on account of mass adoption success. When such limits are reached or exceeded, an upgrade or extension of the current structure must be applied to prevent the system from transaction congestion or a system crash.


And that is what blockchain scalability solutions available in Layers 0 - 3 are for.


Two approaches to blockchain layers

There are two perspectives we need to be aware of while thinking about the layers of blockchain.

The first, more structural perspective consists of the blockchain architecture layers, while the second perspective describes the possible scalability solutions for a created blockchain taken from an ontological hierarchy point of view.

Perspective 1: The blockchain architecture

The first of these two perspectives views all blockchain building blocks that create the layered architecture of blockchain, categorized into five layers. A short description that summarizes these layers - from top to bottom:


Application and Presentation Layer- Layer on which smart contracts and application runs- Allows for communication between user devices front-end and the blockchain back-end


Consensus Layer- This layer runs the protocol that requires a certain number of nodes to verify one transaction. Therefore, every transaction is processed by multiple nodes that must then arrive at the same result and agree on its validity (Determinism - part 1)This framework:- Maintains the blockchain's decentralized nature as no node has sole control over any transactional data, and the role is distributed- Achieves unanimity of truth acceptance among the participating nodes- Establishes a clear set of agreements among nodes in the P2P network- Ensures that no single party has complete control over the blockchain network thanks to decentralization, and where only the heaviest or longest chain is followed


Network Layer- Also called the Propagation layer, is the platform for the inter-node communication where each node must be able to discover other nodes- It is a P2P framework designed for:-- allowing testing of the transaction data validity in the system's consensus   block creation, addition, and discovery


Data Layer- Transactions information is bundled and stored in the form of signed and verified blocks- Each subsequent block is linked to the previous blocks, which are connected with the first block ever mined, the Genesis block. This process is repeated every time a new block is added (Determinism - part 1)- Every transaction is digitally signed with the private key of the sender's wallet. Only the sender has access to this key, thus ensuring that the data can neither be accessed nor be tampered with by anybody else.


Hardware Layer- Equipment and systems that keep it running- Technological backbone allowing peer-to-peer connection of thousands of computers that request the data from each other- The computer in the blockchain is called a node, which is a piece of hardware that runs the client software and randomly verifies transaction data


Visualization

image
Blockchain architecture starts from its hardware/infrastructure layer, on top of which it builds additional layers. These, when combined, create a blockchain backbone.


  • Each of these layers has its meaning and a reason for being separated from the others.


The bottom three layers of the layered architecture create a separate layer from the perspective of the ontological hierarchy. This combined layer is called Layer 0 (L0).

L0 is a network framework running beneath the blockchain and is made up of protocols, connections, hardware, miners, nodes, and more that forms the foundation of the blockchain ecosystem. These components help to make blockchain a reality, and their technology allows Bitcoin, Ethereum, and other blockchain networks to function.


L1 encompasses the concepts of the base network and its underlying infrastructure. Here we can find a consensus, L1 protocols, and the main-chain and side-chain (if used) itself.


Perspective 2: The ontological hierarchy of the blockchain

This approach focuses on the possible scalability solutions for an already created blockchain.


image

  • The ontological hierarchy of blockchain will be covered in the later installment of this series.


So far, we’ve described five blockchain architectural layers that make up the fundamentals to run a blockchain. This allows us to take one step further to observe its functionality. The following two images summarize a general functionality approach and provide additional elements from each of the blocks below:

Blockchain building blocks

Blockchain building blocks



Primitives of blockchain technology

Primitives of blockchain technology


The final step we need to take in our blockchain exploration is to realize that blockchain, with all its layers we just described, stands on the shoulders of the internet. In keeping with the theme of this article, the blockchain is basically an additional internet layer.

Blockchain as an additional layer above the internet 

Blockchain as an additional layer above the internet 


As we see above, the functional Web would not exist without the Internet. Blockchain applications also need the Internet, but they can bypass the Web and give us, besides many other things, another version of the Web that is more decentralized and unique. This version of the Web is called Web3, and it is one of the biggest breakthroughs of blockchain technology. You can read about Web3 in the previous chapter of the academy.


To put it in simple terms, a blockchain stands on the pillars of the Internet, and it is because of internet layers that a blockchain has everything it needs to connect to nodes and communicate with blockchain miners, nodes, and peers.

Outro

But what are these layers anyway? Strictly speaking, a "layer" in a computer language is something that is built and runs based on the services provided by another, more basic, protocol. After all, that is how the IP protocol—one of the cornerstones of the internet—was originally designed.

For example, the network interface that is the basis of the physical communication of the internet is the layer that supports services for the IP layer. The IP layer is the basis for the TCP layer, and the TCP layer is the basis for the HTTP layer. So, two machines can communicate by HTTP protocol thanks to all the other layers below them.



As a final note, one of the essential elements of the blockchain is the Internet Protocol suite, commonly known as TCP/IP. Thanks to TCP/IP, the blockchain can operate on the Internet, and every single thing the blockchain does is based on TCP/IP. This functionality is identified as one of the blockchain Layer 0 parts.


The blockchain interaction with TCP/IP is like breathing—the service TCP/IP provides to a blockchain is like the oxygen our planet offers. Thanks to this gift of nature, provided to use with current abundance, we are allowed to reach our capabilities.


Many blockchains could be operable outside of TCP/IP. Still, similarly to a small population of humans who would be living on Mars in the near future, it would be extremely expensive on resources and currently ineffective. In the same way, humans who will try to live on Mars with scarce oxygen will have a harder style of life than on Earth with the oxygen abundance, a blockchain running without TCP/IP will be much less efficient.

Final thought

If we imagine the global interconnection as the wheel that propels the modern civilization forward, TCP/IP is like the pneumatic tire added to the wheel, bringing us from the age of the electrical telegraph to the age of the Internet.

Now, the blockchain promises to add yet another layer on top of the tire, which would enhance the wheel's functionality even further. Perhaps, if things go well, it could be like an anti-gravity harness, giving the oft-lumbering vehicle of humanity the chance to soar into the heavens.


The end


Did you enjoy reading this content? Head forward to Sovryn Wiki, where you can read more articles like this and study all previous episodes of Learn the Blockchain basics!


About Sovryn

  • Sovryn's Bitcoin-native protocol, already supported by users in 17 countries across the globe, advances financial sovereignty in a way that aligns with Satoshi Nakamoto's vision of a trustless, censorship-resistant, and peer-to-peer system of money. The founding team created the platform by expanding on proven technological advancements from Ethereum-based DeFi applications while improving on the known risk elements. The end result is a self-sustaining platform for trading, leveraging, and lending that runs on the Bitcoin-native RSK side-chain (RootStock).


react to story with heart
react to story with light
react to story with boat
react to story with money

Related Stories

L O A D I N G
. . . comments & more!