Conflux CTO Wu Ming: let the consensus mechanism of POW is no longer a bottleneck | summit in new P.O.D public chain system throughput

 Conflux CTO Wu Ming: let the consensus mechanism of POW is no longer a bottleneck | summit in new P.O.D public chain system throughput

In November 28th, 2018 P.O.D New BlockTrend new potential block chain summit jointly sponsored by Odaily and the daily planet 36Kr group held in Beijing.

At the meeting, the Conflux project is “Scaling Nakamoto CTO Wu Ming Consensus to Thousands of Transactions per Second” (the throughput Nakamoto consensus rate to thousands of times per second transaction) speech, the expansion of the POW mechanism based on new ideas put forward.

Wu Ming from the working principle of the Cong consensus mechanism, pointed out in a simple consensus mechanism increases the capacity and improve the rate of lump block approach is not desirable, these two methods will make the block spread in the network delay is relatively longer, resulting in a lot of branch in the books, not only a waste of computing and network the resources, but also endanger the safety of.

In this regard, Wu Ming introduced the Conflux characteristics of the block chain trading less conflict, optimistic concurrency, and will block through the parent edge and the reference edge into directed acyclic graph (DAG), at the same time, the innovation of the concept of Ghost rules and Epoch combination, so that the machine can determine the nodes participating in the protocol agreement in the book structure consistent transactions in the total order. The backbone of the Ghost rules to ensure that selection cannot be reversed, DAG and Epoch help determine the same transaction order. Through this technology, Conflux can control the attack at the same time will double fork block into the effective so as to enhance the effective block ratio, and throughput can be public chain system rate to thousands of times per second transaction, and can confirm the delivery delay within minutes in the easy level. In Conflux, the system throughput bottleneck is no longer the consensus mechanism itself, but in the network bandwidth and the processing capability of each node locally.

The following is the speech of Wu ming:

Hello everyone, today is very pleased to have the opportunity to introduce our Conflux project, it is a common chain system innovation, its main advantage is to prove the throughput based on workload Nakamoto consensus mechanism rate to thousands of transactions per second.

We first look at the background of the problem. Now, the block chain and digital currency has had considerable influence in the industry. There are more and more people begin to pay attention to it. Block chain technology as the representative of bitcoin has become a can support in the Internet security level, consistent with the distributed transaction account platform. This platform which drives the financial technology, supply chain, technology innovation and application in the field of health. The global digital currency market also support billions of dollars in market value.

However, despite this, the problem of performance and efficiency is still a big pain point block chain system existing. This makes the existing block chain user experience is very bad, such as long delay and high transaction costs. At the same time also limits the ability of application development more meaningful in the block on the chain system. As we all know, bitcoin can handle about 7 transactions per second, Ethernet square is 30 per second transaction. The center of the visa such as transaction services can support thousands of transactions per second throughput.

Let’s look at the consensus mechanism bitcoin is how to work. In this agreement, the transaction is bundled into the inside of the block. All of the blocks to form a chain, the chain said the transaction record. Every part of this protocol machine node will want to produce a new block and packaged new trading in the block, and the hash previous blocks the value stored in the tail of the new block header information to the new fast chain in the chain block. This protocol is used by the proof of work and the long chain rules to let the machine all nodes to block chain state to reach a consensus. At the same time, it maintains a slow network average block rate and smaller block size.

That figure is the current state of a block chain, assuming an attacker wants a reversal in n-2 trading block, he will want to introduce a fork to become invalid block n-2 block n-3 from behind. But at the same time, all honest nodes will follow the longest chain of rules to their new arising out of the block at the end of the longest chain chain. The system maintains a low out size block rate and smaller network delay, compared to a time is relatively small, so the honest node is basically a sequence of blocks. So, as long as the force of more than 50% finally honest nodes, the attacker will not be able to make his own production chain has become the longest chain.

 Conflux CTO Wu Ming: let the consensus mechanism of POW is no longer a bottleneck | summit in new P.O.D public chain system throughput

But then someone might ask, is not by increasing the rate of lump or increase the size of the blocks to improve the system throughput rate? In the simple Nakamoto consensus mechanism to do so there is a problem. Because both the large size increase or increase the delay block rate will make the time block and block spread in the network becomes relatively small compared. This makes a new block in later could spread to the whole network would have other nodes generate another new block, and then in the block chain have bifurcation. Although the whole system will eventually converge to one of the longest fork, but the rate of lump and block size larger, the bifurcation of the situation will be more serious, the bifurcation will further appear in the existing fork. So at the end of the blockchain development books like this, is that there are a lot of bifurcation.

This raises two questions. First, the bifurcation of a waste of network and computing resources, because only the long chain of blocks is considered valid. Second, it does harm to the safety, because most of the long chain block chain in short, the attacker only needs less than 50% of the calculated force can produce the longest chain of malicious.

 Conflux CTO Wu Ming: let the consensus mechanism of POW is no longer a bottleneck | summit in new P.O.D public chain system throughput

Then we look at Conflux is how to solve this problem? We note that in the bitcoin based on the consensus mechanism chain, it is the nature of the transaction execution order has a strict limit, the order of execution is the transaction should be consistent with their local block generated sequence. For example, in this case, if the block 1 is generated in the block after 0, it implies is said to occur in the back block 0 to block 1 in trading. When the same block 2 in Block 0 behind, it also implies the same meaning. So if the back of the block 3, 4, 5, 1 in the chain block behind the 2 block will be lost, because we cannot determine the transaction should be how to sort.

But if we look carefully, the system actually block chain, many transactions are not in conflict, so that they can be in any order, as long as all participating nodes agree that an order can be. Such an observation based on the core idea of our Conflux is the main. We handle these optimistic concurrency blocks, then we put these blocks into a directed acyclic graph, which is DAG. Next we let all the nodes in the machine first assumes that all transactions between each other without conflict, so as to determine a consistent block sequence. They then block according to the order of further determines the execution sequence of all transactions, then in accordance with the transaction order to solve the conflict problem of transaction.

 Conflux CTO Wu Ming: let the consensus mechanism of POW is no longer a bottleneck | summit in new P.O.D public chain system throughput

Next, we use an example to illustrate this idea. This figure is assumed to show Conflux’s books in a moment of state. Each block has a pointer to its father block parent. So these regions and their parent edge, form a tree structure. In addition to his father’s side, each block also can have more than one reference edge. This is the main reference edge to record and express the happens-before relationship between blocks. For example, if a node machine in the production of block E, it has a D block, and this time, D also does not have any other block it is referenced. So this node can be to add a E reference D side to indicate that D is produced in E before.

The definition of these edges, this book structure set, this structure will be broadcast in the whole network nodes so that all nodes will eventually get a consistent account. Then in line with the books, how all of the node to determine a consistent total order block? The core of our ideas is, first of all, the first node in the DAG determines a consistent chain. Then, according to the main chain to determine the total order of a consistent block.

In order to determine the main chain, Conflux uses Ghost rules. Specifically, we start from the block, the block from the child to iteratively select the next block in the main chain. The selection rule is selected with the largest subtree of the child block. For example, the A block and B block is a block of two children block creation. The A subtree is 6 blocks, B subtree is 5 blocks. So we choose A as the main block followed by block block creation. The US according to the same rules, will block C, E, H, are selected in the main chain.

In order to produce a new block, a machine node first select the last block on the main chain as a new block’s father, then this new block to all have received but have not been cited references to other blocks block up.

Here is the use of Ghost rules rather than the long chain rule to choose the main chain, is because of the block all Ghost rules, including those in the fork block, the chain will choose to contribute. In this case, is guaranteed as long as the attacker is no more than 50%, it cannot be changed by honest nodes determine the backbone.

 Conflux CTO Wu Ming: let the consensus mechanism of POW is no longer a bottleneck | summit in new P.O.D public chain system throughput

Now we have a mechanism to allow all nodes to generate a consensus on the main machine. Then, the total order of nodes how to block consensus? In order to do this, we introduce the concept of a Epoch. Each block in the main chain and determine a Epoch. In the block, which belongs to the Epoch bifurcation, is produced by the first chain block in it after the Epoch decision. For example, the D block belongs to Epoch E, because D was the first E references, so before E, but D is not produced before C.

So, in Conflux, we first in Epoch order to block a. Then, within each Epoch, we determined the block order according to topological sorting. If there is a tie, we’ll block according to the hash value to break a tie. So after the map blocks in the order that. Next we want to exchange sort, according to the order of Conflux block to sort the transaction. Then within each block, we will follow the transaction in the block location of the row to be.

 Conflux CTO Wu Ming: let the consensus mechanism of POW is no longer a bottleneck | summit in new P.O.D public chain system throughput

The transaction may conflict. For example, in this example 2 transactions and trading 3. Because the transaction execution after 2, there will not be enough X account balance to 3 to complete the transaction, because the total order inside the transaction, transaction 3 occurred in 2 after the transaction, so we will let 3 transactions become invalid. On the other hand, the same transaction may be packaged into different nodes concurrent block different, such as trading 4. In this case, Conflux will only accept the first transaction in order in this, and repeated the transaction back off invalid.

 Conflux CTO Wu Ming: let the consensus mechanism of POW is no longer a bottleneck | summit in new P.O.D public chain system throughput

 Conflux CTO Wu Ming: let the consensus mechanism of POW is no longer a bottleneck | summit in new P.O.D public chain system throughput

So the next question is how Conflux can prevent the double attack. We first take a look at how an attacker can reverse a transaction in the books, such as trading 4. In order to do this, an attacker needs to generate a trading 4 double deal, packaged into a block, and the block is inserted into the front of the B block in all blocks in order. But the attacker is difficult to do this, there are two main reasons. The first is that unless the attacker can change the backbone, otherwise he could not reverse the transaction, because the transaction order is determined by the main chain. For example, an attacker wants to put a block inserted in the front position, he can do is back in a very early Epoch inside the block and then have a new block. But as long as the blocks are not in the chain, it will eventually belong to a late Epoch. Because when a new honest block, it will block the attacker to pull into the new Epoch by reference edge.

The second reason is that, if the attacker does not exceed 50% of the calculated force, he would have no way to change the main chain. Why is the 50%. Here I give an intuitive explanation. If the A block is a main chain block, an attacker want to replace A in the main chain of the position block A. Then all the attacker generated block will be in the following A ‘subtree, however generated all honest nodes will block in A below the subtree, then the attacker will need more than 50% subtree subtree is to make A more than A “. According to the theoretical analysis, the probability of A can replace the A with the increase of time decline index.

 Conflux CTO Wu Ming: let the consensus mechanism of POW is no longer a bottleneck | summit in new P.O.D public chain system throughput

Therefore, the confirmation of a transaction includes the following steps. The user first of the attacker’s stress ratio and the risk that he can afford to have a hypothesis. Given this assumption, Conflux is the first to find the exchange belongs to Epoch, and then find the corresponding Epoch main chain block. Finally, check the risk probability that the backbone is reversed is smaller than the block users can bear. If less than, the transaction can be confirmed.

This figure shows the general architecture of Conflux. All nodes in Conflux protocol machines connected by a P2P network, they spread and block trading by way of Gossip in the network. Each machine node maintains a pool of transaction, transaction pool to cache package. In addition each node machine also runs the Conflux stop consensus protocol.

Next we will briefly look at some of the experimental results. We built a prototype system of Conflux, and then run in Amazom EC2 10 thousand Conflux nodes to do the experiment. In order to simulate the real network environment of network, we restrict each node of the network bandwidth is 20Mbps. In the experiment we adjust to different block size and block rate. We measured the system throughput and transaction latency, and bitcoin and Ghost protocols are compared.

 Conflux CTO Wu Ming: let the consensus mechanism of POW is no longer a bottleneck | summit in new P.O.D public chain system throughput

The blue line is Conflux, you can see more, a block rate is high, increase the throughput of Conflux is linear, but bitcoin and Ghost can not do. This is because the bitcoin and Ghost block utilization rate will fall sharply.

Finally, to sum up. Conflux using the optimized concurrent block idea, makes the public throughput chain system rate reached thousands of transactions per second, and confirm the minute levels of time. The Conflux deal, the whole system throughput bottleneck is not in consensus on the mechanism, but in the calculation ability of each node on the network bandwidth or.

Thank you。

Leave a Reply

Your email address will not be published. Required fields are marked *