Skip to content

Verifying Stone Proof Using the Binary

This guide will walk you through how to verify a Stone proof using the provided binaries. It includes steps for both setting up the environment using Docker and manually installing the required dependencies.

Creating and Verifying a Test Proof Using Binaries

  • Clone the repository:
git clone https://github.com/dipdup-io/stone-packaging.git /tmp/stone-packaging
  • Navigate to the example test directory
cd /tmp/stone-packaging/test_files/
  • Download the Binary Files:

To download binaries, please refer to the Installation Guide

  • Run the prover:
cpu_air_prover \
    --out_file=fibonacci_proof.json \
    --private_input_file=fibonacci_private_input.json \
    --public_input_file=fibonacci_public_input.json \
    --prover_config_file=cpu_air_prover_config.json \
    --parameter_file=cpu_air_params.json

The proof will be available at fibonacci_proof.json.

  • Run the verifier to verify the proof:
cpu_air_verifier --in_file=fibonacci_proof.json && echo "Successfully verified example proof."

Download Minimal Docker Images for x86_64

Download the Docker image. The stone-prover package includes both cpu_air_prover and cpu_air_verifier:

docker pull ghcr.io/dipdup-io/stone-packaging/stone-prover:latest

Creating and Verifying a Test Proof Using Docker

  1. Clone the Repository:
git clone https://github.com/dipdup-io/stone-packaging.git /tmp/stone-packaging
  1. Run the Docker Container to Create the Proof

Run the container with a volume mounted to the local repository directory:

docker run --entrypoint /bin/bash -v /tmp/stone-packaging/test_files:/app/prover ghcr.io/dipdup-io/stone-packaging/stone-prover -c "cd /app/prover && exec cpu_air_prover \
    --out_file=fibonacci_proof.json \
    --private_input_file=fibonacci_private_input.json \
    --public_input_file=fibonacci_public_input.json \
    --prover_config_file=cpu_air_prover_config.json \
    --parameter_file=cpu_air_params.json"

The proof will be created at test_files/fibonacci_proof.json..

  1. Verify the Proof Using Docker
docker run --entrypoint /bin/bash -v /tmp/stone-packaging/test_files:/app/prover ghcr.io/dipdup-io/stone-packaging/stone-prover -c "cd /app/prover && exec cpu_air_verifier --in_file=fibonacci_proof.json && echo 'Successfully verified example proof.'"