In my previous article “The solution to the problem of Blockchain Sharding” I wrote a General direction in which you need to move when building sharding in blockchains, but did not write how to do it. In the current article, I give one example of how this can be done.
We can build sharding on pow inside the nodes of each miner using this design:
A. Each shard is equal to the other.
B. Each block contains:
- Transactions related to the current shard
- List of hashes from all shard data (including the current)
- Hash of previous block
- Total block hash (hash function from 2, 3 and nonce)
Thus, the hashes of the blocks in all the shards match. To implement this scenario,we must:
- Accurate knowledge of the hashes of all the other shards. This is achieved by separating and adjusting each miner’s own capacity. Therefore, sharding is called imperative.
- Shards will have a single numbering of blocks, a single timing of data delivery, a single leader search — that is, it will be a single blockchain, but with a different composition of transactions — each shard has its own data.
The creation of a new shard
Below we will proceed from the fact that the creation of a new shard is a phenomenon more social than mathematical.
We rely on professional miners, for whom mining is a business. In this case, each miner has more than one computing device.
New shard is created using transaction creating shard:
- Transaction to trigger the creation of the shard (32 byte identifier, the name of the shard, the name of the default currency, and other settings). The node automatically registers the initiation in the list.
- The owner of the node decides to support the new shard in the list and allocates physical capacity for mining.
- In the process of mining, the node votes for a new shard by a corresponding entry in the winner block, if in the last N (1000) blocks there were more than 90% of votes for the creation of a new shard — it is registered in the list of shards.
Thus, at least 90% of the power of the entire network supports each shard, which means that the nodes pests will need to get at least 46% of the power.
Feature: when a new node is added to the network, it must specify which shards it supports directly and which through other nodes (see next option).
When allocating physical capacities for mining of a certain sharding, the miner is not obliged to specify only his node, he can specify any well-known node or cluster of nodes, guided by the authority of the owner in the media space.
If you specify multiple nodes, you can improve security by:
- The nodes maintain statistics of exchanges with each other (the rating)
- If successful, the exchange specifies the unit will be charged 1 point of the rating
- Nodes with a higher rating have more weight when choosing a calculation option
The choice of chain is:
Ratings of nodes within the same value of the variant are added
Select the option with the highest amount
In order to better understand how this is possible in the blockchain with PoW, I recommend you to read the technical WP of the TERA blockchain: https://terafoundation.org/files/TERA_WP_EN.pdf
If you want to be more involved, join our Discord channel where we discuss all technical and non-technical aspects of TERA: