pub struct AlgView {
pub hasher: Box<dyn Hasher>,
pub epochs: Vec<(u64, u64)>,
pub frontier: Vec<Vec<u8>>,
pub frontier_coords: Vec<(u64, u32)>,
}Expand description
One algorithm’s single-tree continuation state: its hasher, committed epoch intervals, and frontier stack. This is the per-algorithm frontier only (D14) — the shared leaf data lives once in the combinator’s store, never here.
Fields§
§hasher: Box<dyn Hasher>Hasher instance.
epochs: Vec<(u64, u64)>Epoch intervals: half-open [start, end).
end == u64::MAX represents an active (open) epoch.
frontier: Vec<Vec<u8>>Frontier stack: holds hashes of completed subtrees.
frontier_coords: Vec<(u64, u32)>Coordinates of each frontier node: (left_index, height).
Implementations§
Source§impl AlgView
impl AlgView
Sourcepub fn is_active_at(&self, i: u64) -> bool
pub fn is_active_at(&self, i: u64) -> bool
Whether leaf/subtree index i falls within any of this algorithm’s active epochs.
Sourcepub fn tree_size(&self, global_size: u64) -> u64
pub fn tree_size(&self, global_size: u64) -> u64
The tree size for this algorithm.
Active algorithms track the global tree size. Frozen algorithms stopped at their last deactivation point.
Sourcepub fn first_activation(&self) -> u64
pub fn first_activation(&self) -> u64
The activation index of the first epoch.
Sourcepub fn active_range(&self, lo: u64, hi: u64) -> bool
pub fn active_range(&self, lo: u64, hi: u64) -> bool
Whether algorithm has active content in the half-open range [lo, hi).
Definition 14b (Active range): true iff any epoch overlaps the interval.
Sourcepub fn fully_active(&self, lo: u64, hi: u64) -> bool
pub fn fully_active(&self, lo: u64, hi: u64) -> bool
Whether the range [lo, hi) is fully contained within the active epochs.
Sourcepub fn effective_size_at(&self, size: u64) -> u64
pub fn effective_size_at(&self, size: u64) -> u64
The algorithm-local tree size corresponding to global size size.
Active algorithms (or null-projection spans before first activation)
see the full global size. Frozen algorithms cap at their last
deactivation point; the maximum epoch end that is strictly less than
size is the algorithm’s effective size.
Sourcepub fn epochs_at(&self, size: u64) -> Option<Vec<(u64, u64)>>
pub fn epochs_at(&self, size: u64) -> Option<Vec<(u64, u64)>>
The epoch timeline as it stood at size size, for commitment into
the combined root and audit checkpoints (Design A+).
Intervals beginning after size are dropped; an interval extending
past size is encoded as open (end == u64::MAX), matching what the
timeline looked like when the log was that size. An interval closed
exactly at size stays closed — this is what distinguishes
“deactivated at the tip” from “still live, log idle” (frontier
freshness). Returns None if the algorithm was not yet registered.