Skip to main content

Module members

Module members 

Source
Expand description

A collection’s members (SPEC_USER_DATA_SYNC_LAYER §3.1): one signed, hash-chained log of membership changes. The first entry founds the collection and is signed by the founder; every later entry is signed by a machine that is a member at the point it extends. A client takes an entry only if it verifies against the signer’s key as the chain lists it and it extends the chain it holds, so a change that no member signed is refused, wherever it came from.

A member is a machine (named by the id its signing key makes, with a box key that key signed, for sealing the collection key to it) or a recovery subject (a box key only: it never signs, never writes a record and is never pinned, but a new epoch’s key is sealed to it too). A member’s label is inside the seal: this module only carries the sealed bytes.

Structs§

Chain
The entries a machine holds for one collection: the chain, and the other entries it has seen that are valid on their own branch (a fork, at the head or further back, and what was signed on top of the branch that lost), so the winner at every position is a function of everything seen and not of the order it arrived in.
Entry
A signed entry of the chain.
State
The members, the epoch and the policy as a chain leaves them.
Subject
A member of a collection. Keys are lower-case hex.

Enums§

Change
One change to the member list.
Kind
What kind of subject a member is.
MemberError
Why an entry was refused.
Policy
How a machine joins: a machine proven by the LAN trust and the account joins at once (auto_proven), or a person confirms on an existing member (approve).
Taken
What taking an entry did.

Constants§

MAX_SIDE
The most entries kept that are not in the chain (branches that lost), so a member’s flood of them has a limit. The oldest positions are dropped first.