Soroban contract wrapper around the Noir(UltraHonk) verifier. The VK is set at deploy time; proofs are verified with public_inputs and proof.
Prereqs:
stellarCLI (stellar-cli)- Rust +
wasm32v1-nonetarget - Docker (for localnet)
# 1) Start localnet
stellar container start -t future --name local --limits unlimited
# 2) Configure network + identity
stellar network add local \
--rpc-url http://localhost:8000/soroban/rpc \
--network-passphrase "Standalone Network ; February 2017"
stellar network use local
stellar network health --output json
stellar keys generate --global alice
stellar keys fund alice --network local
stellar keys address alice
# 3) Build + deploy (constructor requires a VK from tests/build_circuits.sh)
rustup target add wasm32v1-none
stellar contract build --optimize
stellar contract deploy \
--wasm target/wasm32v1-none/release/rs_soroban_ultrahonk.wasm \
--source alice \
-- \
--vk_bytes-file-path tests/simple_circuit/target/vkFrom the repo root. You need Noir tooling (nargo) and bb (barretenberg). Artifacts are generated with --oracle_hash keccak.
tests/build_circuits.shExpects a dataset folder with public_inputs, proof (the VK is already on-chain from deploy):
cd scripts/invoke_ultrahonk
npm install
npx ts-node invoke_ultrahonk.ts invoke \
--dataset ../../tests/simple_circuit/target \
--contract-id <CONTRACT_ID> \
--network local \
--source-account alice \
--send yesstellar contract invoke \
--id <CONTRACT_ID> \
--source alice \
--network local \
--send yes \
--cost \
-- \
verify_proof \
--public_inputs-file-path tests/simple_circuit/target/public_inputs \
--proof_bytes-file-path tests/simple_circuit/target/proofThis contract does not enforce access control:
__constructorstores the VK once at deploy time (immutable after first set).verify_proofalways uses the stored VK set at deploy.
RUST_TEST_THREADS=1 cargo test --test integration_tests -- --nocapture
cargo test --manifest-path tornado_classic/contracts/Cargo.toml --features testutils -- --nocapture- Noir language: https://noir-lang.org/
- Barretenberg (bb): https://github.com/AztecProtocol/aztec-packages
- rs-soroban-ultrahonk: https://github.com/yugocabrio/rs-soroban-ultrahonk
- Soroban documentation: https://developers.stellar.org/docs/build/smart-contracts
- Soroban SDK (Rust): https://github.com/stellar/rs-soroban-sdk
This project has not been audited.
MIT