Module two, lesson two: Scalability.
Let's compare decentralized blockchain systems with centralized systems.
Blockchain has taken on the responsibility of
the intermediaries in the form of validation,
verification, and recording of the transactions,
and of course, the consensus process for the integrity of the chain.
All these functions take time and result in
significant overhead in the confirmation time of transactions,
when compared to the centralized system.
Transaction in Ethereum, for example,
execute on all nodes and execute sequentially, not in parallel.
Every full node stores the entire chain of blocks.
All these impede the scalability of the blockchain applications.
Transaction rates are not satisfactory compared to current centralized application.
This is the challenge.
In this lesson, we'll examine some solutions addressing scalability.
What is scalability?
Scalability is the ability of a system to perform
satisfactorily at all practical levels of load.
Load in the context of the blockchain could be transactions,
number of nodes, number of participants and accounts,
and other attributes of blockchain.
In the case of blockchain,
the practitioners are concerned about the transaction rate or transactions per second.
This is a critical metric for many applications from
payment system to supply chain management to perform well.
So, we focus on transactions per second as a metric for scalability.
Let's explore scalability further.
On completion of this lesson,
you will be able to: discuss
an on-chain solution in improving scalability using larger variable block sizes,
and explore off-chain transaction in state channels for improving scalability.
The most obvious method to improve
transaction rate is to increase the number of transactions per block.
Bitcoin addressed it in two ways,
segregated witness and increase in block size limit.
In segregated witness or Segret,
the transactions and the signatures are
segregated for allowing for more transactions per block.
This was a soft fork that materialized in 2017.
It's working in the current version of the Bitcoin blockchain.
However, the current version,
the block size limit is fixed at one megabyte.
The second proposal for scalability was to increase
the block size limit to a larger size of two megabyte.
In this case, the original block will hold the sender and receiver data and transactions,
the new block structure will hold the signatures and script, or the witness.
Thus, the name of the improvement is called Segret2X,
or Segregated Witness 2X.
It was a planned hard fork that was to have taken place in November 2017,
but did not go through.
At this time, Bitcoin has implemented one
of its improvement for scalability namely the Segret,
it failed with Segment 2X.
Now, let's explore how Ethereum addresses the block size.
In Ethereum, block size can vary,
and is limited by the gas limits specified in the block header.
It can be increased by miners working on it.
The number of transactions in a block dictates the block size.
Here, we see four blocks mined with 30 transaction, 294 transaction,
55 transactions and 183 transaction with the average block time of eight seconds.
This variable block size along with
ASIC-resistant Pure W Consensus Algorithm have improved the transaction rate.
It is expected to improve further when Ethereum moves to proof of
state Consensus Protocol in an upcoming hard fork in 2018.
We just discussed an on-chain solution to improve transaction rate.
Next, we'll discuss an off-chain method.
One of the solutions to address
transaction rate is to unload some of the transactions off-chain.
This is carried out between trusted transacting parties.
Once the unload has concluded,
a transaction confirming this off-chain
activity is recorded on-chain on the blockchain DLT.
This feature in Bitcoin is called payment channel.
Payment transactions can be carried out with
minimal fees at considerable higher rates between trusted parties.
This leverage is the Segret improvement we discussed earlier.
Lightning network is a well known blockchain implementing this protocol.
An Ethereum solution extends this payment channel concept to Smart Contracts.
The state channels are an extension of
the payment channel concept to any arbitrary application level transaction.
It is called the State Channel since the state of
a node on the main chain is locked when transacting off-chain,
and it is synchronized periodically with relevant updates on the main chain.
The transaction of off-chain channels take place at
much higher speeds than the blockchain network
since no consensus or recording under DLT is required.
Thus, offering a scalable solution.
The radar network is an off-chain solution for Ethereum-based main chain.
The popular grid plus energy platform uses this off-chain payment channel
for real-time energy payments from
a Smart Contract to the grid plus retailer Smart Contracts.
In this case, there is a one to one trusted transactions between
two known parties that have secure channel pre-established.
In this lesson, we looked at two solutions for scaling, one on-chain,
the adjustment of block size,
and the second solution that is off-chain, the state channels.
Both these approaches aim to improve the scability of the blockchain.
Other solutions include sharding and panel processing.
Now, the question to ask when you are studying a blockchain is,
what approaches are used for improving scalability?