pub struct AcknowledgedStoreSnapshot {
pub authority: RetainedReplaySnapshotAuthority,
pub acknowledgements: BTreeMap<StoreDeviceId, RetainedAcknowledgementChain>,
}Expand description
One snapshot every device active at its cut has acknowledged.
This is the unanimity proof, and it answers only one question: may history behind this snapshot be deleted? It may, because every device that could still need that history has said in a signed acknowledgement — activated by a commit in the verified closure — that it holds this snapshot.
Installing a snapshot asks a different question and does not need this. A device joining or restoring wants a signed, owner-authored, history- consistent image; whether some other device has caught up has no bearing on that, and a device that is behind converges through an ordinary pull no matter which image the joiner installed. Requiring unanimity there made a store with one joined-and-idle device fall back to its generation-zero image forever.
Fields§
§acknowledgements: BTreeMap<StoreDeviceId, RetainedAcknowledgementChain>One chain per device that had to acknowledge, which is a subset of the
devices active at the coverage: those still active now. Which subset is
a question about the current device state, so it is decided by the
builder against verified history and recorded here — validate can
check that these devices were active at the coverage and that each chain
proves what it claims, but not that the set is the right one to have
asked. See the reclaim module for why the set is what it is.
Implementations§
Source§impl AcknowledgedStoreSnapshot
impl AcknowledgedStoreSnapshot
Sourcepub fn acknowledgement_refs(
&self,
) -> Result<Vec<StoreAckRef>, StoreProtocolError>
pub fn acknowledgement_refs( &self, ) -> Result<Vec<StoreAckRef>, StoreProtocolError>
The latest acknowledgement each active device signed for this snapshot, in a stable order. This is the evidence a reclaim claim carries: the devices are named by what they signed, not by the chains behind it.
Sourcepub fn validate(&self) -> Result<(), StoreProtocolError>
pub fn validate(&self) -> Result<(), StoreProtocolError>
The installable authority, plus proof that every device active at its cut acknowledged this exact snapshot. Reclaim deletes history behind a snapshot only against this.
Trait Implementations§
Source§impl Clone for AcknowledgedStoreSnapshot
impl Clone for AcknowledgedStoreSnapshot
Source§fn clone(&self) -> AcknowledgedStoreSnapshot
fn clone(&self) -> AcknowledgedStoreSnapshot
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AcknowledgedStoreSnapshot
impl Debug for AcknowledgedStoreSnapshot
Source§impl<'de> Deserialize<'de> for AcknowledgedStoreSnapshot
impl<'de> Deserialize<'de> for AcknowledgedStoreSnapshot
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for AcknowledgedStoreSnapshot
impl StructuralPartialEq for AcknowledgedStoreSnapshot
Auto Trait Implementations§
impl !Freeze for AcknowledgedStoreSnapshot
impl RefUnwindSafe for AcknowledgedStoreSnapshot
impl Send for AcknowledgedStoreSnapshot
impl Sync for AcknowledgedStoreSnapshot
impl Unpin for AcknowledgedStoreSnapshot
impl UnsafeUnpin for AcknowledgedStoreSnapshot
impl UnwindSafe for AcknowledgedStoreSnapshot
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
§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.