Repository navigation
v0.4.0
v0.4.0 — Routing hints
Routing hints separate where from what: an untrusted hints.json beside the page (or beside the data) maps CIDs to candidate locations, so hosts can move — or pages can ship anchor-only — without touching a verified byte. The layer is fully optional: a configured client never fetches a hint, wrong hints waste a request at worst, and every byte still verifies against the anchor.
Added
- Routing hints (
SPEC.md§5): an untrustedhints.jsonmaps CIDs to candidate locations, so a page can ship only its anchor and keep host locations in a sibling file that changes on its own cadence. Every byte fetched through a hint is still verified against the anchor exactly as a configured URL is. One new option onVerifiedSource/VerifiedFile/VerifiedAsset:hints(string | string[]) — document URL(s), defaulting to./hints.jsonbeside the page, fetched lazily only when a location is missing. Relative URLs inside a document resolve against the document's own URL — the final URL after redirects — so a copied or redirected hints file is correct on any mirror. Document bodies are bounded to a fixed 1 MiB pre-parse. - Tolerant hints parser: salvages every valid entry and ignores malformed keys, values, and URLs individually; only a non-object body or the size cap rejects a whole document.
- In-directory discovery: the directory holding published artifacts — a proof base, a bundle base, or the directory containing a proof CAR or content file — may publish
hints.json, probed only when a location class is missing (location → document → location, bounded by a 16-document-per-client cap). examples/hints.html— an anchor-only page backed by a siblinghints.json.
Changed
sourceis now optional onVerifiedFile/VerifiedAsset: a hints document may supply the location. Every location option (source,proof,hints) is optional; a fully configured client fetches zero hint documents.- A query-string source no longer requires an explicit
proofwhen an explicit hints document supplies the proof location; the defaulted document never lifts that requirement. - Hints faults are transport-level — they never increment
rejectedand never ban a source; a hinted URL, once merged, is an ordinary source under the existing failover, ban, and speculative-range rules. - The routing-hints specification lands in
SPEC.mdas §5 Routing hints; the previous §5–§8 (Hosts, Publishing, IPFS interoperability, Non-goals) are renumbered §6–§9.
Notes
- No breaking changes: the descriptor, shard-tree, and MASL formats are unchanged, and every existing API keeps its signature and behavior.
Full Changelog: v0.3.1...v0.4.0