Chain and Producer | Not only is it fast, the public chain must be flexible enough to adapt to the development of the industry
郝方舟
2018-10-15 00:00
本文约4361字,阅读全文需要约17分钟
Instead of predicting which area the next killer application will appear in, it is better to create an operating system that can support more scenarios and needs.

Winter is approaching, "Xiong" Guan Man said. Compared with the beginning of the year, the speed of new additions and the pace of financing of blockchain projects have slowed down.turn around and leaveCourt tearAnd concentrate on practicing a few paths. It’s also like every trend changes with the seasons, and the followers come and go. For the projects I talked about last year, several companies have dismissed employees due to shrinking financing and were forced to transfer (tao) to (li). Most of the adherents hold faith and focus on lower-level technologies. They achieved phased results and rethought some fundamental issues.

For example, is blockchain really born for general computing? What roles will the public chain and alliance chain play? Which expansion solution can lead the blockchain to commercialization? Is blindly pursuing performance a misunderstanding of the public chain? Why did the so-called "super public chain" perform poorly after the mainnet went live? After the tide of capital ebbs, has the public chain become a segmented track that has "fallen out of favor"? In addition to being faster, what other qualities should blockchain 3.0 have? With an attitude of learning and asking for advice, Odaily discussed the above issues with the leading public chains in the industry, and passedPublic Chain 101Columns share ideas with readers.

5 months ago, Odaily hadCan blockchain support large-scale applications,andQuarkChainFounder cycle discussion. Qiqi’s team has many years of experience in high-performance system development in companies such as Facebook and Google, and believes that horizontal expansion is the way to truly balance costs. The combination point of the system and the sharding technology (Sharding). Recently, I visited the cycle and learned that QuarkChain’s TPS has increased from 2000 at the end of March to a peak value of 14,000+. The test network has also completed the main functions of version 1.0 and is supporting more consensus mechanisms, virtual machines and token protocols. Version 2.0 evolution; at the same time, QuarkChain has also made a series of interesting exploration attempts in community operation and ecological interaction.

In addition to further discussing technical details such as sharding, we also try to glimpse the future of the bottom layer of the blockchain from the "mirror" of the rise of Internet giants.

Cycle's judgment on the blockchain industry is as follows:

  • In the cold winter, most investors wait and see, but the technical community is increasing. Only by working hard and persevering can we promote the blockchain to become the next Internet.

  • The public chain should not only pursue speed, but also be flexible enough to continuously evolve and adapt to development.

  • Designing a good DAPP requires not only technical and product-level thinking, but also insight into the model and interesting economic design.

  • Sharding is not a panacea, and the design rules for sharding should be deduced in combination with the business logic of the scene.

We edited and organized the content of the interview in the form of questions and answers as follows:

Odaily: QuarkChain open-sourced its code on Github in September. I would like to ask about the data performance and progress of QuarkChain after it was open-sourced, and whether it was "discovered".

Cycle: From project establishment to testnet, QuarkChain took 8 months, and it ran pretty well. In a test environment with more than 6,000 nodes and more than 10,000 concurrent virtual machines, the peak TPS exceeds 14,000. We are currently improving the documentation and development environment, and conducting code reviews.

Compared with other first-mover projects, we are still catching up. Specific actions include: adding a new development team in Beijing; presenting the technical characteristics of QuarkChain through workshops in Blockchain Week in San Francisco, and conducting offline discussions and roadshows with the local community; co-initiating a hackathon with partners to observe How people with different understandings use our network and gather feedback.

Getting more in touch with the programmer community is not only an opportunity for everyone to get started, but also an opportunity for yourself to update. After the open source, some people did find one or two bugs about the smart contract, and we haven’t seen any obvious problems after we fixed it in time.

On the other hand, we also encourage technicians to develop some small programs from the perspective of users, such as payment, games and other common functions that can be handled by smart contracts.

Odaily: In addition to technical barriers, community operations and attracting developers are also the core competitiveness of public chains. I saw that the QuarkChain official website has a TPS competition entry, and the winner will get 1 BTC. How is the game going now?

Cycle: Because QuarkChain is designed to support horizontal expansion, it is theoretically possible to use multiple machines to increase TPS, which can be simply understood as "parallel connection". We haven't tested this ourselves, so it can be included in the competition.

Participants will be required to record a short video to prove that the QuarkChain-based tool has reached a certain speed, and then write a report including machine configuration and parameters, submit it to github for publicity, and we will randomly check the top few.

Of course, "fast" is only one aspect. Many public chains have reached a high TPS. The greater advantage of QuarkChain lies in its flexibility.

Odaily: Flexibility seems to be the focus of QuarkChain version 2.0. I saw in the latest technical text that version 2.0 will support different consensus mechanisms in different shards. Before asking about the specific implementation path, I want to understand that QuarkChain is based on What kind of judgment is it that the application layer needs an underlying operating system that supports different consensus mechanisms? Will blockchain's killer app appear in areas other than Internet products?

Cycle: whether to build the bottom layer with sufficient performance to support the application first, or to force the bottom layer design from the demand, which is a bit similar to "the chicken or the egg first". From the perspective of QuarkChain, we actually don’t know what field the real killer application will be born in. We just generally feel that payment and games are more likely.

Therefore, we do not make too many future predictions, but choose to develop a flexible public chain that can continuously iterate and adapt to development. Even if new and better consensus mechanisms and virtual machines come out in the future, we can iterate and support them immediately. For example, when an application requires A's virtual machine, B's consensus, and C's code, we can be flexible enough to support the permutations and combinations between them.

The development of Google and Facebook is not because of guessing what Internet applications will look like ten years later, but because they are flexible enough to add various plug-ins at any time. Translating the underlying system design experience of the traditional Internet to the blockchain is exactly what our team is good at.

Odaily: Now that we have talked about the comparison with the history of Internet development, I will be very curious. From the perspective of public chains, how does QuarkChain see the future of blockchain applications? Where does DAPP have to catch up with APP, and what are the points that are different from APP?

Cycle: The application layer should still start from the user's point of view. Current blockchain applications can make users feel "uncomfortable". For example, fomo3D, CryptoKitties, etc. are mostly based on the web, and many applications have not yet been well adapted to the experience on mobile phones.

Looking back at the history of WeChat, it did not attract much attention at the beginning. The breaking point was after the launch of voice messages and chat, and then the barriers were consolidated by continuously adding new functions. Good blockchain products can actually start with one or two points, such as payment and games. The key is to combine user needs and let users feel that the real pain points have been solved, and then expand the functions.

Mobile apps have a history too, they just didn't work as well before Apple came along. This also shows that we must abandon old ideas and think about what a product should look like from the perspective of humanity and economics.

Designing a good DAPP requires more consideration, not just technology and products, but also insights into patterns. The common denominator of the more successful DAPPs before is the interesting economic design. Although they obtain short-term traffic, they can keep people participating and staying. The biggest difference between blockchain products and APP lies in the incentive mechanism of the token economy, which is also one of the charms of decentralization.

Odaily: Let’s go back to the positioning of the public chain. How can we help the application land? When application developers have many choices of public chains, how to win their approval and cooperation?

Cycle: The work of our BD team is to study what kind of products have the potential of killer applications. After feedback to the technical team, we will provide more applications with better functions in version 2.0.

For example, although not every application needs to develop its own token, there are still many projects that want to build their own ecology, so they build the bottom layer from the beginning to the end, and on the other hand, they need to combine the needs of the vertical field. "The project volume and talent demand are huge. QuarkChain will support these applications to create their own native tokens by adding new shards to better meet the rules they designed, and at the same time not be constrained by the ERC20 protocol, such as using horizontal expansion solutions to speed up and avoid network congestion.

To sum up, QuarkChain is responsible for all underlying affairs, such as storage, blocks, and support for DAPP's individual needs.

Odaily: You just mentioned using sharding to achieve flexibility. Let me recall that in the last interview, we compared sharding to building a highway. So has QuarkChain already implemented state sharding? What are the specific sharding rules? For example, how to allocate node clusters and transaction tasks? And can cross-chip transactions be avoided in design?

Cycle: After implementing the 1.0 function, QuarkChain is doing state sharding.

Here I also want to emphasize that sharding is not a panacea. For example, we are still observing and learning with the industry how to truly support horizontal expansion, and which case business logic is really suitable for sharding technology. In addition, the more shards, the better. More shards mean higher maintenance costs.

Therefore, we will not do too complicated at the beginning. Some work will be similar to clearing the ground and reserving space before repairing a road faster than a highway.

At the same time, the sharding rules are not static, and QuarkChain will flexibly adjust according to business scenarios. For example, geographical location can be used as a dimension of node grouping, which can be imagined as a "census". First, the survey tasks should be divided from large to small, and then the data should be aggregated according to "township→county→city→province". The basic principles behind this It is to reasonably set the minimum area unit to avoid wasting unnecessary energy, and try to let adjacent areas aggregate data first.

It is difficult to completely avoid cross-shard transactions. QuarkChain hopes to shorten the transaction distance when cross-shard transactions occur. The business environment represented by the transaction also has a lot to do with the geographical location. We will understand the business logic when designing shards and reduce the frequency of cross-shard occurrences to ensure performance.

Odaily: According to the data on our official website, there are 256 shards, 50 clusters, and 129 nodes in each cluster in QuarkChain. What is the current design principle? Does the number of nodes in a single chip affect security? Is Layer 2 prone to congestion when confirming the results of sharding calculations?

Cycle: Because QuarkChain is driven by the cluster mechanism, let’s talk about the design principles of the cluster first. The cluster is responsible for helping to process data on all shards and the main chain concurrently. Each node corresponds to two shards, and one node in each cluster is responsible for data exchange with the root chain. So each cluster contains 129 (=256/2-1) nodes.

Layer 2 is relatively independent, and Layer 1 may not even know the existence of Layer 2. Since not every transaction has to be aggregated to the root chain at any time, the blocks of the root chain are very small. We predict that the throughput will increase in the future, and there may be congestion, but it is fine before that.

The security is mainly protected by computing power and economic mechanism. So far, there have been no security problems caused by the small number of nodes in a shard. The biggest feature of QuarkChain is its flexibility, so it will continue to be optimized in the future.

Odaily: When cross-shard transactions occur, how does the root chain confirm the time order in different shards? Will there be a hard fork?

ChineseChineseEnglish, editor's supplement). This consensus mechanism can be compared to a series of traffic rules, such as turning on the lights when overtaking on the expressway.

Regarding the issue of hard forks, the more famous hard forks in history are more due to security issues or the inability of the community to agree on some functions. QuarkChain discussed with technical staff when working on the mining algorithm, avoiding hard forks by being more CPU-friendly and more flexible in design.

Odaily: Finally, I would like to ask, as a road to public chain expansion, sharding is favored by many project parties. Is there any one that QuarkChain thinks is relatively leading?

Cycle: Other public chains that do sharding can be said to have their own strengths. I think it is Ethereum that innovates more. Whether it is the consensus mechanism or the exploration of sharding, Ethereum is trying to solve more grand problems.

This article is mainly to explore more possibilities of the next phenomenon-level public chain, underlying design, consensus mechanism, etc. Since the project is still in its early stage and the market is yet to mature, Odaily does not endorse the project, and this article does not have investment guidance.

郝方舟
作者文库