Many zero-knowledge proof systems, including Groth16, the proof system that Nocturne V1 uses, require a layer of entropy (randomness) to be applied to circuits in order for the proofs to be secure. The catch, however, is that nobody can know that randomness. For this reason, said randomness is often referred to as “toxic waste” - we must ensure that no one person holds onto the randomness, otherwise the zero-knowledge proof scheme will be broken.
In practice, we can more or less guarantee this by using multi-party computation (MPC). The main idea is that we get as many people as possible to generate their own randomness and apply it to the circuit, layering it on one-by-one in a manner reminiscent of a “summoning ceremony" or a “ritual of randomness”. As long as just one participant actually discards their “toxic waste”, the proof system will be secure.
Since you’re reading this, we hope that you, too, can contribute your randomness and be an important part of ensuring the security of the Nocturne protocol.
For more information about trusted setup ceremonies, check out the following:
We assume a base level of technical ability. In particular, we assume you’ve used Node.js /
npmbefore and you know your way around a terminal.You are running Mac or Linux. The contributor CLI tool does not natively work on Windows, so if you are on Windows, you will need to run it using WSL. The tool does not support being run inside VMs and Docker containers at the moment.
In order to run the contribution CLI, you must have Node.js version 18. It is less likely to work with newer versions. If you don’t have it installed, you can install it using a tool like nvm or volta or directly from their website.
As a sybil-resistance mechanism, you must have a GitHub account such that:
You have 1 public repository
You have at least 1 follower
You are following at least 5 other GitHub accounts
Check your internet connection. Since one of our circuits is somewhat large, we recommend contributors have an upload bandwidth of at least 1 Megabytes per second (~1Mbps).
If you’d like, take a look at the circuits and protocol code here: https://github.com/nocturne-xyz/protocol
The Ceremony will end at 00:00 EST on November 6th. After that, no new contributions will be accepted.
Assuming you’ve satisfied the prerequisites, contributing requires three easy steps:
Fire up a terminal and install the CLI by running
npm install -g @nocturne-xyz/nocturne-setup.You can find the source code of the CLI here
Authenticate the CLI with your GitHub account (satisfying the requirements above) by running
nocturne-setup auth.Contribute to the ceremony by running
nocturne-setup contribute. Follow the prompts, and let it chug.
Depending on your internet connection and how many other contributors are in the queue, it can take between 30 minutes and several hours. Feel free to let it chug in the background while you do other things as long as they’re not upload-intensive.
There is a time limit for contributions for each circuit. If your contribution takes too long, you will be removed from the ceremony and forced to wait 2 hours before trying again. This is to ensure that other people have a chance to contribute.
Please be sure your computer doesn’t go to sleep while the script is running. If you do, you will mostly likely time out and block others from contributing.
If you do experience errors, 99% of the time it’ll be for the third and largest circuit. In the worst case, if you can’t get it to work for that last circuit, your contributions for the first two circuits are still finalized.
The CLI will create some temporary files while it runs. Do not delete them.
unable to retrieve authenticated user. If you see this, wait a minute or so and re-try. Sometimes the backend is a bit slow to update after runningnocturne-setup auth.Upload fails after repeated attempts (like picture below). This is usually due to your internet being too slow. Unfortunately, in this case you won’t be able to contribute.
Verification fails with
[FirebaseError: INTERNAL]. This is a known issue that we unfortunately don’t have the time to fix. If you run into this, let us know, wait to time out, and try again in a few hours.Sitting in the queue for hours and hours. This is to be expected if a lot of people are trying to contribute all at once. Just be patient, and try not to let your computer go to sleep.
The tool we’re using (p0tion) is pretty new, so you may experience issues that prevent your contribution from being completed. While we’ll do our best to provide support, we can’t guarantee that it will work for everyone their contribution since most of our bandwidth is being spent on getting the protocol ready for mainnet.
In many cases, if the CLI fails or gets stuck, you can re-run the command and it will fix itself.
Thank you to Privacy + Scaling Explorations (PSE) for creating p0tion, a wonderful tool that we use to make the contribution so easy!
