Skip to main content

Prerequisites

Before installing Tornado Nova, ensure you have the following installed:
  • Node.js (v14 or higher)
  • Yarn package manager
  • Git

Installation Steps

1

Clone the repository

Clone the Tornado Pool repository to your local machine:
git clone https://github.com/tornadocash/tornado-pool.git
cd tornado-pool
2

Install dependencies

Install all required dependencies using Yarn:
yarn
This will install all packages specified in package.json, including:
  • Hardhat and related plugins
  • Circom and circomlib for zero-knowledge circuits
  • Ethers.js for blockchain interactions
  • OpenZeppelin contracts
3

Download circuit files

Download the required trusted setup files:
yarn download
This downloads the powers of tau ceremony files needed for circuit compilation.
4

Build the project

Build circuits and compile contracts:
yarn build
This command will:
  • Build zero-knowledge circuits for transaction proofs
  • Compile all Solidity smart contracts
  • Generate TypeScript typings

Verify Installation

To verify your installation is successful, run the test suite:
yarn test
The test suite may take several minutes to complete as it involves zero-knowledge proof generation and smart contract testing.

Project Structure

After installation, your project structure will look like this:
tornado-pool/
├── artifacts/          # Compiled contracts and circuits
├── circuits/           # Zero-knowledge circuit definitions
├── contracts/          # Solidity smart contracts
├── scripts/            # Deployment and utility scripts
├── src/                # TypeScript source files
├── test/               # Test files
├── config.js           # Configuration file
├── hardhat.config.js   # Hardhat configuration
└── package.json        # Project dependencies

Available Commands

# Compile contracts only
yarn compile

# Compile Poseidon hasher
yarn compile:hasher

Next Steps

After installation, you’ll need to:
  1. Configure your environment variables (see Configuration)
  2. Build the zero-knowledge circuits (see Building Circuits)
  3. Set up network configurations for deployment
Never commit your .env file containing private keys or API keys to version control.

Build docs developers (and LLMs) love