use crate::{
simplex::{
scheme::Scheme,
types::{
Attributable, Certificate, Finalization, Finalize, Kind, Notarization, Notarize,
Nullification, Nullify, Proposal, Subject, Vote,
},
},
types::{Participant, Round as Rnd},
};
use commonware_cryptography::{Digest, certificate::Verification};
use commonware_parallel::Strategy;
use commonware_runtime::telemetry::traces::TracedExt as _;
use commonware_utils::{non_empty, ordered::Set};
use rand::rngs::StdRng;
use rand_core::{CryptoRng, SeedableRng};
use std::{future::Future, mem, sync::Arc};
use tracing::{Instrument as _, Span, info_span};
/// Runs a CPU-bound job through [Strategy::spawn], entering `span` on the worker thread and
/// instrumenting the returned future so the offloaded work stays attributed to the caller's trace.
fn offload
(len: usize, span: Span, strategy: &P, job: F) -> impl Future