diff --git a/avm-transpiler/src/transpile.rs b/avm-transpiler/src/transpile.rs index ace92a10337c..f1fdd201b8b7 100644 --- a/avm-transpiler/src/transpile.rs +++ b/avm-transpiler/src/transpile.rs @@ -863,7 +863,7 @@ fn handle_black_box_function(avm_instrs: &mut Vec, operation: &B let num_points = points.size.0; let scalars_offset = scalars.pointer.0; // Output array is fixed to 3 - assert!(outputs.size == &3u32, "Output array size must be equal to 3"); + assert_eq!(outputs.size, 3, "Output array size must be equal to 3"); let outputs_offset = outputs.pointer.0; avm_instrs.push(AvmInstruction { opcode: AvmOpcode::MSM, diff --git a/yarn-project/bb-prover/src/avm_proving.test.ts b/yarn-project/bb-prover/src/avm_proving.test.ts index ba17be603abd..905ff2d0801e 100644 --- a/yarn-project/bb-prover/src/avm_proving.test.ts +++ b/yarn-project/bb-prover/src/avm_proving.test.ts @@ -146,6 +146,24 @@ describe('AVM WitGen, proof generation and verification', () => { TIMEOUT, ); + /************************************************************************ + * Avm Embedded Curve functions + ************************************************************************/ + describe('AVM Embedded Curve functions', () => { + // The functions have no inputs for now, but we might change that in the future for more flexible testing. + const avmEmbeddedCurveFunctions: [string, Fr[]][] = [ + ['elliptic_curve_add_and_double', []], + ['variable_base_msm', []], + ]; + it.each(avmEmbeddedCurveFunctions)( + 'Should prove %s', + async (name, _) => { + await proveAndVerifyAvmTestContract(name); + }, + TIMEOUT, + ); + }); + /************************************************************************ * AvmContext functions ************************************************************************/