In Depth Setup
The code in this repo has only been tested on Linux machines using Ubuntu, but it may work on other distributions or operating systems with minor adjustments. If you encounter issues on non-Ubuntu systems, please refer to the documentation for troubleshooting tips or consider contributing compatibility fixes. The following is a guide for how to setup the appropriate environment for two different reference machines. If looking to run on your own machine, please choose the one that closest matches your machine (the biggest difference is whether you have an NVIDIA GPU or not).
CPU Only Machine (ex. AWS c6i.8xlarge)
CUDA Accelerated Machine (ex. AWS g6.xlarge)
CPU Only Machine (ex. AWS c6i.8xlarge)
Using Ubuntu 24.04 (Noble Numbat) and an x86_64 CPU architecture. Install the following dependencies:
# Base
sudo apt update && sudo apt upgrade -y
sudo apt install -y build-essential libssl-dev git curl jq pkg-config
# Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source ~/.cargo/env
# Foundry
curl -L https://foundry.paradigm.xyz | bash
source "/home/ubuntu/.bashrc"
foundryup
# Docker
sudo apt install ca-certificates gnupg lsb-release
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] \
https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo usermod -aG docker $USER
newgrp docker
# (Optional for proving with RISC Zero)
curl -L https://risczero.com/install | bash
source "/home/ubuntu/.bashrc"
rzup install
rzup install risc0-groth16
# (Optional for proving with SP1)
curl -L https://sp1.succinct.xyz | bash
source "/home/ubuntu/.bashrc"
sp1up
# Clone repository
git clone https://github.com/essential-contributions/void-reference-impl.git
cd void-reference-impl
# Install solidity dependencies
cd app-swap/contracts && forge soldeer install && cd -
cd void/void-contracts && forge soldeer install && cd -
CUDA Accelerated Machine (ex. AWS g6.xlarge)
Using Ubuntu 24.04 (Noble Numbat), an x86_64 CPU architecture and an NVIDIA GPU supported by the CUDA 12.8 toolkit. Install the following dependencies:
# Base
sudo apt update && sudo apt upgrade -y
sudo apt install -y build-essential libssl-dev git curl jq pkg-config
# Build deps needed by circom-witnesscalc/bindgen
sudo apt install -y protobuf-compiler libc6-dev clang libclang-dev llvm-dev
# NVIDIA driver for G6 (L4)
sudo apt install -y ubuntu-drivers-common
sudo ubuntu-drivers install
# Reboot to load driver
sudo reboot
-------------------------------------------------------------
# CUDA repo + toolkit (Ubuntu 24.04)
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-keyring_1.1-1_all.deb
sudo dpkg -i cuda-keyring_1.1-1_all.deb
sudo apt update
sudo apt install -y cuda-toolkit-12-8
# Env for CUDA
echo 'export PATH=/usr/local/cuda/bin:$PATH' >> ~/.bashrc
echo 'export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH' >> ~/.bashrc
source ~/.bashrc
# Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source ~/.cargo/env
# Foundry
curl -L https://foundry.paradigm.xyz | bash
source "/home/ubuntu/.bashrc"
foundryup
# Docker
sudo apt install ca-certificates gnupg lsb-release
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] \
https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo usermod -aG docker $USER
newgrp docker
# (Optional for proving with RISC Zero)
curl -L https://risczero.com/install | bash
source "/home/ubuntu/.bashrc"
rzup install
rzup install risc0-groth16
# (Optional for proving with SP1)
curl -L https://sp1.succinct.xyz | bash
source "/home/ubuntu/.bashrc"
sp1up
# Clone repository
git clone https://github.com/essential-contributions/void-reference-impl.git
cd void-reference-impl
# Install solidity dependencies
cd app-swap/contracts && forge soldeer install && cd -
cd void/void-contracts && forge soldeer install && cd -