Skip to content

Commit

Permalink
Save modulus to circuit output
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianGCalderon committed Feb 4, 2025
1 parent e9fc875 commit b6d780c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/libfuncs/circuit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,8 @@ fn build_eval<'ctx, 'this>(
))?;
let gates_array = ok_block.insert_values(context, location, gates_array, &gates)?;

let modulus_struct = u384_integer_to_struct(context, ok_block, location, circuit_modulus)?;

// Build output struct
let outputs_type_id = &info.branch_signatures()[0].vars[2].ty;
let outputs = build_struct_value(
Expand All @@ -424,7 +426,7 @@ fn build_eval<'ctx, 'this>(
helper,
metadata,
outputs_type_id,
&[gates_array],
&[gates_array, modulus_struct],
)?;

ok_block.append_operation(helper.br(0, &[add_mod, mul_mod, outputs], location));
Expand Down

0 comments on commit b6d780c

Please sign in to comment.