Comparative Analysis of Sidechains, Plasma, and Sharding

Vinshu Gupta
3 min readJul 22, 2019

--

As Casper moves closer to reality, the Blockchain community is increasingly pondering about Sharding. One question, among others, is that how is it different from existing architectures such as Sidechains or Plasma.

So, let’s discuss the fundamental relationships between the three, outlining their similarities, as well as, their differences.

In the sense that each has a “hub-and-spoke” framework, consisting of a main, consensus chain and a number of client-level “child” chains, they are similar. Moreover, in all of these, hashes from the child chains are published onto the main chain at regular intervals. So, how and why are they different?

First, it’d be worthwhile to discuss the connection between Sidechains and Plasma, so as to reduce one variable from the equation. Basically, Plasma chains are an evolved, more secure form of regular sidechains. Primarily, they are “non-custodial”. That is, in the case of an error, nodes have the option to exit the chain, after a nominal challenge period, and after paying a higher transaction fee on the main chain.

Tight Coupling — The Difference Between Sharding and Plasma

If the main chain block has an invalid child chain block, it is itself invalid. Also, a child chain block, specifying an invalid main chain block, is itself invalid. Such a necessary validity condition is determined by the concept of tight coupling. And, it is this technicality that distinguishes Sharding from Plasma.

In fact, a chain with multiple layers isn’t a Sharding unless it is defined by tight coupling. Thus, in Plasma, even an invalid block’s header can be published onto the main chain, as the latter only regards it as a transaction and not necessarily as a Plasma block.

Now, the “longest valid chain” in the system is regarded as the “Canonical” chain in both Plasma and Sharding. In a sharded chain, however, the interlinked validity of the main chain and shards means that this involves a mammoth amount of data. As a result, there is no way of “direct” verification of the canonical chain. This, as it stands, is one of the major challenges to building a sharded chain.

The Problem of Indirect Validation

Again, both Plasma and Sharding are similar at this problematic juncture. Consider the Fisherman Schemes of indirectly determining the validity of the canonical chain. Primarily, they are employed to resolve availability issues.

Upon encountering an unavailable block, a node can publish a challenge in a sharded system. If unchallenged even after a stipulated time period, the block and its dependant blocks are reversed. The process is similar in Plasma.

However, in both, multiple fake requests can lead to a Denial of Service (DoS) attack, affecting the overall scalability of the system.

Plasma is virtually defenseless in such situations. But, sharding isn’t. Theoretically, at least.

The Enhanced Security of Sharding

In a significant advancement from traditional chains, sharding uses Data Availability Proof to handle the aforementioned issues of data availability.

Under this scheme, the availability check on an unavailable block will fail and the node will be aware of the unavailability. Moreover, owing to the holistic validity of shards, it’s enough to prove one block as invalid while determining the invalidity of the entire chain. Consequently, the risks of DoS attacks are significantly reduced by sharding.

Alongside, sharding uses randomly sampled committees. Also, as proofs happen “inside the client”, and not “inside the chain” this system is less vulnerable to the infamous 51% attacks.

Conclusion

To conclude, we might as well regard heightened security as one of the reasons to favor sharding over the traditional chains. Yet, when it comes to enhanced scalability, it may be necessary to use a hybrid, with Plasma chains on top of a sharded main chain. In fact, advanced Blockchains such as Casper are expected to tread this path in the long run.

--

--

Vinshu Gupta

CEO at Blockcluster — Building Futuristic Web Services for $3.1T Enterprise Blockchain Industry!!!