Skip to content

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 08 Feb 21:13
· 55 commits to main since this release

[0.2.0] - 2026-02-08

Fixed

  • CRITICAL: Increased value range check from u64 to u128 in unshield.circom and transfer.circom
    • Changed Num2Bits(64) to Num2Bits(128) to match runtime Balance type
    • Previous limit: ~18.4 ORB maximum per transaction
    • New limit: ~340 undecillion ORB (full u128 range)
    • Affects: Unshield and Private Transfer operations
    • Impact: Users can now transact with realistic amounts without artificial circuit limitations
    • BREAKING CHANGE: Requires recompilation of all circuits and regeneration of artifacts

📦 Release Contents

This release includes all three Orbinum ZK circuits:

  • Disclosure Circuit: Selective revelation of note fields (1,584 constraints)
  • Transfer Circuit: Private token transfers with EdDSA signatures (41,212 constraints)
  • Unshield Circuit: Convert private notes to public tokens (11,718 constraints)

Each circuit includes:

  • .wasm - Witness calculator for proof generation
  • .json - Verification key for on-chain validation
  • .zkey - Proving key for snarkjs (JavaScript/TypeScript)
  • .ark - Proving key for arkworks (Rust/Substrate, optimized)

Total: 12 files + checksums

🔗 Integration Examples

JavaScript/TypeScript (snarkjs)

import { groth16 } from 'snarkjs';

// Example: Transfer circuit
const { proof, publicSignals } = await groth16.fullProve(
  inputs,
  'transfer.wasm',
  'transfer_pk.zkey'
);

// Verify with verification key
const vkey = JSON.parse(fs.readFileSync('verification_key_transfer.json'));
const isValid = await groth16.verify(vkey, publicSignals, proof);

Rust/Substrate (arkworks) - Option 1: .ark file (optimized)

use ark_bn254::Bn254;
use ark_groth16::{Groth16, ProvingKey};
use ark_serialize::CanonicalDeserialize;
use std::fs::File;

// Load pre-serialized .ark file (faster, ~2-3x performance)
let mut ark_file = File::open("transfer_pk.ark")?;
let proving_key = ProvingKey::<Bn254>::deserialize_compressed(&mut ark_file)?;

// Generate proof
let proof = Groth16::<Bn254>::prove(&proving_key, circuit, &mut rng)?;

Rust/Substrate (arkworks) - Option 2: .zkey file (direct)

use ark_circom::read_zkey;
use ark_bn254::Bn254;
use ark_groth16::Groth16;

// Read .zkey file directly (requires ark-circom)
let mut zkey_file = File::open("transfer_pk.zkey")?;
let (proving_key, matrices) = read_zkey(&mut zkey_file)?;

// Generate proof
let proof = Groth16::<Bn254>::prove(&proving_key, circuit, &mut rng)?;

Dependencies:

📊 File Sizes

Circuit WASM VK (JSON) Proving Key (.zkey) Arkworks (.ark)
Disclosure ~200 KB 3.4 KB 689 KB ~600 KB
Transfer ~400 KB 3.6 KB 19 MB ~17 MB
Unshield ~250 KB 3.6 KB 5.1 MB ~4.5 MB

⚠️ Security Notice

These keys are generated with a development setup for testing purposes only.

Production deployment requires:

  • Multi-party trusted setup ceremony (50+ independent contributors)
  • Hardware security modules (HSMs) for key contributors
  • Public verification of ceremony transcripts

📥 Download

Download the complete bundle orbinum-circuits-{version}.tar.gz which includes all 12 circuit files.

Extract with: tar -xzf orbinum-circuits-{version}.tar.gz