- Deploy aligned contracts on anvil:
make anvil_deploy_risc0_contracts
make anvil_deploy_sp1_contracts
make anvil_deploy_aligned_contracts- Start anvil:
make anvil_start- Start batcher
make batcher_start_local- Send SP1/Risc0 proofs:
make batcher_send_sp1_burst
make batcher_send_risc0_burstNotes:
- For SP1 only
compressedproofs are supported - For Risc0 both
succinctandcompositeproofs are supported.
- Start proof aggregator:
# This will not run a real prover but a mocked one see below to run a real prover
make proof_aggregator_start_dev AGGREGATOR="sp1|risc0"or
make proof_aggregator_start AGGREGATOR="sp1|risc0"Notes:
- Stark2Snark is only supported for x86 architecture in Risc0, so you won't be able to run the risc0 aggregator on Apple Silicon.
- Proving can be quite slow without GPUs, to activate gpu run:
make proof_aggregator_start_gpu AGGREGATOR="sp1|risc0"- Get latest aggregated proof:
cast logs 0xc351628EB244ec633d5f21fBD6621e1a683B1181 'AggregatedProofVerified(bytes32,bytes32)' --from-block 0 --to-block latest --rpc-url http://localhost:8545Whenever any of the programs change, you must recompile them and update their corresponding program ids in aggregation_mode/program_ids.json. To do this, run the following command:
make proof_aggregator_write_program_idsWe are using docker to produce deterministic builds so that the program ids are the same for all systems.
If the verifier program commitments have changed, you will also need to add the updated one to the AlignedProofAggregationService contract. You can do this by calling the allowVerifyingProgram method with the new commitment and the proving system ID as parameters (you can check the last parameter in the ProvingSystemId definition at contracts/src/core/IAlignedProofAggregationService.sol).
You can fetch the verifier program commitment values from the following:
- Risc0: Use the value of
risc0_chunk_aggregator_image_idfromaggregation_mode/program_ids.json. - SP1: Use the value of
sp1_chunk_aggregator_vk_hashfromaggregation_mode/program_ids.json.