@@ -32,8 +32,8 @@ ifeq ($(OS),Darwin)
3232endif
3333
3434ifeq ($(OS ) ,Linux)
35- export LD_LIBRARY_PATH+=$(CURDIR)/operator/risc_zero/lib:$(CURDIR)/operator/sp1/lib
36- OPERATOR_FFIS=$(CURDIR)/operator/risc_zero/lib:$(CURDIR)/operator/sp1/lib
35+ export LD_LIBRARY_PATH+=$(CURDIR)/operator/risc_zero/lib:$(CURDIR)/operator/sp1/lib:$(CURDIR)/operator/mina/lib:$(CURDIR)/operator/mina_account/lib
36+ OPERATOR_FFIS=$(CURDIR)/operator/risc_zero/lib:$(CURDIR)/operator/sp1/lib:$(CURDIR)/operator/mina/lib:$(CURDIR)/operator/mina_account/lib
3737endif
3838
3939ifeq ($(OS ) ,Linux)
@@ -252,6 +252,9 @@ proof_aggregator_start_dev: is_aggregator_set reset_last_aggregated_block ./aggr
252252proof_aggregator_start_dev_ethereum_package : is_aggregator_set reset_last_aggregated_block ./aggregation_mode/target/release/proof_aggregator_dev # # Starts proof aggregator with mock proofs (DEV mode) in ethereum package. Parameters: AGGREGATOR=<sp1|risc0>
253253 AGGREGATOR=$(AGGREGATOR ) RISC0_DEV_MODE=1 ./aggregation_mode/target/release/proof_aggregator_dev config-files/config-proof-aggregator-mock-ethereum-package.yaml
254254
255+ proof_aggregator_test_without_compiling_agg_programs :
256+ cd aggregation_mode && SKIP_AGG_PROGRAMS_BUILD=1 cargo test -p proof_aggregator --tests -- --nocapture
257+
255258# ## All CPU proof aggregator receipts
256259./aggregation_mode/target/release/proof_aggregator_cpu : $(AGGREGATION_MODE_SOURCES )
257260 AGGREGATOR=$(AGGREGATOR ) cargo build --features prove --manifest-path ./aggregation_mode/Cargo.toml --release --bin proof_aggregator_cpu
@@ -300,7 +303,41 @@ proof_aggregator_install: ## Install the aggregation mode with proving enabled
300303 cargo install --path aggregation_mode --features prove,gpu --bin proof_aggregator_gpu --locked
301304
302305proof_aggregator_write_program_ids : # # Write proof aggregator zkvm programs ids
303- @cd aggregation_mode && ./scripts/build_programs.sh
306+ @cd aggregation_mode/proof_aggregator && ./scripts/build_programs.sh
307+
308+ agg_mode_docker_up :
309+ @cd aggregation_mode && docker compose up -d
310+
311+ agg_mode_docker_down :
312+ @cd aggregation_mode && docker compose down
313+
314+ agg_mode_docker_clean : agg_mode_docker_down
315+ docker volume rm aggregation-mode_postgres_data
316+
317+ agg_mode_run_migrations : agg_mode_docker_up
318+ cargo run --manifest-path ./aggregation_mode/Cargo.toml --release --bin migrate -- postgres://postgres:postgres@localhost:5435/
319+
320+ agg_mode_batcher_start_local : agg_mode_run_migrations
321+ cargo run --manifest-path ./aggregation_mode/Cargo.toml --release --bin agg_mode_batcher -- config-files/config-agg-mode-batcher.yaml
322+
323+ agg_mode_batcher_start_ethereum_package : agg_mode_run_migrations
324+ cargo run --manifest-path ./aggregation_mode/Cargo.toml --release --bin agg_mode_batcher -- config-files/config-agg-mode-batcher-ethereum-package.yaml
325+
326+ AGG_MODE_SENDER ?= 0x70997970C51812dc3A010C7d01b50e0d17dc79C8
327+ agg_mode_batcher_send_payment :
328+ @cast send --value 1ether \
329+ 0x922D6956C99E12DFeB3224DEA977D0939758A1Fe \
330+ --private-key 0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d
331+
332+ agg_mode_batcher_send_sp1_proof :
333+ @NONCE=$$(curl -s http://127.0.0.1:8089/nonce/0x70997970C51812dc3A010C7d01b50e0d17dc79C8 | jq -r '.data.nonce' ) ; \
334+ curl -X POST \
335+ -H " Content-Type: multipart/form-data" \
336+ -F " nonce=$$ {NONCE}" \
337+ -F " proof=@scripts/test_files/sp1/sp1_fibonacci_5_0_0.proof" \
338+ -F " program_vk=@scripts/test_files/sp1/sp1_fibonacci_5_0_0_vk.bin" \
339+ -F " signature_hex=0x0" \
340+ http://127.0.0.1:8089/proof/sp1
304341
305342__AGGREGATOR__ : # # ____
306343
@@ -703,6 +740,58 @@ batcher_send_circom_groth16_bn256_no_pub_input_burst: crates/target/release/alig
703740 --rpc_url $(RPC_URL ) \
704741 --network $(NETWORK )
705742
743+ batcher_send_mina_task :
744+ @echo " Sending Mina state task to Batcher..."
745+ @cd crates/cli/ && cargo run --release -- submit \
746+ --proving_system Mina \
747+ --proof ../../scripts/test_files/mina/devnet_mina_state.proof \
748+ --public_input ../../scripts/test_files/mina/devnet_mina_state.pub \
749+ --proof_generator_addr 0x66f9664f97F2b50F62D13eA064982f936dE76657 \
750+ --rpc_url $(RPC_URL ) \
751+ --network $(NETWORK )
752+
753+ batcher_send_mina_task_bad_hash :
754+ @echo " Sending Mina state task to Batcher..."
755+ @cd crates/cli/ && cargo run --release -- submit \
756+ --proving_system Mina \
757+ --proof ../../scripts/test_files/mina/devnet_mina_state.proof \
758+ --public_input ../../scripts/test_files/mina/mina_state_bad_hash.pub \
759+ --proof_generator_addr 0x66f9664f97F2b50F62D13eA064982f936dE76657 \
760+ --rpc_url $(RPC_URL ) \
761+ --network $(NETWORK )
762+
763+ batcher_send_mina_burst :
764+ @echo " Sending Mina state task to Batcher..."
765+ @cd crates/cli/ && cargo run --release -- submit \
766+ --proving_system Mina \
767+ --proof ../../scripts/test_files/mina/devnet_mina_state.proof \
768+ --public_input ../../scripts/test_files/mina/devnet_mina_state.pub \
769+ --proof_generator_addr 0x66f9664f97F2b50F62D13eA064982f936dE76657 \
770+ --repetitions $(BURST_SIZE ) \
771+ --rpc_url $(RPC_URL ) \
772+ --network $(NETWORK )
773+
774+ batcher_send_mina_account_task :
775+ @echo " Sending Mina account task to Batcher..."
776+ @cd crates/cli/ && cargo run --release -- submit \
777+ --proving_system MinaAccount \
778+ --proof ../../scripts/test_files/mina_account/mina_account.proof \
779+ --public_input ../../scripts/test_files/mina_account/mina_account.pub \
780+ --proof_generator_addr 0x66f9664f97F2b50F62D13eA064982f936dE76657 \
781+ --rpc_url $(RPC_URL ) \
782+ --network $(NETWORK )
783+
784+ batcher_send_mina_account_burst :
785+ @echo " Sending Mina account task to Batcher..."
786+ @cd crates/cli/ && cargo run --release -- submit \
787+ --proving_system MinaAccount \
788+ --proof ../../scripts/test_files/mina_account/mina_account.proof \
789+ --public_input ../../scripts/test_files/mina_account/mina_account.pub \
790+ --proof_generator_addr 0x66f9664f97F2b50F62D13eA064982f936dE76657 \
791+ --repetitions $(BURST_SIZE ) \
792+ --rpc_url $(RPC_URL ) \
793+ --network $(NETWORK )
794+
706795batcher_send_proof_with_random_address : # # Send a proof with a random address to Batcher. Parameters: RPC_URL, NETWORK, PROOF_TYPE, REPETITIONS
707796 @cd crates/cli/ && ./send_proof_with_random_address.sh
708797
@@ -968,6 +1057,48 @@ test_merkle_tree_go_bindings_linux: build_merkle_tree_linux
9681057 @echo " Testing Merkle Tree Go bindings..."
9691058 go test ./operator/merkle_tree/... -v
9701059
1060+ __MINA_FFI__ : # #
1061+ build_mina_macos :
1062+ @cd operator/mina/lib && cargo build --release ${MINA_FEATURES_FLAG}
1063+ @cp operator/mina/lib/target/release/libmina_state_verifier_ffi.dylib operator/mina/lib/libmina_state_verifier_ffi.dylib
1064+
1065+ build_mina_linux :
1066+ @cd operator/mina/lib && cargo build --release ${MINA_FEATURES_FLAG}
1067+ @cp operator/mina/lib/target/release/libmina_state_verifier_ffi.so operator/mina/lib/libmina_state_verifier_ffi.so
1068+
1069+ test_mina_rust_ffi :
1070+ @echo " Testing Mina Rust FFI source code..."
1071+ @cd operator/mina/lib && cargo t --release
1072+
1073+ test_mina_go_bindings_macos : build_mina_macos
1074+ @echo " Testing Mina Go bindings..."
1075+ go test ./operator/mina/... -v
1076+
1077+ test_mina_go_bindings_linux : build_mina_linux
1078+ @echo " Testing Mina Go bindings..."
1079+ go test ./operator/mina/... -v
1080+
1081+ __MINA_ACCOUNT_FFI__ : # #
1082+ build_mina_account_macos :
1083+ @cd operator/mina_account/lib && cargo build --release
1084+ @cp operator/mina_account/lib/target/release/libmina_account_verifier_ffi.dylib operator/mina_account/lib/libmina_account_verifier_ffi.dylib
1085+
1086+ build_mina_account_linux :
1087+ @cd operator/mina_account/lib && cargo build --release
1088+ @cp operator/mina_account/lib/target/release/libmina_account_verifier_ffi.so operator/mina_account/lib/libmina_account_verifier_ffi.so
1089+
1090+ test_mina_account_rust_ffi :
1091+ @echo " Testing Mina Account Rust FFI source code..."
1092+ @cd operator/mina_account/lib && cargo t --release
1093+
1094+ test_mina_account_go_bindings_macos : build_mina_account_macos
1095+ @echo " Testing Mina Account Go bindings..."
1096+ go test ./operator/mina_account/... -v
1097+
1098+ test_mina_account_go_bindings_linux : build_mina_account_linux
1099+ @echo " Testing Mina Account Go bindings..."
1100+ go test ./operator/mina_account/... -v
1101+
9711102__FFI__ : # # ____
9721103
9731104build_all_ffi : # # Build all FFIs
@@ -979,13 +1110,17 @@ build_all_ffi_macos: ## Build all FFIs for macOS
9791110 @$(MAKE ) build_sp1_macos
9801111 @$(MAKE ) build_risc_zero_macos
9811112 @$(MAKE ) build_merkle_tree_macos
1113+ @$(MAKE ) build_mina_macos
1114+ @$(MAKE ) build_mina_account_macos
9821115 @echo " All macOS FFIs built successfully."
9831116
9841117build_all_ffi_linux : # # Build all FFIs for Linux
9851118 @echo " Building all FFIs for Linux..."
9861119 @$(MAKE ) build_sp1_linux
9871120 @$(MAKE ) build_risc_zero_linux
9881121 @$(MAKE ) build_merkle_tree_linux
1122+ @$(MAKE ) build_mina_linux
1123+ @$(MAKE ) build_mina_account_linux
9891124 @echo " All Linux FFIs built successfully."
9901125
9911126__EXPLORER__ : # # ____
@@ -1193,6 +1328,30 @@ docker_batcher_send_circom_groth16_bn256_no_pub_input_burst:
11931328 --rpc_url $(DOCKER_RPC_URL ) \
11941329 --max_fee 0.1ether
11951330
1331+ docker_batcher_send_mina_burst :
1332+ @echo " Sending Mina state task to Batcher..."
1333+ docker exec $(shell docker ps | grep batcher | awk '{print $$1}') aligned submit \
1334+ --private_key $(DOCKER_PROOFS_PRIVATE_KEY) \
1335+ --proving_system Mina \
1336+ --proof ./scripts/test_files/mina/devnet_mina_state.proof \
1337+ --public_input ./scripts/test_files/mina/devnet_mina_state.pub \
1338+ --repetitions $(DOCKER_BURST_SIZE) \
1339+ --proof_generator_addr $(PROOF_GENERATOR_ADDRESS) \
1340+ --rpc_url $(DOCKER_RPC_URL) \
1341+ --max_fee 0.1ether
1342+
1343+ docker_batcher_send_mina_account_burst :
1344+ @echo " Sending Mina account task to Batcher..."
1345+ docker exec $(shell docker ps | grep batcher | awk '{print $$1}') aligned submit \
1346+ --private_key $(DOCKER_PROOFS_PRIVATE_KEY) \
1347+ --proving_system MinaAccount \
1348+ --proof ./scripts/test_files/mina_account/mina_account.proof \
1349+ --public_input ./scripts/test_files/mina_account/mina_account.pub \
1350+ --repetitions $(DOCKER_BURST_SIZE) \
1351+ --proof_generator_addr $(PROOF_GENERATOR_ADDRESS) \
1352+ --rpc_url $(DOCKER_RPC_URL) \
1353+ --max_fee 0.1ether
1354+
11961355# Update target as new proofs are supported.
11971356docker_batcher_send_all_proofs_burst :
11981357 @$(MAKE ) docker_batcher_send_sp1_burst
@@ -1202,6 +1361,8 @@ docker_batcher_send_all_proofs_burst:
12021361 @$(MAKE ) docker_batcher_send_gnark_groth16_burst
12031362 @$(MAKE ) docker_batcher_send_circom_groth16_bn256_burst
12041363 @$(MAKE ) docker_batcher_send_circom_groth16_bn256_no_pub_input_burst
1364+ @$(MAKE ) docker_batcher_send_mina_burst
1365+ @$(MAKE ) docker_batcher_send_mina_account_burst
12051366
12061367docker_batcher_send_infinite_groth16 :
12071368 docker exec $(shell docker ps | grep batcher | awk '{print $$1}') \
@@ -1239,7 +1400,7 @@ docker_verify_proofs_onchain:
12391400 '
12401401
12411402DOCKER_PROOFS_WAIT_TIME =60
1242- DOCKER_SENT_PROOFS =7
1403+ DOCKER_SENT_PROOFS =9
12431404
12441405docker_verify_proof_submission_success :
12451406 @echo " Verifying proofs were successfully submitted..."
0 commit comments