Skip to content

Commit

Permalink
rsx_i should be computed based on x_i, but not x'_i (#205)
Browse files Browse the repository at this point in the history
Co-authored-by: hjlpb <15574831545@163.com>
  • Loading branch information
hjlpb and hjlpb authored Jun 28, 2024
1 parent 2bd9d1b commit 88a5b31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vm/src/circuit/r1cs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -551,9 +551,9 @@ pub fn store_reg(cs: &mut R1CS, input: &str, output: &str, rs: u32) {

// build constraints
for i in 1..32 {
// rsx_i = (1 - rs_i=i) * x'_i
// rsx_i = (1 - rs_i=i) * x_i
let j1 = cs.var(&format!("{input}={i}"));
let j2 = cs.var(&format!("x'{i}"));
let j2 = cs.var(&format!("x{i}"));
let j3 = cs.var(&format!("rsx{i}"));
cs.constraint(|_cs, a, b, c| {
a[0] = ONE;
Expand Down

0 comments on commit 88a5b31

Please sign in to comment.