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 |
|---|---|---|---|
| yes | The space. | |
| no | Where the scope starts. Omitted means the space root. | |
| one of | no | How far down the placement tree. Default |
| list of | no | Which parts to include. Omitted means |
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"]}See also
Do you like what you are reading? Subscribe to receive updates.
Unsubscribe anytime