DFINITY is an upcoming blockchain-based platform pegged as the “Internet Computer” that has a lot of excitement surrounding it. DFINITY is designed to support the next generation of software services and applications to become the public infrastructure of the Cloud 3.0.
As a public cloud computing resource, DFINITY targets business applications by substantially reducing cloud computing costs for IT systems. They aim to achieve this with a highly scalable and powerful network with potentially unlimited capacity. The DFINITY platform is chalk full of innovative designs and features like their Blockchain Nervous System (BNS) for algorithmic governance.
One of the primary components of the platform is its novel Threshold Relay Consensus model from which randomness is produced, driving the other systems that the network depends on to operate effectively. The consensus system was first designed for a permissioned participation model but can be paired with any method of Sybil resistance for an open participation model.
So what exactly is this consensus mechanism and how does it work?
Under the Hood
At its core, the DFINITY consensus mechanism is a heavily optimized proof of stake (PoS) model. It places a strong emphasis on transaction finality through implementing a Threshold Relay technique in conjunction with the BLS signature scheme and a notarization method to address many of the problems associated with PoS consensus.
DFINITY believes that they made the proper trade-offs between practical assumptions and theoretical security provability. The result is an innovative and highly unique consensus design.
The DFINITY consensus mechanism can be broken down into four layers from bottom to top:
- Identity Layer
- Random Beacon Layer
- Blockchain Layer
- Notary Layer
Image Credit – DFINITY Consensus Paper
The Identity Layer provides the registry for all the clients.
The Random Beacon Layer provides the source of randomness for all higher layers using a Verifiable Random Function (VRF).
The Blockchain Layer is driven by the randomness of the Random Beacon Layer and builds a blockchain from the verified transactions.
The Notary Layer provides fast finality guarantees to clients in the network.
Identity Layer
All participants in DFINITY are registered clients with permanent pseudonymous identities. The general purpose of the identity layer is to register identities in the network so they can be appropriately punished for malicious behavior. Open registration is possible through a stake deposit with a lock-up period.
This layer provides Sybil attack resistance, and open registration is achieved through submitting a special transaction to the network. Registration periods occur in non-overlapping epochs and the block produced in the first round of each epoch is a registry block which contains a summary for all registrations in that epoch. The particular registration transactions comprise an endorsement method which is the locked-up stake deposit by the registering entity.
Random Beacon Layer
The random beacon layer is the primary component of the consensus mechanism that drives the randomness of the blockchain and notary layer as well as any applications or smart contracts built on top. The overall purpose of the Random Beacon Layer is to provide an unmanipulable source of randomness to support a fast and scalable consensus layer.
The random beacon is a verifiable random function (VRF), which is a pseudo-random function that creates publicly verifiable proofs of the correctness of its outputs. In DFINITY, the VRF produces completely unpredictable outputs in each block round that nobody can know until it is available to everyone. The core component of the random beacon is the use of the BLS signature scheme to provide practical uniqueness and non-interactivity. The deployment of a threshold signature mechanism of BLS solves the “last actor” problem where the last actor in a decentralized randomness protocol knows the next random value, effectively giving them the power to abort the protocol.
Clients participate in the random beacon process by jointly producing the VRF random outputs. To improve the scalability of the network, the random beacon and notary layer are run by a committee who is changed every block/round. The random beacon output selects the next committee through a specialized protocol, and registered clients can propose blocks predicated on the output value of the random beacon that determines the priority ranking for clients to propose blocks.
According to the DFINITY Consensus Whitepaper, the Threshold Relay is defined as:
“The mechanism by which Dfinity randomly samples replicas into groups, sets the groups (committees) up for threshold operation, chooses the current committee, and relays from one committee to the next is called the threshold relay.”
Notably, the random beacon is fully decentralized but appears to behave like a trusted third party from the outside. However, the committee does not need to run a Byzantine agreement protocol for every beacon output because of the uniqueness of the BLS signature scheme. Agreement is automatic, allowing for a high-speed random beacon and low block time.
Image Credit – DFINITY Consensus Paper
The random output produced by the beacon is used by the next layer, the blockchain layer.
Blockchain Layer
The random output of the beacon is the input that the probabilistic slot protocol (PSP) uses to rank the registered clients for each height of the chain. The randomness of the beacon output allows this determined order to remain unbiased. Weights are subsequently assigned to block proposals based on the proposing client’s rank. Similar to the proof of work (PoW) model of giving preference to the heaviest chain, forks are resolved by giving preference to the chain with the most weight. Chains with more weight have more clients higher up on the priority list than discarded fork chains.
The PSP is formed instantly, allowing for consistently predictable block times. Once a client sees a valid output from the VRF, it can propose a block candidate with pooled transactions from users which it propagates to the notary layer. The notary layer waits for the specific constant block time to receive the proposed blocks.
Notary Layer
The notary layer is the highest layer of the consensus protocol and provides the extremely quick finality of transactions across the network. Once the notary layer receives the proposed blocks, it runs the ranking mechanism for them, selects the highest ranked block, and subsequently signs and broadcasts it to the network. Clients add the received notarized block to their copies of the blockchain. The random beacon then broadcasts a new random output, starting the round all over again.
The notary layer speeds up finality because it uses the threshold signature for the highest-ranked block created jointly by registered clients. According to the whitepaper:
“Only notarized blocks can be included in a chain. Of all the block candidates that are presented to a client for notarization, the client only notarizes the highest-ranked one with respect to a publicly verifiable ranking algorithm driven by a random beacon.”
However, notarization is not consensus since unfavorable timing can create more than one notarized block at a specific height. DFINITY identifies this as a particular advantage over other PoS systems:
“This is explicitly tolerated and an important difference to other proof-of-stake proposals that apply full Byzantine agreement at every block. DFINITY achieves its high speed and short block times exactly because notarization is not full consensus.”
A transaction in DFINITY is considered final after two notarized block confirmations. One of the most important distinctions to make about the entire consensus protocol in regards to its existence as a PoS mechanism is in the following paragraph:
“We like to emphasize that a notarization in DFINITY is not primarily a validity guarantee but rather a timestamp plus a proof of publication. The notarization step makes it impossible for the adversary to build and sustain a chain of linked, notarized blocks in secret. For this reason, DFINITY does not suffer from the selfish mining attack [4] or the nothing-at-stake problem.”
The nothing at stake problem is one of the foremost concerns of PoS consensus models and requires complex measures to mitigate. The dilemma has been one of the primary criticisms of the practical implementation of PoS consensus systems in public networks.
The notary layer is completely decentralized like the random beacon and runs an optimistic protocol for coming to a consensus on the block, allowing it to be non-interactive and fast. As a result, it can run at a parallel speed to the random beacon.
The DFINITY consensus whitepaper dives into the consensus protocol extensively, so if you would like to learn more about it, you can find it here.
Implications of the DFINITY Consensus Mechanism
The DFINITY consensus mechanism is designed for performance and flexibility. The algorithm scales through quorum selections driven by the random beacon which grant it fast finality and resistance against losses of network synchrony.
DFINITY will be one of the first few major cryptocurrency projects to implement a PoS consensus mechanism on a large-scale public blockchain network. It is explicitly tailored to drive the performance of the platform and allow it to scale to an unlimited capacity, theoretically. Moreover, the BNS of the DFINITY platform can upgrade the protocol transparently, automatically and consistently to drive network evolution.
Bootstrapping an on-chain governance mechanism with a heavily optimized PoS consensus protocol is highly ambitious and does come with legitimate concerns, however. PoS is often criticized for not being practically proven and too complicated to implement in a real-world system successfully. Additionally, on-chain governance mechanisms are unproven in regards to sustainability themselves. Combining the two in a new platform designed to scale as the Cloud 3.0 infrastructure may sound crazy (and rightly so) but has nonetheless peaked the interest of VCs to the tune of $102 million in a second round of funding led by Andreessen Horowitz and Polychain Capital.
Conclusion
DFINITY’s consensus mechanism is both novel and ambitious but also demonstrates the type of complexities associated with optimizing a PoS model for large-scale public blockchain networks. There is significant hype surrounding the project, and they have a suite of technical documentation available on the other components of the system, such as governance and near-instant finality. However DFINITY pans out, it will provide a fascinating gauge for just how far along the broader blockchain industry has come and just how powerful the technology behind it is.
1 Comment
I wouldn’t have imagined you being involved in bitcoin. Now you’ve almost convinced me to take another look at it! But it’s just so complicated!