Sharding is a computer technique that seeks to divide a database or network to make its operation much more scalable and decentralized. An interesting strategy that can help blockchain technology overcome its main problem: scalability.
One of the database management techniques that is gaining popularity in today's cryptographic community is the Sharding. It is a process of fragmentation or horizontal division of databases into smaller parts or fragments in order to allow better handling of them, making them less heavy and easier to operate.
Sharding was created in order to facilitate scalability in distributed and decentralized systems. But currently, its application in blockchain technology could considerably improve the scalability problems faced by networks such as Bitcoin y Ethereum.
Advantages of implementing sharding
The main advantage that fragmentation offers for a blockchain is improve scalability. Since transactions can be processed and validated more quickly, reducing the amount of time required for this process. And therefore, the network will have the capacity to process a greater number of transactions per second.
Likewise, the implementation of sharding reduces the risk of network centralization. Currently Bitcoin requires the use of equipment with great computational power to be able to support all the information that is handled in these networks. Equipment that has high acquisition costs, so that not many users may have the ability to buy it.
With the implementation of sharding, it will no longer be necessary to store the entire blockchain in the same node, so the purchase of expensive equipment will not be required. This would allow many more people to have the opportunity to participate in the network with their conventional equipment, guaranteeing the decentralization thereof.
Why is it needed sharding in blockchain networks?
It is not a secret that the growing commercial boom in cryptocurrencies such as Bitcoin and Ethereum, has caused the scalability problem it is accentuated much more in its networks. Today there are many users who want to make Transactions with Bitcoin or use decentralized applications from Ethereum. Causing many nodes to be sued for the validation and verification of all those processes.
Currently, the nodes of these networks operate in such a way that each and every one of them must store an exact copy of their blockchains. With all the data contained in it from the beginning. And that in addition, must be constantly and permanently updated as more information is created and added. Thus transaction speeds are severely affected. Reaching points where networks can collapse and need a large amount of time to process a transaction. Something that is not convenient for the sustainability and adoption of this technology in the long term.
Thus, although this methodology and work structure provides the blockchain with a high level of security and protection, also causes the Scalability of such networks is limited. Making its blockchain unable to process more information than each of its nodes can process individually. Currently the Bitcoin network, for example, requires the use of equipment with great computing power, the scalability problem is still present. So Bitcoin cannot process more than 5 or 7 transactions per second. While Ethereum, although it has a greater capacity compared to Bitcoin, it still has a scalability problem that prevents it from exceeding an average of 10 or 15 transactions per second.
Therefore, the implementation of sharding It can represent that viable and feasible solution that eliminates scalability problems, and that allows the processing of a greater number of transactions in less amount of time, in a safe and efficient way.
How will it improve sharding scalability in blockchain networks?
Sharding allows the fragmentation of a complete database into small, much more manageable and organized parts.
For example, if an informative database of an entire country or region is managed, with all the data of its inhabitants, such as localities, sector of residence, exact address of the property, work address, date of birth, age, quantity of children, economic income, among others, the large amount of information will make it much more complicated to search for or update specific information.
Instead, if that large database is subdivided into smaller, more specific chunks, the information will be much more manageable and efficient. Since each fragment will handle clear and precise information about its content independently from what is handled in other sublists, becoming lighter and more organized.
This is what the sharding applied on the blockchain. With fragmentation, it will no longer be necessary for all blockchain nodes to work linearly to validate all the data that is added to the chain. Rather, they will operate in parallel and manage shards (specific fragments) where the information will be distributed and these shards They will be in charge of validating and processing only the data that corresponds to them.
Only when all nodegroups finish executing the process that was assigned to them, all the information will be added to the blockchain, keeping it complete and complete, with the difference that the nodes will not handle the information in its entirety as it happens up to now.
The application of the method sharding It will allow transactions to be processed much faster, improving the scalability and efficiency of the network.
Will applying fragmentation on blockchain networks not decrease your security?
Implementing the sharding method on the Bitcoin or Ethereum blockchain could pose a security and communication problem on the network. Since the nodes, when assigned to a subgroup, they would not have direct communication with the nodes belonging to the other subgroups. Making necessary the creation and implementation of means of communication and external channels that allow the nodes to communicate with each other.
Likewise, guaranteeing the safety and protection of each of the subgroups is also a challenge for this new methodology. By subdividing nodes into shards, the hash power of each pool will drop considerably. This can pose a security problem and allow a malicious actor to carry out an attack more easily. A situation that jeopardizes the security and integrity of information.
However, the subgroups created will use the same consensus protocol that is used within the network. Thus there will be complete nodes that download and combine each of the processes carried out by each group of nodes. In order to form and maintain the complete blockchain and absolutely verify all the processes carried out. Even allowing thin clients to have access to all fragments for verification of operations.
Therefore, enough nodes can be maintained to keep the system safe and reliable. At the same time that it can process a greater number of transactions per second.
Other associated security issues
One of the biggest security issues that a fragmented blockchain can face is a single fragment acquisition attack. That allows an attacker to control a subgroup of the chain and thus prevent, for example, this subgroup from validating information such as obtaining the corresponding signatures. Or in another case, submit invalid or fraudulent transactions to the main blockchain.
As a solution to this problem, the random sampling. Where each group of the blockchain will have filters or notaries that will be chosen at random for the validation and approval of the information of the blocks.
Current implementations of sharding
Fragmentation is an issue that is still under development for some blockchain like Ethereum y Cardano. The developers of these projects are studying how they can implement this method to optimize their networks. But other cryptocurrencies like Zilliqa (ZIL) have already implemented sharding on their blockchains. Something that has allowed it to reach a total of 2.828 transactions per second in its test network.
Another interesting project that has shown the power of sharding is TON (The Open Network). Its development has already shown that the TON blockchain makes use of sharding to ensure the highest possible level of scalability. However, due to issues with the SEC, Telegram has been unable to make the launch of its network public. For that reason, we can only access its development and testing tools.
Interestingly, the same situation applies to Facebook Pound, a project that despite its enormous privacy problems, was surprising on a technical level due to the use of sharding in its network of validators.