Zero-Knowledge: PLONK Demo 2
By Mels Dees

Apr 30, 2020

We demonstrate how easy it is to build PLONK circuits with the help of our PLONK TurboComposer. With user friendliness central in its design, we dive deeper into the various examples that we’ve created and how to use the API and SDK.

Quick recap
In Part 1 we’ve introduced the PLONK zero-knowledge proof system, explained why an updateable reference string improves scalability and paves the way for the deployment of privacy-enabled smart contracts. We discussed the difference between proving times and verification times and the first benchmark results: 6 second proving time and a 5 - 7 millisecond verification time for a $DUSK transaction made with Phoenix, our transactional model.

The zero-knowledge proof system PLONK plays a crucial role in the entire Dusk Network blockchain stack. For a full overview of our technical framework and how it all ties together, click here.

This week, we start with an introduction of our optimized PLONK circuit builder that is called TurboComposer. For coders familiar with the Rust programming language, the TurboComposer provides an intuitive tool to create their own circuits, and use the PLONK library directly as a dependency in their projects.

User Friendliness
It's important to know that the Dusk PLONK library is set-up in a fashion that makes it as easy as possible for Rust developers to tap into zero-knowledge and use it in their projects. This means that developers do not only have the TurboComposer at their disposal, we've also created additional gadgets that facilitate easy re-usage of built circuits with different values. In addition, the Dusk PLONK team has gone to great lengths to make sure that the code is well-documented and comes with various examples to get you under way.

Unlike most zero-knowledge proof systems, the Dusk PLONK library doesn’t require a team of specialists to get started - instead you can get to work if you have a medium level of development experience. The API is constructed in such a way that you don’t have to worry about refactoring it for every API change, and custom gates are included to support various use cases.

PLONK inside Dusk Network. Examples of Use Cases.
PLONK is used in various instances inside the Dusk Network blockchain. We’ve highlighted just a few.

Private transactions - Obfuscation. When a transaction is sent, both the sender's and receiver's addresses are cryptographically linked to hidden values, which are the input and output, respectively. This is often called a shielded transaction, all that has to happen now is that the sender proves, using a PLONK zk-proof that they have knowledge of the spending keys. This is called no linkability.

Consensus - Proof of Blind Bid. Proof of Blind Bid is the leader extraction protocol that is part of Dusk Network’s consensus mechanism. PLONK is used when the leader is extracted, to ensure that neither identity of the person is not revealed nor the amount of $DUSK that they’ve staked. Then a proof is created and used that proves the inclusion of the bid (stake) in a set of merkle tree grids, which is part of ensuring the correctness.

Phoenix - Proof of Balance. Part of a spending proof compliant with Phoenix, a transaction model utilized by Dusk Network, is a proof of balance. Proof of balance attests to the fact that user has the amount he's trying transfer and no money is being printed out of thin air.

Getting your hands dirty. Building a proof!
In the demo we show the examples folder. In this folder, there are multiple examples included to get you under way.

The repository can be found here:

The Dusk-PLONK crate can be found here:

Next steps
We have previously featured three of our four genesis contracts and next week we will feature the last and final, Blind Bid contract. This contract is part of the consensus mechanism of Dusk Network and utilizes PLONK to anonymously extract the leader from a set of block generators.

Edit May 5, 2020 - Instead of a Blind Bid demo we will first share footage on how creating smart contracts on Dusk Network is a piece of Cake! with our sugared syntax.

Related articles:

Share this post

Subscribe to our newsletter

Dusk on GitHub Download Whitepaper