Scaling Blockchains

If you understand the basics of blockchain tech, you know it suffers from two critical issues: scalability and speed.



A lot of smart people have been working on addressing these two problems and I want to get a high level intuition for some of the more clever solutions.



State Channels

State channels are a Layer 2 technology. This means it sits one level higher than the underlying public blockchain and relies on it for security but doesn't put blocks on the chain unless there's disputes happening.



The big idea with state channels is that if I open a channel between me and another friend, we can have a lot of transactions between us that don't need to go on the public chain if we're moving the same $100 around back and forth in different transactions (kinda like trading Venmo balances without ever cashing out).



There's only 3 reasons we'd go to the public chain:

  • When moving funds into a state channel

  • When moving funds out of a state channel

  • If there's a disputed transaction in the state channel



It's easy to see how this makes things a lot more scalable since we aren't relying on the public chain for every transaction anymore.



Payment channels are a specific implementation of state channels and were popularized by their use in the Lightning Network.



Plasma

Plasma is another Layer 2 technology that's quite interesting. Plasma operators collect transactions into a block, but instead of publishing the full block to the public chain, they only publish a 32-byte hash of the root.



There is an underlying smart contract mechanism that ensures that if the Plasma operator goes MIA or is shady, you have the ability to convert any object in the Plasma chain into an object on the public chain.



Plasma allows you to get the benefits of decentralization quickly with low overhead since you aren't pushing that much onto the public chain. As well, Plasma operators looks like and run just like a server (i.e. you can take an existing server and Plasma-fy it) but it comes with the higher security guarantees of decentralization.



Proof of Stake

This a base layer change in Eth 2.0 to change the consensus algorithm from Proof of Work to something called Casper (which is a Proof of Stake consensus protocol).

In Proof of Stake, the creator of a new block is deterministically chosen by an algorithm, so there's no energy-wasting competition like in PoW. Security is achieved as each validator posts a stake of currency which can be taken away if the algorithm determines they violated the rules.



Compared to PoW, Proof of Stake is much more energy efficient, cheaper to run and more secure.



Sharding

Sharding distributes the work by assigning a random subset of nodes to verify a batch of transactions instead of every single node. Parallelizing the processing of new blocks massively increases the scalability of the base layer by a factor of 1000.



SegWit

The big idea here is simple: improve scalability by removing signature data (which can take up 65% of the block) and thereby increasing the number of transactions in each block. The signature data would now be stored on a sidechain instead. From a scalability perspective, SegWit is similar to just increasing the block size itself.



SegWit was originally designed to fix the bug of transaction malleability where the signatures of confirmed transactions could be changed resulting in a different hashed TransactionID and invalidating the transaction.



The downside here is that it makes mining blocks more expensive and makes the network more centralized.

To reply you need to sign in.