TAGS

nightfall-box

CREATED

UPDATED

STARS

INSTALL

...

REPOSITORY
GitHub Download
Please wait: Fetching readme...

b"# Nightfall Truffle Box\n\nThe easiest way to get started on [Nightfall](https://github.com/EYBlockchain/nightfall).\n\n## Supported hardware & prerequisites\n\nMac and Linux machines with at least 16GB of memory and 10GB of disk space are supported.\n\nNightfall requires the following software to run:\n\n- [Docker](https://docs.docker.com/v17.12/install/)\n - Launch Docker Desktop (on Mac, it is on the menu bar) and set memory to 8GB with 4GB of swap\n space (minimum - 12GB memory is better) or 16GB of memory with 512MB of swap. **The default\n values for Docker Desktop will NOT work. No, they really won't**.\n- [Node](https://nodejs.org/en/) (tested with 10.15.3) with npm and node-gyp\n - If running macOS, install Xcode then run `xcode-select \xe2\x80\x94install` to install command line tools.\n - 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@10` and `brew link --overwrite node@10 --force`\n- [Python](https://www.python.org/downloads/)\n - Be sure npm is setup to use v2.7 of python, not python3. To check the python version, run `python --version`\n - You may need to run `npm config set python /usr/bin/python2.7` (or wherever your python 2 location is)\n\n## Installation\n\nFirst ensure you are in a new and empty directory.\n\n1. Run the `unbox` command via `npx` and skip to step 3. This will install all necessary dependencies.\n ```js\n npx truffle unbox nightfall\n ```\n\n2. Alternatively, you can install Truffle globally and run the `unbox` command.\n ```javascript\n npm install -g truffle\n truffle unbox nightfall\n ```\n\n3. Start Docker.\n \n4. In the root project directory, we generate the keys and constraint files for our [Zero Knowledge Proofs](https://blog.decentriq.ch/zk-snarks-primer-part-one/). 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.\n ```javascript\n npm run setup\n ```\n\n5. Alternatively, you can generate specific verification keys and constraint files one at time using a prompt.\n ```javascript\n npm run setup-prompt\n ```\n\n6. Now, run the development console.\n ```javascript\n truffle develop\n ```\n\n7. Compile and migrate the smart contracts. Note inside the development console we don't preface commands with `truffle`.\n ```javascript\n compile\n migrate\n ```\n \n8. Execute the script provided for registering Zero Knowledge Proof verification keys on-chain. Note inside the development console we don't preface commands with `truffle`.\n ```javascript\n exec scripts/registerVks.js\n ```\n \n9. Truffle can run tests written in Solidity or JavaScript against your smart contracts. Note the command varies slightly if you're in or outside of the development console.\n ```javascript\n // inside the development console.\n test\n\n // outside the development console..\n truffle test\n ```\n\n## FAQ\n\n* __How do I use this with Ganache-CLI?__\n\n It's as easy as modifying the config file! [Check out our documentation on adding network configurations](http://truffleframework.com/docs/advanced/configuration#networks).\n\n* __Where can I find more documentation?__\n\n This box is a marriage of [Truffle](http://truffleframework.com/), [Nightfall](https://github.com/EYBlockchain/nightfall), and [ZoKrates](https://zokrates.github.io/). Any of them would be a great place to start!\n\n\n# Acknowledgements\nThis software uses [ZoKrates](https://hub.docker.com/r/michaelconnor/zok) which is [licensed](https://github.com/Zokrates/ZoKrates/blob/master/LICENSE) under [LGPL3](https://www.gnu.org/licenses/lgpl-3.0.en.html).\n"