Scaling blockchains through proof-of-work.
What is The Blockchain trilemma?
The invention of blockchain heralded a new age of societal organization by introducing decentralized cooperation via objectively verifiable collectively curated datasets. Blockchains as sets of protocols provide a way for people to work together, directly, without interference by other parties, whether private or public. However, single threaded decentralized blockchain technology has advanced to the point in which it is significantly limited by the widely discussed Blockchain Trilemma. The the blockchain trilemma imposes limitations in which only two of three attributes can be optimized: Scalability, Decentralization, and Security.
- Scalability: What is the throughput? How many TPS can be processed?
- Decentralization: How many nodes are running the blockchain?
- Security: How difficult is it to attack or censor the system?
The blockchain trilemma proposes that blockchains can only achieve tradeoffs between the characteristics of scalability, decentralization, and security, but that they cannot achieve all three properties at once. For example, blockchains can try and overcome scale by increasing block size to allow a higher transaction rate (TPS), but this results in increased bandwidth, computation, and storage requirements for nodes. Increased node requirements causes a reduction in the number of nodes making up a network, which reduces the decentralization of the network. Similar arguments can be made for the tradeoffs surrounding scalability and security as well as decentralization and security, however, we will not take the time to cover those here, but interested readers can learn more here.
We argue that the blockchain trilemma is only a true limit in the context were two functions of a blockchain are conflated, specifically consensus and consistency. However, if we understand that these two functions can be decoupled, the design space is no longer limited by the blockchain trilemma but rather by the CAP theorem which is an older concept in distributed databases.
The CAP theorem allows us to strictly look at the problem of a blockchain as a distributed database problem if we do not conflate consensus with consistency. To understand the new set of trade-offs once consensus and consistency are decoupled we should define the characteristics discussed by the CAP theorem:
- Consistency: Do all of the nodes have the same data state?
- Partition Tolerance: Can network nodes operate with limited knowledge of overall network state?
- Data Availability: Are network nodes able to provide read access to the current state?
In this new construct, we can propose creating sharded sets of data, ie independent blockchains, which will increase throughput, but will sacrifice global consistency, decrease the partition tolerance as well as data availability in a global context. However, in each independent blockchain or shard we can maintain the properties of consistent, partition tolerant, available datasets up until individual blockchain shards run into the network constrained bandwidth limit which is endemic of single threaded blockchains.
Presently, we have really not said anything new, and the topology proposed is manifest in many scaling proposals such as ETH 2.0. However, the key piece that we have mentioned but not yet discussed is how do we disentangle consistency with consensus while maintaining a secure, scalable, decentralized system.
Sharding State without sharding work
The current attempts that have been made to increase the security of modular designs (sidechains, roll ups, and PoS validators) fall victim to centralization via infrastructure, liquidity sinks, and trusted validators with inadequate contesting mechanisms.
Ethereum claims that sharding a Proof-of-Work system would lower the hash-rate needed to compromise a portion of the network. This is one reason that they want to move to Proof-of-Stake.
However, Quai proposes a new solution wherein state can be sharded in a Proof-of-Work system without dividing work through a process called Merged Mining.
Merged mining originated with Namecoin merged mining on Bitcoin in 2014. Namecoin claimed merged mining increased network security for both Namecoin and Bitcoin since miners no longer need to choose between mining one or the other. This is a fundamentally important property when deciding how to scale a modular blockchain system since it is possible to have several child blockchains that can all be secured by the same amount of hashrate.
By allowing merged mining via PoW on a set of modular chains, miners are able to secure many intertwined blockchains which share a common set of rules, monetary policy, and base token. The blockchain braid creates a network with sybil resistance (aka security) which is at least as good if not better than Nakamoto consensus.
Hierarchical Merged Mined Blockchains
Quai Network proposes hierarchical merged mining as a solution to scaling blockchains without compromising decentralization or security. Hierarchical merged mining works through a series of chains which are arranged in a tiered structure. The chain at the top, Prime, has the largest mining reward but also the greatest difficulty and slowest blocks. The next levels, Regions, and zones have sequentially lower difficulty, and faster blocks enabling greater liveliness.
Each one of the blockchains in the hierarchy are fundamentally independent chains which do not depend on any of the other chains. They have a shared token and monetary policy, but the consensus rules are locally enforced. To mine in this context, a miner must mine at least one slice of the tree (prime, 1 region, and 1 child zone) which they can choose arbitrarily. The ability to be able to only mine a slice in the overall braid ensures that as the network throughput increases, miners can still participate without being forced to increase node requirements super-linearly with transaction throughput.
One important property that results from merged mining a slice of a hierarchy is something we refer to as a coincident block. When blocks are proposed in a merged mined context the header must contain references to all of the blockchains which are being merged mined together. In Quai, this manifests as a header which is effectively an array of 3 headers corresponding to Prime, Region, and Zone.
A block is found in a blockchain if it meets the difficulty requirement for a block in that blockchain context. This means that only 1 portion of the header is ever valid in any single context. However, if a prime block is found, then both a region block and a zone block will also be found because the difficulty of the child chains will always be lower. When this happens this is called a coincident block. The important property of this block is it creates deterministic objectively verifiable cross-chain references which can be used to transfer state from one chain to another. This effectively creates decentralized bridges between all of the blockchains in the network which allows interoperability.
Hierarchical Longest Chain Rule (hlcr)
The hierarchical longest chain rule is the consensus mechanism in which the canonical truth of the network is based off of the blockchain with the most work aka Prime. Hierarchical longest chain rule guarantees that at coincident Prime blocks all state transitions in the child chains cumulative work becomes equal to the cumulative work in prime. This is due to the fact that if someone tries to roll back a Zone they would need to roll back through the coincident Prime. To roll back Prime an attacker would need to present a chain that has as much work as Prime. Hierarchical longest chain rule achieves sybil resistance equivalent to Nakamoto consensus because all chains achieve the amount of aggregate work represented in Prime at every coincident block even when they only advance at a slower rate proportional to the hash power in each respective chain intra coincident block.
Quai Network achieves a scalable PoW architecture because it makes tradeoffs in the CAP theorem trilemma which allows for greater throughput by delaying global consensus. There is an inherent trade-off that is being made. Quai Network can dramatically increase throughput although somewhere between 3–4 orders of increased TPS it will eventually be constrained by network bandwidth, latency, and delay of cross-chain state propagation.
Join us to build a better blockchain.
Quai Network is an open-source Proof of Work blockchain network utilizing the capabilities of merged mining to increase throughput and security. Users of Quai Network will enjoy fast transaction times without compromising decentralization and security. Miners will have competitive mining opportunities across the many blockchains within the network.
Capable of thousands of transactions per second, the Quai Network is a Proof-of-Work solution to scalability that is soon to be ready for mainnet release.
Opinions, ideas, and statements shared in this update are delivered with numerous assumptions, risks, and uncertainties which are subject to change over time. There are multiple risk factors, including those related to blockchain, cryptographic systems, and technologies generally, as well Quai’s business, operations and results of operations, that could cause actual results or developments anticipated not to be realized or, even if substantially realized, to fail to achieve any or all of the benefits that could be expected therefrom. We reserve the right to unilaterally, completely, or partially change plans, expectations, and intentions stated herein at any time and for any reason, in our sole and absolute discretion, and we undertake no obligation to update publicly or revise any forward-looking statement, whether as a result of new information, future developments, or otherwise. ACCORDINGLY, WE RECOMMEND THAT YOU DO NOT RELY ON, AND DO NOT MAKE ANY FINANCIAL DECISION OR INVESTMENT BASED ON, THE STATEMENTS CONTAINED IN THIS UPDATE OR ANY OF OUR UPDATES/ARTICLES — INCLUDING BUT NOT LIMITED TO ANY SELLING OR TRADING OF QUAI TOKENS, ETHER, OR ANY OTHER CRYPTOGRAPHIC OR BLOCKCHAIN TOKEN, OR THE SECURITIES OF ANY COMPANY.
The views, opinions, and statements made in this update are those of an individual author and not those of any institution, University, or legal entity operating within the jurisdiction of The United States or beyond. There is no association between these views, opinions, and statements and any for-profit or non-profit entity, particularly with Universities, Foundations, and other Agencies located within the United States. Any perception of such an association is purely accidental, and will be rectified immediately if brought to our attention by the reader.