Sharding
Sharding has become one of the top subjects to discuss in the Ethereum community. It’s because it is considered one of key options to solve the scalability problem of this blockchain. The term Sharding came to us from English and isn’t translated. So, what kind of technology it is and how is it introduced on the blockchain?
What is Sharding?
Sharding is one of the scaling strategies for any apps. Within the strategy, the information from the general database is divided into blocks and spread to various servers, which are called shards. The process of using this strategy is called sharding. Sometimes you can meet the term “partitioning” – this is a part of sharding. So is called the process of the database dividing before bringing to the separate servers.
The data sharding is divided into vertical and horizontal. It is connected with the fact that the database presented a table initially. If you divide the table into vertical columns (the title and all data below), then it is the vertical sharding. If you divide the table into lines (the titles of all columns and the table parts under it), it is the horizontal sharding. Anyway, then the table parts (i.e. the databases) go to different servers.
Why use sharding? Eventually, the apps that are developing, face the scaling problem. This happens when the current database server already can’t handle the load as fast and effective as before and reply to the app’s requests. Then the database is divided into parts and sent to different shards.
Together with sharding, the replication is also often used. In this case the servers (shards) receive the copies of themselves. It enhances the fail-over protection of the system.
Sharding technology and its use
We have described above, how the technology is used for the database sharding. Technically, it looks rather simple, but it should be put into practice very attentively and carefully. It’s because when the database is divided into parts and one request needs to receive the data from different shards (servers), then it is important to let the spread data “gather” back correctly.
The base of the majority of cryptocurrencies is a transaction – which is why sharding is used at the transaction level in the blockchain. This is it what is split into separate pieces, which are also called shards. These parts are sent to different nodes and are processed by them. In the theory, the sharding allows the cryptocurrencies to speed up the transaction processing process. But in practice, it is rather difficult to use it.
Difficulties of the blockchain sharding introduction
There is no mechanism that can track which node process the transaction. A safe and effective mechanism is necessary, which will quickly and safely work in the blockchain. There is no developed trust algorithm between the nodes to let them trust each other. In the cryptocurrency blockchain, the nodes do not have the right to simply trust each other – they must come to the independent consensus. A confirmation of the fact that both nodes finished the processing process is also needed. The sharding can be effectively implemented in the blockchains with the Proof-of-stake algorithm (full or partial), and now the scalability problem is faced mostly by the cryptocurrencies with the Proof-of-work algorithm.
Sharding as the tool for saving Ethereum
Considering the difficulties listed above, nobody takes on sharding. Nobody except Ethereum. This is the only one rather large blockchain, which even when coming to Proof-of-stake, will be interested in the implementation of this technology.
The talks about the sharding in the cryptocurrency world started when it was called one of the ways to solve the scaling problem in the network of the Ethereum blockchain. The users of the “ether” faced that the blockchain is already not able to process the growing number of this technology. It became especially obvious when the CryptoKitties game gained its huge popularity and significantly slowed down the work of the blockchain. Edward Snowden described the situation like this “Imagine that in order to buy something, you don’t need just to store the data of all your purchases during your whole life, but also give an access to the check of this database every time you’re going to buy something.”
The sharding was personally presented by Vitalik Buterin, the co-founder of Ethereum. It happened during the BeyondBlock Conference at the end of November 2017 in Taipei. At that time was presented the roadmap of the project, which, according to the developers, had to bring Ethereum to the level of the Visa payment system.
Already after two months, the developers reported that the first part of the sharding roadmap is implemented in the blockchain of Ethereum. In the beginning of this May, Vitalik Buterin said that soon it would be possible to introduce sharding in the Ethereum network. However, to do this, we’ll have to carry out a network hardfork.
It isn’t reported yet, how exactly sharding will be introduced. Probably, the trust problem between the nodes will be solved by introducing a material stimulation system – when nodes will receive a reward for the credible information and will be fined in case of violations.
We’ve mentioned above that the implementation of this technology requires the Proof-of-Stake (PoS) consensus algorithm. If now the “ether’s” network is working on Proof-of-Work (PoW), then soon it will go to the Casper protocol, which means the use of the hybrid protocol PoW/ PoS. This brings the implementation of sharding closer. On May 10th, the first version of the software Casper FFG 0.1.0 was published, which is available for testing. There is no exact information about the protocol introduction in Ethereum yet.
See also
Sources
https://ruhighload.com/Шардинг+и+репликация
http://chainmedia.ru/articles/ethereum-sharding/
https://probtc.info/materialy/35198/
https://decenter.org/blockchain/408-sharding-ethereum-rus
https://forklog.com/buterin-tehnologicheskij-sharding-pozvolit-ethereum-dostich-masshtabov-visa/
https://forklog.com/buterin-pervaya-chast-dorozhnoj-karty-shardinga-v-seti-ethereum-prakticheski-zavershena/
https://forklog.com/vitalik-buterin-zayavil-o-skoroj-implementatsii-shardinga-v-seti-ethereum/
https://forklog.com/opublikovana-pervaya-versiya-koda-obnovleniya-casper-dlya-ethereum/