TPS Competition: an Exclusive First Place Interview

The enthusiasm of the participants inspired QuarkChain team and made us feel more responsible. QuarkChain team will move forward and and create more resplendence.

It is a great pleasure to see the enthusiasm of the participants and the excellent results beyond our imagination. QuarkChain always adhere to the principle of people-oriented and technology-leading. We hope that through the efforts of our team, we can bring brand-new changes to the area of blockchain. At the same time, we decided to hold the annual TPS competition in the future to attract more excellent developers to join our programmer community. In the future, we will also organize more activities aimed at the developer community, and strive to be industry-leading. — CEO Dr. Zhou

We would like to know their thinking about blockchain technology, and many users in the community would like to know more details about the winners. Over the past two days, we have published two interviews with second place and third place. Today, we will publish the interview with champion. The champion told us in the interview that he had paid attention to QuarkChain as early as the founding of QuarkChain, and he downloaded the source code to do research. His deep understanding and thinking about technology itself was an important driving force for him to win the champion. The following is the interview:

1. Could you briefly introduce yourself and your team?

I got to know blockchain at the beginning of 2017. After reading a large number of academic papers and recognizing the scalability issue facing public chains, I began to delve into how to improve the processing capacity of the public chain. Since I had some experiences in researching distributed systems, it occured to me that “divide and concor” might be adopted to solve scalability problem. In fact, I knew that it had a more academic name called “sharding” after a long time. Since that, I have been engaged in investigating sharding related research in the past two years.

2. How you know our TPS Competition?

I keep tracking of projects that I am interested in by following their Twitter, Telegram, WeChat announcements, and official WeChat groups. The news of this TPS competition was released on their WeChat announcement.

QuarkChian Discord: https://discord.gg/gVYRazf

3. Why do you choose QuarkChain? What other blockchain companies you’re paying attention to except QuarkChain? Compare with other public chains, what strengths you think we QuarkChain have?

I followed QuarkChain with great interest since April because it is the first blockchain to support state sharding. As the applications and transactions increase in blockchain, there is no possibility to save the whole ledger in every node. With the increase of operations and further improvement of on-chain TPS of blockchain, the data on the chain will be growing dramatically. The storage pressure of the nodes will also increase, which results in existing nodes’ failure to bear such a huge pressure and the prevention of new nodes joining. QuarkChain’s state sharding technology has attracted me from the very beginning.

I have followed many blockchain projects, such as ETH\EOS\XRP\ZRX\ENG\ZEC\IOTA\VET, etc. Among those projects that sharding technology has been implemented, in addition to QuarkChain, I also focus on Zilliqa, ETH2.0 and Dfinity. The main advantage of QuarkChain is the design of its two-layer architecture and economic incentive model. It is a very natural thing to support state sharding without sacrificing other features. Sharding is currently an excellent solution to the blockchain trilemma. Compared with other public chain projects, QuarkChain enjoys the advantage of sharding implementation, high scalability and high TPS, which are very suitable for running dAPPs that require high TPS. In comparison to other projects in which sharding is also adopted, QuarkChain’s supporting state sharding is the biggest superiority.

4. As the 1st place winner, can you share what efforts you have been made for this competition?

On the first day of QuarkChain open source, I have cloned the source code, analyzed the various modules of the code, and performed a simple run on my laptop. Because I have previously developed Storm, Spark and Hadoop related applications, I understand the basic structure of a distributed system framework, i.e., a cluster’s master node and slave node can be deployed in different nodes. However, the first version of open source code does not have this feature. Running cluster.py will start the master node and multiple slave nodes in multiple processes in the same node. This is definitely a “pseudo-cluster”. I initiated this question in the QuarkChain developer community, and Dr. Qi Zhou gave a detailed answer:we need to write the script for deployment. Next, I started to modify the source code, write the script, and finally successfully separated. Of course, some minor bugs have been fixed, such as shard block time is greater than main chain block time due to node time out of synchronization.

The initial experimental environment had 26 nodes, each with 24 CPUs and 48 G RAM. In order to facilitate the deployment, I built a Docker image, built a Docker private repo, and wrote scripts to start and stop the cluster. Next, I used a different shard_num and slave_num to test the QuarkChain in all directions, and recorded the CPU usage and RAM usage of the node in detail, which is very important for the subsequent experiments. I found that because the current code is simulated mining, it does not have a high demand for CPU but consumes a lot of memory. Roughly speaking, for every doubling of shard_num or slave_num, the memory overhead is also doubled, and when the node memory is exhausted, the processing performance will be greatly degraded due to the need for frequent swap. Thus, after several tests, the best parameters were found: shard_num was set to 1024, slave_num was set to 128, and the peak TPS would achieve 23k+.

I know that if there is enough memory, more shard_num and slave_num can be set to achieve a higher TPS, which cannot be further improved due to my hardware limitations. In the last two days of the competition, I checked the results submitted by everyone on github. One developer’s submission far exceeded mine. Thus, I started to look for ways to find resources and finally locked the Amazon Cloud because it provides on-demand charging mode. In the various examples provided, I found the most cost-effective node (the cheapest memory), and finally used a r5.4*large as the master node and six r5.24*large as the slave nodes to form a cluster. Since the docker image has been created previously and the startup script has been written, it is effortless to migrate the experiment to the Amazon Cloud. Finally, I set shard_num to 1024, slave_num to 256, and TPS number hit 50k+.

5. If there’s no time limit, what else do you think you will do to further improve your TPS?

  1. The two parameters shard_num and slave_num can be further improved by using more nodes. I firmly believe that it is not difficult for QuarkChain to deliver 100k on-chain TPS.
  2. Currently, multiple shards can be run in a slave without implementing parallel processing. Multi-threading can be adopted to implement that function.

6. What have you learnt from our TPS Competition? For the participant’s perspective, what do you think that the organizer (QuarkChain) can further improve in the future?

Through TPS competition, I analyzed the QuarkChain source code in depth and solved the problems that have been confused me before, such as how to deal with cross-chain transactions. In addition, I have a brand new understanding of the QuarkChain team, excellent research capabilities, and strong engineering abilities. The QuarkChain code is well standardized with high quality, and the core part is developed independently, which is undoubtedly different from the current large number of blockchain projects.

As a participant, I think the rules of the TPS competition still have room for further improvement. Some suggestions would be:

  1. Limit the usage of the super nodes. The starting point of the cluster mode is to avoid super nodes. It should be encouraged to use multiple cheap, low-configuration common nodes to form a cluster.
  2. Provide a bug bounty program. Each participant may encounter one or more bugs that do not occur in other experimental environments. The team should take advantage of this opportunity to collect more bug information.

7. Thanks for your participation. we believe that you have a deeper understanding of our open source code after joining the competition. Could you share your opinion of our code and any suggestions? Also, as an open source project, we encourage you to contribute more to our code in the future, will you?

It is confirmed that the QuarkChain code has very good standard and quality. For the functionalities implemented by QuarkChain, I have several thoughts, and please excuse me if there is any misunderstanding.

  1. The QuarkChain cluster can greatly improve the TPS through horizontal scalability. However, the blockchain is a system composed of multiple nodes. That is to say QuarkChain has multiple clusters. It does not make sense to talk about the processing capabilities of a cluster alone. In the blockchain system, there are three scarce resources: node network bandwidth, CPU, and memory. Among them, the deliver of transaction and block needs to consume the network, the verification needs to consume the CPU, and the state needs to be saved in the memory. QuarkChain’s sharding technology allows the CPU and memory to scale horizontally. However, each cluster is connected through the master node. All transactions and blocks are disseminated through the master node, which results in a system bottleneck in network bandwidth. Let’s take Bitcoin transactions as an example. Under the condition of a network bandwidth of 13 Mbps, the peak TPS is close to 7000 TPS, and the actual situation may be much smaller than this number. QuarkChain will also face this problem, i.e., TPS will be greatly limited due to network bandwidth limitations. In the end, QuarkChain may require a very good network environment, and a small number of clusters (<1000) can achieve the goal of 100K TPS.

Note: (On this point of view, in fact, for the limitation of network bandwidth, we have two starting points: 1. In order to meet the large-scale commercial use of block chains in the future, high-speed network requirements are necessary. For example, the network that AWS provides now is 10Gbps, or even 40Gbps. The future may be even higher. 2. In the future, QuarkChain 2.0 network, slave can be directly connected to another cluster’s slave without the participation of master, thus reducing the bandwidth requirement of master.)

2. QuarkChain’s clustering model is based on trust, which is currently offline trust. That is to say, at present, ordinary users cannot use their own nodes to run a single shard. They need to find a master node, and both parties trust each other. This is a bit too ideal. You need to consider the online trust mechanism as soon as possible so that ordinary users can participate, instead of only joining the mine.

3. Since the PoW consensus is adopted both in main chain and shards, under the sharding framework, the TPS has improved, but the confirmation delay of the transaction still failed to drop significantly. QuarkChain’s clustering model and two-layer architecture can actually support more consensus algorithms, such as PoS, DPOS, PBFT, etc. These consensus algorithms can help reduce transaction acknowledgment delays.

In general, QuarkChain is a very promising public chain. Although there are some problems at present, the project is still in its infancy and I believe they will be solved gradually. I will continue to pay attention to QuarkChain, and in the next research work, I will combine my ideas with QuarkChain.

8. Do you have any expectation for blockchain industry in general?

The blockchain is undoubtedly a transformative technology, and it is certain that it will gradually change our way of life, making the cost of fraud higher and personal privacy better protected. The only expectation is that we hope that this day will come soon so that ordinary people can enjoy the benefits of blockchain technology.

9. Do you have any expectation for QuarkChain?

I entered the crypto world since the beginning of 2017. I experienced the bull and bear markets and saw the impetuousness of the crypto world. I also felt the rapid development of the blockchain technology. I hope QuarkChain can stay away from impetuousness, integrate the advantages with other projects and take its place in the front ranks of sharding technology.

The above is the first place’s interview. If you have any questions, please leave comments. Thank you for supporting QuarkChain. Thank you for accepting our interview.

FYI

Website
https://www.quarkchain.io
Discord
https://discord.gg/gVYRazf
Telegram
https://t.me/quarkchainio
Twitter
https://twitter.com/Quark_Chain
Medium
https://medium.com/quarkchain-official
Reddit
https://www.reddit.com/r/quarkchainio/
Facebook
https://www.facebook.com/quarkchain/

--

--

--

QuarkChain provides a secure, decentralized and scalable blockchain solution to deliver 100,000+ on-chain TPS

Recommended from Medium

$NEAR: the solution to all our problems?

F3DAO is the world’s first decentralized computing power trading platform

Playzap Announces Partnership with League of Empires

Asia Blockchain Updates 2019.12.05

Asia Blockchain Updates 2019 by Amy Kang

How ConsenSys’s Latest Acquisition Puts Blockchain at the Center of the Commercial Space Race

2020 Oscar Speech and the Power of Blockchain

Etherisc launches 50 Million DIP Token Grant Program

Blockchain or Hedera HashGraph

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
QuarkChain

QuarkChain

https://www.quarkchain.io

More from Medium

GENERATION’s strategic partner, Baobab Partners, participating in the ‘2022 Metaverse Expo’ in…

ACK GENESIS NFT UTILITY #3

What is an ICO, IDO, or IGO?

Harness the Initial DEX Offering to Raise Capital