Blockchain Scalability: When, Where, How?
BlockGeeks presented an in-depth Guide for Blockchain Scalability, whereby as cryptocurrencies are becoming more and more mainstream, their scalability problem is arising. For bitcoin and ethereum to compete with more mainstream systems like visa and paypal, they need to seriously step up their game when it comes to transaction times. While paypal manages 193 transactions per second and visa manages 1667 transactions per second, Ethereum does only 20 transactions per second while bitcoin manages a whopping 7 transactions per second! The only way that these numbers can be improved is if they work on their scalability.
If we were to categorize the main scalability problems in the cryptocurrencies, they would be: The time taken to put a transaction in the block and the time taken to reach a consensus. In Bitcoin and ethereum, a transaction goes through when a miner puts the transaction data in the blocks that they have mined. So suppose Alice wants to send 4 BTC to Bob, she will send this transaction data to the miners, the miner will then put it in their block and the transaction will be deemed complete.
However, as bitcoin becomes more and more popular, this becomes more time-consuming. Plus, there is also the small matter of transactions fees. You see, when miners mine a block, they become temporary dictators of that block. If you want your transactions to go through, you will have to pay a toll to the miner in charge. This “toll” is called transaction fees.
The higher the transaction fees, the faster the miners will put them up in their block. While this is ok for people who have a huge repository of bitcoins, it might not be the most financially viable options
Theoretically speaking, Ethreum is supposed to process 1000 transactions per second. However, in practice, Ethereum is limited by 6.7 million gas limit on each block.
To understand what “gas” means, think of this situation. Alice has issued a smart contract for Bob. Bob sees that the elements in the contract will cost X amount of gas. Gas meaning the amount of computational effort on Bob’s part. Accordingly, he will charge Alice for the amount of Gas he used up.
Since each block has a gas limit, the miners can only add transactions whose gas requirements add up to something which is equal to or less than the gas limit of the block.
When it comes to the time taken to reach a consensus, currently, all blockchain based currencies are structured as a peer-to-peer network. The participants, aka the nodes, are not given any extra special privileges. The idea is to create an egalitarian network. There is no central authority and nor is there any hierarchy.
Now, if there is no central entity, how would everyone in the system get to know that a certain transaction has happened? The network follows the gossip protocol. Think of how gossip spreads. Suppose Alice sent 3 ETH to Bob. The nodes nearest to her will get to know of this, and then they will tell the nodes closest to them, and then they will tell their neighbors, and this will keep on spreading out until everyone knows. Nodes are basically your nosy, annoying relatives.
Remember, the nodes follow a trustless system. What this means is, just because node A says that a transaction is valid doesn’t mean that node B will believe it to be so. Node B will do their own set of calculations to see whether the transaction is actually valid or not. This means, that every node must have their own copy of the blockchain to help them do so. As you can imagine, this makes the whole process very slow.
The problem is, that unlike other pieces of technology, the more the number of nodes increases in a cryptocurrency network, the slower the whole process becomes. Consensus happens in a linear manner, meaning, suppose there are 3 nodes A, B and C.
For consensus to occur, first A would do the calculations and verify and then B will do the same and then C. However, if there is a new node in the system called “D”, that would add one more node to the consensus system, which will increase the overall time period. As cryptocurrencies has become more popular, the transaction times have gotten slower.
Both Ethereum and Bitcoins have come up with a host of solutions to the Blockchain scalability issues which have either already been or are going to be implemented. The major ones that will be addressed are: Segwit, Block Size Increase, Sharding, Proof of Stake, Off Chain State Channels and Plasma.