From 88a5b31dd231295b571fe4d4b122b8e25cba14a3 Mon Sep 17 00:00:00 2001 From: Jialu Hao Date: Sat, 29 Jun 2024 02:23:07 +0800 Subject: [PATCH] rsx_i should be computed based on x_i, but not x'_i (#205) Co-authored-by: hjlpb <15574831545@163.com> --- vm/src/circuit/r1cs.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vm/src/circuit/r1cs.rs b/vm/src/circuit/r1cs.rs index 3f666ac5..61b9d5d6 100644 --- a/vm/src/circuit/r1cs.rs +++ b/vm/src/circuit/r1cs.rs @@ -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;