Experiment No.
– 9
Date of Performance: 17/04/2025
Date of Submission: 17/04/2025
Documentation Viva Experiment
Program Execution (06) Sign with Date
(01) (03) Total (10)
Experiment No. 9
Study on Blockchain Scalability Solution
9.1 Aim: To study and analyze various blockchain scalability solutions, including Layer 1 and
Layer 2 approaches,
9.2 Course Outcome: Describe and demonstrate public and private blockchains.
9.3 Learning Objectives:
● To identify and differentiate between Layer 1 and Layer 2 scalability solutions in
blockchain technology, along with their technical implementation and use cases.
9.4 Requirement:
9.5 Related Theory:
Layer 1 (On-Chain) Scalability Solutions
Layer 2 (Off-Chain) Scalability Solutions
9.5 Related Theory :
Layer 1 (On-Chain) Scalability Solutions
Layer 1 scalability refers to changes made to the core blockchain protocol to improve its
performance without relying on external frameworks or additional layers. These are also
called “on-chain” solutions because they involve modifications directly applied to the
blockchain’s consensus rules, transaction processing mechanisms, or infrastructure.
1. Consensus Mechanism Improvements
One of the most effective ways to scale Layer 1 is through optimizing the consensus
mechanism. Traditional Proof of Work (PoW) protocols, like those used in Bitcoin, are
secure but slow and energy-intensive. Ethereum’s transition to Proof of Stake (PoS)
with Ethereum 2.0 is a major Layer 1 scalability milestone. PoS removes the need for
mining by selecting validators based on the amount of crypto they "stake." This
drastically improves transaction throughput and reduces energy consumption.
Other consensus models include:
● Delegated Proof of Stake (DPoS) (used in EOS): Offers faster block times and
higher throughput by allowing users to vote for a small number of delegates to
validate transactions.
● Practical Byzantine Fault Tolerance (PBFT): Often used in permissioned
blockchains like Hyperledger Fabric.
2. Block Size and Interval Adjustments
Increasing the block size allows more transactions to be included per block. Bitcoin
Cash, for example, increased the block size from 1 MB (Bitcoin) to 32 MB. Similarly,
reducing the block interval (time between blocks) also improves throughput. However,
larger blocks and shorter intervals increase storage and network bandwidth demands,
potentially centralizing the network to those who can afford better hardware.
3. Sharding
Sharding is a groundbreaking Layer 1 technique where the entire network is split into
smaller units called “shards,” each capable of processing transactions and smart
contracts independently. This allows multiple transactions to be processed
simultaneously rather than sequentially. Ethereum plans to implement sharding
post-Ethereum 2.0 as a key strategy to scale to thousands of transactions per second.
Each shard maintains its own data, reducing the storage burden on individual nodes.
Periodically, the shard data is reconciled with the main chain. A central beacon chain
manages the overall synchronization and validator coordination across shards.
Challenges with Sharding:
● Cross-shard communication is complex and introduces latency.
● Security is a concern as shards could become easier to attack if not enough
validators are allocated.
● State Execution Conflicts might arise if two shards need to interact frequently.
4. State Pruning and Light Clients
Another strategy involves reducing the amount of state data nodes must store.
“Pruning” removes old transaction data while maintaining the most recent state. Light
clients only store block headers, allowing faster syncing and lower resource usage.
' Layer 2 (Off-Chain) Scalability Solutions
Layer 2 solutions are protocols that operate on top of Layer 1 blockchains to improve
scalability and speed while retaining the base layer’s security. These protocols process
most activity off-chain and post minimal data to the main chain.
1. State Channels
State channels allow participants to transact off-chain by locking a portion of blockchain
state into a multisignature contract. Transactions between users are fast, private, and
free of fees. Once they’re done, the final state is broadcast to the main chain. Examples
include Bitcoin’s Lightning Network and Ethereum’s Raiden Network.
Advantages:
● Near-instant transactions.
● Reduced on-chain congestion.
● Privacy due to off-chain execution.
Limitations:
● Channels must be pre-funded.
● Limited to known counterparties.
● Channel closure must be done on-chain.
2. Rollups
Rollups bundle (or “roll up”) hundreds of transactions off-chain and post them as a
single transaction to the Layer 1 chain. There are two primary types:
a) Optimistic Rollups
They assume transactions are valid by default and include a challenge period during
which anyone can dispute incorrect computations. If no fraud is proven within this
period, the transaction batch is accepted.
Examples: Optimism, Arbitrum
b) ZK (Zero-Knowledge) Rollups
These use cryptographic proofs (zk-SNARKs or zk-STARKs) to prove the correctness of
off-chain transactions. These proofs are small and quick to verify, ensuring high security
with very low data usage on-chain.
Examples: zkSync, StarkNet
Rollups are promising because:
● They significantly increase TPS (Transactions Per Second).
● Reduce gas fees.
● Preserve security guarantees by anchoring data on Layer 1.
3. Sidechains
A sidechain is an independent blockchain that runs in parallel to the main chain and
communicates with it via a bridge. Polygon is a well-known example for Ethereum.
Users move assets between Ethereum and Polygon through a bridge contract. Unlike
rollups, sidechains maintain their own security and consensus.
Pros:
● Full flexibility in design and governance.
● High scalability.
Cons:
● Security depends on the sidechain's consensus mechanism, not the main chain.
● Bridges can be points of vulnerability.
' Hybrid Approaches and New Architectures
The blockchain ecosystem has evolved beyond classic Layer 1 and Layer 2 solutions
into novel architectures that challenge traditional block-based models.
1. DAG-Based Structures
Directed Acyclic Graphs (DAGs) are emerging as a revolutionary alternative to chains.
In DAGs, each transaction is linked to multiple previous ones rather than forming a
single linear chain.
Key Examples:
● IOTA (Tangle): Designed for IoT, IOTA allows each new transaction to confirm
two previous ones.
● Fantom (Lachesis protocol): Uses DAG for asynchronous byzantine fault
tolerance (aBFT).
Benefits:
● Near-infinite scalability.
● Fast and fee-less transactions.
● Suitability for microtransactions and IoT.
Drawbacks:
● Complex synchronization.
● Less mature security models.
● Adoption and development tools still evolving.
2. Layer 0 / Modular Blockchains
Layer 0 protocols like Polkadot and Cosmos aim to interconnect multiple blockchains
(interoperability). These protocols offer foundational services such as consensus and
networking, allowing custom chains to plug in with specific use cases.
Modular blockchains like Celestia decouple execution, consensus, and data availability
layers. Developers can build highly customized and scalable systems by choosing
best-in-class modules for each function.
Pros:
● High flexibility.
● Enables chain specialization (e.g., app-specific blockchains).
● Better network coordination.
Cons:
● Complex architecture.
● Cross-chain communication latency.
' Comparison of Solutions (Summary)
Feature Layer 1 Layer 2 Hybrid / New
Architectures
Approach Direct protocol Built on top of base Rethink or combine
upgrades layer layers
Examples Ethereum 2.0, Polygon, Lightning, IOTA, Fantom, Polkadot,
Bitcoin Cash zkSync Cosmos
Scalability Moderate High Very High
Finality Medium Fast Varies
Speed
Security Strong Inherits from Layer 1 Varies by design
Flexibility Low High Very High
Complexity High Moderate Very High
9.6 Conclusion
Scalability is one of the most critical challenges facing blockchain technology
today. Without efficient scaling, blockchains risk becoming bottlenecks rather
than enablers of innovation. This experiment explored the landscape of
scalability solutions by dissecting the architecture, methods, and trade-offs of
Layer 1 (on-chain), Layer 2 (off-chain), and hybrid/new architectural
approaches.
Layer 1 solutions, such as consensus upgrades, sharding, and pruning, aim to
enhance the blockchain’s core capabilities. These improvements are essential
but inherently constrained by the Blockchain Trilemma, which states that
decentralization, security, and scalability cannot all be fully achieved at once.
Layer 1 changes often require hard forks, are complex to coordinate, and may
slow down due to their decentralized governance processes.
Layer 2 solutions offer a more agile alternative by offloading transactional
computation from the main chain, thereby enhancing scalability while preserving
the underlying security guarantees of Layer 1. Technologies like state channels,
rollups (both optimistic and ZK), and sidechains provide higher throughput and
lower fees. Among these, ZK-rollups are especially promising for
enterprise-level adoption due to their strong security and data integrity features.
However, Layer 2 approaches add complexity, require robust bridging
mechanisms, and are not universally applicable to all use cases.
Hybrid and alternative architectures go a step further by reimagining
blockchain structure itself. DAG-based models, Layer 0 interoperability platforms,
and modular blockchains offer next-generation scalability through architectural
innovations. These solutions are forward-looking, adaptable, and suitable for
specific environments like IoT or inter-chain communication. While these models
promise high throughput and flexibility, they are still evolving and face adoption,
interoperability, and standardization hurdles.
In conclusion, no single solution universally addresses all aspects of blockchain
scalability. Instead, a multi-layered, modular approach appears to be the most
effective path forward. By combining Layer 1 robustness with Layer 2 agility and
hybrid architecture innovation, blockchain systems can inch closer to achieving
high scalability without sacrificing security or decentralization. The choice of
scalability method must be tailored to specific use cases, network goals, and
user needs. Understanding these layers and their implications is essential for
architects and developers seeking to build the next generation of scalable,
secure, and decentralized applications.
9.7 Review Questions based on Experiment
1. What is the Blockchain Trilemma, and how do scalability solutions
attempt to address it?
The Blockchain Trilemma, proposed by Vitalik Buterin, refers to the challenge of
achieving three core objectives simultaneously in a blockchain system: scalability,
security, and decentralization. Traditional blockchains like Bitcoin and Ethereum
typically optimize for two out of the three—ensuring security and decentralization—while
sacrificing scalability. This leads to slower transaction speeds and high fees during peak
demand. Scalability solutions aim to balance the trilemma by optimizing the trade-offs.
Layer 1 solutions (like sharding and PoS) attempt to scale the base protocol while
maintaining security and decentralization. Layer 2 solutions (like rollups and state
channels) scale transactions off-chain, thereby preserving the underlying network's
security. Hybrid approaches, including DAGs and modular architectures, explore
fundamentally new designs to overcome these limits. While no single solution
completely solves the trilemma, combining techniques from multiple layers can help
blockchains achieve better overall performance.
2. Compare and contrast Layer 1 and Layer 2 scalability solutions
with suitable examples.
Layer 1 scalability solutions modify the blockchain’s core protocol to improve
throughput. Examples include Ethereum 2.0, which uses Proof of Stake and sharding,
and Bitcoin Cash, which increased block size for more transactions per block. These
solutions enhance the base network's capacity but often require complex upgrades and
consensus among network participants. In contrast, Layer 2 solutions operate on top
of the main blockchain, processing transactions off-chain and only settling summaries
on-chain. Examples include Polygon (a sidechain for Ethereum) and zkRollups, which
batch multiple transactions with cryptographic proofs. While Layer 1 changes enhance
fundamental performance, Layer 2 offers flexibility, quicker deployment, and lower
fees without altering the base protocol. However, Layer 2 security depends on the Layer
1 it anchors to. In practice, both layers are complementary—Layer 1 provides security
and decentralization, while Layer 2 focuses on scaling and usability.
3. Explain how rollups work and distinguish between optimistic and
ZK rollups.
Rollups are Layer 2 solutions that bundle or “roll up” multiple off-chain transactions into
a single on-chain transaction, reducing congestion and gas fees. They maintain security
by anchoring transaction data to the main chain. There are two main types: Optimistic
Rollups and Zero-Knowledge (ZK) Rollups. Optimistic Rollups assume all
transactions are valid and include a challenge period during which fraudulent claims
can be contested. Examples include Arbitrum and Optimism. On the other hand,
ZK-Rollups use cryptographic proofs (zk-SNARKs or zk-STARKs) to validate
correctness before submitting the batch to the main chain. Examples include zkSync
and StarkNet. ZK-Rollups offer faster finality and higher security, but are more
complex to implement. Optimistic Rollups are simpler but have a delay due to the
challenge window. Both offer significant scaling benefits and are vital in Ethereum's
scaling roadmap.
4. What are the advantages and limitations of Sharding as a Layer 1
scalability solution?
Sharding is a Layer 1 solution that improves scalability by dividing the blockchain
network into smaller units called shards. Each shard processes its own set of
transactions and smart contracts, which allows for parallel transaction processing,
significantly increasing throughput. It reduces the load on each node, enabling more
lightweight participation and potentially improving decentralization. Sharding is a core
part of Ethereum 2.0’s roadmap, enabling the network to scale to thousands of
transactions per second. However, it also introduces challenges. Cross-shard
communication can be complex and slow, and improper validator allocation may lead
to shard takeovers or security vulnerabilities. There’s also the challenge of
maintaining consensus and data consistency across shards. Despite these
limitations, sharding offers a strong balance between scalability and decentralization if
implemented carefully with robust inter-shard mechanisms and a secure beacon chain
to coordinate shards.
5. Why are DAG-based architectures considered promising for
blockchain scalability, and what are their key differences from
traditional blockchain structures?
DAG-based architectures (Directed Acyclic Graphs) represent an innovative
alternative to traditional blockchains. Instead of a linear chain of blocks, DAGs allow
transactions to be linked in a graph where each transaction validates one or more
previous ones. This structure enables parallel processing of transactions, resulting in
high throughput and low latency—ideal for applications like IoT and micro-payments.
Projects like IOTA (Tangle) and Fantom (Lachesis) use DAGs to eliminate miners and
reduce transaction fees. Compared to traditional blockchains, DAGs don’t rely on blocks
or long confirmation times. Transactions can be confirmed within seconds and often do
not require gas fees. However, DAGs are less mature and have unresolved issues in
terms of security, consensus, and data finality. Unlike blockchains, which have
decades of cryptographic trust, DAGs are still evolving. Nonetheless, their ability to
scale massively without sacrificing speed makes them a promising avenue for future
decentralized systems.