Test vectors
The published known-answer suites for specification v0.1: cbor-det-v1 pins the deterministic encoding profile byte for byte, and historical-float64-decode pins decode tolerance for records written before the integer-widening rule.
Normative. Reflects the specification as ratified on 1 September 2026. Version pinning is by date. Where this text and a published test vector disagree, the vector wins and the text is corrected.
Two suites are published for v0.1. Each is a single JSON file with a profile name, a spec paragraph stating the rule it pins, and a vectors array. Bytes are hex-encoded. The vector bytes are identical to the internal suite the reference implementation is tested against.
| Suite | Vectors | What it pins | File |
|---|---|---|---|
cbor-det-v1 | 36 | The deterministic encoding profile of The record envelope: map keys ordered by their encoded bytes, shortest-form integer heads, the refusal of integer inputs beyond the 53-bit safe range, and the erasure of type distinctions the encoding does not preserve. | cbor-det-v1.json |
historical-float64-decode | 8 | Decode tolerance. Byte strings the reference encoder produced before the integer-widening rule, when an integer needing an 8-byte head was written as a float64. Records anchored under that encoder are immutable, so a conforming decoder MUST still read them back to the integer shown. | historical-float64-decode.json |
Vector shape
In cbor-det-v1 each vector carries name, doc (the rule it exercises, with its RFC 8949 reference where one applies), input (a kind and a value) and encoded_hex, the exact bytes a conforming encoder MUST produce.
In historical-float64-decode each vector carries name, doc, historical_hex (the bytes as written by the pre-widening encoder) and decodes_to, the integer a conforming decoder MUST return. The suite was captured on 2026-08-11 from two independent sources agreeing byte for byte.
How to validate an implementation
- Fetch the suite and turn each
inputinto your native value. - Encode it under the deterministic profile.
- Compare the hex of your bytes with
encoded_hex. Any difference is a conformance failure on that vector; the profile has no tolerance on the encode side. - For the historical suite, decode
historical_hexand compare withdecodes_to. A decoder that refuses these bytes fails the suite.
Suites named in Section 6 but not yet published
docv2-envelope, dual-curve, placement, utxo-chaining, overlay-binding and cross-domain-refs are named in Section 6 of the specification and follow alongside the reference implementation, at this address. Until each is published, the normative sections fix the shape an implementation must match.
Anchoring, addressing and retrieval
Normative anchoring to the public audit layer (the chaining container, the per-record commitment key, chaining rules, writing, verifying and replay) and addressing: topics, admission, the per-topic index, discovery, access control and deployment profiles.
Exchange patterns
Reusable configuration templates on the base data-sharing protocol, so a new case reuses an existing template instead of designing an exchange from scratch.