Generating proofs for Aligned
SP1
Dependencies
This guide assumes that:
sp1 prover installed (instructions here)
sp1 project to generate the proofs (instructions here)
aligned installed (instructions here)
How to generate a proof
Aligned only verifies SP1 in compressed version. You can check you are using compressed by opening script/src/main.rs and check that the proof is generated with
client.prove_compressedinstead ofclient.prove.
First, open a terminal and navigate to the script folder in the sp1 project directory
Then, run the following command to generate a proof:
cargo run --releaseHow to get the proof verified by Aligned
After generating the proof, you will have to find two different files:
proof file: usually found under
scriptdirectory, with the nameproof.jsonor similarelf file: usually found under
program/elf/directory
Then, you can send the proof to the Aligned network by running the following command
Where proof path is the path to the proof file and vm program path is the path to the elf file.
For more instructions on how to submit proofs, check the Submitting proofs guide.
Gnark
Dependencies
This guide assumes that:
Gnark library is installed. If not, install it using the following command inside your Go module:
gnark project to generate the proofs, instructions here
How to generate a proof
Open a terminal and navigate to the gnark project directory. Then, run the following command to generate the proof:
How to get the proof verified by Aligned
After generating the proof, you will have to have three different files:
proof file
verification key file
public input file
For a detailed guide on how to generate those files, refer to our detailed guide.
Then, you can send the proof to the Aligned network by running the following command
Where proof path is the path to the proof file, public input path is the path to the public input file, and verification key path is the path to the verification key file.
For more instructions on how to submit proofs, check the Submitting proofs guide.
Risc0
Dependencies
This guide assumes that:
Risc0 toolchain installed (instructions here)
Risc0 project to generate the proofs (instructions here)
Aligned installed (instructions here)
How to generate a proof
First, open the risc0 host file and add the following code to export image id & public input needed by Aligned.
Note that METHOD_ID will be imported from guest but it will be under a different name.
Then run the following command to generate the proof:
How to get the proof verified by Aligned
After generating the proof, you will have to find three different files:
Proof file
Image id file
Public input file
Then, you can send the proof to the Aligned network by running the following command
For more instructions on how to submit proofs, check the Submitting proofs guide.
Last updated