An Introduction to our unique Consensus Algorithm
By Robin Massini

Jul 22, 2020

Discover the benefits of Dusk Network’s CA and learn our terminology with ease

Dusk Network is serious about privacy. A major strength of our blockchain includes the ability to provide privacy with financial applications. In fact, we’ve created an innovative smart contract for securities, dubbed the Confidential Security Contract (XSC), aiding users with issuing, registering, and trading digital securities with an eye on legal confidentiality and data protection.

But the XSC is only part of Dusk Network’s dedication to innovation and privacy technology. In this article, we take a closer-look at the consensus algorithm that makes our network tick.


Blockchain & Consensus Algorithms

Although we expect most of our followers to be intimately familiar with the basics of Blockchain technology, understanding the powerful mechanics that run Dusk Network requires a rudimentary grasp of what Blockchain technology does.

The essence of Blockchain is its function as a decentralized digital database, meaning no one entity has the ability to edit the information stored within it. Information is stored as blocks on a chain and the information is verified by all participants to ensure no tampering of information can occur. This phase is where the concept of Consensus Algorithms (CAs) becomes vital.

Information on the blocks in the blockchain need to constantly be verified by all participants to prevent the possibility of information tampering. The mechanisms that power the verification process are called Consensus Algorithms. Different blockchains utilize different Consensus Algorithms. Here are some common examples of CAs:

Proof of Work (PoW)

A brute force approach to information verification executed by validators (or data miners). This method is the oldest blockchain CA. Extremely energy inefficient and nearly inaccessible for everyday people due to the massive hardware costs involved.

Proof of Stake (PoS)

PoS was a direct response to the energy inefficiency of PoW, instead opting for validators chosen by the number of cryptocurrency tokens or coins they’re ‘staking’. Staking means locking up the cryptocurrency for a set amount of time. However, the base PoS algorithms currently in use are unable to fully protect the staker’s privacy.

Proof of Authority (PoA)

PoA is a reputation-based CA, meaning that there is no staking or mining involved. There are a limited number of block validators assigned to the verification process and these validators are pre-approved and designated ‘trustworthy’. In essence, this CA moves everything back closer to a centralized database.

Other CAs include Delegated Proof of Stake (DPoS), Proof of Elapsed Time (PoET), Proof of Burn (PoB) and more.

There are a multitude of CAs powering a variety of blockchains and, in the best case scenario, each has been chosen due to the mechanism’s characteristics lining up with the needs of the blockchain project. An erroneously chosen Consensus Algorithm can severely handicap usage of the blockchain itself.

When choosing a Consensus Algorithm for Dusk Network’s blockchain it soon became apparent that none of the legacy CAs mentioned above would allow us to reach the level of privacy, accessibility, speed, energy efficiency, and in-forkability we aimed for.

To achieve this, we created our own Consensus Algorithm: the Segregated Byzantine Agreement (SBA).


Dusk Network & the Segregated Byzantine Agreement (SBA)

In contrast to PoW, PoS, and any of the CAs mentioned above, the Segregated Byzantine Agreement (SBA) delivers substantial benefits to the Dusk project’s cause. For example, SBA delivers instant settlement finality. This means there is no wait time for block confirmations and thus a great fit for the digitization of securities. The SBA is also in-forkable, as a network fork often causes confusion and damages the network’s trust and reliability.

Due to its unique characteristics, the in-house created Segregated Byzantine Agreement is the perfect Consensus Algorithm for Dusk Network’s mission statement.

Here’s how the SBA works:

In essence, the SBA is tasked with the job of adding new data blocks to the chain in a secure and honest manner. It does this in phases, or ‘epochs’. The epochs, in turn, consist of multiple rounds.

A round is finished once all the steps are done properly:

  1. It starts with block generation. Multiple participants have the option to propose a block for this round.
  2. Afterwards, the blocks are reduced to a single potentially winning block.
  3. If this block is honest and created fairly, a block agreement adds this block to the chain.

Every single round goes through these three steps before looping to the beginning of the next round.

In short:

The Segregated Byzantine Agreement operates in epochs.

The epochs consist of multiple rounds.

The rounds go through 3 steps.


Diving headfirst in terminology

You might see some new terminology in the third step of the rounds mentioned above:

Block Generation & Block Agreement

These are two actions performed by two different key players in the network:

Block Generators & Provisioners

These two roles function through two different contracts:

Proof-of-Blind Bid (PoBB) & Staking

These two contracts are vital pieces of the SBA and dubbed Genesis Contracts. Due to their importance for the network they need to be deployed with the very first block. There are two additional Genesis Contracts (Fee and Transfer) but, for now, we’ll focus on PoBB & Staking.

Block Generators & Provisioners are two different nodes in our Dual Node structure. This atypical structure adds a division of power to further strengthen the security of the network and diminishes any chance of corrupting consensus.

Here’s how the two contracts that power the Dual Node structure work:

Proof-of-Blind Bid Contract

PoBB is a Private Proof-of-Stake leader extraction mechanism which leverages the power of the state-of-the-art zero-knowledge proof system to allow the participants to compete for the block producer rights without revealing their respective identities or the amounts that they bid. This is important to prevent collusion and to further strengthen the security of the network.

More information on the dynamics of the PoBB contract can be found in our demo:
[How it’s made: Privacy in consensus (Proof-of-Blind Bid)]

The Staking Contract

The Staking Contract enables prospective provisioners to lock-up a certain amount of DUSK within predefined bounds to be able to participate in the consensus. The contract is responsible for managing the locked stakes and the punishment of misbehaving provisioners. This functionality is vital for the security of SBA.
[Genesis Contract: Staking Contract]



What is the purpose of our Block Generators & Provisioners?

The PoBB & Staking contracts are what allow Block Generators to perform Block Generation and Provisioners to perform Block Agreements. Here’s how they do what they do on a granular level:

*Block Generators*

What do Block Generators do? Every single round they compete with each other to produce the winning candidate block to be added to the blockchain. Only when they succeed in producing the winning block are they rewarded for their effort.
How do they generate the winning block? Mainly through the novel leader extraction mechanism that works as follows:

  • Block Generators make a bid that contains the transactions to be added to the chain. By making this bid, they lock-up their bidding amount of DUSK for the duration of their bid.
  • Accompanying all the transactions that need to be added to the chain, the Block Generator is given a pseudo-random score.
  • The score of the bid is pseudo-random, meaning that it is mildly affected by the size of the bid. The higher the bid, the better the chance of a higher score and consequently winning the round.
  • The score has to be above a threshold value in order to be eligible for winning the round. By making this pre-selection, we improve efficiency of the network as we significantly reduce the amount of bids that have to be compared.
  • Finally, the bid with the highest round score is selected and up for validation by the Provisioners. If they are convinced that the bid has been constructed honestly and fairly, the winning Block Generator receives his rewards and the block is added to the chain.
  • By making the bid obfuscated or unintelligible with the power of zero-knowledge, we make it extremely difficult for participants to cooperate illegally and deceive others. We prevent collusion and add to the security of the network.

*Provisioners*

As opposed to Block Generators, Provisioners are not in direct competition with each other. Every round a selected group of Provisioners is tasked with the validation of the proposed candidate block by this round’s winning Block Generator. This works as follows:

  • Provisioners stake an amount of DUSK in order to be eligible for participation in the Provisioner Committee.
  • The selection process is somewhat-random. The higher the stake, the bigger the chance of being selected, as each and every single DUSK is a ticket in the lottery.
  • Every consensus round a committee of 64 active participants is selected out of all eligible Provisioners.
  • Once the committee is formed, they inspect the candidate block and verify its integrity.
  • The committee tests whether the Block Generator is indeed the creator of this block (without knowing its identity, all thanks to zero-knowledge technology), if all transactions are included in the block, and if it received its score honestly.
  • When the committee speaks its approval, the finalized block is added to the chain. All active participants receive rewards for their contributions.

Together, Block Generators and Provisioners secure the Dusk Network and add transactions to the chain. To add to the security, all the bidding, proving, and verifying happens under a veil of privacy. Unique to Dusk Network, node participants retain their anonymity as their identity is obfuscated as well.


Powered by you

The staking roles mentioned above fulfill a number of vital roles within the Dusk Network and it’s only fitting that these roles are offered first and foremost to supporters of the project. Whether taking on the role of a Block Generator or Provisioner, you are at the heart of the security of Dusk Network. Most importantly, staking is an opportunity for a bond of trust between community and project. To successfully kick-start any consensus, a vast amount of node participants is required.

The act of staking is a simple yet highly rewarding way to function on the frontier of new technology. It benefits all parties involved, with stakers receiving rewards in the form of tokens and the network itself being directly bolstered by their efforts.

If you want to help power Dusk Network, follow us as we prepare the opportunity for you to get directly involved.

Share this post

Subscribe to our newsletter

Dusk on GitHub Download Whitepaper