@@ -7,9 +7,10 @@ CONFIG_FILE?=config-files/config.yaml
77export OPERATOR_ADDRESS ?= $(shell yq -r '.operator.address' $(CONFIG_FILE ) )
88AGG_CONFIG_FILE? =config-files/config-aggregator.yaml
99
10- OPERATOR_VERSION =v0.15.1
10+ OPERATOR_VERSION =v0.15.2
11+ EIGEN_SDK_GO_VERSION_DEVNET =v0.2.0-beta.1
1112EIGEN_SDK_GO_VERSION_TESTNET =v0.2.0-beta.1
12- EIGEN_SDK_GO_VERSION_MAINNET =v0.1.13
13+ EIGEN_SDK_GO_VERSION_MAINNET =v0.2.0-beta.1
1314
1415ifeq ($(OS ) ,Linux)
1516 BUILD_ALL_FFI = $(MAKE) build_all_ffi_linux
@@ -71,10 +72,23 @@ go_deps:
7172install_foundry :
7273 curl -L https://foundry.paradigm.xyz | bash
7374
75+ install_eigenlayer_cli_devnet : # # Install Eigenlayer CLI v0.11.3 (Devnet compatible)
76+ curl -sSfL https://raw.githubusercontent.com/layr-labs/eigenlayer-cli/master/scripts/install.sh | sh -s -- v0.13.0
77+
78+ anvil_deploy_all_contracts : anvil_deploy_eigen_contracts anvil_deploy_risc0_contracts anvil_deploy_sp1_contracts anvil_deploy_aligned_contracts
79+
7480anvil_deploy_eigen_contracts :
7581 @echo " Deploying Eigen Contracts..."
7682 . contracts/scripts/anvil/deploy_eigen_contracts.sh
7783
84+ anvil_deploy_risc0_contracts :
85+ @echo " Deploying RISC0 Contracts..."
86+ . contracts/scripts/anvil/deploy_risc0_contracts.sh
87+
88+ anvil_deploy_sp1_contracts :
89+ @echo " Deploying SP1 Contracts..."
90+ . contracts/scripts/anvil/deploy_sp1_contracts.sh
91+
7892anvil_deploy_aligned_contracts :
7993 @echo " Deploying Aligned Contracts..."
8094 . contracts/scripts/anvil/deploy_aligned_contracts.sh
@@ -146,6 +160,68 @@ anvil_start_with_more_prefunded_accounts:
146160 @echo " Starting Anvil..."
147161 anvil --load-state contracts/scripts/anvil/state/alignedlayer-deployed-anvil-state.json --block-time 7 -a 2000
148162
163+ __AGGREGATION_MODE__ : # # ____
164+
165+ is_aggregator_set :
166+ @if [ -z " $( AGGREGATOR) " ]; then \
167+ echo " Error: AGGREGATOR is not set. Please provide arg AGGREGATOR='sp1' or 'risc0'." ; \
168+ exit 1; \
169+ fi
170+
171+ reset_last_aggregated_block :
172+ @echo " Resetting last aggregated block..."
173+ @echo ' {"last_aggregated_block":0}' > config-files/proof-aggregator.last_aggregated_block.json
174+
175+ start_proof_aggregator_dev : is_aggregator_set reset_last_aggregated_block # # Starts proof aggregator with mock proofs (DEV mode)
176+ 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
177+
178+ start_proof_aggregator : is_aggregator_set reset_last_aggregated_block # # Starts proof aggregator with proving activated
179+ AGGREGATOR=$(AGGREGATOR ) cargo run --manifest-path ./aggregation_mode/Cargo.toml --release --features prove --bin proof_aggregator -- config-files/config-proof-aggregator.yaml
180+
181+ start_proof_aggregator_dev_ethereum_package : is_aggregator_set reset_last_aggregated_block # # Starts proof aggregator with mock proofs (DEV mode) in ethereum package
182+ AGGREGATOR=$(AGGREGATOR ) RISC0_DEV_MODE=1 cargo run --manifest-path ./aggregation_mode/Cargo.toml --release --bin proof_aggregator -- config-files/config-proof-aggregator-mock-ethereum-package.yaml
183+
184+ start_proof_aggregator_ethereum_package : is_aggregator_set reset_last_aggregated_block # # Starts proof aggregator with proving activated in ethereum package
185+ AGGREGATOR=$(AGGREGATOR ) cargo run --manifest-path ./aggregation_mode/Cargo.toml --release --features prove --bin proof_aggregator -- config-files/config-proof-aggregator-ethereum-package.yaml
186+
187+ start_proof_aggregator_gpu : is_aggregator_set reset_last_aggregated_block # # Starts proof aggregator with proving + GPU acceleration (CUDA)
188+ 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
189+
190+ start_proof_aggregator_gpu_ethereum_package : is_aggregator_set reset_last_aggregated_block # # Starts proof aggregator with proving activated in ethereum package
191+ 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-ethereum-package.yaml
192+
193+ verify_aggregated_proof_sp1_holesky_stage :
194+ @echo " Verifying SP1 in aggregated proofs on holesky..."
195+ @cd batcher/aligned/ && \
196+ cargo run verify-agg-proof \
197+ --network holesky-stage \
198+ --from-block $(FROM_BLOCK ) \
199+ --proving_system SP1 \
200+ --public_input ../../scripts/test_files/sp1/sp1_fibonacci_4_1_3.pub \
201+ --program-id-file ../../scripts/test_files/sp1/sp1_fibonacci_4_1_3.vk \
202+ --beacon_url $(BEACON_URL ) \
203+ --rpc_url https://ethereum-holesky-rpc.publicnode.com
204+
205+ verify_aggregated_proof_risc0_holesky_stage :
206+ @echo " Verifying RISC0 in aggregated proofs on holesky..."
207+ @cd batcher/aligned/ && \
208+ cargo run verify-agg-proof \
209+ --network holesky-stage \
210+ --from-block $(FROM_BLOCK ) \
211+ --proving_system Risc0 \
212+ --program-id-file ../../scripts/test_files/risc_zero/fibonacci_proof_generator/fibonacci_id_2_0.bin \
213+ --public_input ../../scripts/test_files/risc_zero/fibonacci_proof_generator/risc_zero_fibonacci_2_0.pub \
214+ --beacon_url $(BEACON_URL ) \
215+ --rpc_url https://ethereum-holesky-rpc.publicnode.com
216+
217+ install_aggregation_mode : # # Install the aggregation mode with proving enabled
218+ cargo install --path aggregation_mode --features prove,gpu --bin proof_aggregator
219+
220+ agg_mode_write_program_ids : # # Write proof aggregator zkvm programs ids
221+ @cd aggregation_mode && \
222+ cargo run --release --bin write_program_image_id_vk_hash
223+
224+
149225_AGGREGATOR_ :
150226
151227build_aggregator :
@@ -179,7 +255,9 @@ operator_set_eigen_sdk_go_version_testnet:
179255 @echo " Setting Eigen SDK version to: $( EIGEN_SDK_GO_VERSION_TESTNET) "
180256 go get github.com/Layr-Labs/eigensdk-go@$(EIGEN_SDK_GO_VERSION_TESTNET )
181257
182- operator_set_eigen_sdk_go_version_devnet : operator_set_eigen_sdk_go_version_mainnet
258+ operator_set_eigen_sdk_go_version_devnet :
259+ @echo " Setting Eigen SDK version to: $( EIGEN_SDK_GO_VERSION_DEVNET) "
260+ go get github.com/Layr-Labs/eigensdk-go@$(EIGEN_SDK_GO_VERSION_DEVNET )
183261
184262operator_set_eigen_sdk_go_version_mainnet :
185263 @echo " Setting Eigen SDK version to: $( EIGEN_SDK_GO_VERSION_MAINNET) "
@@ -280,7 +358,7 @@ operator_remove_from_whitelist:
280358
281359operator_deposit_into_mock_strategy :
282360 @echo " Depositing into mock strategy"
283- $(eval STRATEGY_ADDRESS = $(shell jq -r '.addresses.strategies.MOCK ' contracts/script/output/devnet/eigenlayer_deployment_output.json) )
361+ $(eval STRATEGY_ADDRESS = $(shell jq -r '.addresses.strategies.WETH ' contracts/script/output/devnet/eigenlayer_deployment_output.json) )
284362 @go run operator/cmd/main.go deposit-into-strategy \
285363 --config $(CONFIG_FILE ) \
286364 --strategy-address $(STRATEGY_ADDRESS ) \
@@ -510,6 +588,11 @@ batcher_send_burst_groth16: batcher/target/release/aligned
510588 @mkdir -p scripts/test_files/gnark_groth16_bn254_infinite_script/infinite_proofs
511589 @./batcher/aligned/send_burst_tasks.sh $(BURST_SIZE ) $(START_COUNTER )
512590
591+ batcher_send_proof_with_random_address :
592+ @cd batcher/aligned/ && ./send_proof_with_random_address.sh
593+
594+ batcher_send_burst_with_random_address :
595+ @cd batcher/aligned/ && ./send_burst_with_random_address.sh
513596
514597__TASK_SENDER__ :
515598BURST_TIME_SECS ?= 3
@@ -584,7 +667,6 @@ aligned_get_user_balance_holesky:
584667 --network holesky \
585668 --user_addr $(USER_ADDR )
586669
587-
588670__GENERATE_PROOFS__ :
589671 # TODO add a default proving system
590672
@@ -684,12 +766,20 @@ upgrade_batcher_payment_service: ## Upgrade BatcherPayments contract. Parameters
684766 @echo " Upgrading BatcherPayments Contract on $( NETWORK) network..."
685767 @. contracts/scripts/.env.$(NETWORK ) && . contracts/scripts/upgrade_batcher_payment_service.sh
686768
769+ deploy_proof_aggregator :
770+ @echo " Deploying ProofAggregator contract on $( NETWORK) network..."
771+ @. contracts/scripts/.env.$(NETWORK ) && . contracts/scripts/deploy_proof_aggregator.sh
772+
773+ upgrade_proof_aggregator :
774+ @echo " Upgrading ProofAggregator Contract on $( NETWORK) network..."
775+ @. contracts/scripts/.env.$(NETWORK ) && . contracts/scripts/upgrade_proof_aggregator.sh
776+
687777build_aligned_contracts :
688- @cd contracts/src/core && forge build
778+ @cd contracts/src/core && forge build --via-ir
689779
690780show_aligned_error_codes :
691781 @echo " \nAlignedLayerServiceManager errors:"
692- @cd contracts && forge inspect src/core/IAlignedLayerServiceManager.sol:IAlignedLayerServiceManager errors
782+ @cd contracts && forge inspect src/core/IAlignedLayerServiceManager.sol:IAlignedLayerServiceManager errors
693783 @echo " \nBatcherPaymentService errors:"
694784 @cd contracts && forge inspect src/core/BatcherPaymentService.sol:BatcherPaymentService errors
695785
@@ -1239,6 +1329,7 @@ ethereum_package_inspect: ## Prints detailed information about the net
12391329
12401330ethereum_package_rm : # # Stops and removes the ethereum_package environment and used resources
12411331 kurtosis enclave rm aligned -f
1332+ kurtosis engine stop
12421333
12431334batcher_start_ethereum_package : user_fund_payment_service
12441335 @echo " Starting Batcher..."
@@ -1249,11 +1340,11 @@ aggregator_start_ethereum_package:
12491340 $(MAKE ) aggregator_start AGG_CONFIG_FILE=config-files/config-aggregator-ethereum-package.yaml
12501341
12511342operator_start_ethereum_package :
1252- $(MAKE ) operator_start OPERATOR_ADDRESS=0x70997970C51812dc3A010C7d01b50e0d17dc79C8 CONFIG_FILE=config-files/config-operator-1-ethereum-package.yaml
1343+ $(MAKE ) operator_start ENVIRONMENT=devnet OPERATOR_ADDRESS=0x70997970C51812dc3A010C7d01b50e0d17dc79C8 CONFIG_FILE=config-files/config-operator-1-ethereum-package.yaml
12531344
12541345operator_register_start_ethereum_package :
1255- $(MAKE ) operator_full_registration OPERATOR_ADDRESS=0x70997970C51812dc3A010C7d01b50e0d17dc79C8 CONFIG_FILE=config-files/config-operator-1-ethereum-package.yaml \
1256- $(MAKE ) operator_start OPERATOR_ADDRESS=0x70997970C51812dc3A010C7d01b50e0d17dc79C8 CONFIG_FILE=config-files/config-operator-1-ethereum-package.yaml
1346+ $(MAKE ) operator_full_registration OPERATOR_ADDRESS=0x70997970C51812dc3A010C7d01b50e0d17dc79C8 CONFIG_FILE=config-files/config-operator-1-ethereum-package.yaml
1347+ $(MAKE ) operator_start ENVIRONMENT=devnet OPERATOR_ADDRESS=0x70997970C51812dc3A010C7d01b50e0d17dc79C8 CONFIG_FILE=config-files/config-operator-1-ethereum-package.yaml
12571348
12581349
12591350install_spamoor : # # Instal spamoor to spam transactions
0 commit comments