Nightfall Truffle Box¶
The easiest way to get started on Nightfall.
Supported hardware & prerequisites¶
Mac and Linux machines with at least 16GB of memory and 10GB of disk space are supported.
Nightfall requires the following software to run:
- Launch Docker Desktop (on Mac, it is on the menu bar) and set memory to 8GB with 4GB of swap space (minimum - 12GB memory is better) or 16GB of memory with 512MB of swap. The default values for Docker Desktop will NOT work. No, they really won't.
- Node (tested with 10.15.3) with npm and node-gyp
- If running macOS, install Xcode then run
xcode-select —installto install command line tools.
- Note: Currently will not work with node v12. To check the node version, run
node --version. If using mac/brew, then you may need to run
brew install node@10and
brew link --overwrite node@10 --force
- Be sure npm is setup to use v2.7 of python, not python3. To check the python version, run
- You may need to run
npm config set python /usr/bin/python2.7(or wherever your python 2 location is)
First ensure you are in a new and empty directory.
npxand skip to step 3. This will install all necessary dependencies.
npx truffle unbox nightfall
Alternatively, you can install Truffle globally and run the
npm install -g truffle truffle unbox nightfall
In the root project directory, we generate the keys and constraint files for our Zero Knowledge Proofs. This is about 7GB and depends on randomness for security. This step can take a while, depending on your hardware (1-3 hours). Before you begin, check once more you have provisioned enough memory for Docker.
npm run setup
Alternatively, you can generate specific verification keys and constraint files one at time using a prompt.
npm run setup-prompt
Now, run the development console.
Compile and migrate the smart contracts. Note inside the development console we don't preface commands with
Execute the script provided for registering Zero Knowledge Proof verification keys on-chain. Note inside the development console we don't preface commands with
// inside the development console. test // outside the development console.. truffle test
How do I use this with Ganache-CLI?
It's as easy as modifying the config file! Check out our documentation on adding network configurations.
Where can I find more documentation?