Scope
What a sync conversation is about, a node, how deep into the placement tree, and which facets, from which both peers derive the same blob set filtered to what the requester may read.
Fetching schema…

Part of Stem. This page defines the scope struct used by every sync RPC and by policy rules.

A scope is a node, a depth and a set of facets; the scope set is the blobs a peer holds for it that the requester may read.

Fields

field

type

required

meaning

space

principal

yes

The space.

node

node id

no

Where the scope starts. Omitted means the space root.

depth

one of exact, children, subtree

no

How far down the placement tree. Default exact.

facets

list of state, files, comments, authority, profile

no

Which parts to include. Omitted means state, files, comments and authority.

Rules

Both peers derive the set from their own index with one rule, described in The sync protocol: the Node blobs of the resources in scope and their state closure through dep links (state), the targets of their file links (files), the nodes whose target link points into the scope and their closure (comments), and the Grants, Revocations and Groups that bear on the readers and writers of the resources in scope (authority). profile is state restricted to the space root, for showing a name and avatar cheaply. The set is then filtered to blobs the requesting peer may read, and fingerprints are computed over the filtered set. A scope is addressable as a URL: hm://<space>/<node> with /* for children and /** for the subtree and :comments or :profile for a single facet.

Today (HM24)

The Filter{resource, recursive, depth_one, types[]} of ReconcileBlobs, keyed by IRI, with a blob-type allowlist instead of facets, and a maintained rbsr_scope index with four shapes.

Example

{"space": {"/": {"bytes": "7QEE...Starlight"}}, "node": "bafyreiujzdegxdncf32epf3dhodzdocis2jhtlgmxgedn73u55xtplpft7", "depth": "subtree", "facets": ["state", "comments"]}

Do you like what you are reading? Subscribe to receive updates.

Unsubscribe anytime