Author: Gamals Ahmed, CoinEx Business Ambassador
An open network for a new world of DApps, Web 3.0, finance
ABSTRACT
Conflux represents the latest addition to an active field of distributed ledger technologies that are trying to address some of the scalability limitation of blockchains like Ethereum or Bitcoin. Dfinity, Hasgraph, Zilliqa, Algorand are some of the most prominent projects focused on this area. The ideas behind Conflux have some similarities with some of these projects but it remains loyal to the Nakamoto-consensus model. Conceptually, the Conflux protocol improves upon the Nakamoto-consensus sequential model of producing one block at the time allowing the network to create an arbitrary number of concurrent blocks without sacrificing the immutability of the blockchain. Technically, this optimization can enable the concurrent processing of thousands of transactions per second. Obviously, the devil is in the details, but Conflux seems to have combined several well-known computer science techniques to arrive to this major breakthrough.
Conflux keeps all fork blocks by Tree Graph, thereby improving the overall throughput of the system, and realizing scalability under the premise of security. The overall idea is not complicated. However, in terms of engineering implementation, the overall sequencing of all transactions, the processing of complex topology of Tree Graph, the problem of block generation incentives, and how to reduce duplicate transactions, there are still many difficulties to be tackled by much profound technical and theoretical solutions. At present, Conflux has already launched and open-sourced the testnet.
1.INTRODUCTION
Conflux represents the latest addition to an active field of distributed ledger technologies that are trying to address some of the scalability limitation of blockchains like Ethereum or Bitcoin. Dfinity, Hasgraph, Zilliqa, Algorand are some of the most prominent projects focused on this area. The ideas behind Conflux have some similarities with some of these projects but it remains loyal to the Nakamoto-consensus model. Conceptually, the Conflux protocol improves upon the Nakamoto-consensus sequential model of producing one block at the time allowing the network to create an arbitrary number of concurrent blocks without sacrificing the immutability of the blockchain. Technically, this optimization can enable the concurrent processing of thousands of transactions per second. Obviously, the devil is in the details, but Conflux seems to have combined several well-known computer science techniques to arrive to this major breakthrough.
Conflux keeps all fork blocks by Tree Graph, thereby improving the overall throughput of the system, and realizing scalability under the premise of security. The overall idea is not complicated. However, in terms of engineering implementation, the overall sequencing of all transactions, the processing of complex topology of Tree Graph, the problem of block generation incentives, and how to reduce duplicate transactions, there are still many difficulties to be tackled by much profound technical and theoretical solutions. At present, Conflux has already launched and open-sourced the testnet.
1.1 OVERVIEW ABOUT CONFLUX NETWORK
Founded in 2018, Conflux has raised US$35 million, according to Crunchbase, from investors including Sequoia China and Baidu Ventures — the venture capital arm of China’s equivalent of Google.
Conflux Network is an open protocol for a new world of DApps, finance, and Web 3.0. As a fast and secure public blockchain, Conflux Network combines Proof of Work and a Tree-Graph structure to power a new generation of decentralized commerce.y developing decentralized open source technologies.
Born from the top minds of Tsinghua University and University of Toronto, Conflux Network is overseen by a diverse global team with the mission to promote cross border collaboration.
Conflux is a new PoW network with a Turing-complete smart contract language similar to this of Ethereum. The Conflux network provides significant performance improvements with its processing of parallel blocks in a Directed Acyclic Graph (DAG) structure, which lowers confirmation times and increases transaction throughput sub- stantially.
Conflux Network is a scalable and decentralized blockchain system with high throughput and fast confirmation. It operates a novel consensus protocol GHAST, which optimistically processes concurrent blocks without discarding any as forks, and adaptively assigns heterogeneous weights to blocks based on their topologies in the ledger structure (called Tree-Graph). Therefore, Conflux is able to achieve high throughput as well as fast confirmation and liveness guarantee.
The only state endorsed public, permissionless blockchain project in China, Conflux Network is an open-source, layer-1 blockchain protocol delivering heightened scalability, security, and extensibility for the next generation of open commerce, decentralized applications, financial services, and Web 3.0. Conflux Network is overseen by a global team of world-class engineers and innovative computer scientists, led by Turing Award recipient Dr. Andrew Yao. Fostering entrepreneurship and innovation, Conflux elevates startups and organizations across industries and continents to generate decentralized marketplaces and digital assets for meaningful business and social impact. Founded in 2018, Conflux has raised $35 million in capital from prominent investors including Sequoia China, Metastable, Baidu Ventures, F2Pool, Huobi, IMO Ventures, and the Shanghai Municipal Science and Technology Commission.
To address the space congestion challenge, Conflux requires users to bond native to- kens into storage to occupy space, which implicitly creates a disincentive to occupy space unnecessarily. The disincentive stems from the payment of interest on existing tokens in the system. The interest on the bonded storage is payed to miners instead of the users to create a long term income to the miners. To address the fairness attack challenge, Conflux assigns the block reward in a way that eliminates the winner-take-all characteristic of mining. Instead of competing for the longest chain, miners in Conflux receive block rewards for all the blocks that they generate, albeit with some penalty mechanisms that encourage following the consensus protocol. Competing blocks are jointly penalized so that selfish mining is not profitable and different miners are incentivized to cooperate along the protocol to keep the network stable and secure.
Similarly to Ethereum, Conflux operates with an account-based model that every normal account associates with a balance and each smart contract account contains the corresponding byte codes as well as an internal state. Conflux supports a modified version of Solidity (the main contract language in Ethereum) and Ethereum Virtual Machine (EVM) for its smart contracts, so that smart contracts from Ethereum can migrate to Conflux easily.
A transaction in Conflux refers to a message that initiates a payment transaction, or deploys/executes smart contract code. Each block consists of a list of transactions that are verified by the proposing miner. Each node maintains a pool of verified, received transactions that have not yet been included in a block. Miners compete with one an- other by solving PoW puzzles to include transactions into blocks. Similar to Bitcoin and Ethereum, Conflux adjusts the PoW difficulty so as to maintain a stable block generation rate. Each node also maintains a local state constructed from the received blocks.
The Conflux consensus algorithm operates with a special Directed Acyclic Graph (DAG) structure called TreeGraph. Unlike Ethereum which only accepts transactions on a single chain into its ledger, the Conflux consensus algorithm safely incorporates and processes transactions in all concurrent blocks. There are two kinds of edges between blocks, parent edges and reference edges. Each block (except the genesis) in the Tree- Graph has exactly one parent edge to its chosen parent block. Each block can also have multiple reference edges to refer previous blocks. All parent edges form a tree embedded inside a Directed Acyclic Graph (DAG) of all edges.
At a high level, Conflux uses the novel Greedy Heaviest Adaptive SubTree (GHAST) algorithm (Li and Yang (2020)), which assigns a weight to each block according to the topologies in the TreeGraph. Under this weight assignment, there is a deterministically heaviest chain within the graph called pivot chain, which corresponds to the relatively most stable chain from the genesis to the tip of the parental tree.
Parent edges, reference edges, and the pivot chain together enable Conflux to split all blocks in a DAG into epochs. As shown in Figure 1, every block in the pivot chain corresponds to one epoch. Each epoch contains all blocks that are reachable from the corresponding block in the pivot chain via the combination of parent edges and refer- ence edges and that are not included in previous epochs. Details about the consensus algorithm can be find in (Li and Yang (2020)).
Experimental results have shown that Conflux is capable of processing 4, 000 trans- actions per second for simple payment transactions, at least two orders of magnitude higher throughput than Ethereum and Bitcoin. The improvement in throughput is a result of the TreeGraph structure and the consensus algorithm, so that the network can operate with a much faster block generation rate, no forks are discarded, and with a higher utilization of block space. According to the technical specification, the main net of Conflux will run under a fixed block generation rate at two blocks per second. The daily block generation rate is therefore 60 • 60 • 24 × 2 = 172, 800 blocks per day.
1.1.1 CONFLUX FOUNDATION
Conflux is the next generation blockchain protocol with scalability, security, and extensibility. In addition to the research and development of Conflux protocol, Conflux Foundation is committed to integrating blockchain technology into real-world scenarios with strategic partners and developing decentralized applications with mass adoption.
1.1.2 CONFLUX MISSION
The goal of the foundation is to gradually use technology to create the next generation of distributed systems. Conflux aim to promote the integration of technology and business with advanced blockchain technology, and they strive to collaborate the resources from technology, industry, business, and all other aspects to achieve the goal. They provide a rigorous security proof for the GHAST protocol. When adversarial computing power is bounded away from 50%, GHAST guarantees logarithmically bounded liveness and low confirmation latency.
The team also evaluated Conflux on Amazon EC2 clusters with up to 12,000 Conflux full nodes. The consensus protocol of Conflux achieves a consensus throughput of 9.6Mbps with per node network bandwidth limit of 20Mbps. On a combined workload of random payment transactions and Ethereum historical transactions, the Conflux Network achieves an end-to-end throughput of up to 3,480 transactions per second while confirming transactions under one minute.
1.1.3 WHAT IS THE SECRET TO CONFLUX NETWORK’S SUCCESS IN CHINA?
Conflux wins rare endorsements from Shanghai and Hunan provincial governments as other blockchain firms struggle for a toehold on the mainland.
In the shadow of the splitting up of the Blockchain Service Network — China’s once-hyped blockchain bridge between the East and the West — Conflux announced that it had received another endorsement from a regional government, this time in Hunan.
Hunan’s official embrace of Conflux Network, which is headquartered in Singapore, follows a similar endorsement by Shanghai last December.
In China, a government endorsement allows a company to access lucrative public sector contracts. Relationships are key to doing business in the country, and official endorsements like Hunan’s are notable events with consequences for a company far beyond mere public relations value. The ultimate goal of Conflux’s partnership with Hunan, according to an email from the company, is to share and verify all government administrative data on a blockchain infrastructure powered by Conflux.
Conflux — an open-source, layer-1 blockchain protocol — seems to be pulling off what few blockchain companies have been able to do on the mainland before: getting government seals of approval, so to speak, for a public, permissionless blockchain network.
The secret to Conflux’s success in China
Though Conflux is registered in Singapore, the company’s investors and core employees are part of China’s tech elite and have deep mainland roots.
According to Conflux, at least 10 out of the company’s 18-people development team, including founders David Chow and Fan Long, graduated from the computer science program at Tsinghua University — which is sometimes referred to as “China’s M.I.T.”
“Conflux is honored to be endorsed by the Hunan Government, whom we very much look forward to working with,” said Conflux Global Managing Director, Eden Dhaliwal. “Hunan is evolving into an epicenter for science and technology innovation and Conflux is proud to be at the forefront of this exploration and development. We strongly believe a positive relationship with Chinese state-backed entities is an instrumental piece to the puzzle of widespread blockchain adoption.”
Hunan’s plans for Conflux
According to Conflux and local media coverage, the company will be working closely with the Hunan government to build out blockchain infrastructure to enhance the region’s GovTech initiatives. Recently, the Hunan government initiated a three-year plan for blockchain, to build out the industry in the province while accelerating blockchain projects for supply chain management, tax compliance, electronic signatures and digital contracts.
As part of its three year blockchain plan the first of its kind for a provincial government in China when it was unveiled earlier this year. Hunan aims to build 10 blockchain-based public service platforms and five blockchain industrial parks, with a target of connecting 30,000 enterprises that will produce 3 billion yuan in revenue or about US$443.5 million across a variety of sectors.
“The lab at Hunan University creates a launching pad for more research and development opportunities in the great province of Hunan,” Dhaliwal said. “Not only will Conflux founders Fan Long and Ming Wu be presented as honorary professors, they will help foster an ongoing partnership with students and professors who may be interested in developing a Conflux incubation in the future.”
2. CONFLUX NETWORK TECHNOLOGY
Conflux Network is a scalable and decentralized blockchain system with high throughput and fast confirmation. It operates a novel consensus protocol GHAST which optimistically processes concurrent blocks without discarding any as forks, and adaptively assigns heterogeneous weights to blocks based on their topologies in the ledger structure (called Tree-Graph). Therefore Conflux is able to achieve high throughput as well as fast confirmation and liveness guarantee.
They provide a rigorous security proof for the GHAST protocol. When adversarial computing power is bounded away from 50%, GHAST guarantees logarithmically bounded liveness and low confirmation latency.
They also evaluated Conflux on Amazon EC2 clusters with up to 12,000 Conflux full nodes. The consensus protocol of Conflux achieves a consensus throughput of 9.6Mbps with per node network bandwidth limit of 20Mbps. On a combined workload of random payment transactions and Ethereum historical transactions, the Conflux Network achieves an end-to-end throughput of up to 3,480 transactions per second while confirming transactions under one minute.
The core value of blockchain is that it establishes a trustworthy and participatory decentralized platform without relying on the endorsement of any organization or individual. Importantly, Conflux serves to maximize this core value. It permits anyone to participate in the public blockchain consensus even without holding any stock share.
Conflux inherited the central design idea of Bitcoin system: Computing power is the only weapon in competing for the right of block generation. Additionally, in Conflux, the order of all transactions is solely determined by the Tree Graph (TG) . Conflux strives to prevent illegal transactions each transaction in the core chain is examined by all nodes of the network. The strict algorithm design and the comprehensive theoretical analysis of Conflux protect itself from most attacks. More importantly, Conflux pursuiting the efficiency without sacrificing any of its safety, decentralization or trustworthiness.
2.1 VERSATILITY OF APPLICATION
Most of the PoW-based blockchain systems currently in the field (e.g., Bitcoin and Ethereum) have a very limited transaction throughput rate, which is far lower than the centralized transaction services like Visa that can support the execution of >1,000 transactions per second. Such a low throughput rate restricts the possibility of exploiting more meaningful applications from blockchain systems. By adopting the Tree Graph (TG), Conflux realized a high throughput rate of 3000–6000 TPS in our internal network testing without compromising decentralization. In the future, they anticipate that Conflux will have versatile applications in many fields, such as financial transactions, Internet ID, Internet of things as well as property rights.
2.2 CONFLUX ARCHITECTURE
Differently from some the other blockchain scalability attempts, Conflux does not propose a brand new consensus model as much as a mechanism for extending the well-established Nakamoto consensus. Powering networks like Bitcoin, Nakamoto consensus has developed a reputation for being incredibly robust and secure as well as annoyingly slow. A Nakamoto-consensus protocol usually organizes transactions into an ordered list of blocks, each of which contains multiple transactions and a link to its predecessor. Each newly generated block will be appended at the end of the longest chain to make the chain even longer and therefore harder to revert. While incredibly secure, the Nakamoto-consensus model has the limitation that only one participant can win the competition and contribute to the blockchain.
https://preview.redd.it/sqezf2f9gky51.png?width=700&format=png&auto=webp&s=4ccc059ded0b3328dc3f73c334aa33a1faa934e0
To address the limitations of Nakamoto-consensus, several blockchains have relied on alternatives such as Byzantine fault tolerance (BFT) which relies on a hierarchical model to determine the order of transactions. However, there is a school of thought, which obviously includes the researchers behind Conflux that believes that BFT blockchains can’t be sufficiently decentralized at scale. The Conflux protocols follows a different approach powered by a simple idea: “What if we could optimistically process concurrent blocks and transactions deferring its final order to after commit time?”
Released from the constraints of sequential Nakamoto-consensus, Conflux introduces concurrent block processing by following a few simple steps:
1) Optimistically process concurrent blocks
2) Organize blocks into direct acyclic graphs (DAG)
3) First agree on a total order of all blocks (Assume transactions would not conflict each other )
4) Then derives the transaction order from the agreed block order (Resolve transaction conflicts lazily)
In order to implement these steps, the Conflux consensus protocol maintains consensus protocol maintains two kinds of relationships between blocks. When a participant node generates a new block in Conflux, the node identifies a parent (predecessor) block for the new block and creates a parent edge between these two blocks like Bitcoin. These parent edges enable Conflux to achieve consistent irreversible consensus on its ledger. The end result is that edges between blocks form a direct acyclic graph(DAG) that is both easy to navigate and introduces certain level of resistant to forks. From that perspective, Conflux can be seen as a DAG-based Nakamoto consensus protocol.
https://preview.redd.it/1oqmtz0hgky51.png?width=700&format=png&auto=webp&s=4660133a9c9843e76ea8b38b478ad197c027ecb8
Blockchain is more than a consensus protocol. Conflux provides a fairly simple architecture that extends some of the core principles of Bitcoin with innovative scalability constructs. The base architecture of Conflux includes the following components:
- Gossip Network: All participant nodes in Conflux are connected via a gossip network which is responsible from broadcasting a transaction to all nodes in the network.
- Pending Transaction Pool: Each node in the Conflux network maintains a pending transaction pool that includes transactions that have been heard by the node but are not yet packed into any block. Whenever a node receives a new transaction from the gossip network, the node adds the transaction into its pool.
- Block Generator: Conflux’s nodes use a block generator based on Proof-Of-Work(PoW) to create blocks for pending transactions.
- DAG State: Each node in Conflux maintains a local copy of the DAG graph that contains all the blocks the node is aware of.
https://preview.redd.it/7pyx1cvngky51.png?width=700&format=png&auto=webp&s=44028df42f68b343f1d4e0b705ca3ccac9632760
The principles of this architecture allow Conflux to combine the security and robustness of Bitcoin with the scalability of modern blockchains in a single network. The Conflux model ensures three very desirable properties of blockchain networks: security, concurrent transaction processing and correctness. However, the Conflux team went beyond the theoretical exercise and decided to see if some of their ideas work in practice.
2.2.1 CONFLUX IN ACTION
The Conflux team run a prototype implementation of the protocol on a cluster of 800 AWS EC2 instances running dozens of nodes each. In total the experiments used an architecture of about 10000 Conflux nodes processing blocks of 1MB-8MB in size. Not surprisingly, Conflux shown a clear advantage in throughput compared to other Nakamoto-consensus blockchains.
https://preview.redd.it/g4rohz1tgky51.png?width=700&format=png&auto=webp&s=aabd72b6111358143700fc8bbc627dd1ce66a089
A bit more impressive is that Conflux’s block utilization ration vastly outperforms other comparable blockchains.
https://preview.redd.it/sj5dhn0xgky51.png?width=700&format=png&auto=webp&s=fbf1cfc5b4d00eff1dd4bf3ef3c6c29e33869798
Other experiments showed that Conflux can scale consistently to about 20000 concurrent users without major impact in the confirmation time.
Conflux takes a novel approach to blockchain scalability by not completely departing from the principles of Bitcoin. At the moment, Conflux is not much more than a sophisticated research exercise but some of its ideas might evolve as a new blockchain or even be incorporated into Bitcoin.
2.2.2 CONFLUX AND SUCCEEDING IN DOUBLE SPENDING ATTACK
1. An attacker cannot revert a transaction unless he/she reverts the Pivot Chain
In order to double spend Tx2 (in block A), an attacker may refer the genesis block as parent and expects that the malicious block (Attack A) precedes A in the total order. However, as long as the pivot chain is not reverted, the malicious block (Attack A) must belong to a later epoch; so that the attacker cannot double spend Tx2.
2. An attacker cannot revert the Pivot Chain unless he/she controls 50% block generation power.
How to revert an old block:
- Suppose to revert a pivot chain block A.
- Honest participants may create small forks but always under the subtree of A.
- Attacker needs at least 50% block generation power to make subtree of A’ heavier than A.
2.3 GHAST MECHANISM
In order to solve the “liveness attack” problem, Conflux has designed a GHAST mechanism solution.
The core parts of the GHAST mechanism can be summarized as follows:
1) The heaviest chain rule is applied, but the block has three different weights: 0, 1, X. Where X is a relatively large number, for example X = 1000 (ignoring the situation involving adjustment of mining difficulty).
2) There are two types of blocks in the network: normal blocks and special blocks. The weight of the normal block is always 1; the weight of the special block is determined
according to the difficulty of the block (Difficulty) — there are 1/X special block weights of X, while the rest are 0. Mining a normal block has the same difficulty as a special block.
3) The block type is determined by the historical Tree-Graph structure of the block. As the generator of a block cannot arbitrarily specify the block type.
4) In the absence of an attack, all newly generated honest blocks should become normal blocks; after the attacker conducts any kind of “liveliness attack” and continues for a long enough time, all newly generated honest blocks become special blocks.
Full Report