Range
One range of a range-based set reconciliation message: a mode, an upper bound, and a fingerprint or a list of items.
Fetching schema…

Part of Stem. This page defines the rpc/type/range message type used by the sync RPC specification. Reconcile requests and responses are lists of these.

The formal schema is attached as the schemaDefinition of this page.

One range of a range-based set reconciliation message. Items are (ts, cid) ordered by timestamp then CID bytes; an item's hash is SHA-256 of its CID bytes.

Fields

field

type

required

meaning

mode

one of "skip", "fingerprint", "list"

yes

How this range is described.

boundTs

timestamp

yes

Upper bound of the range: item timestamp.

boundCid

cid

no

Upper bound of the range: item CID. Omitted for the open upper bound.

fingerprint

bytes

no

First 16 bytes of SHA-256 over the 256-bit sum of item hashes followed by the item count. Only in fingerprint mode.

cids

list of cid

no

The items. Only in list mode.

Rules

    Ranges in one message are contiguous and ordered by their upper bounds; the first range starts at the lowest item and the last range's bound is the open upper bound (no boundCid).

    fingerprint is present exactly in fingerprint mode and cids exactly in list mode; skip carries only the bound.

    A list holds fewer than thirty-two items unless it is the remainder of a message that hit the size budget.

Today (HM24)

Field-for-field the HM24 SetReconciliationRange{mode, bound_timestamp, bound_value, values, fingerprint}, with the modes lower-cased and the bound value typed as a CID.

Example

{"mode": "fingerprint", "boundTs": 1759500000000, "boundCid": {"/": "bafy…02"}, "fingerprint": {"/": {"bytes": "3c9e…"}}}

See also

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

Unsubscribe anytime