Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: properly track equivalence of witnesses generated for black box functions #3428

Merged
merged 3 commits into from
Nov 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,9 @@ impl AcirContext {
return Ok(variable);
}
}
let witness = self.var_to_witness(variable)?;

let witness_var = self.get_or_create_witness_var(variable)?;
let witness = self.var_to_witness(witness_var)?;
self.acir_ir.range_constraint(witness, *bit_size)?;
if let Some(message) = message {
self.acir_ir
Expand Down Expand Up @@ -1083,7 +1085,8 @@ impl AcirContext {
// Intrinsics only accept Witnesses. This is not a limitation of the
// intrinsics, its just how we have defined things. Ideally, we allow
// constants too.
let witness = self.var_to_witness(input)?;
let witness_var = self.get_or_create_witness_var(input)?;
let witness = self.var_to_witness(witness_var)?;
let num_bits = typ.bit_size();
single_val_witnesses.push(FunctionInput { witness, num_bits });
}
Expand Down
Loading