Submitting proofs
Make sure you have Aligned installed as specified here.
If you run the examples below, make sure you are in Aligned's repository root.
Supported Verifiers
The following is the list of the verifiers currently supported by Aligned:
✅ gnark - Groth16 (with BN254)
✅ gnark - Plonk (with BN254 and BLS12-381)
✅ SP1 (v1.0.8-testnet)
✅ Risc0 (v1.0.1)
The following proof systems are going to be added soon:
🔲 Kimchi
🔲 Halo2 - Plonk/KZG
🔲 Halo2 - Plonk/IPA
1. Import/Create Keystore file
If you already have a keystore file, you can ignore this section and start sending proofs. We give two examples of how to generate one. The first one using Foundry, and the second one using EigenLayer CLI
Alternative 1: With foundry
You need to have installed Foundry.
If you are creating a new account, create a private key with:
It will show you a new mnemonic phrase, and a public-private key pair, similar to the following example:
Import the wallet using the private key previously generated, or whichever you want to use, and write a password to use it.
You have to paste your private key and set a password for the keystore file.
This will create the ECDSA keystore file in ~/.aligned_keystore/keystore0
Alternative 2: With EigenLayer CLI
If you have the EigenLayer CLI installed, the keystore can be generated following this instructions. The key will be stored into
~/.eigenlayer/operator_keys.
2. Fund the batcher
To be able to send proofs to Aligned using the Batcher, the user must fund its transactions. For this, there is a simple Batcher Payment System.
To use it you can use the aligned CLI, as shown with the following example:
These commands allows the usage of the following flags:
--batcher_addrto specify the address of the Batcher Payment Service smart contract.--rpcto specify the rpc url to be used.--chainto specify the chain id to be used. Could be holesky or devnet.--keystore_paththe path to the keystore.--amountthe amount of ethers to transfer to the Batcher.Note:
--amountflag parameter must be with the shown format. The amount followed by theetherkeyword to specify how many ethers you wish to deposit to the Batcher.
After depositing funds, you can verify the Service has correctly received them by executing the following command:
These commands allows the usage of the following flags:
--batcher_addrto specify the address of the Batcher Payment Service smart contract.--rpcto specify the rpc url to be used.--user_addrthe address of the user that funded the Batcher.
3. Send your proof to the batcher
SP1 proof
The current SP1 version used in Aligned is v1.0.8-testnet.
The SP1 proof needs the proof file and the vm program file.
Example
Risc0 proof
The current Risc0 version used in Aligned is v1.0.1.
The Risc0 proof needs the proof file and the vm program file (vm program file is the image id).
Example
GnarkPlonkBn254, GnarkPlonkBls12_381 and Groth16Bn254
The GnarkPlonkBn254, GnarkPlonkBls12_381 and Groth16Bn254 proofs need the proof file, the public input file and the verification key file.
Examples:
Last updated