Trait BlackBoxFunctionSolver

pub trait BlackBoxFunctionSolver<F> {
    // Required methods
    fn multi_scalar_mul(
        &self,
        points: &[F],
        scalars_lo: &[F],
        scalars_hi: &[F],
        predicate: bool,
    ) -> Result<(F, F, F), BlackBoxResolutionError>;
    fn ec_add(
        &self,
        input1_x: &F,
        input1_y: &F,
        input1_infinite: &F,
        input2_x: &F,
        input2_y: &F,
        input2_infinite: &F,
        predicate: bool,
    ) -> Result<(F, F, F), BlackBoxResolutionError>;
    fn poseidon2_permutation(
        &self,
        inputs: &[F],
    ) -> Result<Vec<F>, BlackBoxResolutionError>;
}
Expand description

This component will generate outputs for Blackbox function calls where the underlying [acir::BlackBoxFunc] doesn’t have a canonical Rust implementation.

Returns an BlackBoxResolutionError if the backend does not support the given [acir::BlackBoxFunc].

Required Methods§

fn multi_scalar_mul( &self, points: &[F], scalars_lo: &[F], scalars_hi: &[F], predicate: bool, ) -> Result<(F, F, F), BlackBoxResolutionError>

fn ec_add( &self, input1_x: &F, input1_y: &F, input1_infinite: &F, input2_x: &F, input2_y: &F, input2_infinite: &F, predicate: bool, ) -> Result<(F, F, F), BlackBoxResolutionError>

fn poseidon2_permutation( &self, inputs: &[F], ) -> Result<Vec<F>, BlackBoxResolutionError>

Implementors§

§

impl<F> BlackBoxFunctionSolver<F> for StubbedBlackBoxSolver