pub trait JustificationView {
// Required method
fn latest_finalized_epoch(&self) -> u64;
// Provided methods
fn current_justified_checkpoint(&self) -> Checkpoint { ... }
fn previous_justified_checkpoint(&self) -> Checkpoint { ... }
fn finalized_checkpoint(&self) -> Checkpoint { ... }
fn canonical_block_root_at_slot(&self, _slot: u64) -> Option<Bytes32> { ... }
fn canonical_target_root_for_epoch(&self, _epoch: u64) -> Option<Bytes32> { ... }
}Expand description
Per-epoch finality view. Returns the epoch of the most
recently FINALIZED Casper-FFG checkpoint. DSL-127 consults
this to derive in_finality_stall; the orchestrator does
not require a full Casper view, only the finalized-epoch
height.
Implemented by the embedder’s consensus integration (DSL-143 full surface). Shipped here early because DSL-127 is the first caller.
Required Methods§
Sourcefn latest_finalized_epoch(&self) -> u64
fn latest_finalized_epoch(&self) -> u64
Epoch of the most recent finalized checkpoint. 0 at
genesis before any checkpoint has finalized. DSL-127
derives in_finality_stall from this.
Provided Methods§
Sourcefn current_justified_checkpoint(&self) -> Checkpoint
fn current_justified_checkpoint(&self) -> Checkpoint
Most recently justified checkpoint in the current epoch. DSL-075 source-justified appeal check consumer. Default: zero checkpoint so DSL-127 fixtures that only care about the stall flag don’t have to implement the full surface.
Sourcefn previous_justified_checkpoint(&self) -> Checkpoint
fn previous_justified_checkpoint(&self) -> Checkpoint
Checkpoint justified in the previous epoch. DSL-075 consumer. Default: zero checkpoint.
Sourcefn finalized_checkpoint(&self) -> Checkpoint
fn finalized_checkpoint(&self) -> Checkpoint
Most recently finalized checkpoint. Default: zero-root
at [latest_finalized_epoch] so the epoch leg matches
DSL-127’s minimum contract even when the root is
uninitialised. DSL-076 consumer.
Sourcefn canonical_block_root_at_slot(&self, _slot: u64) -> Option<Bytes32>
fn canonical_block_root_at_slot(&self, _slot: u64) -> Option<Bytes32>
Canonical block root at slot, or None for
uncommitted / future slots. DSL-076/077 head check
consumer. Default: always None.
Sourcefn canonical_target_root_for_epoch(&self, _epoch: u64) -> Option<Bytes32>
fn canonical_target_root_for_epoch(&self, _epoch: u64) -> Option<Bytes32>
Canonical target root for epoch (start-of-epoch
block root), or None past chain tip. DSL-076 target-root
consumer. Default: None.