0% found this document useful (0 votes)
8 views35 pages

Bct-Unit 2

Consensus mechanisms are vital for ensuring the security and legitimacy of blockchain transactions by achieving agreement among users. They work through a series of verification steps involving multiple validators before transactions are added to the blockchain. Various consensus mechanisms, such as Proof of Work and Proof of Stake, have different approaches to achieving consensus, each with its own advantages and drawbacks, particularly regarding scalability, decentralization, and security.

Uploaded by

maryfathimaanuja
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views35 pages

Bct-Unit 2

Consensus mechanisms are vital for ensuring the security and legitimacy of blockchain transactions by achieving agreement among users. They work through a series of verification steps involving multiple validators before transactions are added to the blockchain. Various consensus mechanisms, such as Proof of Work and Proof of Stake, have different approaches to achieving consensus, each with its own advantages and drawbacks, particularly regarding scalability, decentralization, and security.

Uploaded by

maryfathimaanuja
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 35

WHY CONSENSUS MECHANISM:

It achieves the agreement of most users on a single network. The consensus


mechanism maintains the security of the blockchain by keeping a record of all legitimate
transactions. Since crypto trading is a decentralised process, this becomes important to stop
sellers from deliberately cheating a buyer.

Need for Consensus Mechanisms: Consensus Mechanisms essentially make

sure that every blockchain transaction is genuine. This helps the blockchain remain

secure since each user is confident that their funds are safe. Therefore, the most

important job of a consensus mechanism is to ensure the safety of the blockchain.

How do Consensus Mechanisms Work?

Let me give you a broad overview of how consensus mechanisms work.

Though there are differences, yet the basic process is all the same.
Consensus mechanisms basically need to make sure that the distributed
ledger of a blockchain stays true. This is done through the following
steps:

1. When a transaction is initiated, it is verified by a designated verifier


such as a validator(PoS) or miner(PoW).
2. Then the verifier broadcasts the transaction to the network.
3. Multiple verifiers, other than the first verifier, also verify the
transactions.
4. After the transaction is verified by a certain number of verifiers, it is
added to a block.
5. The block is then added to a blockchain when it has sufficient
numbers of transactions.
6. After a few blocks, the transaction is finalized.

Centralized vs Decentralized Consensus:

Centralized consensus algorithms are the ones where decision making


and authorization of transactions take place in a top down approach. A
few verifiers validate all the transactions. Usually I have seen these kind
of mechanisms in permissioned blockchains such as Hyperledger where
even a single authority such as a company’s CEO authorizes the
blockchain transactions.
In Decentralized consensus algorithms, the number of verifiers are
higher, with more power and they are often geographically distributed.
Here, the transactions are verified in a democratic process. Usually some
kind of mechanism is put so that they do not act in a fraudulent manner.

Sybil Resistance Mechanisms vs Consensus Mechanisms

Sybil Resistance Mechanisms are those which prevent a majority takeover


of a blockchain’s verifiers. These takeovers are in the form of attacks
called 51% attacks.
List of Various Consensus Mechanisms with Examples
 1. Proof of Work (PoW)
 2. Proof of Stake (PoS)
 3. Proof of Delegated Stake (PoDS)
 4. Proof of History (PoH)
 5. Proof of Authority (PoA)
 6. Proof of Delegated Authority (PoDA)
 7. Proof of Elapsed Time (PoET)
 8. Proof of Burn (PoB)
 9. Proof of Capacity (PoC)
 10. Proof of Contribution (PoCo)

1. Proof of Work (PoW)


This was the first consensus mechanism to come into existence with
Bitcoin’s blockchain. Here, transaction verifiers, also called as miners,
run complex calculations to guess the nonce value which is unique for
every transaction. These nonce values are obtained from the hashing
function with the following inputs (non-exhaustive list):
1. Transaction amount
2. Public address of receiver
3. Private key of sender
4. Hash of previous transaction
Examples of Proof of Work Blockchains:
1. Bitcoin

2. Dogecoin

3. Ethereum Classic

2. Proof of Stake (PoS)

In this consensus mechanism, the transactions are verified by validators who


have to stake some collateral (32 ETH in Ethereum) to be able to sign
transaction. Any mistake or faulty behavior of the validators can lead to a partial
or total loss of their stake.

The working of Proof of Stake is similar to Proof of Work but there is no need to
perform complex calculations in the Proof of Stake consensus mechanism.

Examples of Proof of Stake Blockchains:

1. Ethereum

2. Algorand

3. Avalanche

3. Proof of Delegated Stake (PoDS)

This is a special type of blockchain consensus protocol where instead of using


their own funds to stake, validators receive funds from people called delegators.
Since these delegators fund the stake for the validator, they are entitled to share
the rewards that the validator generates.

A special type of election is conducted to elect witnesses (delegates) who take


the role of validators. Only those who own the native Governance token are
allowed to vote.

Example of Proof of Delegated Stake Blockchains:

1. Tron

2. EOS

4. Proof of History (PoH)

In Proof of History, which was developed by Solana, blocks are time-stamped


using function called Verifiable Delay Function(VDF). These timestamps record
at what point a block was validated and also record the order of the blocks. The
VDF is designed to be a computation intensive function and resists attacks from
the outside.

Proof of History cannot work alone and it needs another blockchain consensus to
verify individual transactions, which is in the case of Solana is Proof of Stake.

These blockchain consensus has a dual layer of protection and is very effective
against Replay Attacks.

In the case of Solana, Proof of History achieves a theoretical transaction speed


of 100k per second.

5. Proof of Authority (PoA)

In this type of blockchain, the command structure follows a top-down approach.


Here, transaction verifiers are selected and authorized to validate transactions.
Selection can be from done by a top authority such as leadership of an
organization or through a vote by token holders.

Example of Proof of Authority consensus:

VeChain uses this consensus mechanism to select its 101 blockchain validators
which are called as Masternode Operators. This helps VeChain operate its
blockchain in an energy efficient way. As per its claims VeChain uses only 0.04%
of energy as compared to other blockchains.

6. Proof of Delegated Authority (PoDA)

In the proof of delegated authority consensus mechanism, the validators are


selected by the key decision makers. This is opposed to Proof of Authority where
a decision maker is directly responsible for validating blockchain transactions.

The consensus mechanism is mostly seen in private blockchains where day to


day decision making is done through and recoded on blockchains.

7. Proof of Elapsed Time (PoET)

In Proof of Elapsed Time, every validator generates a random waiting (using a


function) time after which they are allotted a block. They then add transactions
to the block and then the next validator whose waiting time is overtakes the
creation of the next block.
It was invented by Intel Inc in early 2016 in collaboration with Hyperledger, IBM
and Linux Project. The primary aim of this project is to reduce the energy
consumption in Proof of Work blockchains.

8. Proof of Burn (PoB)

In Proof of Burn, the validators are required to burn the native coins to be able
to verify transactions. The greater the number of tokens burnt, the higher will be
their share in validating transactions. Tokens are sent to a dead irrecoverable
wallet for burning.

It was invented by Iain Stewart.

Tokens are mostly sold to validators during ICOs or can be bought from the
market.

Since, after buying tokens, the validators already have a stake in securing the
blockchain, it creates a mental barrier against any ill thought plan to sabotage
the blockchain.

Example of Proof of Burn consensus mechanism:

 Slimcoin

9. Proof of Capacity (PoC)

In this type of consensus mechanism, local hard drive of the validator is used to
store a list of possible solutions to the function that is run for validation. If there
is a large space on the computer, a larger list of solutions can be stored and
therefore a larger probability of discovering the right solutions and add it to
blocks.

One key disadvantage of Proof of Capacity is that a hacker could obtain an


virtual computer on the cloud to have infinite storage and therefore legally could
mine all or a major chunk of the crypto alone.

Example of Proof of Capacity consensus mechanism:

 Signum

 Chia

 Spacemint
10. Proof of Contribution (PoCo)

Here, the contribution of users and their behavior is recorded and those with the
highest contributions in a consensus round are rewarded a block. The benefit is
that it does not rely on a cryptocurrency to become a validator unlike Ethereum.

Proof of Contribution consensus mechanism was built by Hongyu Song, Nafei


Zhu, Ruixin Xue, Jingsha He, Kun Zang and Jianyu Wang to secure Intellectual
Property Rights without the use of a cryptocurrency.

Frequently Asked Questions

What is the best crypto Consensus Mechanism?

In my experience, if you prefer safety, Proof of Work is the best. If you prefer
centralization, permissioned mechanisms like Proof of Authority is best. If you
prefer a lean consensus mechanism with safety, Proof of Stake works best.

Is Bitcoin based on Consensus Mechanism?

Yes, Bitcoin was the first blockchain which had established the practical usage
of a consensus mechanism which was Proof of Work on which it is based.

What is Ripple’s Consensus Mechanism?

Ripple uses the Federated Byzantine Agreement Model for its consensus and it is
called as RPCA (Ripple Protocol Consensus Algorithm).

Which Consensus protocol is fastest?

The fastest consensus protocol as far as I have seen is possible with Proof of
Authority since it requires much lesser number of confirmations than other
consensus protocols.

Ethereum changed its Consensus Mechanism from what to what?

In 2022, Ethereum changed its consensus mechanism from Proof of work to


Proof of Stake. This reduced its energy consumption by 99.9%.

SCALABILTY ASPECTS OF CONSENSUS


PROTOCOLS:

Scalability in blockchain largely refers to transaction speeds. The ability


for blockchain technology to handle a high volume of transactions quickly, known as
scalability, is a major challenge in the cryptocurrency industry.
The concept of scalability has different interpretations in the field of blockchain, and
this article aims to explore the latest advancements and developments in this area.
Understanding scalability issues in blockchain is important for the growth and
advancement of the blockchain community and industry

What is Blockchain Scalability?

Scalability in blockchain, which largely refers to transaction speed, is undoubtedly


the crypto industry’s simultaneous holy grail and bottleneck. Cryptocurrency
transactions currently take longer than regular payment methods. However, there
are a variety of hypotheses being developed in the crypto communities on how to
best get past this obstacle and the promise of advancements that could eventually
lead to nearly instantaneous transaction speeds.
What is Blockchain Scalability Trilemma?

One can’t answer “What is blockchain scalability?” without talking about the Blockchain
Scalability Trilemma. The scalability of the blockchain is one of the biggest obstacles for
cryptocurrencies is the trilemma. It claims that you can only concurrently achieve two
of decentralization, scalability, or security—never all three. Trade-offs are therefore
unavoidable.

Vitalik Buterin, the creator of Ethereum, originally came up with the term “trilemma,” which
he used in reference to this challenge of blockchain technology. Trilemma is not a rigorous
mathematical proof, merely an observation. Even though the trilemma is challenging, unless
it has been demonstrated that it cannot be solved, an algorithm that can do so may exist.
Directions of Blockchain Scalability Trilemma

1. Decentralization

2. Security
3. Scalability

1. Decentralization

The level of ownership, power, and value diversity on a blockchain is referred to as


decentralization. Since no one entity can control the entire network, cryptocurrencies are
often considered to be “decentralized.” Decentralization, however, is a spectrum rather than
a simple “yes” or “no,” and different projects like Bitcoin, Ethereum, Ripple, EOS, etc. exhibit
varying degrees of decentralization.
2. Security

Security is the capacity of the blockchain to withstand intrusions from outside


sources and the system’s resilience to manipulation. A blockchain system is
vulnerable to numerous assaults, including double-spending, sybil, DDoS, and 51%
attacks. Greater decentralization is achieved with greater freedom, i.e., free entry
and exit from the network, but security is decreased since it is difficult to confirm the
identity of new players, who may be controlled by a single bad entity or collaborate
together to disrupt the network.

3. Scalability
The network’s capacity is determined by scalability, which also affects the number of
network nodes, the amount of transactions the network can handle, how quickly the
network can handle transactions, and other factors. Because Bitcoin’s blockchain is
scalable as additional users join the network, the term “scalability” is ambiguous. The
PoW algorithm will automatically alter the level of difficulty, and the network may
support any quantity of nodes.
Blockchain Scalability: Execution,
Storage, and Consensus:
DEFINITION

Blockchain scalability is the ability of a blockchain to process transactions, store data, and
reach consensus as additional users are added to the network.

Trust minimization is a valuable security property that blockchain


technology is uniquely positioned to generate—replacing handshakes,
brand reputation, and paper contracts with guarantees based on
computer code, cryptography, and decentralized consensus. These
superior guarantees provided by blockchains form the basis

of cryptographic truth .
Blockchains vs. Traditional Computing

Before discussing how to scale blockchains, it’s important to first


understand why blockchain computing is fundamentally different from
traditional computing. In general, blockchains are valuable for three
reasons:

 Deterministic computation—predefined coded logic executes exactly


as written with a very high level of certainty.

 Credible neutrality—there is no central administrator and no special


network privileges, meaning anyone can submit transactions without fear
of censorship or discrimination.

 End-user verification—the historical and current state of the


blockchain’s ledger and the code underpinning the client software are
auditable by anyone in the world.

Blockchains are tasked with managing an internal ledger of data,


which can represent asset ownership, contract state, or simply
raw information. Most blockchain networks are managed by two
overlapping yet distinct sets of participants: block producers and
full nodes.

Block producers gather unconfirmed transactions submitted by users,


check their validity, and place them into data structures called blocks.

Block producers are generally referred to as miners in Proof-of-Work (PoW)


chains or validators in Proof-of-Stake (PoS) chains, with PoW and PoS
acting as Sybil-resistance mechanisms to ensure that blockchain ledgers
remain live and immune to censorship.

 The blocks submitted by block producers are then accepted or rejected by full
nodes
 Entities that independently store a full copy of the chain’s ledger and
continually validate new blocks but are not required to participate in block
production.
 Full nodes are run by most block producers but also include end-users and
key economic actors such as exchanges, RPC providers, and stablecoin
issuers.
 Ultimately, full nodes keep block producers honest by rejecting invalid blocks,
even in a situation where the majority of block producers are malicious.
 This makes the creation of invalid blocks a waste of time and money,
assuming a sufficient number of honest full nodes exist.
LIMITATIONS/DRAWBACKS:

 One limitation of traditional blockchain models is that achieving scalability


usually requires sacrificing decentralization, security, or some degree of
both.
 For instance, a scalable and decentralized network will need to incentivize
a large number of active participants to achieve high security.
 A scalable and secure network will generally raise the cost of running a
node at the expense of decentralization.
 Furthermore, decentralized and secure networks keep node requirements
low and the cost of attacks high but end up with scalability bottlenecks.

Three Key Properties of Blockchain Scaling

Blockchain scaling can be broken down into three general categories:

1. Execution
2. Storage
3. consensus.

Blockchain Execution

1. Blockchain execution is the computation required to execute


transactions and perform state changes.
2. Transaction execution involves checking the validity of transactions
(e.g. verifying signatures and token balances) and executing the on-
chain logic needed to calculate state changes.
3. State changes are when full nodes update their copy of the ledger to
reflect new token transfers, smart contract code updates, and data
storage.
4. The scalability of blockchain execution is commonly thought of in
terms of transactions per second (TPS), but on a more general level,
it refers to the number of computations per second since
transactions can vary in complexity and cost.
5. The more transactions that flow through a network, the more
computations that need execution at any given time.
6. When scaling the execution layer, the main problem to solve is how
to achieve more computations per second without substantially
increasing the hardware requirements on individual full nodes that
validate the transactions in blocks.

Blockchain Storage

Blockchain storage refers to the storage requirements of full nodes, which


maintain and store a copy of the ledger. Blockchains have two general
forms of storage:

 Historical data encompasses all the raw transactions and block data.
Transaction data includes the origin and destination addresses, the
amount sent, and the signature of every individual transaction.

 Block data includes the list of transactions and metadata from a specific
block, such as its Merkle root, nonce, previous block hash, etc.
 Historical data doesn’t typically require quick access, and there only needs
to be at least one honest entity making it available for download.

 Global state is a snapshot of all the data that smart contracts can read
from or write to, such as account balances and the variables within all
smart contracts.
 Global state can be generally thought of as the database of a blockchain,
which is required to validate incoming transactions.
 State is commonly stored within tree structures (e.g. Merkle trees) where
access and modifications can be easily and quickly made by a full node.

Blockchain Consensus

1. Blockchain consensus is the method by which nodes in a


decentralized network reach an agreement on the current state of
the blockchain.
2. Consensus is mostly concerned with achieving an honest majority in
the face of a certain threshold of malicious actors and reaching
finality; i.e., transactions are accurately processed and highly
unlikely to ever be reversed.
3. Blockchain consensus is generally designed around minimizing
communication overhead in order to increase the upper bound on
decentralization for stronger Byzantine fault tolerance and lower the
time to finality for faster settlement.

When scaling the consensus layer, the main problem to solve is how to
reach finality faster, cheaper, and with more trust minimization—all in a
predictable, stable, and accurate manner.

Scaling the Execution Layer

Below are five different approaches currently being taken to scale the
execution layer of blockchains along with the advantages and tradeoffs of
each. In practice, some of these approaches are combined for even
greater execution capacity.

Vertical Scaling of Validator Hardware Requirements

Blockchain execution can be scaled by increasing the hardware


requirements for block producers. Higher hardware requirements lead to
each validator being able to perform more computations per second.

Advantages:

1. Having a single decentralized network made up of high-computing-


capacity validators leads to blockchains that can support larger
blocks, faster block times, and lower transaction costs while still
maintaining on-chain composability between smart contracts and
potentially higher trust minimization than traditional computing
models.
2. Such blockchains can be particularly useful for high-frequency
trading, gaming, and other latency-sensitive use cases.

Tradeoffs:

1. Vertical scaling of validators will limit network decentralization


given the higher cost of running a validator or full node.
2. Node costs will often increase over time, making it hard for most
users to participate.
3. Remaining decentralized will become dependent on Moore’s law,
which states that the number of transistors on a microchip doubles
around every two years while the cost of computers halves.
4. Higher full node costs can also increase the costs for end-users who
want to directly verify activity happening on-chain, lowering trust
minimization.

Horizontal Scaling via Multi-Chain Ecosystems

An alternative to vertical scaling is horizontal scaling through the use of


multiple independent blockchains or sidechains within a single ecosystem.
Horizontal scaling spreads the computation of transactions in an
ecosystem across many independent blockchains, with each chain having
its own block producers and execution capacity.

Advantages:

1. Multi-chain ecosystems enable the execution layer of each


individual chain to have fully customizable features such as node
hardware requirements, privacy features, gas token usage, virtual
machine (VM) choice, permission settings, and more.
2. This design is why multi-chain ecosystems sometimes result in dApp
chains, where individual blockchains specialize in supporting
individual dApps or small collections of dApps.
3. Self-sovereign blockchains can also help isolate security risks, with
one chain’s design choice for security not always affecting other
chains in the ecosystem.

Tradeoffs:

1. Multi-chain ecosystems require each blockchain to bootstrap its own


security through a native token that’s issued in an inflationary
manner.
2. Though this is standard in the early growth stages of blockchains, it
may prove difficult to move towards a less dilutive, more
sustainable economic model based on on-chain user fees since user
fees will be spread across many independent blockchains.
3. There are also composability challenges since dApps and tokens
that want to interoperate don’t always exist on the same
blockchain.

Horizontal Scaling via Execution Sharding

1. A similar yet unique approach to multi-chain scaling is having a


single blockchain that supports parallel execution across many
different shards.
2. Each shard essentially acts as its own blockchain, meaning many
blockchains can execute in parallel.
3. There is also a single main chain that has the sole purpose of
keeping all shards synced together.

In execution sharding, there is one pool of validators that is split up across


shards to execute transactions.

Nodes are randomly and regularly rotated so they don’t always


execute/validate the same shard, with the number of shards configured to
make the risk of corrupting any single shard statistically insignificant.

Advantages:

1. All execution shards pull from the same pool of nodes, so there’s no
need to bootstrap security on new shards. Assuming there is a large
pool of nodes, every execution environment can achieve the same
level of security.
2. Execution sharding also doesn’t require raising the hardware
requirements for nodes, as nodes only perform execution on one
shard at a time. Shards can also operate with the same VM or use
different configurations to meet the unique requirements of certain
use cases.

Tradeoffs:

1. Each shard is limited in flexibility given that all nodes must be able
to support the computation of every shard.
2. There is also generally a limit to the number of shards one
blockchain can support due to the increasing computation
requirements put on the main chain and the risk of having too few
nodes per shard.
3. Furthermore, there are frictions when it comes to load balancing as
well as implementation risk given that shared security models mean
that all shards may be subject to the same vulnerability.
Multi-chain ecosystems generally do not share security across blockchains
while execution sharding distributes security across shards from one pool of
node operators.

Horizontal Scaling via Modularity

1. Another approach to horizontal scaling is modular blockchains,


where the architecture of blockchains is separated into multiple
different layers; i.e., isolating the execution, data availability (DA),
and consensus components.
2. The most popular way to perform execution in modular blockchain
implementations is via rollups, which move the computation and
state off-chain into off-chain networks while storing transaction data
on-chain.
3. State changes computed off-chain are then proven on-chain
proactively as valid using zero-knowledge proofs (zk-rollups) or
invalid retroactively using fraud proofs (optimistic rollups).

Advantages:

1. Modular blockchains offload transaction execution and state to a


cheaper, leaner, and higher-throughput computing environment
while still inheriting the security of the underlying blockchain used
for settlement.
2. This is because the consensus process, in which the validity of off-
chain computation performed by the execution layer is verified, is
carried out by an existing decentralized baselayer (i.e. L1)
blockchain.
3. Intuitively, this means the computational bandwidth of a baselayer
blockchain can be used more efficiently because full nodes don’t
need to execute every transaction.
4. Full nodes just need to verify succinct proofs and store a small
amount of transaction data.

 Rollups can also support escape hatches for trust minimization; i.e.,
if a rollup network is not working properly, users can withdraw their
crypto and submit it to the baselayer blockchain.
 Many modular networks can also amortize user costs; i.e., there are
fixed costs for verifying the proof of a zk-rollup on the baselayer
blockchain, meaning consensus costs can be reduced as usage
increases since they are shared amongst a larger number of users.
 Furthermore, rollups have a 1-of-n trust model—only one honest
node is required to ensure the correctness and liveness of the
computation.

Tradeoffs:
1. Modular blockchains may not be as fast or as cheap as sidechains
or standalone chains since most approaches leverage the use of a
baselayer blockchain’s limited and sometimes expensive block
space for security.
2. Current approaches to modular networks also commonly carry
upgradability risks that require governance intervention (outside
immutable enshrined rollups) and may result in liquidity
fragmentation and composability challenges if some dApps remain
on a baselayer blockchain while others run across different off-
chain execution layers.
3. Finally, implementing a rollup or other modular blockchain designs
is a newer and more complex process than launching a new
standalone blockchain.

A proposed way to scale Ethereum is modular blockchains, separating the


execution, data availability, and consensus layers (source).

Payment and State Channels

1. Payment and state channels can be used for blockchain scaling by


allowing users to lock cryptocurrency into a multisig smart contract
with other parties and then exchange signed messages off-chain
representing a transfer of asset ownership and/or change of state
without making any on-chain transactions.
2. Users only need to make on-chain transactions when opening a
channel and closing a channel.
3. The multisig contract is used to ensure the correct settlement of the
channel by having users cryptographically sign each interaction,
with each signature accompanied by a nonce so the smart contract
can verify the correct order of transactions.

Advantages:

1. Payment and state channels allow transfers of cryptocurrency to


happen in real-time for zero cost and near-instant latency.
2. Payment channels make micropayments feasible, which are often
not possible on a baselayer blockchain.
3. They also allow the cryptocurrency locked in the channel to be
settled swiftly on-chain if both parties cooperate.

Tradeoffs:

1. State/payment channels require each participating party of a


channel to be connected to the Internet to ensure their
counterparties are not trying to use old messages to settle the
channel on-chain.
2. This often necessitates the use of watchtowers to continually
monitor the channel and protect user funds.
3. Payment channels also need to be pre-funded with liquidity, which
can make large payments difficult and result in capital inefficiency.
4. Efficiently routing payments across a network of channels is
a difficult problem that can result in failed transfers or the creation
of a more centralized hub-and-spoke model to ensure participants
have access to sufficient liquidity and short routes.
5. Generally, state/payment channels work best between a known set
of static participants but don’t work well with a dynamic or
unbounded set of participants.
6. There is also the ownership problem, where it’s difficult or often
impossible for channels to represent objects that do not have a clear
logical owner (e.g. DEX liquidity pool).

Scaling Data Storage

Below are six different approaches currently being taken to scale the
storage layer of blockchains. In practice, some of these approaches are
combined for even greater storage improvements.

Vertical Scaling of Blockchain Nodes

Similar to vertical scaling of blockchain execution, vertical scaling of


blockchain storage involves raising the hardware requirements of running
a full node.
Advantages:

1. Blockchains with higher storage limits for full nodes can offer a
large volume of cheap storage; i.e., full nodes can store more
historical data and larger amounts of state.
2. Direct full node storage enables easier access to on-chain data
given that there are no additional storage layers or external
dependencies.

Tradeoffs:

1. Since there is more and more data to store over time, the
decentralization of the blockchain becomes increasingly at risk as
the costs of running a full node increase.
2. With less decentralization, fewer trust-minimized assurances can
be provided to users that data will be available and correct.
3. State bloat can also lead to slower execution of blocks over time,
increasing the strain on the network as a whole.

Data Sharding on Layer-1 Blockchains

1) Another approach to scaling the data storage of blockchains is data sharding. Data
sharding splits the storage of the ledger and/or the data used to recreate the ledger
across many shards, reducing an individual node’s storage requirements at any given
time to that of a single shard or small set of shards.

Advantages:

 Data sharding allows blockchains to increase their capacity to store data cheaply
without increasing the hardware requirements for individual nodes.
 Such an approach is beneficial for maintaining decentralization since it increases the
ability of users to run their own nodes.
 Data sharding also provides greater storage capacity for rollups that store transaction
data on baselayer blockchains—a requirement to rebuild the rollup’s state.
 Moreover, approaches such as Danksharding allow for a merged fee market for better
load-balancing and inclusion of data.

Tradeoffs:

 There may be limits on the number of shards one blockchain can support due to the
increased load on the main chain.
 There is also a need for data availability sampling (DAS), which proves that
historical data needed to reconstruct part of the ledger was available at one point (i.e.
when the block was produced) without nodes actually having to download all the data
themselves.
 Additionally, data sharding requires communication overhead to pass storage between
nodes when rotating nodes to different shards. It also requires a large number of nodes
to maintain high security—there must be a certain level of decentralization per shard,
so the total pool of nodes needs to be large since it’s split out amongst all shards.

Compressed On-Chain Data Storage With Modular Blockchains

 Modular blockchains perform computation off-chain and then store transaction data or
state differences either on-chain or off-chain.
 The data allows other nodes or users to rebuild the current or historical state of the
ledger.
 When rollups employ on-chain data storage, transaction data is often compressed off-
chain prior to being stored on-chain.

Advantages:

1. Compressed on-chain data storage is the most secure form of data storage for
modular blockchains because data is stored by all full nodes on the network.
2. It also reduces the cost of storing data on the layer-1 blockchain.
3. When combined with data sharding, rollups are provided access to a more
efficient and cheaper on-chain storage environment for transaction data that
scales better with increased usage.

Tradeoffs:

1. On-chain storage availability is more expensive than off-chain storage, which may
inhibit the ability of modular blockchains to match the scalability of less decentralized
storage options.
2. Compressing data may also drop parts of the data that are not strictly required for
validation, potentially inhibiting a more granular analysis of chain activity based on
that data.

Off-Chain Data Storage in Modular Blockchain Designs

 Modular blockchains can store transaction data off-chain to further reduce on-chain
storage requirements.
 This includes “validiums,” which publish zero-knowledge proofs on-chain while
storing data off-chain.
 There are four main approaches to off-chain data storage by modular blockchains:

 Centralized storage consists of off-chain storage on a centralized platform. While it’s the
cheapest way to store data, it can be subject to data withholding and security issues such as
the centralized storage platform modifying data or going offline.

 Permissioned DACs store data off-chain but provide on-chain attestations of that data being
published correctly using a signature scheme from a small committee of trusted nodes,
referred to as a data availability committee (DAC). The advantages and tradeoffs are similar
to centralized storage solutions but with slightly better trust assumptions on availability.
 Permissionless DACs store data off-chain but provide on-chain proofs using permissionless
DACs with cryptoeconomic incentives to act honestly. Permissionless DACs are cheaper than
on-chain storage solutions while being more secure than other off-chain solutions. The
tradeoffs are that this is still less secure than on-chain storage and has yet to be achieved in
production at scale with sustainable economics.

 Volitions enable users to choose whether they want to store their transaction data on-chain
or off-chain. Volitions are novel because they enable data availability solution options at the
individual transaction level while allowing all transactions to share the same state root and
consensus cost. However, this method is more complex than the others listed above and has
yet to be achieved in production.

Data Pruning

 Data pruning is a technique that enables blockchain full nodes to discard historical
data beyond a specific block height.
 Data pruning is often paired with Proof-of-Stake checkpoints, where the transactions
in blocks beyond the checkpoint are considered final; i.e. they can’t be reversed
without major social consensus or a hard fork.

Advantages:

1. Data pruning reduces the amount of data that a node needs to store or reference when
participating in consensus—the ledger is smaller since historical data is already
validated so it is safe to be pruned.
2. Because the historical data has already been validated, it is no longer needed if the
intent of operating a full node is just to validate future blocks as opposed to also
offering historical look-backs.

Tradeoffs:

1. Data pruning relies on third parties (e.g. exchanges, block explorers, etc) to store
historical data permanently in order to rebuild state back to the genesis block.
2. However, it’s a 1-of-n trust model, so only one third party needs to store the data
honestly in order for a full node to be able to recreate all historical state.
3. With Proof-of-Stake offering checkpoints and weak subjectivity, this assumption
becomes less relevant.
4. However, such data is still important for on-chain analytics and block explorers.

Statelessness, State Expiry, and State Rent

There also exist methods focused around limiting the amount of state that
full nodes have to store, particularly through state expiry, statelessness,
or state rent implementations.

 State expiry designs allow nodes to prune state that hasn’t been
accessed in a certain amount of time, yet utilize a type of merkle proof
(called “witnesses”) to revive expired state if needed.
 Statelessness designs are where full nodes are not required to store
state. Full nodes only need to validate new blocks with the inclusion of
witnesses. Weak statelessness is when only block producers are required
to store global state while all other nodes can verify blocks without storing
state.

 State rent designs require that users pay to maintain limited state
storage. State that is no longer being paid for is recycled and rented out to
new users.

Advantages:

1. Methods for limiting state storage requirements ultimately help cap


the amount of state that individual nodes have to store.
2. This helps alleviate state bloat, even amidst a growing ledger or
increasing number of on-chain transactions.
3. Limiting state storage is crucial for maintaining long-term end-user
verification while still maintaining practical hardware requirements.

Tradeoffs:

1. Limiting state storage is a fairly novel approach and eliminates the


idea of users paying a single time to have every single full node in
the network store their state in perpetuity forever—a stark contrast
to how blockchains handle state today.
2. Furthermore, upgrading a blockchain that uses a traditional state
storage model to a more limited state storage model is difficult and
may break applications that made specific assumptions during
development about state always being accessible.
3. New state storage models may also make particular applications
more expensive than they were previously.

Permissionless and permissioned blockchains compared (overview)

Permissioned blockchains - Closed networks with limited decentralization, an


additional access control layer, and designated entities.

Permissionless blockchains - Open, decentralized networks with universal


consensus validation; anyone can join the network and possess a copy of the
ledger.

Permissioned Permissionless

Alternate designations Private, permissioned Public, trustless


sandbox

Examples Ripple Bitcoin, Ethereum

Key attributes Controlled Full transparency


transparency Development is open
source
Development by
private entities Mostly anonymous
Not anonymous Privacy dependent on
Identity of members is technological
known by the limitations
operators of the
No control authority
blockchain, but not
necessarily by all Involves digital assets
participants
Privacy based on
governance decision
No single authority
May or may not
involve digital assets

Benefits Incremental Broader


decentralization decentralization
Strong privacy Highly transparent
Customizable Censorship resistant
Faster, scalable Security resilience
Since consensus
protocols depend on
knowing who the
members are (e.g.,
PBFT), less nodes are
needed, allowing for
greater performance

Drawbacks  Limited  Less energy


decentralization efficient
Requires
 Override risk
computationally
 Less and energy-
transparent intensive mining
 processes to
cryptographicall
y add blocks to
the chain
 Slow and
difficult to
scale
Consensus
models based
on
computationally
expensive
algorithms
requiring the
processing
power of many
nodes to ensure
security
 Less user
privacy

Use cases B2B P2P


B2C B2C
Government to Government to
Organizations Citizens

Permissioned blockchains:

 Permissioned blockchains are blockchains that are closed (i.e., not publicly
accessible) or have an access control layer.
 This additional layer of security means that the blockchain can only be
accessed by users with permissions.
 Permissioned users are only able to perform blockchain operations within
the strict confines of roles assigned to them by the ledger administrators
and require that they authenticate themselves through certificates or
digital identifier methods.
 In addition, the roles would dictate what information a user would be able
to access.

Aspects of a permissioned blockchain

Decisions are authorized by a private group


Decisions are made by the owners of the network through a central, pre-defined
level.

Security
Permissioned blockchains provide the operating organization granular control
over permissions, data access, and the scope of user roles.

Decentralization isn’t fixed


Permissioned blockchains can either be fully centralized or partially
decentralized. Its members typically decide on the network’s level of
decentralization and the mechanisms for consensus.

Transparency is not required


 Unlike permissionless blockchains, permissioned blockchains do not need
to be transparent.
 Transparency is optional, as most permissioned blockchain networks are
specifically intended to not be transparent for security purposes.
 Levels of transparency usually depend on the goals of the organization
running the blockchain network.
 In the meantime, the ledger maintains a record of every transaction and
the identities of the participating parties.

Lack of anonymity

Access to the identify of every transactional participant can be crucial


information for private entities concerned with accountability and a provable
chain of custody. Every change is tracked to a specific user, so network
administrators can have instantaneous access to has made a change to the
system and when.
Advantages of permissioned blockchains

 Security

A big benefit of a permissioned blockchains is the level of security it guarantees. In


these blockchains, the trade-off for security is that there is no radical decentralisation
which ensures no one can participate on the blockchain without being authenticated
and having the necessary permissions.

 Flexibility of Decentralisation

Permissioned blockchains have the advantage of being incremental or fully


centralised, giving organisations the flexibility and freedom to participate without
bearing the risks associated with high levels of centralisation.

 Performance

These blockchain networks work faster since they have limited accessibility. With
fewer nodes in the network performance and scalability are improved.

Disadvantages of permissioned blockchains

 Risk of Corruption

Since a permissioned blockchain only allows a specific set of authenticated users,


security is said to be tight. However, with the chain allowing only a permissioned set
of users there can also be a risk of overriding consensus by the private group and
network operators. After all, the network can only be as safe as the integrity of its
users.

 Regulation and censorship

Being a permissioned network these blockchains fall under the purview of regulators.
This means that permissioned blockchains can be regulated or censored and a
transaction can be restricted from being executed.

 Vulnerable to attacks

The consensus protocol in a permissioned blockchain has fewer validators which


makes the network more prone to malicious attacks.

What are permissioned blockchains used for?

1. Based on the architecture of permissioned blockchains, there are several industry use cases
where they have been successfully applied.
2. These are primarily in the context of ‘B2B’, ‘B2C’ and ‘government to organisations’ setups.
3. The key feature of restricted access on permissioned blockchains has made it a popular
option for supply chain management, claim handling, payment verification between parties,
and identity verification as well.

Examples of permissioned blockchains


 Hyperledger Fabric
This blockchain is a permissioned blockchain network that is also open source. It
was created in 2015 by the Linux Foundation. Its characteristics make it suitable for
a variety of applications like supply chain management, trade finance and clearing
and settlement of financial assets.

 Quorum
This blockchain platform is a permissioned network that was designed for
commercial use cases with a primary focus on the financial services industry’s
enterprises and organisations.

 Corda
This particular permissioned and highly secure blockchain network is ideal for
financial markets.

Table of content:
 Seven Key Design Principles of a Blockchain System
o Principle 1: Decentralization
o Principle 2: Immutability
o Principle 3: Transparency
o Principle 4: Security
o Principle 5: Scalability
o Principle 6: Privacy
o Principle 7: Flexibility

Principle 1: Decentralization

 One of the main benefits of blockchain technology is its decentralized nature.


 This allows for trustless transactions and eliminates needing a third party to
verify transactions
 Separating the network from the miners allows for a more democratized
system.
 This makes it more resistant to centralized control and allows for a more
egalitarian distribution of wealth.

Principle 2: Immutability

 The second principle is immutability.


 This means that all data and transactions on the blockchain are permanent
and unchangeable.
 It ensures that information is accurate and secure, and it prevents fraudulent
activities from taking place.
 Once a transaction is recorded on the blockchain, it cannot be changed or
tampered with.
 By ensuring that all transactions are permanent, the blockchain achieves its
key goal of trustworthiness and security.
 Immutability also has other benefits. It can help to reduce the cost of
transactions, as there is no need for third-party verification or reconciliation.

Principle 3: Transparency

 Transparency is another key feature of the blockchain.


 Allowing users to see all of the information associated with a transaction can
improve the trustworthiness and understanding of transactions.
 For example, let’s say you are a business owner and want to sell your product
online.
 You would need to provide your customer with accurate information about the
product, such as the ingredients and manufacturing process.
 With blockchain, you could upload the product’s data onto the network and let
customers see this information directly.
 This increased transparency can have several benefits for businesses.
 For example, it can help build trust between companies and their customers.

Principle 4: Security

 One of the principal advantages of blockchain technology is its security.


 Allowing users to see all the information associated with transaction security
can improve the trustworthiness and understanding of transactions.
 By making every transaction visible on a public ledger, all parties involved are
assured that their actions remain traceable and transparent.
 A blockchain database is simply a database that is stored on the network and
is accessed using distributed ledger technology.
 This means that every node in the network has access to the same database.
 When you make a transaction on a blockchain network, you are not actually
sending money to another person.
 Instead, you create a new block on the chain and add it to the ledger. To
verify your transaction, miners must inspect your block and determine whether
or not it meets certain conditions.
 If your block passes inspection, it is added to the chain and recorded as part
of the public record.
 This means that everyone with access to the blockchain database can see
this information.
 As long as at least 51% of all miners verify blocks, your transaction will be
accepted by the network and completed.

Principle 5: Scalability

 Blockchain scalability is the capacity of a blockchain system to accommodate


an increased volume of transactions without compromising its overall
intricacy.
 The three main factors that affect scalability are execution, storage, and
consensus.

1. Execution refers to the speed at which transactions are processed on the


blockchain network. This is determined by several factors, including the
number of nodes involved in the network, their processing power, and the
bandwidth available.
2. Storage refers to the amount of data that can be stored on a blockchain
network. The size of blocks and the frequency at which they are generated
play a crucial role in determining their volume.
3. Consensus refers to the agreement of all nodes involved in a blockchain
system about which transaction is valid. Nodes can reach an agreement by
voting or by using a proof-of-work algorithm.
Scalability is one of the significant advantages of blockchain technology. By allowing
multiple nodes to access the network at once, blockchain can handle a much larger
number of transactions than traditional systems.

Principle 6: Privacy

 Privacy verifies the transparency of data and transactions on the network,


providing users with a degree of trustworthiness.
 All information is accessible to everyone; therefore, it cannot be
misrepresented.
 It also allows for greater accountability since everyone involved with a
blockchain project is publicly visible.

Principle 7: Flexibility

 The blockchain system’s innate flexibility is an important feature and has


several benefits.
 First off, transactions can be carried out swiftly and precisely – which is
especially useful when planning to expand the system in the future.
 Secondly, by remaining streamlined and manageable overall complexity of
the network remains at a minimum level, allowing for its growth without
making any additional demands on users or developers alike!

Consensus Protocols for Permissioned Blockchains:

 Permissioned Blockchain network is operated by trusted nodes elected by the


central authority. In a practical enterprise level blockchain application, an
enterprise defines mining and signing nodes for consensus process. There
are three types of Consensus protocols that are popularly used while
designing permissioned blockchain architecture.

PBFT Consensus

 The practical byzantine fault tolerance algorithm (PBFT) is used to build


consensus in blockchain solutions.
 In PBFT consensus each ‘leader’ (signing node) maintains an internal state
(ongoing specific information or status).
 When a ‘leader’ receives a message, they use the message in conjunction
with their internal state to run a computation or operation.
 This computation, in turn, asks other ‘leader’ (other nodes) if the transaction
is valid. Post receiving validation from other ‘leaders’, the first ‘leader’
broadcasts that decision with all the other ‘leaders’ in the network.
 A consensus decision is achieved based on the total confirmations submitted
by all leaders.
 PBFT is useful for low latency storage systems, It could be easily used in
digital assets backed platforms, that don’t require a large amount of capacity,
but do demand many transactions.
 PBFT ensures the accuracy of transaction records within the network.
Hyperledger use PBFT for more other areas including digital assets backed
platforms.
 It takes the idea of an algorithm for consensus and uses it to distribute all
sorts of technical solutions
 Examples: Hyperledger, Chain

Federated Consenus

 In Federated Consensus, every participant in the network trusts a set of


signers for reaching the consensus stage.
 To do it efficiently, block signers use a single block generator, which receives,
holds and filters transaction.
 The generator’s signature is used to coordinate with signers for block
validation process.
 Block signer verifies the block which is signed by block generator and which
fulfills the certain conditions set by the network.
 Block get published to the network, once the block generator got enough
signatures from the network.
 Federated consensus reliance a on single participant which provides many
efficiencies and simplicity benefits and has only limited downsides in target
use cases. It guarantees safety and liveness. This consensus mechanism is
best for use cases like: cross boarder remittance, real time KYC etc.
 Examples: Stellar, Ripple
Round Robin Consensus
 In Round Robin Consensus, validators participate in the consensus process
by signing votes for blocks.
 There are three types of votes: a prevote, a precommit and a commit. To
receive more than two third of commits means to receive commits from a two
third majority of validators.
 A block is said to be committed by the network when a two third majority of
validators have signed and broadcasted commits for that block.
 At each height of the blockchain a round-based protocol is run to determine
the next block.
 Each round comprises of three steps (Propose, Prevote, and Precommit),
along with two special steps Commit and NewHeight.
 The Propose, Prevote, and Precommit steps each take one third of the total
time allocated for that round. Each round is longer than the previous round
followed by a small fixed increase of time.
 This allows the network to eventually achieve consensus in a limited
concurrent network.
 Round robin consensus process doesn’t depend on a single participant for
block validation, Here Multiple nodes play a key role in validating and signing
transactions which make this process more secure as compare to other
consensus process. It has lesser probability of double spend attack because
of the voting power distribution among trusted nodes. Round robin consensus
mechanism is best suitable for provenance bases usecases like: trade
finance, supply chain etc.
 Examples: Multichain, Tendermint

You might also like