@@ -79,6 +79,10 @@ anvil_deploy_eigen_contracts:
7979 @echo " Deploying Eigen Contracts..."
8080 . contracts/scripts/anvil/deploy_eigen_contracts.sh
8181
82+ anvil_deploy_risc0_contracts :
83+ @echo " Deploying RISC0 Contracts..."
84+ . contracts/scripts/anvil/deploy_risc0_contracts.sh
85+
8286anvil_deploy_sp1_contracts :
8387 @echo " Deploying SP1 Contracts..."
8488 . contracts/scripts/anvil/deploy_sp1_contracts.sh
@@ -155,11 +159,52 @@ anvil_start_with_more_prefunded_accounts:
155159 anvil --load-state contracts/scripts/anvil/state/alignedlayer-deployed-anvil-state.json --block-time 7 -a 2000
156160
157161__AGGREGATION_MODE__ : # # ____
158- start_proof_aggregator_local : # # Start the proof aggregator locally using Mock Verifier Contract
159- cargo run --manifest-path ./aggregation_mode/Cargo.toml --release -- config-files/config-proof-aggregator-mock.yaml
160162
161- start_proof_aggregator_local_with_proving : # # Start the proof aggregator locally using SP1 Verifier Contract
162- cargo run --manifest-path ./aggregation_mode/Cargo.toml --release --features prove -- config-files/config-proof-aggregator.yaml
163+ is_aggregator_set :
164+ @if [ -z " $( AGGREGATOR) " ]; then \
165+ echo " Error: AGGREGATOR is not set. Please provide arg AGGREGATOR='sp1' or 'risc0'." ; \
166+ exit 1; \
167+ fi
168+
169+ reset_last_aggregated_block :
170+ @echo " Resetting last aggregated block..."
171+ @echo ' {"last_aggregated_block":0}' > config-files/proof-aggregator.last_aggregated_block.json
172+
173+ start_proof_aggregator_dev : is_aggregator_set reset_last_aggregated_block # # Starts proof aggregator with mock proofs (DEV mode)
174+ AGGREGATOR=$(AGGREGATOR ) RISC0_DEV_MODE=1 cargo run --manifest-path ./aggregation_mode/Cargo.toml --release -- config-files/config-proof-aggregator-mock.yaml
175+
176+ start_proof_aggregator : is_aggregator_set reset_last_aggregated_block # # Starts proof aggregator with proving activated
177+ AGGREGATOR=$(AGGREGATOR ) cargo run --manifest-path ./aggregation_mode/Cargo.toml --release --features prove -- config-files/config-proof-aggregator.yaml
178+
179+ start_proof_aggregator_gpu : is_aggregator_set reset_last_aggregated_block # # Starts proof aggregator with proving + GPU acceleration (CUDA)
180+ AGGREGATOR=$(AGGREGATOR ) SP1_PROVER=cuda cargo run --manifest-path ./aggregation_mode/Cargo.toml --release --features prove,gpu -- config-files/config-proof-aggregator.yaml
181+
182+ verify_aggregated_proof_sp1_holesky_stage :
183+ @echo " Verifying SP1 in aggregated proofs on holesky..."
184+ @cd batcher/aligned/ && \
185+ cargo run verify-agg-proof \
186+ --network holesky-stage \
187+ --from-block $(FROM_BLOCK ) \
188+ --proving_system SP1 \
189+ --public_input ../../scripts/test_files/sp1/sp1_fibonacci_4_1_3.pub \
190+ --program-id-file ../../scripts/test_files/sp1/sp1_fibonacci_4_1_3.vk \
191+ --beacon_url $(BEACON_URL ) \
192+ --rpc_url https://ethereum-holesky-rpc.publicnode.com
193+
194+ verify_aggregated_proof_risc0_holesky_stage :
195+ @echo " Verifying RISC0 in aggregated proofs on holesky..."
196+ @cd batcher/aligned/ && \
197+ cargo run verify-agg-proof \
198+ --network holesky-stage \
199+ --from-block $(FROM_BLOCK ) \
200+ --proving_system Risc0 \
201+ --program-id-file ../../scripts/test_files/risc_zero/fibonacci_proof_generator/fibonacci_id_2_0.bin \
202+ --public_input ../../scripts/test_files/risc_zero/fibonacci_proof_generator/risc_zero_fibonacci_2_0.pub \
203+ --beacon_url $(BEACON_URL ) \
204+ --rpc_url https://ethereum-holesky-rpc.publicnode.com
205+
206+ install_aggregation_mode : # # Install the aggregation mode with proving enabled
207+ cargo install --path aggregation_mode --features prove,gpu
163208
164209_AGGREGATOR_ :
165210
@@ -704,12 +749,16 @@ deploy_proof_aggregator:
704749 @echo " Deploying ProofAggregator contract on $( NETWORK) network..."
705750 @. contracts/scripts/.env.$(NETWORK ) && . contracts/scripts/deploy_proof_aggregator.sh
706751
752+ upgrade_proof_aggregator :
753+ @echo " Upgrading ProofAggregator Contract on $( NETWORK) network..."
754+ @. contracts/scripts/.env.$(NETWORK ) && . contracts/scripts/upgrade_proof_aggregator.sh
755+
707756build_aligned_contracts :
708- @cd contracts/src/core && forge build
757+ @cd contracts/src/core && forge build --via-ir
709758
710759show_aligned_error_codes :
711760 @echo " \nAlignedLayerServiceManager errors:"
712- @cd contracts && forge inspect src/core/IAlignedLayerServiceManager.sol:IAlignedLayerServiceManager errors
761+ @cd contracts && forge inspect src/core/IAlignedLayerServiceManager.sol:IAlignedLayerServiceManager errors
713762 @echo " \nBatcherPaymentService errors:"
714763 @cd contracts && forge inspect src/core/BatcherPaymentService.sol:BatcherPaymentService errors
715764
0 commit comments