The problem : As the number of transaction on a blockchain increases the transaction speed slows down. This situation creates scaling problem on blockchain. The main purpose of sharding is to increase the number and the speed of transactions on blockchain.
Sharding as a solution offer for scaling problem:
Vitalik Bulterin proposes Sharding to solve the scaling problem of blockchain.
Sharding is the future of Ethereum scalability, and it will be key to helping the ecosystem support many thousands of transactions per second and allowing large portions of the world to regularly use the platform at an affordable cost. However, it is also one of the more misunderstood concepts in the Ethereum ecosystem and in blockchain ecosystems more broadly. It refers to a very specific set of ideas with very specific properties, but it often gets conflated with techniques that have very different and often much weaker security properties. The purpose of this post will be to explain exactly what specific properties sharding provides, how it differs from other technologies that are not sharding, and what sacrifices a sharded system has to make to achieve these properties.One of the many depictions of a sharded version of Ethereum. Original diagram by Hsiao-wei Wang, design by Quantstamp.
The Scalability Trilemma
The best way to describe sharding starts from the problem statement that shaped and inspired the solution: the Scalability Trilemma.
The scalability trilemma says that there are three properties that a blockchain try to have, and that, if you stick to “simple” techniques, you can only get two of those three. The three properties are:
- Scalability: the chain can process more transactions than a single regular node (think: a consumer laptop) can verify.
- Decentralization: the chain can run without any trust dependencies on a small group of large centralized actors. This is typically interpreted to mean that there should not be any trust (or even honest-majority assumption) of a set of nodes that you cannot join with just a consumer laptop.
- Security: the chain can resist a large percentage of participating nodes trying to attack it (ideally 50%; anything above 25% is fine, 5% is definitely not fine).
Now we can look at the three classes of “easy solutions” that only get two of the three:
- Traditional blockchains – including Bitcoin, pre-PoS/sharding Ethereum, Litecoin, and other similar chains. These rely on every participant running a full node that verifies every transaction, and so they have decentralization and security, but not scalability.
- High-TPS chains – including the DPoS family but also many others. These rely on a small number of nodes (often 10-100) maintaining consensus among themselves, with users having to trust a majority of these nodes. This is scalable and secure (using the definitions above), but it is not decentralized.
- Multi-chain ecosystems – this refers to the general concept of “scaling out” by having different applications live on different chains and using cross-chain-communication protocols to talk between them. This is decentralized and scalable, but it is not secure, because an attacker need only get a consensus node majority in one of the many chains (so often <1% of the whole ecosystem) to break that chain and possibly cause ripple effects that cause great damage to applications in other chains.
Sharding is a technique that gets you all three. A sharded blockchain is:
- Scalable: it can process far more transactions than a single node)
- Decentralized: it can survive entirely on consumer laptops, with no dependency on “supernodes” whatsoever
- Secure: an attacker can’t target a small part of the system with a small amount of resources; they can only try to dominate and attack the whole thing
The rest of the post will be describing how sharded blockchains manage to do this.(https://vitalik.ca/general/2021/04/07/sharding.html)
The Risks of Blockchain Sharding
Since the idea of sharding first showed up on the radar of blockchain developers about three years ago, it has driven a lot of controversy. The controversy stems from the fact that, traditionally, having every node process every transaction was a core tenet of the consensus architectures that lay the foundation for blockchains. Since there is no centralized authority verifying blockchain transactions, the network as a whole decides which transactions are valid. When you stop having every node process every transaction, you theoretically raise the risk that invalid transactions could be recorded by a subset of malicious nodes and remain unchecked because the rest of the network does not handle those transactions.
Proponents of blockchain sharding argue that it is eminently possible to mitigate the risk of invalid transactions on a sharded blockchain by ensuring that each transaction is processed by a sufficient number of nodes. Still, due probably to the fact that sharding runs contrary to one of the founding principles of blockchain architecture, sharding is an idea that many folks have trouble swallowing .
From a technical perspective, calculating the security risks of blockchain sharding more precisely would depend on a variety of factors that are specific to the type of blockchain you want to share, as well as the sharding technique you use. Some blockchains can be sharded more easily – and perhaps more securely – than others; for example, because the Bitcoin blockchain lacks native support for smart contracts, it would likely be more difficult to implement a highly secure sharding architecture for Bitcoin than it would be on the Ethereum blockchain. There are also multiple ways to achieve sharding , each with different pros and cons.(https://www.nasdaq.com/articles/sharding-and-future-blockchains-2018-06-26)