smart-byte: envelope wire format, v1 key-event logs, and their conformance vectors #125
Merged
dcharlot
merged 3 commits from 2026-10-01 01:04:17 -04:00
smart-byte-wire-format into main 2026-09-30
smart-byte conformance: the second implementation replays logs and envelopes
All checks were successful
standards workspaces build + test / jouleclaw-rs (pull_request) Successful in 1m42s
standards workspaces build + test / aac-rs (pull_request) Successful in 46s
standards workspaces build + test / joule-code-rs (pull_request) Successful in 39s
standards workspaces build + test / joulecontract-rs (pull_request) Successful in 38s
standards workspaces build + test / map-rs (pull_request) Successful in 32s
standards workspaces build + test / mesh-rs (pull_request) Successful in 23s
standards workspaces build + test / openpay (pull_request) Successful in 1m25s
smart-byte conformance gate / Validate conformance JSON files (pull_request) Successful in 4s
smart-byte conformance gate / Second implementation reproduces every vector (pull_request) Successful in 3s
smart-byte conformance gate / Spec changes require vector-pack updates (pull_request) Successful in 3s
smart-byte conformance gate / VERSIONS.md and README.md must exist (pull_request) Successful in 3s
no-vanity-metrics / Scan committed Markdown for vanity metrics (pull_request) Successful in 3s
standards workspaces build + test / eoc-rs (pull_request) Successful in 1m48s
standards workspaces build + test / jcp-rs (pull_request) Successful in 1m16s
standards workspaces build + test / proof-rs (pull_request) Successful in 1m11s
standards workspaces build + test / sandbox-rs (pull_request) Successful in 2m6s
standards workspaces build + test / smart-byte-rs (pull_request) Successful in 2m51s
standards workspaces build + test / arl-rs (pull_request) Successful in 2m11s
standards workspaces build + test / joule-ui-rs (pull_request) Successful in 3m1s
standards workspaces build + test / jouledesk-rs (pull_request) Successful in 2m48s
standards workspaces build + test / joulehook-rs (pull_request) Successful in 2m58s
standards workspaces build + test / sense-rs (pull_request) Successful in 2m34s
standards workspaces build + test / macOS energy backend (jcp-energy) (pull_request) Successful in 2m11s
verify_v1.py now replays key-event logs (identity spec §3, §4) and verifies envelopes (envelope wire format §8). It is written from the spec text, uses the standard library only, and implements its own BLAKE3 and Ed25519. It reproduces all 94 vectors and finds the pack complete. Falsified: - 20 planted defects, each caught on its own vector, with and without -O. - 30 rule mutations, each caught by the vector built for it. regeneration.md records the regeneration and what building it found; VERSIONS.md names the new spec. Co-Authored-By: Claude Opus 5.5 <[email protected]>
smart-byte: the envelope wire format, v1 key-event logs, and their vectors
smart-byte-core
- `wire`: canonical CBOR for any serde type. `from_slice` refuses bytes that
are not the decoded object's own encoding. Serde otherwise accepts an array
of integers for a byte string, a byte string for text, and an array for a
struct, each a second encoding the SAID does not cover.
- Controller AIDs. Controller signatures are checked against the key states
replayed logs establish. One strict Ed25519 rule.
- The envelope: attested provenance, ownership chain and joule cost. Cargo
carries a registered type tag.
smart-byte-keri-witness
- Events are §2 SAIDs over canonical CBOR.
- The default verifier is spec v1. It replays one event at a time and says
which event it refused. It refuses `dip`, which skipped the pre-rotation
check entirely, plus zero thresholds, duplicate keys, rotations after an
empty `n`, and extension members.
- Extension mode, fixed:
- Witness receipts carried their own key, so anyone could receipt in any
witness's name. Witnesses are now named by their keys, and receipts sign
everything they claim.
- Duplicity evidence was gathered from unverified receipts.
- Recovery accepted any keys; it now needs its witnesses' receipts.
- OOBIs were signed by an embedded key; they are now controller signatures.
- Configuration traits were never enforced, so they are gone.
VC, BBS+, CRDT, mDL, lockstep, libp2p and the CLI move to the new envelope.
smart-byte-conformance
- kel_vectors.json: 25 vectors.
- envelope_vectors.json: 18 vectors, checked against the logs' key states.
- The SAID and signature vectors are rebuilt on the real objects, so all the
files describe one set of parties.
- Planted defects in every file are caught on their own vectors.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
smart-byte spec: the envelope wire format; key-event logs as v1 verifies them
envelope_wire_format.md is new. It fixes what the treatise leaves open: the envelope's members, what the issuer and each owner sign, the snapshot SAID and the byte's identity, the history hash, the cargo registry, controller signatures, and verification with an error class for each failure. It also says which questions the cluster answers instead. The identity spec now says: - an inception placeholders `i` with `d`; - an event has exactly its §3.3 members; - thresholds run from 1 to the key count, with no key or digest listed twice; - nothing rotates after an empty `n`; - `dip` is not a v1 type. Rotations follow KERI's rule: signed by the keys they reveal, under both the committed threshold and their own. The previous rule, "signed by the previous keys", let anyone holding the current keys rotate the controller away. Co-Authored-By: Claude Opus 5.5 <[email protected]>