Important Interpretation of QuarkChain’s Function Upgrade Vol.01
Unrestricted smart contracts to the whole network and more efficient VMs
Recently, there are two main updates in our Bi-weekly Report:
Supported creation and invocation of cross-shard smart contracts;
Upgraded EVM to Ethereum’s Constantinople hard fork.
Some readers may wonder: What is the creation and invocation of cross-shard smart contracts? Did Constantinople upgrade happen in Turkey?
First of all, it is guaranteed that the Constantinople upgrade has nothing to do with Turkey. It is synchronization of Ethereum’s most recent hard fork system upgrade. What is the meaning of the two important upgrades? What is the influence of cross-shard smart contracts? Why QuarkChain’s upgrade is related to Ethereum? Professor Yaodong Yang, the scientist of QuarkChain, gives a brief but clear interpretation.
Creation and Invocation of Cross-shard Smart Contracts
The reason why QuarkChain has a quite high TPS lies in two facts:
(i) QuarkChain’s horizontal scalability can improve efficiency in processing by adding more nodes;
(ii) sharding is a method of distributing the data among multiple machines and processing it separately. A shard is like a small world and each is capable of processing certain business. It’s quite different from Bitcoin or Ethereum, both of which require the entire network to process the date.
However, this creates a problem theoretically: In order to improve efficiency, each shard will process the assets on its own shard instead of distributing them to other shards. It’s like many years ago when banks are not connected by the Internet. If we want to manage our assets on one bank account, we need to go to the exact bank branch where we opened our bank account there. If we are away from the bank branch, it’s impossible for us to manage our assets on that bank account. A smart contract is like a bank where assets can be managed. The smart contract can only interact with the assets within the shard and other users can only use the smart contract within the shard if information can not be distributed to other shards. Although users can make a cross-shard transaction directly to transfer their assets to the shard. This kind of operation process will bring much trouble for users. In addition, users are likely to leave their own tokens on multi-shards. As a result, it will affect the user experience.
As for networks that adopt state sharding, there are a variety of problems to be solved in order to process a valid cross-shard smart contract. For instance, how to calculate the Gas fee when a cross-shard contract deployment fails? Currently, there isn’t any state sharding network which is able to process cross-shard smart contracts. Thus, it is a problem that some sharding public chains have to face.
Thanks to the hard work of QuarkChain’s engineer team, the technical difficulties are tackled and this function has been realized. Users of the main network are able to create and invoke smart contracts cross shards. It’s not necessary for users to remove their assets from their frequently-used shard to access the smart contracts of QuarkChain’s entire network. The experience of using smart contracts on QuarkChain and on Ethereum is the same.
Next, QuarkChain is marching further: Invoking a contract cross different shards, i.e., invoking a contract deployed on the №2 shard directly during the process of a contract deployed on №1 shard. Once the problem of cross-shard contracts is solved completely, the smart contracts on each shard can be coupled to support more complicated logic and scenario.
Upgraded EVM to Ethereum’s Constantinople Hard Fork
There was an upgrade of Ethereum in February, which is called Constantinople. In this new version, EVM, the virtual machine for smart contracts executed on the Ethereum network has been upgraded with a variety of functions, including:
- EIP 145: Native support for the “bitwise shifting” operational character to save the consumption of Gas for DApp developers.
- EIP1014: Better support of the scalability solution based on state channel and off-chain transaction, that is the mainstream of Layer 2 solution.
- EIP1052: Effectively Reduced the computation cost for large-scale smart contracts in Ethereum, especially when only the hash value of a smart contract is needed.
Most upgrades are related to EVM. Thanks to these upgrades, EVM has higher efficiency and is more user-friendly to developers. In addition, it also improves the performance of state channel solutions like Layer 2 solution.
As a VM used in every shard on QuarkChain, EVM on QuarkChain is upgraded to a version of Ethereum’s Constantinople hard fork and everyone is welcome to use it. As one of the first public chains to support state-sharding, QuarkChain will accommodate more VMs besides EVM in the future.
It should be noted that solutions such as state sharding and Layer 2 are not exclusive to each other, but have a common goal: to improve the performance of the network. QuarkChain is focusing on state sharding, a Layer 1 horizontal scalability solution. However, QuarkChain is also willing to embrace new technologies like Layer 2 solution. In fact, Celer Network, which is devoted to Layer 2 solution, is one of QuarkChain’s eco-partners.