@@ -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)
@@ -240,7 +240,7 @@ reset_last_aggregated_block:
240240 @echo " Resetting last aggregated block..."
241241 @echo ' {"last_aggregated_block":0}' > config-files/proof-aggregator.last_aggregated_block.json
242242
243- AGGREGATION_MODE_SOURCES = $(wildcard ./aggregation_mode/Cargo.toml) $(wildcard ./aggregation_mode/src/** ) $(wildcard ./aggregation_mode/aggregation_programs/risc0/Cargo.toml) $(wildcard ./aggregation_mode/aggregation_programs/risc0/src/** ) $(wildcard ./aggregation_mode/aggregation_programs/sp1/Cargo.toml) $(wildcard ./aggregation_mode/aggregation_programs/sp1/src/** )
243+ AGGREGATION_MODE_SOURCES = $(wildcard ./aggregation_mode/Cargo.toml) $(wildcard ./aggregation_mode/proof_aggregator/Cargo.toml) $( wildcard ./aggregation_mode/proof_aggregator/ src/** ) $(wildcard ./aggregation_mode/proof_aggregator/ aggregation_programs/risc0/Cargo.toml) $(wildcard ./aggregation_mode/proof_aggregator/ aggregation_programs/risc0/src/** ) $(wildcard ./aggregation_mode/proof_aggregator/ aggregation_programs/sp1/Cargo.toml) $(wildcard ./aggregation_mode/proof_aggregator /aggregation_programs/sp1/src/** )
244244
245245# ## All Dev proof aggregator receipts with no real proving
246246./aggregation_mode/target/release/proof_aggregator_dev : $(AGGREGATION_MODE_SOURCES )
@@ -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,46 @@ 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_gateway_start_local : agg_mode_run_migrations
321+ cargo run --manifest-path ./aggregation_mode/Cargo.toml --release --bin gateway -- config-files/config-agg-mode-gateway.yaml
322+
323+ agg_mode_gateway_start_ethereum_package : agg_mode_run_migrations
324+ cargo run --manifest-path ./aggregation_mode/Cargo.toml --release --bin gateway -- config-files/config-agg-mode-gateway-ethereum-package.yaml
325+
326+ agg_mode_payments_poller_start_local : agg_mode_run_migrations
327+ cargo run --manifest-path ./aggregation_mode/Cargo.toml --release --bin payments_poller -- config-files/config-agg-mode-gateway.yaml
328+
329+ agg_mode_payments_poller_start_ethereum_package : agg_mode_run_migrations
330+ cargo run --manifest-path ./aggregation_mode/Cargo.toml --release --bin payments_poller -- config-files/config-agg-mode-gateway-ethereum-package.yaml
331+
332+ AGG_MODE_SENDER ?= 0x70997970C51812dc3A010C7d01b50e0d17dc79C8
333+ agg_mode_gateway_send_payment :
334+ @cast send --value 1ether \
335+ 0x922D6956C99E12DFeB3224DEA977D0939758A1Fe \
336+ --private-key 0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d
337+
338+ agg_mode_gateway_send_sp1_proof :
339+ @cargo run --manifest-path aggregation_mode/cli/Cargo.toml -- submit sp1 \
340+ --proof scripts/test_files/sp1/sp1_fibonacci_5_0_0.proof \
341+ --vk scripts/test_files/sp1/sp1_fibonacci_5_0_0_vk.bin \
342+ --private-key " 0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d"
343+
344+ agg_mode_get_quotas :
345+ curl -X GET http://127.0.0.1:8089/quotas/0x70997970C51812dc3A010C7d01b50e0d17dc79C8
304346
305347__AGGREGATOR__ : # # ____
306348
@@ -703,6 +745,58 @@ batcher_send_circom_groth16_bn256_no_pub_input_burst: crates/target/release/alig
703745 --rpc_url $(RPC_URL ) \
704746 --network $(NETWORK )
705747
748+ batcher_send_mina_task :
749+ @echo " Sending Mina state task to Batcher..."
750+ @cd crates/cli/ && cargo run --release -- submit \
751+ --proving_system Mina \
752+ --proof ../../scripts/test_files/mina/devnet_mina_state.proof \
753+ --public_input ../../scripts/test_files/mina/devnet_mina_state.pub \
754+ --proof_generator_addr 0x66f9664f97F2b50F62D13eA064982f936dE76657 \
755+ --rpc_url $(RPC_URL ) \
756+ --network $(NETWORK )
757+
758+ batcher_send_mina_task_bad_hash :
759+ @echo " Sending Mina state task to Batcher..."
760+ @cd crates/cli/ && cargo run --release -- submit \
761+ --proving_system Mina \
762+ --proof ../../scripts/test_files/mina/devnet_mina_state.proof \
763+ --public_input ../../scripts/test_files/mina/mina_state_bad_hash.pub \
764+ --proof_generator_addr 0x66f9664f97F2b50F62D13eA064982f936dE76657 \
765+ --rpc_url $(RPC_URL ) \
766+ --network $(NETWORK )
767+
768+ batcher_send_mina_burst :
769+ @echo " Sending Mina state task to Batcher..."
770+ @cd crates/cli/ && cargo run --release -- submit \
771+ --proving_system Mina \
772+ --proof ../../scripts/test_files/mina/devnet_mina_state.proof \
773+ --public_input ../../scripts/test_files/mina/devnet_mina_state.pub \
774+ --proof_generator_addr 0x66f9664f97F2b50F62D13eA064982f936dE76657 \
775+ --repetitions $(BURST_SIZE ) \
776+ --rpc_url $(RPC_URL ) \
777+ --network $(NETWORK )
778+
779+ batcher_send_mina_account_task :
780+ @echo " Sending Mina account task to Batcher..."
781+ @cd crates/cli/ && cargo run --release -- submit \
782+ --proving_system MinaAccount \
783+ --proof ../../scripts/test_files/mina_account/mina_account.proof \
784+ --public_input ../../scripts/test_files/mina_account/mina_account.pub \
785+ --proof_generator_addr 0x66f9664f97F2b50F62D13eA064982f936dE76657 \
786+ --rpc_url $(RPC_URL ) \
787+ --network $(NETWORK )
788+
789+ batcher_send_mina_account_burst :
790+ @echo " Sending Mina account task to Batcher..."
791+ @cd crates/cli/ && cargo run --release -- submit \
792+ --proving_system MinaAccount \
793+ --proof ../../scripts/test_files/mina_account/mina_account.proof \
794+ --public_input ../../scripts/test_files/mina_account/mina_account.pub \
795+ --proof_generator_addr 0x66f9664f97F2b50F62D13eA064982f936dE76657 \
796+ --repetitions $(BURST_SIZE ) \
797+ --rpc_url $(RPC_URL ) \
798+ --network $(NETWORK )
799+
706800batcher_send_proof_with_random_address : # # Send a proof with a random address to Batcher. Parameters: RPC_URL, NETWORK, PROOF_TYPE, REPETITIONS
707801 @cd crates/cli/ && ./send_proof_with_random_address.sh
708802
@@ -968,6 +1062,48 @@ test_merkle_tree_go_bindings_linux: build_merkle_tree_linux
9681062 @echo " Testing Merkle Tree Go bindings..."
9691063 go test ./operator/merkle_tree/... -v
9701064
1065+ __MINA_FFI__ : # #
1066+ build_mina_macos :
1067+ @cd operator/mina/lib && cargo build --release ${MINA_FEATURES_FLAG}
1068+ @cp operator/mina/lib/target/release/libmina_state_verifier_ffi.dylib operator/mina/lib/libmina_state_verifier_ffi.dylib
1069+
1070+ build_mina_linux :
1071+ @cd operator/mina/lib && cargo build --release ${MINA_FEATURES_FLAG}
1072+ @cp operator/mina/lib/target/release/libmina_state_verifier_ffi.so operator/mina/lib/libmina_state_verifier_ffi.so
1073+
1074+ test_mina_rust_ffi :
1075+ @echo " Testing Mina Rust FFI source code..."
1076+ @cd operator/mina/lib && cargo t --release
1077+
1078+ test_mina_go_bindings_macos : build_mina_macos
1079+ @echo " Testing Mina Go bindings..."
1080+ go test ./operator/mina/... -v
1081+
1082+ test_mina_go_bindings_linux : build_mina_linux
1083+ @echo " Testing Mina Go bindings..."
1084+ go test ./operator/mina/... -v
1085+
1086+ __MINA_ACCOUNT_FFI__ : # #
1087+ build_mina_account_macos :
1088+ @cd operator/mina_account/lib && cargo build --release
1089+ @cp operator/mina_account/lib/target/release/libmina_account_verifier_ffi.dylib operator/mina_account/lib/libmina_account_verifier_ffi.dylib
1090+
1091+ build_mina_account_linux :
1092+ @cd operator/mina_account/lib && cargo build --release
1093+ @cp operator/mina_account/lib/target/release/libmina_account_verifier_ffi.so operator/mina_account/lib/libmina_account_verifier_ffi.so
1094+
1095+ test_mina_account_rust_ffi :
1096+ @echo " Testing Mina Account Rust FFI source code..."
1097+ @cd operator/mina_account/lib && cargo t --release
1098+
1099+ test_mina_account_go_bindings_macos : build_mina_account_macos
1100+ @echo " Testing Mina Account Go bindings..."
1101+ go test ./operator/mina_account/... -v
1102+
1103+ test_mina_account_go_bindings_linux : build_mina_account_linux
1104+ @echo " Testing Mina Account Go bindings..."
1105+ go test ./operator/mina_account/... -v
1106+
9711107__FFI__ : # # ____
9721108
9731109build_all_ffi : # # Build all FFIs
@@ -979,13 +1115,17 @@ build_all_ffi_macos: ## Build all FFIs for macOS
9791115 @$(MAKE ) build_sp1_macos
9801116 @$(MAKE ) build_risc_zero_macos
9811117 @$(MAKE ) build_merkle_tree_macos
1118+ @$(MAKE ) build_mina_macos
1119+ @$(MAKE ) build_mina_account_macos
9821120 @echo " All macOS FFIs built successfully."
9831121
9841122build_all_ffi_linux : # # Build all FFIs for Linux
9851123 @echo " Building all FFIs for Linux..."
9861124 @$(MAKE ) build_sp1_linux
9871125 @$(MAKE ) build_risc_zero_linux
9881126 @$(MAKE ) build_merkle_tree_linux
1127+ @$(MAKE ) build_mina_linux
1128+ @$(MAKE ) build_mina_account_linux
9891129 @echo " All Linux FFIs built successfully."
9901130
9911131__EXPLORER__ : # # ____
@@ -1193,6 +1333,30 @@ docker_batcher_send_circom_groth16_bn256_no_pub_input_burst:
11931333 --rpc_url $(DOCKER_RPC_URL ) \
11941334 --max_fee 0.1ether
11951335
1336+ docker_batcher_send_mina_burst :
1337+ @echo " Sending Mina state task to Batcher..."
1338+ docker exec $(shell docker ps | grep batcher | awk '{print $$1}') aligned submit \
1339+ --private_key $(DOCKER_PROOFS_PRIVATE_KEY) \
1340+ --proving_system Mina \
1341+ --proof ./scripts/test_files/mina/devnet_mina_state.proof \
1342+ --public_input ./scripts/test_files/mina/devnet_mina_state.pub \
1343+ --repetitions $(DOCKER_BURST_SIZE) \
1344+ --proof_generator_addr $(PROOF_GENERATOR_ADDRESS) \
1345+ --rpc_url $(DOCKER_RPC_URL) \
1346+ --max_fee 0.1ether
1347+
1348+ docker_batcher_send_mina_account_burst :
1349+ @echo " Sending Mina account task to Batcher..."
1350+ docker exec $(shell docker ps | grep batcher | awk '{print $$1}') aligned submit \
1351+ --private_key $(DOCKER_PROOFS_PRIVATE_KEY) \
1352+ --proving_system MinaAccount \
1353+ --proof ./scripts/test_files/mina_account/mina_account.proof \
1354+ --public_input ./scripts/test_files/mina_account/mina_account.pub \
1355+ --repetitions $(DOCKER_BURST_SIZE) \
1356+ --proof_generator_addr $(PROOF_GENERATOR_ADDRESS) \
1357+ --rpc_url $(DOCKER_RPC_URL) \
1358+ --max_fee 0.1ether
1359+
11961360# Update target as new proofs are supported.
11971361docker_batcher_send_all_proofs_burst :
11981362 @$(MAKE ) docker_batcher_send_sp1_burst
@@ -1202,6 +1366,8 @@ docker_batcher_send_all_proofs_burst:
12021366 @$(MAKE ) docker_batcher_send_gnark_groth16_burst
12031367 @$(MAKE ) docker_batcher_send_circom_groth16_bn256_burst
12041368 @$(MAKE ) docker_batcher_send_circom_groth16_bn256_no_pub_input_burst
1369+ @$(MAKE ) docker_batcher_send_mina_burst
1370+ @$(MAKE ) docker_batcher_send_mina_account_burst
12051371
12061372docker_batcher_send_infinite_groth16 :
12071373 docker exec $(shell docker ps | grep batcher | awk '{print $$1}') \
@@ -1239,7 +1405,7 @@ docker_verify_proofs_onchain:
12391405 '
12401406
12411407DOCKER_PROOFS_WAIT_TIME =60
1242- DOCKER_SENT_PROOFS =7
1408+ DOCKER_SENT_PROOFS =9
12431409
12441410docker_verify_proof_submission_success :
12451411 @echo " Verifying proofs were successfully submitted..."
0 commit comments