pub struct Rotation {
pub rotator: PublicKey,
pub scope: RekeyScope,
pub new_epoch: Epoch,
pub prev_epoch: Epoch,
pub prev_commit: [u8; 32],
pub blobs: Vec<RekeyBlob>,
pub declared_chunks: u32,
pub held_chunks: BTreeSet<u32>,
}Expand description
A collected rotation: all chunks sharing one correlation key, and whether the
set is complete (all n chunks present).
Fields§
§rotator: PublicKey§scope: RekeyScope§new_epoch: Epoch§prev_epoch: Epoch§prev_commit: [u8; 32]§blobs: Vec<RekeyBlob>The union of every chunk’s blobs.
declared_chunks: u32Total chunk count n declared by the chunks.
held_chunks: BTreeSet<u32>Distinct chunk indices actually held.
Implementations§
Source§impl Rotation
impl Rotation
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
True once every declared chunk index 1..=n is held — the precondition
for concluding removal (a missing chunk is “keep recovering”, never a
removal).
Sourcepub fn continuity(&self, held_epoch: Epoch, held_key: &[u8; 32]) -> Continuity
pub fn continuity(&self, held_epoch: Epoch, held_key: &[u8; 32]) -> Continuity
This rotation’s continuity against the (epoch, key) I hold for its scope
— the check_continuity verdict at the aggregated-rotation level (same
prevcommit test), so a follower can gate adoption without a raw chunk.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Rotation
impl RefUnwindSafe for Rotation
impl Send for Rotation
impl Sync for Rotation
impl Unpin for Rotation
impl UnsafeUnpin for Rotation
impl UnwindSafe for Rotation
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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>
Converts
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>
Converts
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