BLOCKCHAIN SCALABILITY:
Sept. 19, 2022
ARCHITECTURE FOR
-2022
@camiinthisthang
WIDESPREAD ADOPTION
CAMILA RAMOS
-2022
Educator
Developer
Head of DevRel @ Fuel Labs
@camiinthisthang
MODULAR EXECUTION LAYERS & MODULAR BLOCKCHAINS
-2022
@camiinthisthang
AGENDA
How blockchains work
What is scalability?
Challenges with existing monolithic architecture
Existing approaches to scalability
Modular execution layers
@camiinthisthang
BUCKLE UP
@camiinthisthang
BLOCKCHAIN 101
Transactions batched into blocks and connected to each other to form a chain.
Transactions are updates made to the state (i.e. write actions)
@camiinthisthang
In the Ethereum universe, there is a single, canonical computer (called the Ethereum Virtual Machine, or EVM) whose state everyone on the Ethereum network agrees on. Everyone who participates in the Ethereum network (every Ethereum node) keeps a copy of the state of this computer. Additionally, any participant can broadcast a request for this computer to perform arbitrary computation. Whenever such a request is broadcast, other participants on the network verify, validate, and carry out ("execute") the computation. This execution causes a state change in the EVM, which is committed and propagated throughout the entire network.
UPDATING STATE
@camiinthisthang
Transaction
Global State (t)
Global State (t+1)
Bob sends Alice 1 ETH
An Ethereum transaction refers to an action initiated by an externally-owned account, in other words an account managed by a human, not a contract. For example, if Bob sends Alice 1 ETH, Bob's account must be debited and Alice's must be credited. This state-changing action takes place within a transaction.
BLOCKCHAIN 101
@camiinthisthang
A blockchain is a decentralized public database and peer-to-peer network.
BLOCKCHAIN 101
A blockchain is a decentralized public database and peer-to-peer network.
A chain’s state is replicated, not distributed, across nodes
Node n
Node n + 1
Node ...
Node …
@camiinthisthang
BLOCKCHAIN 101
A blockchain is a distributed public database and peer-to-peer network.
@camiinthisthang
Transactions
A
B
C
D
State
Account
Balance
Alice
5
Bob
10
Charlie
8
David
2
BLOCKCHAIN 101
A blockchain is a distributed public database and peer-to-peer network.
@camiinthisthang
Blockchain Functions
Computation over transactions, resulting in an update to the state
EXECUTION
Order and agree on transactions to ensure we know which one came first
CONSENSUS
Nodes download data to ensure that it is available. Data can’t be downloaded = block rejected
DATA AVAILABILITY
Dispute resolution
SETTLEMENT
@camiinthisthang
SCALABILITY
Scalability is the ability of an application to handle a growing number of users and load, without compromising on performance and causing disruptions to user experience
@camiinthisthang
BLOCKCHAIN SCALABILITY
Scalability
=
Throughput (TPS)
Decentralization
@camiinthisthang
Scalability is defined as the ratio of throughput to decentralization.
DECENTRALIZATION??
User sovereignty - the ability for an end user to validate the chain themselves, and not trust that validators (those who validate transactions) are being honest.
@camiinthisthang
Ethereum was created with this ethos of user sovereignty in mind, and made it such that a user on regular consumer hardware could run a full node.
TYPES OF NODES
Only downloads block headers which contain summary information about the contents of the blocks. Does not store a local copy of the blockchain, or validate transactions
Downloads and executes every transaction locally, verifying the validity of the chain. Maximum security.
@camiinthisthang
Full Nodes
Light Clients
Ethereum was created with this ethos of user sovereignty in mind, and made it such that a user on regular consumer hardware could run a full node.
DECENTRALIZATION??
Nodes have to be able to handle the volume of transactions in a block using modest hardware, imposing a limit on the transaction throughput to keep the network decentralized.
@camiinthisthang
DECENTRALIZATION??
Throughput is constrained by the resource requirements of a single node since the blockchain is replicated, not distributed, across nodes.
@camiinthisthang
DECENTRALIZATION??
To increase throughput you could increase bandwidth, compute, and storage capacity, which pushes up the cost of running a full node as a user.
@camiinthisthang
This is not scalability, as it reduces the number of people who can run a full node to validate the chain.
MONOLITHIC ARCHITECTURE
Ethereum, Solana, and all the existing chains were designed in a monolithic architecture, where all four functions of the chain happen at the same layer.
@camiinthisthang
CHALLENGES WITH MONOLITHIC
Costly and inefficient transaction verification
To verify the validity of transactions in the chain, full nodes must download the entire chain and execute each transaction locally.
@camiinthisthang
CHALLENGES WITH MONOLITHIC
Resource constraints
The blockchain is bound by the resource capacity of its nodes. Throughput is constrained by the resource requirements of a single node since the blockchain is replicated, not distributed, across nodes.
@camiinthisthang
CHALLENGES WITH MONOLITHIC
Shared resources
In a monolithic architecture, the four functions of the chain operate on the same finite set of computing resources. For example, using a node's capacity for execution means less capacity left over for data availability.
@camiinthisthang
SCALING SOLUTIONS
Rollups (Optimistic)
Rollups are blockchains perform transaction execution outside layer 1 and then the data is posted to layer 1 where consensus is reached.
Pro: They reduce computation on the main Ethereum chain by processing transactions off-chain.
@camiinthisthang
They assume off-chain transactions are valid and don't publish proofs of validity for transaction batches posted on-chain.
SCALING SOLUTIONS
Rollups (Optimistic)
Con: Rollups will eventually suffer from the same problem as the underlying L1. There is a delay in withdrawing funds to allow time for someone to challenge an invalid transaction.
@camiinthisthang
SCALING SOLUTIONS
State Channels
State channels utilize multisig contracts to enable participants to transact quickly and freely off-chain, then settle finality with on the base chain.
Pros: This minimizes network congestion, fees, and delays.
@camiinthisthang
SCALING SOLUTIONS
State Channels
Cons: Not dynamic. Only works for situations where the participants are predefined.
@camiinthisthang
SCALING SOLUTIONS
Sidechains
A sidechain is an independent EVM-compatible blockchain which runs in parallel to Mainnet. These are compatible with Ethereum via two-way bridges, and run under their own chosen rules of consensus, and block parameters.
Pro: Own consensus algorithm = can be designed for efficient processing of transactions
@camiinthisthang
SCALING SOLUTIONS
Sidechains
Con: Don’t inherit the security of the L1, don’t post blocks to the base chain. Loses a lot of decentralization.
@camiinthisthang
SCALING SOLUTIONS
ZK Rollups
Bundle transactions into batches that are executed off-chain. ZK-rollup operators submit a summary of the changes and produce a cryptographic proof which ensures the correctness of their changes.
Pro: Fast, secure
@camiinthisthang
SCALING SOLUTIONS
ZK Rollups
Con: Tech is not mature yet, still a WIP
@camiinthisthang
MODULAR ARCHITECTURE
Modularity allows the key functions of a blockchain to be separated across multiple specialized layers. Specialization = potential for increase in performance to each layer.
@camiinthisthang
A modular blockchain architecture does not inherently enable scaling. The properties that are derived as a result are what make this possible.
MODULAR EXECUTION
A modular execution layer is a blockchain created specifically to handle transaction execution. Similar to a rollup!
@camiinthisthang
Blockchain Functions
Computation over transactions, resulting in an update to the state
EXECUTION
Order and agree on transactions to ensure we know which one came first
CONSENSUS
Nodes download data to ensure that it is available. Data can’t be downloaded = block rejected
DATA AVAILABILITY
Dispute resolution
SETTLEMENT
@camiinthisthang
MODULAR EXECUTION
Fuel Labs is building Fuel, the fastest modular execution layer that delivers maximum security and the highest flexible throughput for the Ethereum ecosystem.
@camiinthisthang
MODULAR EXECUTION
Fuel was built for fraud proofs, enabling trust-minimized light clients, enabling high security without requiring high resource usage.
@camiinthisthang
In a monolithic architecture, users must choose between high security and high computational resource usage and trusted security and low computational resource usage.
FRAUD PROOFS
A security model where transactions are assumed to be valid and, after a period of time where the validity of a transaction can be challenged, are settled as final.
Fraud proofs allow users to directly know that the chain is valid without relying on trusting validators.
@camiinthisthang
FRAUD PROOFS
Users don’t need to run full nodes (resource-heavy) to have high security with minimal trust assumptions!
@camiinthisthang
TYPES OF NODES
Only downloads block headers which contain summary information about the contents of the blocks. Does not store a local copy of the blockchain, or validate transactions
Downloads and executes every transaction locally, verifying the validity of the chain. Maximum security.
@camiinthisthang
Full Nodes
Light Clients
With fraudproofs, users no longer have to run full nodes to be sovereign and have the ability to validate the chain themselves! They can rely on the security model to validate each transaction without having to download and locally execute each one themselves.
Fraud proofs = higher node requirements
Now we aren’t constrained by the need to keep resource requirements low for users to run full nodes → We can increase node requirements = more com