Skip to main content

compute_drb_result

Function compute_drb_result 

Source
pub async fn compute_drb_result(
    drb_input: DrbInput,
    store_drb_progress: StoreDrbProgressFn,
    load_drb_progress: LoadDrbProgressFn,
    progress_load_timeout: Duration,
    heartbeat: Heartbeat,
    cancel: CancellationToken,
) -> Option<DrbResult>
Expand description

Compute the DRB result for the leader rotation.

This is to be started two epochs in advance and spawned in a non-blocking thread. Returns None if the computation was cancelled via cancel.

ยงArguments

  • drb_seed_input - Serialized QC signature.
  • progress_load_timeout - Bound on the initial stored-progress load (see DRB_PROGRESS_LOAD_TIMEOUT).
  • heartbeat - Bumped as the hash chain advances, so a supervisor can tell a long computation apart from a stalled one. Pass Heartbeat::default() when nobody is watching.
  • cancel - Token that stops the hash loop when fired.