Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 

Repository files navigation

Zisk Docker

Docker image for ZisK v0.14 with GPU support.

Setup

# Clone this repository.
git clone https://github.com/zenith-network/zisk-container.git && cd ./zisk-container

# Build image.
docker build -t zisk-docker .

# Clean up pre-existing `.zisk` directory on host.
rm -rf ~/.zisk
mkdir -p ~/.zisk

# Copy `.zisk` content from the image to host.
docker run --rm -v ~/.zisk:/host-zisk zisk-docker bash -c \
  "cp -r /root/.zisk/* /host-zisk/"

# Put ZisK binaries in PATH.
echo 'export PATH="$HOME/.zisk/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

# Fix permissions.
sudo chown -R ubuntu:ubuntu /home/ubuntu/.zisk

# Install CUDA toolkit v12.8 (other versions might not work).
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb
sudo dpkg -i cuda-keyring_1.1-1_all.deb
sudo apt-get update
sudo apt-get -y install cuda-toolkit-12-8
export PATH=/usr/local/cuda-12.8/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-12.8/lib64:$LD_LIBRARY_PATH

# Generate tree files.
cargo-zisk check-setup -a
Caution

Binaries are dynamically linked, so you should match their libraries on the host, e.g. /usr/local/cuda/targets/x86_64-linux/lib/libcudart.so.12.

You should be good when using Ubuntu 22.04 (recommended) or Ubuntu 24.04.

Usage

Tip
Inside ./assets you will find an example Ethereum proving guest ELF and input file for block 23,881,681.
  1. Emulate execution - just to verify everything works without crashing:

    ziskemu -e ./zisk-reth-proofs.elf -i ./23881681.bin -m
    Important
    If it crashes, in 99% cases it means guest program issue, not a ZisK bug. The 1% cases is a bug in ZisK precompiles (already happened with KZG precompile).
  2. Run ROM setup - required for proving:

    cargo-zisk rom-setup -e ./zisk-reth-proofs.elf
  3. Prove block:

    cargo-zisk prove -e ./zisk-reth-proofs.elf -i ./23881681.bin -o /tmp/out -a -u

Important

Caution
If you try to compile ZisK on multiple machines separately, you will get slightly different output files causing mismatch when proving.

When running ZisK workers on multiple machines, make you sure you use exactly the same binaries, emulator files etc. Otherwise you will get different "global challenge" generated, causing proving to fail.

The easiest way is to build ZisK image on one machine only, then distribute it.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages