pub struct Checkpoint {
pub offset: Offset,
pub chain_hash: Hash,
pub record_count: u64,
pub created_at: Timestamp,
}Expand description
A periodic verification checkpoint stored in the log.
Checkpoints are records IN the log (not separate files), which means:
- They are part of the hash chain (tamper-evident)
- Checkpoint history is immutable
- Single source of truth
Checkpoints enable efficient verified reads by providing trusted anchor points, reducing verification from O(n) to O(k) where k is the distance to the nearest checkpoint.
Fields§
§offset: OffsetLog position of this checkpoint record.
chain_hash: HashCumulative hash of the chain at this point.
record_count: u64Total number of records from genesis to this checkpoint.
created_at: TimestampWhen this checkpoint was created.
Implementations§
Trait Implementations§
Source§impl Clone for Checkpoint
impl Clone for Checkpoint
Source§fn clone(&self) -> Checkpoint
fn clone(&self) -> Checkpoint
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Checkpoint
impl Debug for Checkpoint
Source§impl<'de> Deserialize<'de> for Checkpoint
impl<'de> Deserialize<'de> for Checkpoint
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for Checkpoint
impl Hash for Checkpoint
Source§impl PartialEq for Checkpoint
impl PartialEq for Checkpoint
Source§impl Serialize for Checkpoint
impl Serialize for Checkpoint
impl Copy for Checkpoint
impl Eq for Checkpoint
impl StructuralPartialEq for Checkpoint
Auto Trait Implementations§
impl Freeze for Checkpoint
impl RefUnwindSafe for Checkpoint
impl Send for Checkpoint
impl Sync for Checkpoint
impl Unpin for Checkpoint
impl UnwindSafe for Checkpoint
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