A Beginner’s Guide To Understanding The Layers Of Blockchain Technology 2022
If you are interested in investing in the cryptocurrency market, you may have heard the term blockchain quite a bit, but what does it mean? Understanding the layers of blockchain technology is essential if you want to invest securely and effectively in cryptocurrency trading.
In this beginner’s guide to understanding the layers of blockchain technology, we’ll break down what blockchains are made up of and how they work together and explore some of the different types of blockchains.
Understanding The Layers Of The Blockchain
When you first learn about blockchain, it is often presented as a thing, a digital ledger that records cryptocurrency transactions. However, blockchain is much more than that. A blockchain is an encrypted database (called a laser) that can transparently store any information, and anyone with access to the Internet can access it.
The chain part refers to how each transaction links back to prior ones and must be verified cryptographically before being recorded on the blockchain, which involves running a mathematical algorithm.
A benefit of doing things this way is that there is no central database for hackers or malicious actors to attack. This distributed approach makes cryptocurrencies much less vulnerable because there’s no single server for cybercriminals to attack or target.
What Is Blockchain Scalable?
Scalability refers to how well a blockchain performs as its networks grow. The bitcoin and Ethereum blockchains have demonstrated linear scalability, i.e., as new nodes join the network, performance remains consistent across time.
More specifically, adding a single node (or, in practice, 10-20 nodes) does not change bandwidth requirements for either blockchain; more extensive networks result in shorter propagation times for each transaction.
Therefore, there is no theoretical limit on their scalability; more users increase through-put but not computation or storage requirements per user.
As such, it is expected that further research will be done on the use of cryptography to enhance decentralization/scalability without sacrificing through-put capability or security.
Several projects are working on layer two solutions to increase speed and privacy without compromising decentralization. These include Raiden Network, Lightning Network, TumbleBit, ZeroLink, etc.
This section provides an overview of critical concepts in cryptography related to blockchain technology: public-key cryptography, hashing algorithms, digital signatures, and zero-knowledge proofs. A basic understanding of cryptography is essential for anyone looking to work with blockchain technology.
It is important to note that all blockchains are different, and thus it is impossible to discuss general properties that apply across all blockchains.
The Bitcoin protocol has some unique features not found in any other blockchain; likewise, many other blockchains have special features not found in Bitcoin. For example, Ethereum uses a proof-of-work consensus algorithm while Hyperledger Fabric uses a Byzantine fault-tolerant consensus algorithm (see Glossary).
However, some general cryptographic principles apply across most blockchains, including Bitcoin and Ethereum, and protocols built on tops such as Counterparty or Omni Layer.
The Blockchain Trilemma
Blockchain architecture is a modern-day technology that poses many questions. One question is, how will blockchains scale with transaction volume? The simple answer is they won’t, at least not without changing their architecture.
How they change their architecture, or whether they do at all, will determine what sorts of future blockchains have in store for us. That’s because there’s a tradeoff between scaling transactions and security. Call it what you want: a trilemma, a request, or just hard decisions;
Here are three options for blockchain architectures moving forward:
Each has its benefits and drawbacks, so let’s look at each option individually.
What Is Side-Chain-Based Scalability?
What if we didn’t make any changes to existing blockchain architecture by using side chains instead. Essentially, we would allow users to transact on their main chain while periodically committing those transactions onto another chain.
When everyone wants instant confirmations, we could process all these transactions using as little computing power as possible onto either individual miners or nodes working in tandem, similar to mining pools.
Also, this would give us a lot more room for expansion but at what cost? Sidechains are susceptible to double-cost attacks because they are not protected by Proof of Work (PoW).
To prevent double spending, there needs to be some central authority that monitors and verifies every single transaction, which means we’re back to where we started with banks and financial institutions. Not exactly an ideal situation but one that can be remedied through some change.
What Is Sharding-Based Scalability?
Sharding divides up data across multiple servers so that each server only has partial information about the network as a whole. In other words, instead of having one giant database for every node on a blockchain, we have many smaller databases (shards), and each node can only see its piece of information.
The idea here is that if we split up all our transactions into different fragments, we can process them in parallel, which will allow us to scale our transaction volume significantly.
However, there are two problems with sharding:
- It’s challenging to implement
- It’s challenging to maintain security when you have many small pieces of data because they become easier targets for hackers.
What Is Plasma-Based Scalability?
Plasma is an off-chain scaling solution that uses child chains. The idea is to keep our main chain relatively small by moving as many transactions as possible onto child chains.
Also, this will allow us to scale transaction volume significantly while keeping our main chain relatively small and secure. Also, If you’re interested in learning more about how plasma works, check out their website.
What Are Some Other Options for Scaling Blockchains?
There are a few other solutions that don’t necessarily fall into any one category but could still be viable ways of scaling blockchains:
- Delegated Proof-of-Stake (DPoS),
- Payment channels.
What is delegated proof-of-stake? DPoS is an alternative consensus mechanism that Bitshares first introduced. It works by allowing users to vote on delegates responsible for validating transactions.
The more votes you have, the more likely you will be selected as a delegate which means you can earn money from transaction fees.
The Interplay Among Scalability, Security, And Decentralization
Because blockchains have many different use cases, there are often several tradeoffs among scalability, security, and decentralization.
Take Bitcoin as an example: when greater decentralization is desired (i.e., more people participate in maintaining consensus), the block size must be smaller, which slows down transaction verification and makes maintaining an entire node more expensive.
For Ethereum, scaling can come at the cost of some security; indeed, larger blocks make it easier for miners to conduct 51% attacks on lesser-secured Proof-of-Work chains.
Scalability, security, and decentralization all play essential roles in determining how valuable a particular blockchain will be. The key takeaway is that developers need to consider each project’s tradeoffs.
Deciding which features to prioritize depends on what you’re trying to build with your blockchain. Also, this is where considering each layer of your blockchain comes into play. While you might start by creating a private or consortium blockchain, keep in mind that you may want to expand your chain later if demand increases.
Thus, designing from the ground up with multiple layers could help you accommodate future growth.
Layer 3 blockchain projects focus on solving real-world problems using existing infrastructure, while layer 0 projects aim to tackle foundational challenges like governance, identity management, and interoperability.
Layer 1 solutions generally refer to cryptocurrencies like Bitcoin or Ethereum that use intelligent leverage contracts, while layer two solutions refer to decentralized exchanges built atop those cryptocurrencies.
The Layered Structure Of The Blockchain Architecture
From top to bottom, we have layer 0 (the physical layer), layer 1 (the data link layer), layer 2 (the network layer), and finally, layer 3, our fully functional blockchain. Many projects focus on each layer, so I like to refer to them as blockchain projects.
Think about it for a second: A project that focuses on making blockchains faster focuses on a layer one solution. One which provides support for decentralized applications focuses on a layer two solution. And so forth.
Hardware Infrastructure Layer:
Bitcoin, Ethereum, and other cryptocurrencies have been mainly regarded as a medium for value transmission.
While transacting with bitcoin and ether may not be easy right now, transactions are still confirmed in real-time due to their decentralized nature, nearly instantaneously and free of charge. What about transactions involving other digital assets? Well, some problems need solving first.
They fall under what we’ll call layer 0 blockchain projects (which is still on top of all these other layers). Transactions about layer 0 blockchain projects can be grouped into two broad categories: exchanges and applications/operating systems.
The data layer is responsible for storing transaction, identity, and intelligent contract information. Smart contracts are applications that run on a network using its native token as payment. Because of these incentives, they are maintained by a distribution community rather than a centralized authority.
Also, this is significant because it allows decentralized applications (dApps) to function autonomously without having to rely on external parties.
Once entered, the data stored in a blockchain cannot be changed or tampered with, so smart contracts can be trusted to be implemented exactly as they have been. dApps often use tokens created in an ICO to allow users to access their platform; Therefore, they must store enough information about these tokens so that users can transact on their platform.
Apps may also need access to sensitive user data like medical records or financial statements. Many blockchains have built-in privacy features such as encryption or zero-knowledge proofs, which prevent sensitive user data from being exposed publicly. However, some platforms choose not to include these features and leave them up to developers who build on top of their protocol.
The network layer is responsible for transporting information from point A to point B. That usually means moving transactions and blocks from node to node in a distributed network in blockchains.
Also, this is where IPFS comes into play. IPFS describes itself as a peer-to-peer hypermedia protocol. That might not sound very easy, but all it means is that it helps computers access and transfer files over a peer-to-peer (P2P) network.
There are two main types of P2P networks: distributed file systems, which distribute storage evenly across nodes, and content distribution networks (CDNs), which deliver files quickly over high bandwidth connections. It’s worth noting that other blockchain projects use similar technology.
Stellar, for example, uses a system called the federated Byzantine agreement (FBA). FBA is interesting because it proves data integrity by reaching a consensus on conflicting data—much like how Wikipedia reconciles conflicting edits on its pages. It’s more complex than traditional blockchain technology but also more secure.
The consensus layer is a way for nodes of a blockchain network to make any transaction valid and should be added to that specific blockchain. It’s not just about validation; it’s also about deciding on shared states.
For example, every 10 minutes, Bitcoin miners worldwide compete to validate a block of transactions and add it to Bitcoin’s global ledger (the blockchain). In turn, all other users get updated once new blocks are added.
Also, this ensures that no one can tamper with historical records and makes sure everyone agrees on what exists. As long as more than half of these miners keep working on adding new blocks to Bitcoin’s blockchain, there will never be any discrepancies. So how does consensus work? There are two main approaches: Proof-of-Work and Proof-of-Stake.
In Proof-of-Work systems, nodes have to solve complex mathematical problems to create new blocks. These problems need a lot of computing power, so there has to be some incentive involved if you want people—in our case, miners—to do all that heavy lifting for you!
The blockchain can be used for more than just transferring value, and it can also be used as a platform for building decentralized applications. The most common example is a decentralized file storage system like Sia. When you use Sia’s network to store files, you are putting your trust in them like a centralized service.
If they do something unethical with your data, there is no way for you to change or stop them (although several projects like Story are trying to address that). With Sia, however, because it is built on top of the blockchain, there is an immutable record-keeping system in place that prevents anyone from tampering with or changing data and keeps both hosts and renters accountable.
Blockchain layers explained:
The network in which Bitcoin lives is an example of a blockchain. But there are other blockchains as well. Some existing blockchains—like Ethereum—have been created with specific purposes in mind.
Other blockchains like Openchain and Hyperledger are open-source platforms designed for anyone to create or join their own. The relationships between these blockchains can be complicated, but luckily, there’s always someone ready to distill things down into bite-sized chunks.
The Mechanics of a Blockchain (How Does It Work?) Every blockchain works the same way, with different technical implementations on each layer:
1. Data is gathered into blocks using a cryptographic hash function and transaction information.
2. Hashes are chained together, forming a blockchain.
3. Unions need validation by miners who contribute CPU power to solve computational puzzles before accepting them into the blockchain.
4. The miner who solves one puzzle receives some bitcoin as compensation for their service in validating transactions and securing blockchains with their computing power. Finally, after enough time has passed that all transactions have been validated and confirmed by multiple nodes in a network, new blocks get added to their respective chains.
Peer-to-Peer Network: The decentralized peer-to-peer network is where all peers, or nodes, come together. Peers send and receive transactions as well as block information from each other. Nodes are incentivized to maintain a copy of that blockchain with small amounts of cryptocurrency tokens Bitcoin or Ethereum).
These token rewards serve as an incentive for peers to maintain copies of that blockchain and continue participating in that decentralized network.
The Lightning Network is a Bitcoin-based protocol for making micropayments in real-time. It can be thought of as an extension to the Bitcoin blockchain that provides instant transactions between participating nodes. It uses smart contracts for dispute resolution and relies on game theory incentives for non-cooperative nodes to remain honest.
Consensus and peer-to-peer network: Blockchain is a consensus mechanism in layman’s terms. Every node in a blockchain network has its copy of the shared ledger, which is updated automatically by participating nodes when there are transactions.
Since no single entity controls the updates made to all copies, it ensures that every transaction added or removed from any copy of the ledger is approved by all participants before it gets added.
Thus, blockchain brings distributed databases (decentralized) into existence as every node maintains an identical database and updates it with new entries safely and securely without fail (preventing double-spending).
Can The Blockchain Trilemma Be Solved?
One of the most significant issues facing blockchain technology is hard to change. And not just a little bit difficult—so complex that many even say it can’t be changed at all. If you want something changed, you have two options: wait for someone else to make it happen or do so yourself.
Some people see one or both of these as weaknesses and believe there is no way blockchain technology will be widely adopted, but others believe solving these problems will take time and should be expected.
They also think that focusing on fixing them is more productive than worrying about them. Regardless of which side you fall on, being aware of these issues is essential if you plan to get involved with blockchain technology.
The Ethereum network underwent its first hard fork after an attacker exploited vulnerabilities in smart contracts. The attack caused $50 million worth of Ether coins (the native cryptocurrency used by Ethereum) to be stolen from several accounts controlled by Decentralized Autonomous Organizations (DAOs).
In response, members of Ethereum’s community implemented changes that prevent similar attacks from happening again. The resulting hard fork was primarily supported by users, miners, and exchanges alike. Afterward, however, some were concerned about how easy it was for changes like these to occur in future situations when consensus isn’t reached across such a large group.