open-standards/proof
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Transaction Science a4caa2e60d
Some checks failed
standards workspaces build + test / jouleclaw-rs (push) Has been cancelled
standards workspaces build + test / aac-rs (push) Has been cancelled
standards workspaces build + test / arl-rs (push) Has been cancelled
standards workspaces build + test / eoc-rs (push) Has been cancelled
standards workspaces build + test / jcp-rs (push) Has been cancelled
standards workspaces build + test / joule-code-rs (push) Has been cancelled
standards workspaces build + test / joule-ui-rs (push) Has been cancelled
standards workspaces build + test / joulecontract-rs (push) Has been cancelled
standards workspaces build + test / jouledesk-rs (push) Has been cancelled
standards workspaces build + test / joulehook-rs (push) Has been cancelled
standards workspaces build + test / map-rs (push) Has been cancelled
standards workspaces build + test / mesh-rs (push) Has been cancelled
standards workspaces build + test / openpay (push) Has been cancelled
standards workspaces build + test / proof-rs (push) Has been cancelled
standards workspaces build + test / sandbox-rs (push) Has been cancelled
standards workspaces build + test / sense-rs (push) Has been cancelled
standards workspaces build + test / smart-byte-rs (push) Has been cancelled
proof: read the published conformance pack, and pin the cascade's accounting
gen-vectors writes proof/conformance/v1/ and nothing read it back -- the crate's
soundness.rs does no file IO -- so the published receipts were never checked
against the implementation that claims to produce them.

The gap is measured. Changing the steward the generator seals under
("did:example:proof-reference" -> "did:example:proof-DRIFTED"), an identity change
in published signed artifacts, leaves soundness.rs green AND the main() harness
reporting "all checks passed". The new drift test is the only thing that notices.

tests/pack.rs checks three separable things:

  - Drift: the generator still emits exactly the published files, run into a temp
    directory via CARGO_BIN_EXE_gen-vectors so the pack is never touched.

  - Signatures, independently: each of the four envelopes is verified from the
    pack and RFC 9052 alone, with a hand-built CBOR encoder rather than the
    crate's own COSE code -- what a cross-language verifier would have to do --
    plus a tampered core and a stranger's key as negatives.

  - The cascade's accounting, recomputed across tiers rather than read back one
    at a time. Two properties the receipts assert together and none states alone:
    the waste recorded at a tier is exactly what the tiers before it consumed
    (0, 50, 5050, 505050 against totals 50, 5050, 505050, 50505050), and
    escalating all the way to T3 costs MORE than the 50 mJ baseline. The cascade
    saves by closing early, not by existing, and that honest limit is now pinned
    so it cannot be quietly re-described.

Falsified both ways and restored: breaking T2's wasted_uj in the pack fails the
accounting test naming T2, and the steward change above fails the drift test.

The pack is current -- regenerating into a scratch directory matched both files
byte for byte, so unlike joulehook's and jouledesk's nothing here is stale.

Every vector records closed_by_stub = 1: these verdicts were closed by stand-ins,
and the pack says so rather than hiding it. The test asserts that marking stays.

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-09-21 13:48:08 -04:00
..
conformance/v1 proof: closed_by_stub rides in the signed receipt (SPEC §6.1) 2026-08-30 17:22:46 -04:00
proof-rs proof: read the published conformance pack, and pin the cascade's accounting 2026-09-21 13:48:08 -04:00
CONTRIBUTING.md Add the proof open standard — a carrier for verified work 2026-06-07 15:30:07 -04:00
LICENSE Add the proof open standard — a carrier for verified work 2026-06-07 15:30:07 -04:00
LICENSE-SPEC Add the proof open standard — a carrier for verified work 2026-06-07 15:30:07 -04:00
README.md proof: a real hardware energy meter (the HwShunt backend) 2026-06-18 15:24:58 -04:00
SPEC.md proof: closed_by_stub rides in the signed receipt (SPEC §6.1) 2026-08-30 17:22:46 -04:00

proof — A Carrier for Verified Work

The verification cargo class of the substrate. A proof obligation is content-addressed; a solver is anything that can attempt one at a declared tier; a discharged obligation seals as a signed JCR-1 receipt that records which tier closed it and the joules it cost. The standard fixes the one axis the theorem-proving field leaves implicit — joules per verified proof — and makes it portable: any prover can emit a Proof receipt, and any auditor can verify it with the same tooling as a Map, Sandbox, or Joule Code receipt.

The cheapest sufficient solver wins. Every obligation goes to the cheapest rung that can discharge it — deterministic automation (T0), then SMT (T1), then a small distilled prover (T2), then a frontier model (T3, last resort) — and escalates only on failure. Correctness is never traded for energy: a solver returns proved only when a verifier would accept the artifact, so the standard changes which tier pays for a proof, not whether it is checked. The joules spent on a cheaper solver that ran and failed first are disclosed as the cost of escalation, never hidden. Energy carries an honest provenance tag (HwShunt / ModelBased / Estimator), and a receipt for an Ungrounded statement says, in the signed artifact, that the statement was never validated against intent — a proof is not a specification.

  • Site: jouleproof.transaction.science (the JouleProof pillar is the steward + services layer over this standard).
  • Licence: Apache-2.0 for reference code (see LICENSE); CC-BY-4.0 for specification text (see LICENSE-SPEC).
  • Status: v0.1.0 draft. Specification core published (SPEC.md); reference workspace proof-rs/.

What's here

proof/
├── SPEC.md            — the normative standard (§1–§9)
├── conformance/v1/    — published vectors (receipt wire + signed core + envelope)
└── proof-rs/          — the Apache-2.0 reference implementation

The reference implementation (proof-rs/)

  • proof-schema — the content-addressed goal (blake3(statement‖0x00‖context)), the cheapest-first tier ladder, the honest energy model (HwShunt/ModelBased/Estimator with the coupling enforced), SpecGrounding, the verdict, and the Solver trait every backend implements. Canonical det-CBOR content addressing.
  • proof-solvers — two real rungs with measured energy: a propositional decider (T0) that parses a boolean goal and decides validity by truth-table in process, and z3 (T1) — shell or kept resident across goals — that decides an SMT-LIB goal (assert the negation; unsat ⇒ valid). Each refuses rather than fakes, so the router escalates. The model rungs (T2/T3) are honest stand-ins behind the same trait.
  • proof-cascade — the escalation router (every joule accounted, wasted_uj disclosed), the content-addressed proof cache (the energy flywheel, durable as line-delimited JSON), batch energy accounting against a frontier-only baseline with the per-tier Amdahl breakdown, and a real hardware energy meter (meter — the HwShunt backend): it brackets a real proof, run on every core, against an idle baseline using the platform's energy interface (IOReport via macmon on Apple Silicon, RAPL on Linux) and returns measured microjoules, so the headline joules per verified proof can be a real reading, not only a model. Returns nothing where no interface is reachable — the caller keeps the honestly-tagged ModelBased figure rather than inventing one.
  • proof-receipt — the proof/1 JCR-1 receipt: canonical det-CBOR + COSE_Sign1/EdDSA, vendored byte-compatible with the family's cross-language verifiers; refuses to seal an unproved goal.
  • proof-conformance — C1–C5 + a negative pack, all checks real, published vectors in conformance/v1/.
  • proof-cli — the proof reference demo: a proof workload reporting joules-per-proof against a frontier-only baseline, the Amdahl breakdown, the cache flywheel, and a sealed + verified receipt. proof --measure adds a real hardware reading of a non-trivial T0 proof (HwShunt, where an energy interface is present).

cargo test --workspace green; cargo clippy --workspace --all-targets warning-free. The two bottom rungs decide for real with measured energy; the model rungs are honestly marked as stand-ins until inference backends are wired.

Honesty the standard records

  • A proof is not a specification. spec_grounding rides in the signed receipt; Ungrounded is the default and a prover may never self-certify it.
  • The multiple shrinks with difficulty. The accounting reports energy per closing tier, so the few hardest goals dominating the joules (Amdahl) is visible, not averaged away.
  • Energy is reported at all — per proof, with an honest provenance tag — which the field otherwise leaves to be inferred from device-days.