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
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 these 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 allow the usage of the following flags:
--payment_service_addr to specify the address of the Batcher Payment Service smart contract.
--rpc_url to specify the rpc url to be used.
--network to specify the chain id to be used. Could be holesky or devnet.
--keystore_path the path to the keystore.
--amount the number of ethers to transfer to the Batcher.
Note: --amount flag parameter must be with the shown format. The amount followed by the ether keyword 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 allow the usage of the following flags:
--payment_service_addr to specify the address of the Batcher Payment Service smart contract.
--rpc_url to specify the rpc url to be used.
--user_addr the address of the user that funded the Batcher.
3. Submit your proof to the batcher
This guide will focus on how to submit proofs using the Aligned CLI. To integrate the proof submission process into your application, check the Aligned SDK guide.
Proof submission is done via the submit command of the Aligned CLI. The arguments for the submit command are:
proving_system: The proving system corresponding to the proof you want to submit.
proof: The path of the proof associated to the computation to be verified.
vm_program: When the proving system involves the execution of a program in a zkVM, this argument is associated with the compiled program or some other identifier of the program.
pub_input: The path to the file with the public input associated with the proof.
batcher_url: The batcher websocket URL.
chain to specify the chain id to be used. Could be holesky or devnet.
rpc_url: The RPC Ethereum node URL.
payment_service_addr: The Ethereum address of the Batcher Payments System contract.
proof_generator_addr: An optional parameter that can be used in some applications to avoid front-running.
batch_inclusion_data_directory_path: An optional parameter indicating the directory where to store the batcher response data. If not provided, the folder with the responses will be created in the current directory.
SP1 proof
The current SP1 version used in Aligned is v1.0.1.
The SP1 proof needs the proof file and the vm program file.