open-standards/joule-code/examples/transport-moqt
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Transaction Science cc371d815a wai: energy reports, labelled JWP leaves and what signatures cover
Two claim classes report on one energy figure without changing the
receipt that seals it. `measurement` carries a bracket's values as
integers with each bracket's liveness facts, the build and the power
reader, and is accepted only against the receipt that carries its
figure. `operating-point` records the requested, committed and
delivered operating points and a prediction. The ratio, verdict and
residual are derived by every reader, never stated.

energy-measurement §6.2 gives the figure and the least declaration a
report's integers support as exact integer formulas; wai-rs
`energy_report` implements them with no floating-point arithmetic.
§3.1 defines a live power reader: a rail must advance in two
consecutive intervals, in at least five and in at least four of every
five, over at least 300 ms. A frozen or held rail is refused rather than
sealed under a hardware class. An unmetered `0` is never a figure of
zero joules.

A JWP object's figure, class and origin are bound into its Merkle leaf
(`\x02`), and a labelled group payload signs the total's class, its
coverage and the parent link. An object must sit at the position its
inclusion proof walks, and group signatures follow the strict Ed25519
rule claims use. `jwp_delivery` and `energy_figure` implement this in
wai-rs; joule-moq 0.2.0 builds and verifies both labelled forms.

New corpus `jwp-conformance/` with `jwp_verify.py`, more claim vectors
with the earlier ones pinned, and a CI job that runs claim_verify.py,
differential.py and jwp_verify.py. Legacy receipts keep their bytes.
External JWP implementations must adopt the `\x02` leaf and the
labelled group payload before verifying objects or groups that use
them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-01 06:37:25 -04:00
..
tests joule-code: port CommunicationOS transport (jwp + joule-moq) into the public standard 2026-06-13 21:29:05 -04:00
Cargo.lock wai: energy reports, labelled JWP leaves and what signatures cover 2026-10-01 06:37:25 -04:00
Cargo.toml msrv: raise the rust-version floor to 1.97 across the workspaces 2026-07-23 00:17:08 -04:00
README.md joule-code: CommunicationOS (MoQT) transport binding — the last federation layer 2026-06-05 04:29:47 -04:00

transport-moqt — CommunicationOS transport binding (the last federation layer)

A consumer binding showing a Joule Code collaboration's committed coding operations carried over CommunicationOS's MoQT transport — the network wire layer left deferred by spec/collab.md §2.

It closes the loop on the federation stack. The other three layers are already built and tested in joule-code-collab: BFT consensus (LockstepCluster), FROST threshold authorization (protected), and MLS group keying (tests/mls_keying.rs). This example adds the transport.

What it demonstrates

The whole stack, end to end, in one in-process test:

BFT consensus (LockstepCluster)  →  committed, op_id-ordered coding ops
   →  published as MoQT objects over CommunicationOS's transport (inv-moq)
   →  each object carries a real Ed25519 / BLAKE3 signed receipt
   →  a subscriber receives every op, verifies the signed receipts against the
      publisher's key, and recovers the original SignedOp intact

A second test shows the ownerless-trust property: a subscriber that requires receipts rejects a group whose signed receipt does not chain to a trusted publisher key — no central authority decides who is authentic.

The transport

The carrier is inv-moq — joulesperbit's MoQT (Media over QUIC Transport) wire protocol plus its JWP receipt extension, the CommunicationOS broadcast-media transport. It exposes Publisher / Subscriber / GroupHandle / Relay traits with object-level signed provenance and joule receipts.

The test drives inv-moq through its MockFabric, which runs the real publish/subscribe/receipt machinery in-process — real Ed25519 signatures, real BLAKE3 merkle receipts — with no QUIC and no network. inv-moq's quic feature is the real-wire path (quinn/rustls); the trait surface is identical, so this binding moves to the network by swapping the fabric, not the code.

This is a standalone workspace (path-deps inv-moq from joulesperbit and the joule-code-* crates), so the standard's reference library stays free of a joulesperbit dependency — the same discipline as examples/l3-jouleclaw.

Run

cargo test

Expected:

test untrusted_publisher_is_rejected ... ok
test committed_ops_replicate_over_communicationos_moqt_with_signed_receipts ... ok