Skip to content

Concepts

Registry

A registry is identified by the author's public key and a name, such as models/vision. Names use letters, digits and ._/-, start with a letter or digit, and have at most 200 characters.

Asset

An asset event describes one file: registry, name, content identifier (sha256:<digest>), size, chunk size, Merkle root over the chunks, origin address, media type and policy. The origin address must end with the digest, so it names immutable content.

Manifest

A manifest lists the current assets of a registry, sorted by name, with the event id and content identifier of each, and a Merkle root over the list. Versions start at 1 and increase by one. Each manifest names the previous one. A manifest holds up to 2000 assets.

Two different manifests with the same version put the registry in conflict. All readers see the flag, and consumers refuse to act on it.

Intent and revocation

An intent asks for a distribution state of an asset or of the whole registry: hot, cold, stop or rewarm. The newest intent for a name applies.

A revocation withdraws one asset, or every version up to a number. Revocations only add up: nothing can undo one, except publishing a new asset or version.

State and proof

An indexer folds all valid events into a state. Each registry contributes one leaf: author, name, live manifest, version, conflict flag, revoked version, tombstones and intents. The root is the Merkle root over all leaves sorted by key.

An answer contains the manifest, the assets, the revocations and intents, and the inclusion proof of the leaf. The reader verifies every signature, recomputes the leaf from the returned events, and checks it against the root in the signed answer. An indexer can therefore not change, add or mix events, and leaving out a revocation changes the leaf.

Reading from several indexers

A reader discovers indexers from relays, discards those with a low score, shuffles the rest, and asks until a quorum answered. It merges the events of all answers, so one honest indexer is enough to reveal a newer version, a revocation or a conflict. If there is no quorum, or assets are missing, it reads the relays directly and reports "fallback": true.

Trust scores

A watchdog report scores an indexer from 0 to 100. A reader considers only watchdogs it was configured to trust. Reports lose weight with a half-life of 24 hours and drift towards the neutral score of 0.5. Proven equivocation counts as 0 with full weight. Indexers below 0.4 are not asked.

Checkpoint

For each epoch, a committee is selected from the indexers by hashing the epoch number with each key. The first member proposes the current root, the others compare it with their own state, synchronize if needed, and co-sign. A checkpoint needs more than two thirds of the committee (floor(2n/3) + 1). An indexer never signs two roots for one epoch.