@@ -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,56 @@ 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 --bin proof_aggregator -- 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 --bin proof_aggregator -- 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 --bin proof_aggregator -- 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 --bin proof_aggregator
208+
209+ agg_mode_write_program_ids : # # Write proof aggregator zkvm programs ids
210+ @cd aggregation_mode && \
211+ cargo run --release --bin write_program_image_id_vk_hash
163212
164213_AGGREGATOR_ :
165214
@@ -527,6 +576,11 @@ batcher_send_burst_groth16: batcher/target/release/aligned
527576 @mkdir -p scripts/test_files/gnark_groth16_bn254_infinite_script/infinite_proofs
528577 @./batcher/aligned/send_burst_tasks.sh $(BURST_SIZE ) $(START_COUNTER )
529578
579+ batcher_send_proof_with_random_address :
580+ @cd batcher/aligned/ && ./send_proof_with_random_address.sh
581+
582+ batcher_send_burst_with_random_address :
583+ @cd batcher/aligned/ && ./send_burst_with_random_address.sh
530584
531585__TASK_SENDER__ :
532586BURST_TIME_SECS ?= 3
@@ -704,12 +758,16 @@ deploy_proof_aggregator:
704758 @echo " Deploying ProofAggregator contract on $( NETWORK) network..."
705759 @. contracts/scripts/.env.$(NETWORK ) && . contracts/scripts/deploy_proof_aggregator.sh
706760
761+ upgrade_proof_aggregator :
762+ @echo " Upgrading ProofAggregator Contract on $( NETWORK) network..."
763+ @. contracts/scripts/.env.$(NETWORK ) && . contracts/scripts/upgrade_proof_aggregator.sh
764+
707765build_aligned_contracts :
708- @cd contracts/src/core && forge build
766+ @cd contracts/src/core && forge build --via-ir
709767
710768show_aligned_error_codes :
711769 @echo " \nAlignedLayerServiceManager errors:"
712- @cd contracts && forge inspect src/core/IAlignedLayerServiceManager.sol:IAlignedLayerServiceManager errors
770+ @cd contracts && forge inspect src/core/IAlignedLayerServiceManager.sol:IAlignedLayerServiceManager errors
713771 @echo " \nBatcherPaymentService errors:"
714772 @cd contracts && forge inspect src/core/BatcherPaymentService.sol:BatcherPaymentService errors
715773
0 commit comments