Skip to content

v0.1.0-phase1 — Phase 1 freeze

Pre-release
Pre-release

Choose a tag to compare

@kh0ra kh0ra released this 20 Apr 00:14
· 191 commits to main since this release

Phase 1 technical scope frozen. This pre-release is the reference point for audit-readiness conversations; subsequent commits land documentation, supply-chain attestation, and outreach artifacts without changing the runtime surface.

What's in

  • mosaic-core: ProofSystem, ProofCodec, TranscriptHash, SyscallBackend, two-layer error taxonomy (29 OnChainError variants pinned at stable discriminants), bump arena.
  • mosaic-groth16: BN254 Groth16 verifier with LE_INPUTS const generic for SIMD-0204 forward-compat. Host backend via ark-bn254, SBF backend via solana-bn254 syscalls.
  • mosaic-serde: snarkjs JSON + arkworks canonical adapters producing byte-equal canonical output. gnark/halo2/plonky3/risc0 are stubs.
  • mosaic-chunked: 48-hour session PDA protocol with rolling SHA-256 commitment. PDA seeds bound to (session_id, payer) to defend front-running griefing.
  • mosaic-program: 112 KB SBF ELF dispatching single-tx VerifyProof + chunked-upload instructions.
  • mosaic-sdk: instruction builder + host-side preflight.
  • mosaic-bench: bpf-bench measures real on-chain CU (80,296 CU Groth16 mul-circuit, 44.6% of the 180K ADR-0005 cap).
  • mosaic-fuzz: three libFuzzer harnesses.

Verification

  • cargo test --workspace --all-features: 36 passed, 0 failed
  • cargo clippy strict: 0 errors
  • cargo build-sbf --tools-version v1.52: 112 KB mosaic_program.so
  • Round-trip: snarkjs + arkworks + canonical paths byte-equal
  • Differential (proptest): arkworks reference vs Mosaic host backend, 16 cases

Fixture corpus

Deterministic Groth16 mul-circuit (proves a * b == c with a=7, b=6) committed in three formats under tests/fixtures/groth16/mul-circuit/.

Documentation

5 ADRs + 1 design doc (chunked-upload implementation contract) + threat model + CU budget + lint policy + SECURITY/AUDIT/CONTRIBUTING.

Known limitations

  • No external audit yet (issue #19)
  • Fixtures are programmatic, not Circom-sourced (#24)
  • Poseidon syscall path for Solana 2.x not wired (#8)
  • Only Groth16 implemented; PLONK/STARK/Nova stubs (#1, #3, #4)

Compatibility

  • Host: Rust 1.85.0 stable
  • SBF: cargo-build-sbf --tools-version v1.52 mandatory
  • Solana program SDK: ^2.1 (tested against 2.3.0)

Full changelog

CHANGELOG.md