What is the particularity of YeeCo’s full sharding scheme?

Yee Foundation
6 min readJul 17, 2020

--

Friends who are familiar with the YeeCo white paper should know that YeeCo also uses sharding technology in terms of performance improvement, but unlike the general sharding scheme, YeeCo uses a “full-sharding” architecture, which is the biggest difference between YeeCo and other sharding projects. Before YeeCo MainNet release, let’s review the full sharding scheme and its particularity.

YeeCo’s full sharding scheme

First, let’s review the basic information of the full sharding scheme: YeeCo’s full sharding architecture divides the four workloads: network workload, transaction execution, state storage, and data storage are divided into four workloads, while other sharding solutions generally only focus on one or a few In terms of segmentation, such as network sharding, transaction sharding, and state sharding, the development difficulty of the three is a progressive relationship. State sharding can greatly solve the performance problems of decentralized systems.

However, state sharding does not solve all the problems: as the blockchain network storage resources increase, the node network will run slower and slower. In addition, the completeness of sharding and segmentation is also critical. If the sharding is not thorough, each node needs to maintain the state of the entire network account book and update the status of each transaction. The network performance cannot be effectively improved.

Therefore, YeeCo took data storage into consideration during the design process, and segmented network communication (network sharding), transaction execution (transaction sharding), state storage (state sharding), and data storage (storage sharding), which constituted full-sharding architecture.

According to YeeCo’s design: the number of shards is limited to the k-th power of 2, that is n=2^k, only k bits are needed to represent n different shards, and the last K bits of the transaction sender’s address will be used as the basis to divide the address into corresponding shards, and a series of operations related to the transaction, verification, storage, etc. are also divided into corresponding fragments, to avoid data interaction and mutual influence on different fragments. At the same time, a series of operations such as transaction, verification, and storage involved in the transaction are divided into corresponding shards, which avoids data interaction and mutual influence on different shards.

In other words, the full-sharding architecture can ensure that the working mode of each shard is completely consistent with the existing single-chain system. Each shard can independently complete synchronization transactions, verification transactions, packaging blocks, synchronization blocks, etc., effectively achieving isolation between shards. At the same time, the full-shard technology architecture also ensures that the throughput of the YeeCo network can grow exponentially as the number of shards grows.

For example, suppose the number of shards is 1 and the throughput is N; when the number of shards is 2, the throughput is 2*N; when the number of shards is 4, the throughput becomes 4*N. The number of shards will be decided by the miners and recorded in the block header.

The sharding solution will inevitably encounter two problems: cross-chain transactions and sharding security issues. Below we will detail YeeCo’s thinking in these two issues.

Schematic diagram of YeeCo consensus

YeeCo’s cross-chain transactions

From a technical perspective, a cross-shard transaction is essentially a cross-chain transaction. A transaction is split into two processes. The first process checks and reduces the balance in one chain, and the second process increases the balance in the other chain to ensure that the two processes are an atomic operation.

A common atomic operation is to achieve two chains to synchronize blocks, so that the success of the block means that the two processes succeed at the same time, and the failure of the block means that the two processes fail at the same time, thereby achieving atomicity. However, this method will introduce the synchronization mechanism of the two partitions, thus reducing the independence of the partitions and increasing the performance overhead related to the number of shards.

To this end, YeeCo introduced the CRFG (Conditional Reward Finality Gadget) to establish absolute certainty for PoW consensus, so that cross-shard transactions can be split into independently verifiable sub-transactions, avoiding the performance cost related to the number of shards brought by lock mechanism.

As can be seen from the above, the YeeCo main network will be divided into different shards according to the address information. We assume that two addresses on the 0th shard and the 2nd shard need to generate a transfer transaction. First, the address on the 0th shard is packed and the balance is deducted, but the balance is not directly added to the address of the 2nd shard; instead, a relay transaction containing the transfer information is generated, and broadcasted on the 2nd shard and finally confirm the increase in balance.

That is to say, if the first process of the cross-shard transaction has been included in the block but the final certainty has not been reached, the second process cannot complete the deterministic SPV verification and will not be included in the block. The balance increase operation of the second process is in unconfirmed status, cannot be spent. If the first process of a cross-shard transaction rolls back, the transaction of the second process is invalid. If the first process of a cross-shard transaction reaches finality, the second The process can complete deterministic SPV verification, package transactions, and the balance increase operation is in a confirmed state and can be spent.

YeeCo’s sharding security

Normally, in a blockchain system with n sharding, the power of each shard is only one-nth of the total network. A malicious node can exploit a 51/n% of the entire network to attack a shard, thus making the entire network ineffective. This is the so-called 1% attack problem. In order to effectively resist such risks, YeeCo introduced the design of parallel mining.

The plan is summarized as follows, the hashrate involved in parallel mining construct blocks of multiple chains, and construct the block heads of these blocks into a Merkle tree, then detect the nonce and calculate the hash, once the hash meets the difficulty of a certain chain. The requirement is to complete a new block packaging for this chain. This new block contains the previously constructed block of this chain, and the block header is Merkle Proof in the block header Merkle tree. Thus, the include proof of the block transaction is provided.

In a general sharding environment, one hashrate can only be applied to one sharding. Now, by parallel mining, one hashrate can be applied to all sharding, so that the difficulty of each sharding chain will be pushed up and the whole network hashrate will be all digging the same level on a chain. Therefore, it is guaranteed that as long as the hashrate of the malicious node does not exceed 51% of the entire network, it is impossible to attack any sharding. Moreover, all of YeeCo’s sharding chains support parallel mining.

It should be noted that parallel mining is not joint mining. The former is to “amplify” the effective computing power and increase the attack cost of a single shard to prevent the computing power from focusing on a specific shard. The latter is to borrow the chain of large computing power to ensure the safety of the chain of small computing power.

Parallel mining can not only “magnify” the effective computing power, but also enlarge the block rewards that can be obtained by the unit of physical computing power. With the same physical computing power and the same energy consumption, the more shards are divided, the more rewards will be obtained, which will naturally encourage miners to participate in YeeCo network mining.

YeeCo’s “full-sharding” architecture not only solves the performance problem of the blockchain network, but also considers the data storage problem, and prepares a complete solution in advance. At the same time, in terms of cross-shard transactions and security, the CRFG scheme and parallel mining are introduced to effectively solve the various problems faced in the development of shard projects, laying a technical foundation for the landing of the scene.

To know more about YeeCo:

Visit official website: yeeco.io

YeeCo Testnet: https://testnet.yeescan.org

Join our Telegram community: https://t.me/yeeofficialgroup

YeeCo block chain explorer: https://pocnet.yeescan.org

POCNET Web Wallet: https://pocnet.yeescan.org/create-wallet

POCNET: https://pocnet.yeeco.io

YeeCo Blockchain Technical WhitePaper V0.2:

https://doc.yeeco.io/YeeCo-V0.2-EN.pdf

YeeCo Github:https://github.com/yeeco

Follow us on Twitter: https://twitter.com/YeeCoOfficial

Like our Facebook Page: https://www.facebook.com/YeeCoOfficial

--

--

Yee Foundation
Yee Foundation

Written by Yee Foundation

A decentralized, high-performance infrastructure for the Internet of everything in 5G era 🔗Site: yeeco.io, Twitter: @YeeCoOfficial, Telegram: @yeeofficialgroup

No responses yet