A receiver that stores what a broadcast carried, a neighbourhood cache or a peer can serve those objects over a short link; a neighbour that knows who holds what fetches from them before it spends the backhaul. Nothing said who holds what. extensions/holdings.md registers `wai.delivery.holdings`: a record (WHD1) of, per group a node holds objects of, the group's link hash, its leaf count and either `whole` or a bitmap (as a reconciliation's), in one canonical form, with the instant it states them at and the one it expires at, signed by the holder under SPEC §7 Signatures. Groups and bitmaps rather than a filter over hashes: WAI delivers everything under group receipts that name objects by position, a node holds objects as groups arrive, and a bitmap is exact (no neighbour sent after an object its holder lacks) at a bit an object, 41 bytes for a group held whole. A verifier holds a record to its instant and to the group receipts it has (a misstated leaf count refuses it whole; a group with no receipt held is kept), keeps a holder's latest record and sets aside two of one instant that differ, answers whether a record holds an object, and derives an asker's plan: each wanted object's holders in the asker's order, and the objects no neighbour holds, which come from the origin. An object a neighbour serves is verified under its receipts like any other; a record is never evidence of bytes. A node advertises only what reached it over a broadcast bearer, and may sign each record with a fresh key. The reference is the `holdings` module of wai-rs; the corpus is live-conformance/holdings/ (21 records with a control for each rule, 11 verdicts, 6 queries, a plan over three neighbours), with holdings_verify.py as its second implementation: 39 cases agree, 9 of 9 mutated copies and 10 of 10 weakened verifiers caught. Co-Authored-By: Claude Opus 5.5 <[email protected]>
2 KiB
live-conformance/holdings — who holds which objects
The corpus of extensions/holdings.md §8, in one file,
vectors.json.
Provenance. Generated here by wai_holdings_vectors gen (wai-rs, feature holdings), from
Ed25519 keys on fixed 32-byte seeds, constant instants, and envelopes whose payloads are opaque
test bytes written by the generator; no media and no input from outside this repository.
keys names every key by its role, as 64 lowercase hexadecimal digits: the publisher's
(did:web:publisher.example#d1) and three holders' (holder_a, holder_b, holder_c).
records(§4) are each a record'sbytesin hexadecimal, and itsoutcome:read, with itsdigest,holderand count ofentries; orrefuseand itsreason.verdicts(§5.1 to §5.3) are eachrecords, the groupreceiptsa verifier holds and the instantat_ms;outcome.recordsgives each record's verdict:stands,superseded,set-aside reason=…orreject reason=….queries(§5.4) are each arecord, agroup's link hash and anindex;outcomeisheldor the reason it is not.plans(§5.4) are a verdict's inputs, the records in the asker's order, and thewantedobjects;outcomegives the records' verdicts, each wanted object'sholdersin that order, andfrom_origin, the wanted objects no holder holds.
Everything is synthetic: keys attest nothing, and the publisher's origin is a reserved example domain. Each case states the outcome it was written to have, declared in the generator, never copied from a verifier. §4.4's bound of 1,048,576 bytes is carried by no vector (a megabyte of hexadecimal); both implementations check it themselves.
wai_holdings_vectors verify and tests/holdings.rs check that the file regenerates byte for
byte and that wai-rs reaches every stated outcome. ../holdings_verify.py is the second
implementation, written from the extension's text, which also mutates copies of the corpus and
drops each of its own checks in turn and requires each to be caught.