Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ jobs:
cache: false
- name: Build SP1 bindings
run: make build_sp1_linux
- name: Build Halo2-IPA bindings
run: make build_halo2_ipa_linux
- name: Build operator
run: go build operator/cmd/main.go
- name: Build aggregator
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/test-halo2-ipa.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: test-halo2-ipa

on:
merge_group:
push:
branches: [main]
pull_request:
branches: ["*"]

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Clear device space
run: |
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf /usr/local/.ghcup
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22'
cache: false

- name: Test Halo2-IPA go bindings
run: make test_halo2_ipa_go_bindings_linux
69 changes: 69 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,23 @@ batcher_send_burst_groth16: build_batcher_client
@echo "Sending a burst of tasks to Batcher..."
@./batcher/client/send_burst_tasks.sh $(BURST_SIZE)

batcher_send_halo2_ipa_task: batcher/client/target/release/batcher-client
@echo "Sending Halo2 IPA 1!=0 task to Batcher..."
@cd batcher/client/ && cargo run --release -- \
--proving_system Halo2IPA \
--proof test_files/halo2_ipa/proof.bin \
--public_input test_files/halo2_ipa/pub_input.bin \
--vk test_files/halo2_ipa/params.bin \

batcher_send_halo2_ipa_task_burst_5: batcher/client/target/release/batcher-client
@echo "Sending Halo2 IPA 1!=0 task to Batcher..."
@cd batcher/client/ && cargo run --release -- \
--proving_system Halo2IPA \
--proof test_files/halo2_ipa/proof.bin \
--public_input test_files/halo2_ipa/pub_input.bin \
--vk test_files/halo2_ipa/params.bin \
--repetitions 5

__TASK_SENDERS__:
# TODO add a default proving system

Expand Down Expand Up @@ -287,6 +304,27 @@ send_sp1_proof:
--config config-files/config.yaml \
2>&1 | zap-pretty

send_halo2_ipa_proof: ## Send a Halo2 IPA proof using the task sender
@echo "Sending Halo2 IPA proof..."
@go run task_sender/cmd/main.go send-task \
--proving-system halo2_ipa \
--proof task_sender/test_examples/halo2_ipa/proof.bin \
--public-input task_sender/test_examples/halo2_ipa/pub_input.bin \
--verification-key task_sender/test_examples/halo2_ipa/params.bin \
--config config-files/config.yaml \
2>&1 | zap-pretty

send_halo2_ipa_proof_loop: ## Send a Halo2 IPA proof using the task sender every 10 seconds
@echo "Sending Halo2 IPA proof in a loop every 10 seconds..."
@go run task_sender/cmd/main.go loop-tasks \
--proving-system halo2_ipa \
--proof task_sender/test_examples/halo2_ipa/proof.bin \
--public-input task_sender/test_examples/halo2_ipa/pub_input.bin \
--verification-key task_sender/test_examples/halo2_ipa/params.bin \
--config config-files/config.yaml \
--interval 10 \
2>&1 | zap-pretty

__METRICS__:
run_metrics: ## Run metrics using metrics-docker-compose.yaml
@echo "Running metrics..."
Expand Down Expand Up @@ -398,3 +436,34 @@ test_merkle_tree_go_bindings_macos: build_merkle_tree_macos
test_merkle_tree_go_bindings_linux: build_merkle_tree_linux
@echo "Testing Merkle Tree Go bindings..."
go test ./operator/merkle_tree/... -v

__HALO2_IPA_FFI__: ##
build_halo2_ipa_macos:
@cd operator/halo2ipa/lib && cargo build --release
@cp operator/halo2ipa/lib/target/release/libhalo2ipa_verifier_ffi.dylib operator/halo2ipa/lib/libhalo2ipa_verifier.dylib
@cp operator/halo2ipa/lib/target/release/libhalo2ipa_verifier_ffi.a operator/halo2ipa/lib/libhalo2ipa_verifier.a

build_halo2_ipa_linux:
@cd operator/halo2ipa/lib && cargo build --release
@cp operator/halo2ipa/lib/target/release/libhalo2ipa_verifier_ffi.so operator/halo2ipa/lib/libhalo2ipa_verifier.so
@cp operator/halo2ipa/lib/target/release/libhalo2ipa_verifier_ffi.a operator/halo2ipa/lib/libhalo2ipa_verifier.a

test_halo2_ipa_rust_ffi:
@echo "Testing Halo2-KZG Rust FFI source code..."
@cd operator/halo2ipa/lib && cargo t --release

test_halo2_ipa_go_bindings_macos: build_halo2_ipa_macos
@echo "Testing Halo2-KZG Go bindings..."
go test ./operator/halo2ipa/... -v

test_halo2_ipa_go_bindings_linux: build_halo2_ipa_linux
@echo "Testing Halo2-KZG Go bindings..."
go test ./operator/halo2ipa/... -v

generate_halo2_ipa_proof:
@cd task_sender/test_examples/halo2_ipa && \
cargo clean && \
rm params.bin proof.bin pub_input.bin && \
RUST_LOG=info cargo run --release && \
echo "Generating halo2 plonk proof..." && \
echo "Generated halo2 plonk proof!"
Loading