pub struct RootSet {
pub ever: Vec<RootKey>,
pub removed: Vec<(RootKey, i64)>,
pub members: Vec<RootKey>,
}Expand description
The roots that may act for an identity, as a verifier works them out from its genesis and every valid state it holds (P7-08):
ever: the genesis’s roots, and every root added by one inever, until nothing more is added. A state counts only if one of these signed it.removed: every root a state signed by one ineverremoves, at its earliestremoved_at. Removal never lapses: a removed root never comes back.members: the genesis’s roots, and every root added by a member no later than that member’s own removal (added_atat or before itsremoved_at: times are whole seconds, and a rotation adds the new key and drops the old one in the same one), until nothing more is added; then without the removed. A credential counts only from a member.
So a root added by a key later rotated out stays, and one a removed
key adds after its removal does not. Times are the roots’ own word:
a stolen key that backdates an addition is stopped where its removal
arrived first, by the verifier refusing the state that brings it
(spoolframe_server’s store, the SDK’s accept_state). A removed
root’s removals still count, so two roots that remove each other are
both gone: the identity is locked rather than taken (P7-07 reviews
this).
Fields§
§ever: Vec<RootKey>§removed: Vec<(RootKey, i64)>§members: Vec<RootKey>Implementations§
Source§impl RootSet
impl RootSet
Sourcepub fn of(genesis: &[RootKey], states: &[RootChanges<'_>]) -> Self
pub fn of(genesis: &[RootKey], states: &[RootChanges<'_>]) -> Self
The set genesis begins and states change.
Sourcepub fn knew(&self, root: &RootKey) -> bool
pub fn knew(&self, root: &RootKey) -> bool
Whether root was ever one of the identity’s: a state it signed
is taken in, for its removals.
Sourcepub fn is_removed(&self, root: &RootKey) -> bool
pub fn is_removed(&self, root: &RootKey) -> bool
Whether root is removed.
Sourcepub fn refuses_additions(&self, added: &[AddedRoot]) -> bool
pub fn refuses_additions(&self, added: &[AddedRoot]) -> bool
Whether added, arriving now, adds a root this set does not know
whose adder this set has already removed: an addition that came
after the removal, whatever time it claims. A verifier refuses the
state that brings it, so a stolen key cannot backdate its way past
a removal the verifier already holds.