@@ -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)
@@ -300,7 +300,25 @@ proof_aggregator_install: ## Install the aggregation mode with proving enabled
300300 cargo install --path aggregation_mode --features prove,gpu --bin proof_aggregator_gpu --locked
301301
302302proof_aggregator_write_program_ids : # # Write proof aggregator zkvm programs ids
303- @cd aggregation_mode && ./scripts/build_programs.sh
303+ @cd aggregation_mode/proof_aggregator && ./scripts/build_programs.sh
304+
305+ agg_mode_docker_up :
306+ @cd aggregation_mode && docker-compose up -d
307+
308+ agg_mode_docker_down :
309+ @cd aggregation_mode && docker-compose down
310+
311+ agg_mode_docker_clean : agg_mode_docker_down
312+ docker volume rm aggregation-mode_postgres_data
313+
314+ agg_mode_run_migrations : agg_mode_docker_up
315+ cargo run --manifest-path ./aggregation_mode/Cargo.toml --release --bin migrate -- postgres://postgres:postgres@localhost:5435/
316+
317+ agg_mode_batcher_start_local : agg_mode_run_migrations
318+ cargo run --manifest-path ./aggregation_mode/Cargo.toml --release --bin agg_mode_batcher -- config-files/config-agg-mode-batcher.yaml
319+
320+ agg_mode_batcher_start_ethereum_package : agg_mode_run_migrations
321+ cargo run --manifest-path ./aggregation_mode/Cargo.toml --release --bin agg_mode_batcher -- config-files/config-agg-mode-batcher-ethereum-package.yaml
304322
305323__AGGREGATOR__ : # # ____
306324
@@ -703,6 +721,58 @@ batcher_send_circom_groth16_bn256_no_pub_input_burst: crates/target/release/alig
703721 --rpc_url $(RPC_URL ) \
704722 --network $(NETWORK )
705723
724+ batcher_send_mina_task :
725+ @echo " Sending Mina state task to Batcher..."
726+ @cd crates/cli/ && cargo run --release -- submit \
727+ --proving_system Mina \
728+ --proof ../../scripts/test_files/mina/devnet_mina_state.proof \
729+ --public_input ../../scripts/test_files/mina/devnet_mina_state.pub \
730+ --proof_generator_addr 0x66f9664f97F2b50F62D13eA064982f936dE76657 \
731+ --rpc_url $(RPC_URL ) \
732+ --network $(NETWORK )
733+
734+ batcher_send_mina_task_bad_hash :
735+ @echo " Sending Mina state task to Batcher..."
736+ @cd crates/cli/ && cargo run --release -- submit \
737+ --proving_system Mina \
738+ --proof ../../scripts/test_files/mina/devnet_mina_state.proof \
739+ --public_input ../../scripts/test_files/mina/mina_state_bad_hash.pub \
740+ --proof_generator_addr 0x66f9664f97F2b50F62D13eA064982f936dE76657 \
741+ --rpc_url $(RPC_URL ) \
742+ --network $(NETWORK )
743+
744+ batcher_send_mina_burst :
745+ @echo " Sending Mina state task to Batcher..."
746+ @cd crates/cli/ && cargo run --release -- submit \
747+ --proving_system Mina \
748+ --proof ../../scripts/test_files/mina/devnet_mina_state.proof \
749+ --public_input ../../scripts/test_files/mina/devnet_mina_state.pub \
750+ --proof_generator_addr 0x66f9664f97F2b50F62D13eA064982f936dE76657 \
751+ --repetitions $(BURST_SIZE ) \
752+ --rpc_url $(RPC_URL ) \
753+ --network $(NETWORK )
754+
755+ batcher_send_mina_account_task :
756+ @echo " Sending Mina account task to Batcher..."
757+ @cd crates/cli/ && cargo run --release -- submit \
758+ --proving_system MinaAccount \
759+ --proof ../../scripts/test_files/mina_account/mina_account.proof \
760+ --public_input ../../scripts/test_files/mina_account/mina_account.pub \
761+ --proof_generator_addr 0x66f9664f97F2b50F62D13eA064982f936dE76657 \
762+ --rpc_url $(RPC_URL ) \
763+ --network $(NETWORK )
764+
765+ batcher_send_mina_account_burst :
766+ @echo " Sending Mina account task to Batcher..."
767+ @cd crates/cli/ && cargo run --release -- submit \
768+ --proving_system MinaAccount \
769+ --proof ../../scripts/test_files/mina_account/mina_account.proof \
770+ --public_input ../../scripts/test_files/mina_account/mina_account.pub \
771+ --proof_generator_addr 0x66f9664f97F2b50F62D13eA064982f936dE76657 \
772+ --repetitions $(BURST_SIZE ) \
773+ --rpc_url $(RPC_URL ) \
774+ --network $(NETWORK )
775+
706776batcher_send_proof_with_random_address : # # Send a proof with a random address to Batcher. Parameters: RPC_URL, NETWORK, PROOF_TYPE, REPETITIONS
707777 @cd crates/cli/ && ./send_proof_with_random_address.sh
708778
@@ -968,6 +1038,48 @@ test_merkle_tree_go_bindings_linux: build_merkle_tree_linux
9681038 @echo " Testing Merkle Tree Go bindings..."
9691039 go test ./operator/merkle_tree/... -v
9701040
1041+ __MINA_FFI__ : # #
1042+ build_mina_macos :
1043+ @cd operator/mina/lib && cargo build --release ${MINA_FEATURES_FLAG}
1044+ @cp operator/mina/lib/target/release/libmina_state_verifier_ffi.dylib operator/mina/lib/libmina_state_verifier_ffi.dylib
1045+
1046+ build_mina_linux :
1047+ @cd operator/mina/lib && cargo build --release ${MINA_FEATURES_FLAG}
1048+ @cp operator/mina/lib/target/release/libmina_state_verifier_ffi.so operator/mina/lib/libmina_state_verifier_ffi.so
1049+
1050+ test_mina_rust_ffi :
1051+ @echo " Testing Mina Rust FFI source code..."
1052+ @cd operator/mina/lib && cargo t --release
1053+
1054+ test_mina_go_bindings_macos : build_mina_macos
1055+ @echo " Testing Mina Go bindings..."
1056+ go test ./operator/mina/... -v
1057+
1058+ test_mina_go_bindings_linux : build_mina_linux
1059+ @echo " Testing Mina Go bindings..."
1060+ go test ./operator/mina/... -v
1061+
1062+ __MINA_ACCOUNT_FFI__ : # #
1063+ build_mina_account_macos :
1064+ @cd operator/mina_account/lib && cargo build --release
1065+ @cp operator/mina_account/lib/target/release/libmina_account_verifier_ffi.dylib operator/mina_account/lib/libmina_account_verifier_ffi.dylib
1066+
1067+ build_mina_account_linux :
1068+ @cd operator/mina_account/lib && cargo build --release
1069+ @cp operator/mina_account/lib/target/release/libmina_account_verifier_ffi.so operator/mina_account/lib/libmina_account_verifier_ffi.so
1070+
1071+ test_mina_account_rust_ffi :
1072+ @echo " Testing Mina Account Rust FFI source code..."
1073+ @cd operator/mina_account/lib && cargo t --release
1074+
1075+ test_mina_account_go_bindings_macos : build_mina_account_macos
1076+ @echo " Testing Mina Account Go bindings..."
1077+ go test ./operator/mina_account/... -v
1078+
1079+ test_mina_account_go_bindings_linux : build_mina_account_linux
1080+ @echo " Testing Mina Account Go bindings..."
1081+ go test ./operator/mina_account/... -v
1082+
9711083__FFI__ : # # ____
9721084
9731085build_all_ffi : # # Build all FFIs
@@ -979,13 +1091,17 @@ build_all_ffi_macos: ## Build all FFIs for macOS
9791091 @$(MAKE ) build_sp1_macos
9801092 @$(MAKE ) build_risc_zero_macos
9811093 @$(MAKE ) build_merkle_tree_macos
1094+ @$(MAKE ) build_mina_macos
1095+ @$(MAKE ) build_mina_account_macos
9821096 @echo " All macOS FFIs built successfully."
9831097
9841098build_all_ffi_linux : # # Build all FFIs for Linux
9851099 @echo " Building all FFIs for Linux..."
9861100 @$(MAKE ) build_sp1_linux
9871101 @$(MAKE ) build_risc_zero_linux
9881102 @$(MAKE ) build_merkle_tree_linux
1103+ @$(MAKE ) build_mina_linux
1104+ @$(MAKE ) build_mina_account_linux
9891105 @echo " All Linux FFIs built successfully."
9901106
9911107__EXPLORER__ : # # ____
@@ -1193,6 +1309,30 @@ docker_batcher_send_circom_groth16_bn256_no_pub_input_burst:
11931309 --rpc_url $(DOCKER_RPC_URL ) \
11941310 --max_fee 0.1ether
11951311
1312+ docker_batcher_send_mina_burst :
1313+ @echo " Sending Mina state task to Batcher..."
1314+ docker exec $(shell docker ps | grep batcher | awk '{print $$1}') aligned submit \
1315+ --private_key $(DOCKER_PROOFS_PRIVATE_KEY) \
1316+ --proving_system Mina \
1317+ --proof ./scripts/test_files/mina/devnet_mina_state.proof \
1318+ --public_input ./scripts/test_files/mina/devnet_mina_state.pub \
1319+ --repetitions $(DOCKER_BURST_SIZE) \
1320+ --proof_generator_addr $(PROOF_GENERATOR_ADDRESS) \
1321+ --rpc_url $(DOCKER_RPC_URL) \
1322+ --max_fee 0.1ether
1323+
1324+ docker_batcher_send_mina_account_burst :
1325+ @echo " Sending Mina account task to Batcher..."
1326+ docker exec $(shell docker ps | grep batcher | awk '{print $$1}') aligned submit \
1327+ --private_key $(DOCKER_PROOFS_PRIVATE_KEY) \
1328+ --proving_system MinaAccount \
1329+ --proof ./scripts/test_files/mina_account/mina_account.proof \
1330+ --public_input ./scripts/test_files/mina_account/mina_account.pub \
1331+ --repetitions $(DOCKER_BURST_SIZE) \
1332+ --proof_generator_addr $(PROOF_GENERATOR_ADDRESS) \
1333+ --rpc_url $(DOCKER_RPC_URL) \
1334+ --max_fee 0.1ether
1335+
11961336# Update target as new proofs are supported.
11971337docker_batcher_send_all_proofs_burst :
11981338 @$(MAKE ) docker_batcher_send_sp1_burst
@@ -1202,6 +1342,8 @@ docker_batcher_send_all_proofs_burst:
12021342 @$(MAKE ) docker_batcher_send_gnark_groth16_burst
12031343 @$(MAKE ) docker_batcher_send_circom_groth16_bn256_burst
12041344 @$(MAKE ) docker_batcher_send_circom_groth16_bn256_no_pub_input_burst
1345+ @$(MAKE ) docker_batcher_send_mina_burst
1346+ @$(MAKE ) docker_batcher_send_mina_account_burst
12051347
12061348docker_batcher_send_infinite_groth16 :
12071349 docker exec $(shell docker ps | grep batcher | awk '{print $$1}') \
@@ -1239,7 +1381,7 @@ docker_verify_proofs_onchain:
12391381 '
12401382
12411383DOCKER_PROOFS_WAIT_TIME =60
1242- DOCKER_SENT_PROOFS =7
1384+ DOCKER_SENT_PROOFS =9
12431385
12441386docker_verify_proof_submission_success :
12451387 @echo " Verifying proofs were successfully submitted..."
0 commit comments