Skip to main content

PreprocessingBundler

Trait PreprocessingBundler 

Source
pub trait PreprocessingBundler<C: Curve>: Send {
    // Required method
    async fn fetch_for(
        &mut self,
        circuit: &Circuit<C>,
    ) -> Result<CerberusPreprocessingIterator<C>, PreprocessingBundlerError>;
}
Expand description

Bundles all preprocessing sources for an MPC protocol session.

Implementations are responsible for fetching all preprocessing required for a circuit concurrently and packaging the results into a CerberusPreprocessingIterator. Because each implementation owns its sources as disjoint struct fields, it can issue all network requests in a single try_join! and return after a single await, rather than making one sequential round-trip per source type.

Required Methods§

Source

async fn fetch_for( &mut self, circuit: &Circuit<C>, ) -> Result<CerberusPreprocessingIterator<C>, PreprocessingBundlerError>

Fetches all preprocessing required by circuit and returns a ready-to-use iterator.

Implementations should issue all source requests concurrently (e.g. via tokio::try_join!) so that this resolves after a single network barrier rather than N sequential ones.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§