Ming Wu, CTO of Conflux Project, presented the Scaling Nakamoto Consensus to Thousands of at the 2018 P.O.D New BlockTrend Blockchain Summit, co-hosted by Odaily Planet and 36Kr Group Transactions per Second (increasing satoshi Nakamoto’s consensus throughput rate to thousands of Transactions per Second) gave a speech, offering new insights on poW-based capacity expansion.

WuMing from mechanism, according to the working principle of the astute consensus is pointed out that the increase in consensus mechanism of simple block capacity and enhance the output rate of block is not recommended that these two approaches will make the block transmission in the network time delay is relatively long, so as to produce a lot of bifurcation in the books, not only waste of computing and network resources, also harm the security.

In this regard, Wu Ming introduced that Conflux takes advantage of the characteristics of less conflicts in blockchain transactions, optimistically processes concurrent blocks, and organizes blocks into directed Acyclic graphs (DAG) by parent edges and reference edges. Meanwhile, it innovatively combines the concepts of Ghost rules and Epoch. This enables the participating machine nodes to determine a consistent full order of transactions in a consistent ledger structure. Ghost rules ensure that the choice of master chain cannot be reversed, and DAG and Epoch help determine a consistent transaction sequence. Through this technology, Conflux can prevent the double flower attack while making the blocks on the fork effective to increase the proportion of valid blocks, thus increasing the throughput rate of the public chain system to thousands of transactions per second, and can confirm the transactions within a minute delay. In Conflux, the throughput bottleneck of the system is no longer the consensus mechanism itself, but the network bandwidth and the local computing processing capacity of each node.


The following is the transcript of Dr Ng’s lecture:

Hello everyone, I am very glad to have this opportunity to introduce to you our Conflux project. It is an innovative public chain system. Its main advantage is that it can increase the throughput rate of Satoshi Nakamoto consensus mechanism based on proof of work to the order of thousands of transactions per second.

Let’s start with the background of the question. Today, blockchains and digital currencies have had considerable influence in the industry. And more and more people are paying attention to it. Blockchain technology, represented by Bitcoin, has evolved into a platform that supports a secure, consistent, and distributed transaction ledger at the Internet level. This platform, in turn, drives innovation in fintech, supply chain, and healthcare applications. The global digital currency market also supports a market cap of $100 billion.

However, despite this, performance and efficiency issues remain a big pain point for existing blockchain systems. This leads to poor user experiences with existing blockchains, such as long processing delays and high transaction costs. It also limits the ability to develop more meaningful applications on blockchain systems. As we all know, Bitcoin can process about seven transactions per second, ethereum 30 transactions per second. A centralized transaction service like Visa can handle thousands of transactions per second.

Let’s take a quick look at how the consensus mechanism in Bitcoin works. In this protocol, transactions are packaged into blocks. All the blocks form a chain that represents the history of the transaction. Each machine node that participates in the protocol wants to create a new block and package a new transaction in that block, and put the new fast chain at the end of the blockchain by storing the hash of the previous block into the header of the new block. This protocol uses proof of work and the longest chain rule to get all the machine nodes to agree on the state of the blockchain. At the same time, it maintains a slow net-wide average block rate and a relatively small block size.

Suppose the diagram shows the current state of a blockchain. Suppose an attacker wants to reverse a transaction in block N-2. He would want to invalidate block N-2 by introducing a fork from the back of block N-3. But at the same time, all honest nodes follow the longest chain rule and put their new blockchain at the end of the longest chain. Because the system maintains a low block rate and small block size, the network latency is small relative to block time, so the blocks generated by these honest nodes are basically sequential. Thus, an attacker cannot make his own chain the longest as long as the total strength of the honest node exceeds 50%.



But one might then ask, can the throughput of the system be improved by increasing the block yield rate or increasing the block size? Simply doing so in the Satoshi consensus mechanism is problematic. Because increasing both the size of the block and the rate of block generation will make the time of block generation relatively small compared with the delay of block propagation across the network. This allows a new block to be created by other nodes before it has time to spread across the network, resulting in a fork in the blockchain. Although the whole system eventually converges to the longest fork, the larger the block rate and size, the more serious the fork will be, and the further the fork will appear on the existing fork. So the end result of the blockchain ledger is that there are a lot of forks.

This raises two problems. First, these forks waste network and computing resources, because only the blocks in the longest chain are considered valid. Second, it compromises security because the longest chain in the entire blockchain becomes shorter, allowing an attacker to produce a malicious longest chain with less than 50% of the computing power.



How does Conflux solve this problem? We note that in the chain-based consensus mechanism in Bitcoin, there is essentially a strict restriction on the order in which transactions are executed, that is, the order in which transactions are executed is the same as the order in which they are generated. In this example, for example, if block 1 is generated after block 0, it implies that all transactions in block 1 will occur after block 0. Similarly, when block 2 comes after block 0, it implies the same thing. So if the next block, 3,4,5, is chained behind block 1, block 2 will be discarded because we can’t determine how its transactions should be ordered.

But if we look carefully, in fact, in the blockchain system, many transactions are non-conflicting, so they can be executed in any order, as long as all the participating nodes agree on an order. So based on this observation, the main core idea of our Conflux is this. We first treat these potentially concurrent blocks optimistically, and then we organize these blocks into directed acyclic graphs, or DAGs. We then let all the machine nodes first assume that all transactions do not conflict with each other to determine a consistent block order. They then further determine the order of execution of all transactions based on the order of the block, and finally resolve the conflict of transactions based on the order of the transaction.




Let’s use a concrete example to illustrate this idea. Suppose this graph shows the state of Conflux’s ledger at a certain point in time. Each block has a parent edge that points to its parent block. These blocks and their parent edges form a tree structure. In addition to the edge pointing to the parent, each block can have multiple reference edges. This reference edge primarily records and expresses the happens-before relationship between the blocks. For example, if a machine node generates block E when it already has block D, and at this point, D does not have any other blocks referencing it. So this node can add an edge to E that refers to D to indicate that D came before E.

With these edges defined, the ledger structure is defined, and the structure is broadcast across the network so that all nodes end up with a consistent ledger. So with a consistent ledger, how do all nodes determine a consistent block total order? The core idea is that these nodes first determine a consistent main chain in the DAG, and then determine the full order of a consistent block based on that main chain.

To determine the main chain, Conflux uses the Ghost rule. Specifically, we start with the Creation block and iteratively select the next block on the main chain from the child block. The rule for selection is to pick the child block with the largest subtree. For example, blocks A and B are the two child blocks of genesis. The subtree of A has 6 blocks, and the subtree of B has 5 blocks. Therefore, we choose block A as the main chain block following Trands Block. Accordingly, we selected blocks C,E and H into the main chain according to the same rules.

To create a new block, a machine node first selects the last block on the main chain as the parent of the new block, which then references all the blocks that have been received but not yet referenced by other blocks.

The main chain is chosen using Ghost instead of the longest chain because all blocks in Ghost, including those on forks, contribute to the selection of the main chain. This ensures that the main chain determined by the honest node cannot be changed as long as the attacker’s computational power does not exceed 50%.



We now have a mechanism for all the machine nodes to agree on the main chain. Then, how do these nodes agree on the full order of the block? To do this, we introduce the concept of Epoch. Each block on the main chain defines an Epoch. Which Epoch the block on the fork belongs to is determined by the Epoch of the first main chain block created after it. For example, block D belongs to Epoch E. Because D was first referenced by E, it was generated before E, but D was not generated before C.

Therefore, in Conflux, we first order the blocks according to the order of Epoch. Then, within each Epoch, we determine the order of the blocks by topological sorting. If there is a tie, we break the tie based on the block’s hash value. So the blocks in this diagram are sorted like this. Next, we will sort the transactions. Conflux first sorts the transactions according to the block order. Then, within each block, we rank the transactions according to where they are in the block.



Transactions can conflict. Take transaction 2 and transaction 3 in this example. After transaction 2 is executed, there is not enough balance in account X to complete transaction 3. In the whole transaction sequence, transaction 3 takes place after transaction 2, so we will make transaction 3 invalid. Alternatively, the same transaction may be packaged into different concurrent blocks by different nodes, such as transaction 4. In this case, Conflux will only accept the first such transaction in the whole sequence and invalidate subsequent duplicate transactions.


The next question is how Conflux can prevent double-flower attacks. Let’s start by looking at how an attacker can reverse a transaction in the ledger, such as transaction 4. To do this, an attacker needs to generate a double-flower transaction of transaction 4, package it into a block, and insert the block before block B in the block’s full order. But this is hard for attackers to do for two main reasons. The first is that unless an attacker can change the main chain, he cannot reverse the transaction, because the order of the transaction is determined by the main chain. For example, if an attacker wanted to insert a block early, he could simply create a new block after a block inside a very early Epoch. But as long as the block is not on the main chain, it will still end up belonging to a very late Epoch. Because when an honest new block is created, it pulls the attacker’s block into the new Epoch by referring to the edge.

The second reason is that if the attacker doesn’t have more than 50% of the power, he can’t change the main chain. Why is it 50%? Let me give you an intuitive explanation. Suppose block A is A block on the main chain, and an attacker wants to replace A on the main chain with block A ‘. Then all blocks produced by the attacker will be under the subtree of A ‘, whereas all blocks produced by the honest nodes will be under the subtree of A, so the attacker will need more than 50% of the computation power to make the subtree of A ‘surpass that of A. According to theoretical analysis, the probability that A ‘can replace A decreases exponentially with time.



Therefore, the confirmation of a transaction consists of the following steps. The user first makes an assumption about the attacker’s ratio of computing power and how much risk he is willing to take. Given this hypothesis, Conflux first finds the Epoch to which the transaction belongs and then finds the main chain block corresponding to that Epoch. Finally, check whether the probability of the main chain block being reversed is less than the risk the user can bear. If less than, the transaction can be confirmed.

This figure shows the Conflux system architecture in a nutshell. All the machine nodes participating in the Conflux protocol are connected by a P2P network. They propagate transactions and blocks through the network by means of Gossip. Each machine node maintains a transaction pool, which caches the transactions to be packaged. In addition, each machine node is also continuously running the Conflux consensus protocol.

Let’s look briefly at some of the experimental results. We built a prototype system of Conflux, and then ran 10,000 Conflux nodes on Amazom EC2 to do the experiment. In order to simulate the real network environment on the public network, we limit the network bandwidth of each node to 20Mbps. In the experiment we adjust different block size and block yield rate. We measured throughput and transaction latency on the system and compared it to Bitcoin and Ghost protocols.



The blue line is Conflux. It can be seen that the larger the block size and the higher the block output rate, the throughput rate of Conflux can increase linearly, but bitcoin and Ghost cannot do so. This is because bitcoin’s and Ghost’s block utilization drops dramatically.

Just to conclude. Conflux takes advantage of the idea of optimizing the processing of concurrent blocks, enabling the public chain system to handle thousands of transactions per second, as well as minute-level confirmation times. In Conflux transactions, the throughput bottleneck of the entire system is no longer in the consensus mechanism, but in the network bandwidth or the computing capacity of each node.

thank you

Part of this article is reproduced with permission from 36kr and Odaily Planet


Click to obtain → PPT of this speech


Conflux has a huge advantage in the composition of team members: all the team members have professional research background, rich experience in the industry and winning experience in programming competitions.

Conflux is a team led by Professor Yao Qizhi, China’s only Turing Award winner. Academician Yao Qizhi is a world-renowned computer scientist. He was awarded the Turing Prize in 2000 for his contributions to computer theory, including complexity-based pseudo-random number generation theory, cryptography and communication complexity. In addition, most of the technical team members, including the co-founder, chief technology officer, core system engineering developer, algorithm engineer and so on, are from the “Yao class”. And almost all of them have gold MEDALS in programming competitions such as the International Informatics Competition, ACM-ICPC, and Code Jam. The Conflux team has an unmatched advantage in technical staffing. And in the future development, will continue to expand this core advantage.