pub struct Watermark {
pub epoch: u64,
pub record_digest: [u8; 64],
pub terminal: bool,
}Expand description
The persistent per-DID duplicity high-watermark: design #879 §7.2/R6’s
(epoch, H512(accepted record)) pair, plus the terminal flag that carries
B3 (#887) commitment-lifecycle state.
Storing the digest (not just the epoch) is the whole point of the
remediation: it is what lets DuplicityGuard tell an honest continuation
from a divergent fork and makes max-epoch fork selection impossible.
Fields§
§epoch: u64Highest accepted epoch for this DID.
record_digest: [u8; 64]H512 over the canonical bytes of the record accepted at [Watermark:: epoch] — the digest half of the R6 pair. A successor advancing the chain
must echo this in its prev_record_digest; a divergent digest at
epoch <= this.epoch is duplicity.
terminal: booltrue iff the accepted head pre-commits to no next keys — a
declared-immutable (empty at genesis) or exhausted (rotated-to-empty)
identity (B3, #887). A terminal watermark admits no successor, ever.
Trait Implementations§
impl Copy for Watermark
impl Eq for Watermark
impl StructuralPartialEq for Watermark
Auto Trait Implementations§
impl Freeze for Watermark
impl RefUnwindSafe for Watermark
impl Send for Watermark
impl Sync for Watermark
impl Unpin for Watermark
impl UnsafeUnpin for Watermark
impl UnwindSafe for Watermark
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more