pub struct CheckpointRunner<B: ?Sized, S> { /* private fields */ }Expand description
Advances durable CLL state when its host runs it (Go checkpoint.Runner).
B is the store, shared in an Arc so a
DeliveryRunner can use the
same one; S signs the checkpoints, and its
key_id must be the hex raw Ed25519 public
key, which becomes each statement’s kid. Passes are serialized: one
runner never runs two at once.
Implementations§
Source§impl<B, S> CheckpointRunner<B, S>
impl<B, S> CheckpointRunner<B, S>
Sourcepub fn new(config: RunnerConfig, store: Arc<B>, signer: S) -> Result<Self>
pub fn new(config: RunnerConfig, store: Arc<B>, signer: S) -> Result<Self>
Validates config without starting background work: an invalid log
or witness identifier, scan limit, cadence or poll interval, more
than MAX_WITNESSES witnesses or a repeated one is invalid.
Sourcepub fn config(&self) -> &RunnerConfig
pub fn config(&self) -> &RunnerConfig
The configuration.
Sourcepub fn run(&self, stop: &AtomicBool) -> Result<()>
pub fn run(&self, stop: &AtomicBool) -> Result<()>
Sourcepub fn run_once(&self, now: Timestamp) -> Result<bool>
pub fn run_once(&self, now: Timestamp) -> Result<bool>
Advances durable state by at most one entry scan batch at now.
Returns true when it commits nodes, a checkpoint, or both. A stored
state whose MMR, indexed sequence or checkpoint is inconsistent, or
whose checkpoint does not verify under this log and key, is
corrupt; a lost compare-and-set is contention.