Reproducible Builds
Building OpenVM programs deterministically
Using OpenVM securely requires deterministic program compilation, which enables users to verify that OpenVM binaries correspond to the original programs they are interested in.
On the Axiom Proving API, we achieve this by running the compilation process in a Docker container with a fixed single architecture linux/amd64
platform with the riscv32im-risc0-zkvm-elf
target. The resulting RISC-V ELF is then transpiled to an OpenVM binary.
See the OpenVM documentation for more details about this build process.
To replicate a build done on the Axiom Proving API, follow these steps:
- Download the program source code (a
tar.gz
file) and the OpenVM config (aopenvm.toml
file) from the Axiom Proving API console program page. - Prepare the following files locally:
An executable script (compile.sh
), that compiles a program and puts the output in the output
directory:
And the Dockerfile
.
Note that --platform=linux/amd64
on the first line is necessary to guarantee that the build is identical.
- And then run these commands:
- Finally, download the OpenVM exe from the Axiom Proving API console and confirm that it matches what you obtained locally.