Keyboard shortcuts

Press ← or β†’ to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

πŸ”₯ Crucible Prover

CI MSRV License Pitch video

PROVE β€” the zero-knowledge proving layer of Crucible, a three-repository suite for the Stellar Confidential Token architecture.

πŸ“– Documentation site for all three repositories: https://crucible-docs-flame.vercel.app

β–Ά Watch the pitch β€” 4:52

Crucible product pitch video

Click the thumbnail to watch the full product pitch. It covers the problem, the three-layer architecture, how proofs are generated and checked, and the limits this project states about itself.

Every frame is a live capture β€” the deployed documentation site, the public repositories, and the deployed Stellar testnet verifier contract. Nothing in it is a mock-up, and nothing in it is a slide about a roadmap.

Pitch preview

RepositoryLayerResponsibility
crucible-simulatorSIMULATEdeterministic state and execution model
crucible-proverPROVEzero-knowledge proof generation, circuits, verification, proof artifacts
crucible-scenariosSTRESS-TESTscenario orchestration and adversarial testing
crucible-docsREADthe rendered documentation for all three layers β€” a build of their markdown, not a source of it

The boundary is strict:

crucible-simulator owns the state and execution model. crucible-prover owns proving. crucible-scenarios owns scenario orchestration.

What this repository does

crucible-prover owns the complete proving lifecycle:

Simulator State ─▢ Proof Request ─▢ Witness ─▢ Circuit ─▢ ACIR
      ─▢ Prover Backend ─▢ ZK Proof ─▢ Public Inputs ─▢ Verification
      ─▢ Soroban-Compatible Proof

It is not a wallet, a token contract, a blockchain explorer, a transaction simulator, a compliance or audit engine, a general-purpose ZK framework, a secrets vault, or a Soroban SDK. It is the proof engine and proving infrastructure for Crucible.

Layout

interfaces/    Stable contracts: ProofProvider/Prover/Verifier traits,
               requests/responses, circuit ids, expectations spec
crates/        prover-core, proof-types, witness, artifacts, noir,
               ultrahonk, verifier, mock, vectors
adapters/      Sibling-repo bridges: simulator proof seam (real UltraHonk
               proving) + Soroban on-chain verification payload path
circuits/      The Noir workspace (shared lib, register/deposit/merge/transfer/
               withdraw circuits, measurement gadgets)
artifacts/     Pinned compiled circuits + manifests (the proving input),
               runtime verification-key store
test-vectors/  Cross-language vectors per operation (valid + reject categories)
schemas/       JSON schemas for proofs, requests, witnesses, artifacts
proofs/        Committed proof-envelope fixtures + serialization material
tests/         Cross-crate security/invariant/verification/live suites
benches/       In-process pipeline benchmarks (toolchain-free)
examples/      Runnable end-to-end demos (mock backend)
cli/           Orchestration CLI (no proving logic)
docs/          Architecture and design documents
scripts/       Toolchain setup, gates, and regeneration scripts

Status

The full proving pipeline is implemented and green in CI: interfaces and wire types, witness and artifact management, mock and UltraHonk backends proving only from manifest-pinned artifacts, state-bound circuits, prover-core orchestration, cross-verifier agreement, the vector catalog, committed proof fixtures, benchmarks, examples, and the crucible-prover CLI (whose binary is attached to tagged releases). The mock backend is TEST ONLY and not cryptographically secure.

The canonical end-to-end flow is:

simulator state ─▢ witness builder ─▢ Noir circuit ─▢ ACIR
      ─▢ UltraHonk prover ─▢ ZK proof ─▢ local verifier / Soroban verifier

Backends plug into the ProofProvider interface so the simulator and the scenario suites never couple to UltraHonk β€” or to the mock prover used in CI.

The Soroban on-chain verification path is live against a deployed testnet verifier contract (adapters/soroban, gated live tests):

  • contract CCS6Z3VVCKV4F5BCH7VXJLKKWMDROUWOTZYROJ4T26CM7R45SE4IFYI2 on Stellar testnet, holding the transfer circuit’s key, deployed in ledger 4569701;
  • reproduce the result yourself β€” CRUCIBLE_SOROBAN_LIVE=1 cargo test -p crucible-soroban-adapter --test live submits the committed fixture to that contract over read-only RPC simulation, so it needs no key and pays no fee;
  • the full record is in docs/deployment.md and docs/soroban-verification.md.

Remaining workstreams are Merkle membership for consumed commitments and the optional live-network testnet layer β€” see docs/simulator-integration.md and docs/testnet.md.

Development

cargo fmt --all -- --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace

Noir (circuits) is a separate toolchain; see scripts/setup-noir.sh and docs/noir.md.

Documentation

The documentation in this repository is rendered together with crucible-simulator and crucible-scenarios at https://crucible-docs-flame.vercel.app. The markdown files here are the source; the site is a build of them. Rebuilds are nightly and on demand β€” a push here does not itself trigger one β€” so a change appears on the site within a day, or immediately if the documentation-site workflow is dispatched. To change a published page, change the file that owns it in this repository.

The pages below are the full index.

Architecture & lifecycle β€” docs/architecture.md (layers, boundaries, dependency rules), docs/proving-model.md (requests, providers, binding, mock), docs/proof-lifecycle.md (stages and failure modes), docs/witness-model.md (private/public split, encoder), docs/public-inputs.md (what proofs bind to), docs/proof-format.md (the envelope wire format), docs/verification.md (verifiers, agreement, round trips).

Privacy & security β€” docs/privacy.md (structural secret handling), docs/security.md (guarantees and mechanisms), docs/threat-model.md (adversaries and defenses).

Circuits & backends β€” docs/circuit-model.md (operation circuits, boundaries, measured costs), docs/noir.md (Noir toolchain split), docs/ultrahonk.md (real UltraHonk proving with bb).

Ops & tooling β€” docs/cli.md (full command surface), docs/artifacts.md (pinned artifacts and the provider gate), docs/test-vectors.md (the vector catalog), docs/performance.md (what each benchmark measures), docs/reproducibility.md (the pin chain), docs/compatibility.md (versioning policy), docs/dependency-policy.md (crypto-dependency rules and why sha2 is held at 0.10), docs/deployment.md (releases and production gaps).

Design & roadmap β€” docs/simulator-integration.md (the simulator boundary and adapter design), docs/soroban-verification.md (on-chain verification groundwork), docs/testnet.md (optional testnet execution layer).

Quick start (CLI)

cargo run -q -p crucible-cli -- circuits list
cargo run -q -p crucible-cli -- circuits compile
cargo run -q -p crucible-cli -- artifacts check
cargo run -q -p crucible-cli -- prove transfer \
  --vector test-vectors/transfer/valid/transfer-valid-001.json \
  --backend mock
cargo run -q -p crucible-cli -- verify transfer-valid-001.mock.proof.json
cargo run -q -p crucible-cli -- vectors run

See docs/cli.md for the full command surface.

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option β€” the same dual offer crucible-simulator and crucible-scenarios make.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this repository by you, as defined in the Apache License, shall be dual licensed as above, without any additional terms or conditions.