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
45 changes: 45 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# UltraHonk Rust Verifier 🦀
A standalone Rust implementation of the **UltraHonk** proof verifier + a handful of sample Noir circuits.

---

## Features
- Pure Rust (`no_std` planned)
- UltraHonk verifier compatible with Barretenberg bb v0.82.2
- Planned: support for latest bb prove
- Ready-to-run example circuits (`simple_circuit`, `fib_chain`, `poseidon_demo`)

---

## Quick Start
```bash
# 1) Generate proofs & verification keys for all circuits
tests/build_circuits.sh # downloads nargo & bb v0.82.2 if missing

# 2) Run Rust tests (verifies each proof)
cargo test
````

## How it works (high-level)

1. `tests/build_circuits.sh`

* installs **Nargo 1.0.0-beta.3** and **bb v0.82.2** if necessary
* builds each circuit → witness → proof & vk (UltraHonk)
2. Rust tests (`tests/verifier.rs`)

* load `proof + public_inputs` and `vk_fields.json`
* call `HonkVerifier::verify()` — all proofs must pass

---

## Roadmap

* [ ] `no_std` verifier for WASM
* [ ] Support Stellar Soroban runtime
* [ ] Publish crate to crates.io

---

## License
**MIT** – see [`LICENSE`](LICENSE) for details.
2 changes: 1 addition & 1 deletion src/field.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// field.rs
// src/field.rs

use ark_bn254::Fr as ArkFr;
use ark_ff::BigInteger256;
Expand Down
2 changes: 1 addition & 1 deletion src/hash.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// hash.rs
// src/hash.rs

use sha3::{Digest, Keccak256};

Expand Down
4 changes: 2 additions & 2 deletions src/shplemini.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// src/shplonk.rs
//! Shplonk batch-opening verifier for BN254
// src/shplemini.rs
//! Shplemini batch-opening verifier for BN254

use crate::debug::dbg_fr;
use crate::debug::dbg_vec;
Expand Down
2 changes: 1 addition & 1 deletion src/sumcheck.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// sumcheck.rs
// src/sumcheck.rs
//! Sum-check verifier
use crate::trace;
use crate::{
Expand Down
2 changes: 1 addition & 1 deletion src/transcript.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// transcript.rs
// srctranscript.rs
//! Fiat–Shamir transcript for UltraHonk

use crate::debug::{dbg_fr, dbg_vec};
Expand Down
2 changes: 1 addition & 1 deletion src/types.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//type.rs
// src/types.rs
use crate::field::Fr;
use ark_bn254::{Fq, G1Affine};

Expand Down
2 changes: 1 addition & 1 deletion src/utils.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// utils.rs
// src/utils.rs
//! Utilities for loading Proof and VerificationKey, plus byte↔field/point conversion.

use crate::field::Fr;
Expand Down
1 change: 1 addition & 0 deletions src/verifier.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// src/verifier.rs
//! UltraHonk verifier

use crate::{
Expand Down