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.
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:
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.
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.
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.
Getting taller, or expanding vertically, simply means a better use of the space resources the city possesses. Something as a use of a “structure upgrade” that turns big city buildings to Empire State dimensions, the properties of which raises the accommodation function capabilities of the same city area by using the vertical dimension.
Then, the blockchain hardware, nodes and containers that enable 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.
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.
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:
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 with 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.
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.
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
Consensus Layer
Network Layer
Data Layer
Hardware Layer
|
These descriptions than can be wrapped to create the following structure of a basic architecture:
Blockchain architecture starts from its hardware / infrastructure layer, on top of which it builds additional layers. These, when combined, create a blockchain backbone.
The bottom three layers from 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.
This approach focuses on the possible scalability solutions for an already created blockchain.
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:
These blocks can then be furtherly divided into the following subsections:
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.
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.
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.
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