Original title:A beginner's guide to understanding the layers of blockchain technology
Original author:cointelegraph
Original author: H.Forest Ventures
Recommended reason:
Recommended reason:
Blockchains have different layered architectures to facilitate this unique way of authenticating transactions. Therefore, for blockchain researchers and enthusiasts, understanding the layering of blockchain is the basis for advanced research in the industry.
first level title
Understand the various layers of the blockchain
If you've researched cryptocurrencies or blockchains in any way, you've probably come across terms like layer one and layer two protocols. Are you curious about what these layers are and why they exist? Let us discuss blockchain layer architecture in this article.
Distributed ledger technology (DLT) stores cryptographically verified information among a group of users agreed through a predetermined network protocol without the oversight of a central authority. Bringing these technologies together can foster trust between people or parties who would otherwise have no incentive to do so. They enable blockchain networks to securely exchange value and data between users.
Due to the lack of a central authority, the blockchain must be very secure. They must also be extremely scalable to handle ever-increasing user, transaction and other data. Layers were born out of a need for scalability while maintaining top-notch security.
first level title
What is blockchain scalability?
The term "scaling" in blockchain technology refers to an increase in system throughput, measured in transactions per second. With the widespread adoption of cryptocurrencies in everyday life, the blockchain layer is now needed to improve network security, record keeping and other functions.
Blockchain is the first layer of a decentralized ecosystem. The second tier is a third-party integration used in conjunction with the first tier to increase the number of nodes and thus increase system throughput. There are many second-layer blockchain technologies currently being implemented. Smart contracts are used in these solutions to automate transactions.
As bitcoin becomes a more significant force in the business world, blockchain developers are trying to expand the scope of blockchain governance. They hope to reduce processing time and improve TPS by developing the blockchain layer and optimizing the second layer scalability.
first level title
The blockchain trilemma (trilemma)
The blockchain trilemma refers to the commonly held view that a decentralized network can only provide two of the three benefits at any given time, in terms of decentralization, security, and scalability.
Computer scientists devised the Consistency, Availability, and Partition Tolerance (CAP) theorem in the 1980s to express perhaps the most important of these difficulties. The CAP theorem states that decentralized data storage, such as blockchain, can only satisfy two of the above three guarantees at the same time.
In the context of the current distributed network, this theorem has evolved into the blockchain trilemma. The commonly held view is that public blockchain infrastructure must sacrifice security, decentralization, or scalability.
Therefore, the holy grail of blockchain technology is to create a network with impenetrable security on a widely decentralized network, while also handling Internet-scale transaction throughput.
Before delving into the dynamics of the trilemma, let’s define scalability, security, and decentralization in general terms:
Security refers to the ability to protect data on the blockchain from various attacks and the blockchain's defense against double spending.
Decentralization is a type of network redundancy that ensures that the network is not controlled by fewer entities.
The interplay between scalability, security, and decentralization.
picture
Now, assume that both proof-of-work blockchains have the same degree of decentralization, and consider security as the hashrate of the blockchains. Confirmation times decrease with increasing hashrate, while scalability increases with increased security. Therefore, scalability and security are commensurate with constant decentralization.
picture
As a result, the blockchain cannot be optimized for all three desired functions at the same time, forcing it to make trade-offs. This ethereum is the latest example of the trilemma. This summer saw a surge in usage of the Ethereum platform due to the rise of decentralized finance (DeFi) applications. Ethereum can only grow so far.
Due to increased demand, transaction fees have risen to the point where some people are unable to participate in the blockchain. The increased Ethereum fees are an example of the trilemma as we can see that Ethereum cannot scale without sacrificing security or decentralization.
The focus of Ethereum is decentralization and security, the number of transactions per second is limited (scalability). Users pay higher fees to encourage miners to prioritize their transactions. Likewise, decentralization and security take precedence over Bitcoin's scalability.
It is well known that the scalability of blockchains such as Bitcoin and Ethereum is currently limited. As a result, a global community of startups, corporations, and technologists is frantically researching layer-1 and layer-2 solutions to solve the blockchain trilemma.
Developers are approaching this problem from various angles. Bitcoin Cash (BCH) increased the block size to improve Bitcoin’s scalability, however, there is no evidence that it is becoming more popular.
Bitcoin is seeking to solve this problem by adding a layer on top of the existing blockchain layer. According to the idea behind scaling solutions, second-layer solutions bundle together a large number of transactions and only occasionally query the base-layer blockchain. Ethereum is taking a hybrid approach to scaling the base-layer blockchain through sharding, and the community is looking forward to several second-layer solutions to further increase throughput.
first level title
In a distributed network of blockchain architectures, each network participant maintains, authorizes and updates new entries. A collection of blocks with transactions in a specific order represents the structure of blockchain technology. These lists can be saved as flat files (txt format) or simple databases. Blockchain architectures can be public, private or consortium.
The layered architecture of the blockchain is divided into six layers.
picture
hardware infrastructure layer
The contents of the blockchain are stored on servers in a data center somewhere on this lovely planet. Clients request content or data from application servers while browsing the web or using any application, this is known as client-server architecture.
Clients can now connect and share data with peer clients. A peer-to-peer (P2P) network is a large group of computers that share data. A blockchain is a peer-to-peer computer network that calculates, verifies and records transactions in an orderly fashion on a shared ledger. As a result, a distributed database is created, storing all data, transactions and other related data. Nodes are computers in a P2P network.
data layer
The data structure of the blockchain is represented as a list of blockchains in which transactions are ordered. The data structure of the blockchain consists of two basic elements: pointers and linked lists. A linked list is a list of linked blocks that contain data and pointers to the previous block.
A pointer is a variable that refers to the location of another variable, and a linked list contains data and a pointer to the previous block. A Merkle tree is a binary tree of hashes. Each block contains information such as the root hash of the Merkle tree and the hash of the previous block, timestamp, nonce, block version number, and current difficulty target.
To protect the security and integrity of the data contained in the blockchain, transactions need to be digitally signed. The private key is used to sign transactions, and anyone with the public key can verify the signer. Digital signatures detect information manipulation. Because the encrypted data is also signed, the digital signature ensures identity. As a result, any manipulation will invalidate the signature.
Network layer
The data cannot be found because it is encrypted. Even if caught, it can no longer be tampered with. The identity of the sender or owner is also protected by a digital signature. Therefore, a signature is legally connected to its owner and cannot be ignored.
The network layer, often referred to as the P2P layer, is responsible for communication between nodes. Discovery, transactions, and block propagation are all handled by the network layer. Propagation layer is another name for this layer.
consensus layer
The consensus layer is critical to the existence of a blockchain platform. The consensus layer is the most necessary and critical layer in any blockchain, be it Ethereum, Hyperledger or other blockchains. The consensus layer is responsible for validating blocks, ordering them and ensuring everyone agrees.
application layer
picture
application layer
The blockchain network acts as the backend technology for these applications, and they communicate with it through APIs. Smart contracts, underlying rules, and chaincode are all part of the execution layer.
first level title
layer 0
layer 0
level one
Blockchain layer zero consists of components that help make blockchain a reality. It is the technology that allows Bitcoin, Ethereum, and other blockchain networks to function. Tier 0 components include the Internet, hardware, and connectivity that will enable Tier 1 to function smoothly.
level one
This is the base layer, whose security is based on its immutability. The Ethereum network or Layer 1 is what people are alluding to when they say Ethereum. This layer is responsible for the consensus process, programming language, block times, dispute resolution, and rules and parameters that maintain the basic functionality of the blockchain network. It is also known as the implementation layer. Bitcoin is an example of a layer 1 blockchain.
Level 1 Questions
These scaling solutions, when used together, increase the throughput of the network. However, as the number of blockchain users increases, the first layer seems to be insufficient. The outdated and clumsy proof-of-work consensus process is still used on layer 1 blockchains.
While this method is more secure than other methods, it is limited by speed. Miners need to use computing power to solve cryptographic algorithms. Therefore, more computing power and time are required in the long run. Furthermore, as the number of users increases, so does the workload of the layer-1 blockchain. As a result, processing speed and capacity are slower.
Proof of Authority is another consensus that Ethereum 2.0 will adopt. This consensus method authenticates new blocks of transaction data against the collateral of network participants, resulting in a more efficient program.
Second floor
Sharding is a scaling solution to the burden of layer one blockchain problems. Simply put, sharding divides the task of validating and validating transactions into smaller, more manageable chunks. Thus, workloads can be distributed across the network to use the computing power of more nodes. Since the network processes these shards in parallel, multiple transactions can be processed sequentially and simultaneously.
Second floor
Overlay networks on top of the base layer are called L2 solutions. The protocol leverages the second layer to increase scalability by removing some interactions from the base layer. Therefore, smart contracts on the main blockchain protocol only handle deposits and withdrawals, and ensure compliance for off-chain transactions. Bitcoin's Lightning Network is an example of a second-layer blockchain.
So, what is the difference between layer 1 and layer 2 blockchains? Blockchain is the first layer of a decentralized ecosystem. The second tier is a third-party integration used in conjunction with the first tier to increase the number of nodes and thus increase system throughput. There are many second-layer blockchain technologies currently being implemented.
Layer 2 Scaling Solutions
Layer 2 protocols have exploded in popularity in recent years, especially as they have proven to be the most effective solution to the scaling problem of PoW networks. The following sections explain various second layer scaling solutions.
nested blockchain
Nested second layer blockchains run on top of one another. Essentially, the first layer establishes the setting while the second layer does the programming. On a single main chain, there may be multiple blockchain layers. Think of it as a typical business structure.
Rather than having one person (e.g. a manager) do all the work, management delegates tasks to subordinates who then report back to management when they are done. As a result, administrator workload is reduced while scalability is increased. For example, the OMG Plasma project acts as a secondary blockchain to the Ethereum primary protocol, allowing for cheaper and faster transactions.
state channel
Rather, it is a network-adjacent resource secured through multi-signature or smart contract mechanisms. When a transaction or batch of transactions completes on a state channel, the final "state" of the "channel" and all its inherent transitions are published to the underlying blockchain.
side chain
Examples of state channels include Bitcoin's Lightning Network and Ethereum's Raiden Network. In a trilemma, state channels give up some decentralization in exchange for higher scalability.
side chain
Sidechains are chains of transactions that run alongside the blockchain and are used for bulk transactions. Sidechains have their consensus methods that can be tuned for speed and scalability, and utility tokens are often used as part of the data transfer mechanism between the sidechain and the mainchain. The main function of the main chain is to provide general security and dispute resolution.
summary
Rollups are a layer-2 blockchain scaling solution that executes transactions outside of the layer-1 network and then uploads the data from the transactions to the layer-2 blockchain. The first layer can keep the summarization safe because the data resides on the base layer.
picture
the third floor
The application layer is often referred to as Layer 3 or L3. L3 items act as the user interface while masking the technical aspects of the communication channel. L3 applications give blockchain applicability in the real world, as explained in Layered Structure of Blockchain Architecture.
The problems faced by distributed data storage that lead to blockchains are passed on to blockchains. To better understand these difficulties and related issues, the term "blockchain trilemma" was coined to group them. Although the term "trilemma" still exists, the blockchain trilemma is just a conjecture. This hypothesis may have been accurate based on earlier data, but it has neither been proven nor disproved. Although layer 1 and layer 2 solutions have had some success, more research needs to be done.
in conclusion
first level title
in conclusion
One of the reasons blockchain businesses are unlikely to adopt cryptocurrency mainstream right now is scalability. As the demand for cryptocurrencies grows, so will the pressure to scale blockchain protocols. Because both blockchain levels have their own limitations, the ultimate solution will be to develop a system that can solve the scalability trilemma.
The first layer is crucial as it is the foundation of the decentralized system. The scalability problem of the underlying blockchain is solved through the second layer protocol. Unfortunately, most Layer 3 protocols (DApps) currently only operate on Layer 1, bypassing Layer 2. It's no surprise that these systems didn't work as well as we wanted them to.
Layer 3 applications are critical as they help develop real-world use cases for blockchain. However, they will not capture as much value as their underlying blockchains compared to traditional networks.
Translator's note:
In-depth speaking, the blockchain structure has a total of 5 layers, which are data layer, network layer, consensus layer, incentive layer and application layer. With the rapid rise of smart contracts on Ethereum, the blockchain system has established a new structure: that is, a contract layer is added between the incentive layer and the application layer. However, due to the trilemma of the blockchain, scalability has always been an insurmountable problem. As more and more users enter the blockchain, more layers may be introduced into the structure.@Forest_Ventures
Follow us:H.Forest
Our twitter:
