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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Overview

The project is a halo2 verifier written in Move language. It provides on-chain verification logic, helper utilities, and SDK tooling for verifying halo2 proofs on chain.
The project is a halo2 zk-proofs verifier written in Move language. It provides on-chain verification api, helper utilities, and SDK tooling for verifying halo2 proofs on any Move blockchains.

It supports two verifier variants:
- A pure Move verifier for maximum portability.
- A fast verifier backed by native functions for higher performance.

Key components:
- `packages/common`: shared Move utilities (e.g., field/serialization helpers).
- `packages/verifier`: the core Move verifier implementation.
- `packages/verifier`: the core verifier implementation.
- `packages/api`: public-facing Move APIs and integration helpers.
- `crates/*`: Rust tooling that supports the verifier (serialization, deserialization, SDK helpers, and examples).
- `crates/*`: Rust tooling that supports the verifier (serialization/deserialization, SDK helpers, and examples).

See [TUTORIAL.md](./TUTORIAL.md) for step-by-step usage and workflows.
19 changes: 10 additions & 9 deletions TUTORIAL.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ Run the script to publish the verifier contracts to the local network:
PROFILE=<your-profile-for-contracts> ./publish_contracts.sh
```

## Create verifier for specific circuit
## Deploy verifier for specific circuit

Two verifier variants are available:
- Native: uses native functions for faster verification.
- Pure Move: implements verification entirely in Move, offering better portability.

This section deploys the native verifier first. We use the Fibonacci circuit (project_root/examples/fibonacci) as an example to show how to deploy the verifier.
This section deploys the native verifier first, and then deploys the pure move verifier as an option. We use the Fibonacci circuit (project_root/examples/fibonacci) as an example to show how to deploy the verifier.

### Deploy halo2 verifier (native functions)
### Deploy the native halo2 verifier

Publish KZG params:

Expand Down Expand Up @@ -95,7 +95,7 @@ aptos move run --json-file test_fibonacci-1747793629098-publish-vk-native.txn --
aptos move run --json-file test_fibonacci-1747793629098-publish-circuit-native.txn --profile <your-profile-for-verifier>
```

### Deploy halo2 verifier (pure Move)
### (Optional) Deploy the pure move verifier

Publish KZG params:

Expand Down Expand Up @@ -134,18 +134,19 @@ Build a verify-proof transaction for the native verifier:
zkmove aptos build-verify-proof-native-aptos-txn --pubs-path example/proofs/test_fibonacci-1754384516414.instance --proof-path example/proofs/test_fibonacci-1754384516414.proof --k <your_parameter_k> --native-verifier-contract-address <address-of-your-profile-for-contracts> --params-address <address-of-your-profile-for-params> --native-verifier-address <address-of-your-profile-for-verifier>
```

Or, build a verify-proof transaction for the pure Move verifier:
Submit the verify-proof transaction (any user can submit the transaction):

```shell
zkmove aptos build-verify-proof-aptos-txn --pubs-path example/proofs/test_fibonacci-1754384516414.instance --proof-path example/proofs/test_fibonacci-1754384516414.proof --verifier-contract-address <address-of-your-profile-for-contracts> --params-address <address-of-your-profile-for-params> --verifier-address <address-of-your-profile-for-verifier>
aptos move run --json-file test_fibonacci-1747793629098-verify-proof-native.txn --profile <any-profile>
```

Submit the verify-proof transaction (anyone can submit the transaction):
Or, build a verify-proof transaction for the pure Move verifier:

```shell
aptos move run --json-file test_fibonacci-1747793629098-verify-proof-native.txn --profile <any-profile>
zkmove aptos build-verify-proof-aptos-txn --pubs-path example/proofs/test_fibonacci-1754384516414.instance --proof-path example/proofs/test_fibonacci-1754384516414.proof --verifier-contract-address <address-of-your-profile-for-contracts> --params-address <address-of-your-profile-for-params> --verifier-address <address-of-your-profile-for-verifier>
```
Or
Submit the transaction:

```shell
aptos move run --json-file test_fibonacci-1747793629098-verify-proof.txn --profile <any-profile>
```