From d4de372310a51d0cad4e6929f4bf2e211c3ff23f Mon Sep 17 00:00:00 2001 From: Constance Date: Mon, 26 Jun 2023 09:02:49 +0200 Subject: [PATCH 1/8] Add constraints (split_flag=1) => (is_native_asset=0) --- src/circuit.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/circuit.rs b/src/circuit.rs index 99a35b1d9..92a681e0f 100644 --- a/src/circuit.rs +++ b/src/circuit.rs @@ -230,6 +230,7 @@ impl plonk::Circuit for Circuit { // Constrain is_native_asset to be boolean // Constraint if is_native_asset = 1 then asset = native_asset else asset != native_asset // Constraint if split_flag = 0 then psi_old = psi_nf + // Constraint if split_flag = 1, then is_native_asset = 0 let q_orchard = meta.selector(); meta.create_gate("Orchard circuit checks", |meta| { let q_orchard = meta.query_selector(q_orchard); @@ -307,13 +308,17 @@ impl plonk::Circuit for Circuit { // is not equal to zero, we will prove that it is invertible. ( "(is_native_asset = 0) => (asset != native_asset)", - (one.clone() - is_native_asset) + (one.clone() - is_native_asset.clone()) * (diff_asset_x * diff_asset_x_inv - one.clone()) * (diff_asset_y * diff_asset_y_inv - one.clone()), ), ( "(split_flag = 0) => (psi_old = psi_nf)", - (one - split_flag) * (psi_old - psi_nf), + (one - split_flag.clone()) * (psi_old - psi_nf), + ), + ( + "(split_flag = 1) => (is_native_asset = 0)", + split_flag * is_native_asset, ), ], ) From 1c0e564e926d32f7a8402b2eec4948a6b13c14d0 Mon Sep 17 00:00:00 2001 From: Constance Date: Mon, 26 Jun 2023 09:14:59 +0200 Subject: [PATCH 2/8] Add constraint (split_flag=1) => (v_old != 0) --- src/circuit.rs | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/src/circuit.rs b/src/circuit.rs index 92a681e0f..ab1241a70 100644 --- a/src/circuit.rs +++ b/src/circuit.rs @@ -231,6 +231,7 @@ impl plonk::Circuit for Circuit { // Constraint if is_native_asset = 1 then asset = native_asset else asset != native_asset // Constraint if split_flag = 0 then psi_old = psi_nf // Constraint if split_flag = 1, then is_native_asset = 0 + // Constraint if split_flag = 1, then v_old != 0 let q_orchard = meta.selector(); meta.create_gate("Orchard circuit checks", |meta| { let q_orchard = meta.query_selector(q_orchard); @@ -267,6 +268,8 @@ impl plonk::Circuit for Circuit { let psi_old = meta.query_advice(advices[4], Rotation::next()); let psi_nf = meta.query_advice(advices[5], Rotation::next()); + let v_old_inv = meta.query_advice(advices[6], Rotation::next()); + Constraints::with_selector( q_orchard, [ @@ -283,7 +286,7 @@ impl plonk::Circuit for Circuit { ), ( "v_old = 0 or enable_spends = 1", - v_old * (one.clone() - enable_spends), + v_old.clone() * (one.clone() - enable_spends), ), ( "v_new = 0 or enable_outputs = 1", @@ -314,11 +317,15 @@ impl plonk::Circuit for Circuit { ), ( "(split_flag = 0) => (psi_old = psi_nf)", - (one - split_flag.clone()) * (psi_old - psi_nf), + (one.clone() - split_flag.clone()) * (psi_old - psi_nf), ), ( "(split_flag = 1) => (is_native_asset = 0)", - split_flag * is_native_asset, + split_flag.clone() * is_native_asset, + ), + ( + "(split_flag = 1) => (v_old != 0)", + split_flag * (v_old * v_old_inv - one), ), ], ) @@ -938,6 +945,23 @@ impl plonk::Circuit for Circuit { psi_old.copy_advice(|| "psi_old", &mut region, config.advices[4], 1)?; psi_nf.copy_advice(|| "psi_nf", &mut region, config.advices[5], 1)?; + // `v_old_inv` will be used to prove that + // if split_flag = 1, then v_old != 0. + region.assign_advice( + || "v_old_inv", + config.advices[6], + 1, + || { + self.v_old.map(|v_old| { + if v_old.inner() == 0u64 { + NoteValue::zero() + } else { + NoteValue::from_raw(1u64 / v_old.inner()) + } + }) + }, + )?; + config.q_orchard.enable(&mut region, 0) }, )?; From 05bc10472940bdb822754d1be8bf560c22ab9c93 Mon Sep 17 00:00:00 2001 From: Constance Date: Mon, 26 Jun 2023 09:41:52 +0200 Subject: [PATCH 3/8] Update circuit tests --- src/circuit.rs | 85 +++++- src/circuit_description | 512 +++++++++++++++++++++----------- src/circuit_proof_test_case.bin | Bin 5250 -> 5250 bytes 3 files changed, 411 insertions(+), 186 deletions(-) diff --git a/src/circuit.rs b/src/circuit.rs index ab1241a70..12977e480 100644 --- a/src/circuit.rs +++ b/src/circuit.rs @@ -1579,7 +1579,12 @@ mod tests { let (circuit, instance) = generate_circuit_instance(is_native_asset, split_flag, &mut rng); - check_proof_of_orchard_circuit(&circuit, &instance, true); + let should_pass = match (is_native_asset, split_flag) { + (true, true) => false, + _ => true, + }; + + check_proof_of_orchard_circuit(&circuit, &instance, should_pass); // Set cv_net to zero // The proof should fail @@ -1648,19 +1653,77 @@ mod tests { }; check_proof_of_orchard_circuit(&circuit, &instance_wrong_cmx_pub, false); - // If split_flag=0, set nf_old_pub to random Nullifier + // Set nf_old_pub to random Nullifier + // The proof should fail + let instance_wrong_nf_old_pub = Instance { + anchor: instance.anchor, + cv_net: instance.cv_net.clone(), + nf_old: Nullifier::dummy(&mut rng), + rk: instance.rk.clone(), + cmx: instance.cmx, + enable_spend: instance.enable_spend, + enable_output: instance.enable_output, + }; + check_proof_of_orchard_circuit(&circuit, &instance_wrong_nf_old_pub, false); + + // If split_flag = 0 , set psi_nf to random pallas Base element // The proof should fail if !split_flag { - let instance_wrong_nf_old_pub = Instance { - anchor: instance.anchor, - cv_net: instance.cv_net, - nf_old: Nullifier::dummy(&mut rng), - rk: instance.rk, - cmx: instance.cmx, - enable_spend: instance.enable_spend, - enable_output: instance.enable_output, + let circuit_wrong_psi_nf = Circuit { + path: circuit.path, + pos: circuit.pos, + g_d_old: circuit.g_d_old, + pk_d_old: circuit.pk_d_old, + v_old: circuit.v_old, + rho_old: circuit.rho_old, + psi_old: circuit.psi_old, + rcm_old: circuit.rcm_old.clone(), + cm_old: circuit.cm_old.clone(), + psi_nf: Value::known(pallas::Base::random(&mut rng)), + alpha: circuit.alpha, + ak: circuit.ak.clone(), + nk: circuit.nk, + rivk: circuit.rivk, + g_d_new: circuit.g_d_new, + pk_d_new: circuit.pk_d_new, + v_new: circuit.v_new, + psi_new: circuit.psi_new, + rcm_new: circuit.rcm_new.clone(), + rcv: circuit.rcv, + asset: circuit.asset, + split_flag: circuit.split_flag, + }; + check_proof_of_orchard_circuit(&circuit_wrong_psi_nf, &instance, false); + } + + // If split_flag = 1 , set v_old to zero + // The proof should fail + if split_flag { + let circuit_wrong_v_old = Circuit { + path: circuit.path, + pos: circuit.pos, + g_d_old: circuit.g_d_old, + pk_d_old: circuit.pk_d_old, + v_old: Value::known(NoteValue::zero()), + rho_old: circuit.rho_old, + psi_old: circuit.psi_old, + rcm_old: circuit.rcm_old.clone(), + cm_old: circuit.cm_old.clone(), + psi_nf: circuit.psi_nf, + alpha: circuit.alpha, + ak: circuit.ak.clone(), + nk: circuit.nk, + rivk: circuit.rivk, + g_d_new: circuit.g_d_new, + pk_d_new: circuit.pk_d_new, + v_new: circuit.v_new, + psi_new: circuit.psi_new, + rcm_new: circuit.rcm_new.clone(), + rcv: circuit.rcv, + asset: circuit.asset, + split_flag: circuit.split_flag, }; - check_proof_of_orchard_circuit(&circuit, &instance_wrong_nf_old_pub, false); + check_proof_of_orchard_circuit(&circuit_wrong_v_old, &instance, false); } } } diff --git a/src/circuit_description b/src/circuit_description index 8078e15f1..0b77f21f2 100644 --- a/src/circuit_description +++ b/src/circuit_description @@ -913,6 +913,168 @@ PinnedVerificationKey { ), ), ), + Product( + Product( + Product( + Product( + Fixed { + query_index: 18, + column_index: 18, + rotation: Rotation( + 0, + ), + }, + Sum( + Constant( + 0x0000000000000000000000000000000000000000000000000000000000000002, + ), + Negated( + Fixed { + query_index: 18, + column_index: 18, + rotation: Rotation( + 0, + ), + }, + ), + ), + ), + Sum( + Constant( + 0x0000000000000000000000000000000000000000000000000000000000000003, + ), + Negated( + Fixed { + query_index: 18, + column_index: 18, + rotation: Rotation( + 0, + ), + }, + ), + ), + ), + Sum( + Constant( + 0x0000000000000000000000000000000000000000000000000000000000000004, + ), + Negated( + Fixed { + query_index: 18, + column_index: 18, + rotation: Rotation( + 0, + ), + }, + ), + ), + ), + Product( + Advice { + query_index: 8, + column_index: 8, + rotation: Rotation( + 0, + ), + }, + Advice { + query_index: 9, + column_index: 9, + rotation: Rotation( + 0, + ), + }, + ), + ), + Product( + Product( + Product( + Product( + Fixed { + query_index: 18, + column_index: 18, + rotation: Rotation( + 0, + ), + }, + Sum( + Constant( + 0x0000000000000000000000000000000000000000000000000000000000000002, + ), + Negated( + Fixed { + query_index: 18, + column_index: 18, + rotation: Rotation( + 0, + ), + }, + ), + ), + ), + Sum( + Constant( + 0x0000000000000000000000000000000000000000000000000000000000000003, + ), + Negated( + Fixed { + query_index: 18, + column_index: 18, + rotation: Rotation( + 0, + ), + }, + ), + ), + ), + Sum( + Constant( + 0x0000000000000000000000000000000000000000000000000000000000000004, + ), + Negated( + Fixed { + query_index: 18, + column_index: 18, + rotation: Rotation( + 0, + ), + }, + ), + ), + ), + Product( + Advice { + query_index: 8, + column_index: 8, + rotation: Rotation( + 0, + ), + }, + Sum( + Product( + Advice { + query_index: 0, + column_index: 0, + rotation: Rotation( + 0, + ), + }, + Advice { + query_index: 16, + column_index: 6, + rotation: Rotation( + 1, + ), + }, + ), + Negated( + Constant( + 0x0000000000000000000000000000000000000000000000000000000000000001, + ), + ), + ), + ), + ), Product( Product( Product( @@ -1057,7 +1219,7 @@ PinnedVerificationKey { Product( Scaled( Advice { - query_index: 17, + query_index: 18, column_index: 9, rotation: Rotation( -1, @@ -1066,7 +1228,7 @@ PinnedVerificationKey { 0x0000000000000000000000000000000000000000000000000000000000000400, ), Advice { - query_index: 16, + query_index: 17, column_index: 9, rotation: Rotation( 1, @@ -3675,7 +3837,7 @@ PinnedVerificationKey { Negated( Scaled( Advice { - query_index: 17, + query_index: 18, column_index: 9, rotation: Rotation( -1, @@ -3701,7 +3863,7 @@ PinnedVerificationKey { Negated( Scaled( Advice { - query_index: 17, + query_index: 18, column_index: 9, rotation: Rotation( -1, @@ -3919,7 +4081,7 @@ PinnedVerificationKey { Negated( Scaled( Advice { - query_index: 17, + query_index: 18, column_index: 9, rotation: Rotation( -1, @@ -4480,7 +4642,7 @@ PinnedVerificationKey { Negated( Scaled( Advice { - query_index: 17, + query_index: 18, column_index: 9, rotation: Rotation( -1, @@ -4506,7 +4668,7 @@ PinnedVerificationKey { Negated( Scaled( Advice { - query_index: 17, + query_index: 18, column_index: 9, rotation: Rotation( -1, @@ -4724,7 +4886,7 @@ PinnedVerificationKey { Negated( Scaled( Advice { - query_index: 17, + query_index: 18, column_index: 9, rotation: Rotation( -1, @@ -5223,7 +5385,7 @@ PinnedVerificationKey { Product( Sum( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -5239,7 +5401,7 @@ PinnedVerificationKey { ), Sum( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -5250,14 +5412,14 @@ PinnedVerificationKey { Sum( Product( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, ), }, Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -5266,7 +5428,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -5558,7 +5720,7 @@ PinnedVerificationKey { Negated( Scaled( Advice { - query_index: 20, + query_index: 21, column_index: 6, rotation: Rotation( -1, @@ -5584,7 +5746,7 @@ PinnedVerificationKey { Negated( Scaled( Advice { - query_index: 20, + query_index: 21, column_index: 6, rotation: Rotation( -1, @@ -5786,7 +5948,7 @@ PinnedVerificationKey { Negated( Scaled( Advice { - query_index: 20, + query_index: 21, column_index: 6, rotation: Rotation( -1, @@ -5907,7 +6069,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -6059,7 +6221,7 @@ PinnedVerificationKey { }, Negated( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -6146,7 +6308,7 @@ PinnedVerificationKey { Product( Sum( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -6162,7 +6324,7 @@ PinnedVerificationKey { ), Sum( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -6173,14 +6335,14 @@ PinnedVerificationKey { Sum( Product( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, ), }, Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -6189,7 +6351,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -6315,7 +6477,7 @@ PinnedVerificationKey { Negated( Scaled( Advice { - query_index: 20, + query_index: 21, column_index: 6, rotation: Rotation( -1, @@ -6341,7 +6503,7 @@ PinnedVerificationKey { Negated( Scaled( Advice { - query_index: 20, + query_index: 21, column_index: 6, rotation: Rotation( -1, @@ -6559,7 +6721,7 @@ PinnedVerificationKey { Negated( Scaled( Advice { - query_index: 20, + query_index: 21, column_index: 6, rotation: Rotation( -1, @@ -6696,7 +6858,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -6864,7 +7026,7 @@ PinnedVerificationKey { }, Negated( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -6948,7 +7110,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -7048,7 +7210,7 @@ PinnedVerificationKey { Product( Sum( Advice { - query_index: 16, + query_index: 17, column_index: 9, rotation: Rotation( 1, @@ -7060,7 +7222,7 @@ PinnedVerificationKey { 0x0000000000000000000000000000000000000000000000000000000000000002, ), Advice { - query_index: 17, + query_index: 18, column_index: 9, rotation: Rotation( -1, @@ -7076,7 +7238,7 @@ PinnedVerificationKey { Negated( Sum( Advice { - query_index: 16, + query_index: 17, column_index: 9, rotation: Rotation( 1, @@ -7088,7 +7250,7 @@ PinnedVerificationKey { 0x0000000000000000000000000000000000000000000000000000000000000002, ), Advice { - query_index: 17, + query_index: 18, column_index: 9, rotation: Rotation( -1, @@ -7193,7 +7355,7 @@ PinnedVerificationKey { Product( Sum( Advice { - query_index: 16, + query_index: 17, column_index: 9, rotation: Rotation( 1, @@ -7205,7 +7367,7 @@ PinnedVerificationKey { 0x0000000000000000000000000000000000000000000000000000000000000002, ), Advice { - query_index: 17, + query_index: 18, column_index: 9, rotation: Rotation( -1, @@ -7224,7 +7386,7 @@ PinnedVerificationKey { }, Negated( Advice { - query_index: 21, + query_index: 22, column_index: 1, rotation: Rotation( -1, @@ -7241,7 +7403,7 @@ PinnedVerificationKey { Negated( Sum( Advice { - query_index: 16, + query_index: 17, column_index: 9, rotation: Rotation( 1, @@ -7253,7 +7415,7 @@ PinnedVerificationKey { 0x0000000000000000000000000000000000000000000000000000000000000002, ), Advice { - query_index: 17, + query_index: 18, column_index: 9, rotation: Rotation( -1, @@ -7273,7 +7435,7 @@ PinnedVerificationKey { ), }, Advice { - query_index: 21, + query_index: 22, column_index: 1, rotation: Rotation( -1, @@ -7468,7 +7630,7 @@ PinnedVerificationKey { Sum( Sum( Advice { - query_index: 20, + query_index: 21, column_index: 6, rotation: Rotation( -1, @@ -7668,7 +7830,7 @@ PinnedVerificationKey { ), }, Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -7778,7 +7940,7 @@ PinnedVerificationKey { ), }, Advice { - query_index: 22, + query_index: 16, column_index: 6, rotation: Rotation( 1, @@ -7789,7 +7951,7 @@ PinnedVerificationKey { ), ), Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -7888,7 +8050,7 @@ PinnedVerificationKey { Product( Sum( Advice { - query_index: 16, + query_index: 17, column_index: 9, rotation: Rotation( 1, @@ -7914,7 +8076,7 @@ PinnedVerificationKey { Negated( Sum( Advice { - query_index: 16, + query_index: 17, column_index: 9, rotation: Rotation( 1, @@ -8029,7 +8191,7 @@ PinnedVerificationKey { Product( Sum( Advice { - query_index: 16, + query_index: 17, column_index: 9, rotation: Rotation( 1, @@ -8064,7 +8226,7 @@ PinnedVerificationKey { Negated( Sum( Advice { - query_index: 16, + query_index: 17, column_index: 9, rotation: Rotation( 1, @@ -8198,7 +8360,7 @@ PinnedVerificationKey { Product( Sum( Advice { - query_index: 16, + query_index: 17, column_index: 9, rotation: Rotation( 1, @@ -8233,7 +8395,7 @@ PinnedVerificationKey { Negated( Sum( Advice { - query_index: 16, + query_index: 17, column_index: 9, rotation: Rotation( 1, @@ -10595,7 +10757,7 @@ PinnedVerificationKey { }, Sum( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -10701,7 +10863,7 @@ PinnedVerificationKey { Product( Sum( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -10710,7 +10872,7 @@ PinnedVerificationKey { Negated( Scaled( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -10727,7 +10889,7 @@ PinnedVerificationKey { Negated( Sum( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -10736,7 +10898,7 @@ PinnedVerificationKey { Negated( Scaled( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -10832,7 +10994,7 @@ PinnedVerificationKey { ), }, Advice { - query_index: 22, + query_index: 16, column_index: 6, rotation: Rotation( 1, @@ -11252,7 +11414,7 @@ PinnedVerificationKey { Sum( Sum( Advice { - query_index: 20, + query_index: 21, column_index: 6, rotation: Rotation( -1, @@ -11620,7 +11782,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 22, + query_index: 16, column_index: 6, rotation: Rotation( 1, @@ -11965,7 +12127,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -12310,7 +12472,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -12850,7 +13012,7 @@ PinnedVerificationKey { Sum( Scaled( Advice { - query_index: 22, + query_index: 16, column_index: 6, rotation: Rotation( 1, @@ -12860,7 +13022,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -12871,7 +13033,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -13006,7 +13168,7 @@ PinnedVerificationKey { Sum( Scaled( Advice { - query_index: 22, + query_index: 16, column_index: 6, rotation: Rotation( 1, @@ -13016,7 +13178,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -13027,7 +13189,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -13162,7 +13324,7 @@ PinnedVerificationKey { Sum( Scaled( Advice { - query_index: 22, + query_index: 16, column_index: 6, rotation: Rotation( 1, @@ -13172,7 +13334,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -13183,7 +13345,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -13270,7 +13432,7 @@ PinnedVerificationKey { Sum( Sum( Advice { - query_index: 20, + query_index: 21, column_index: 6, rotation: Rotation( -1, @@ -13286,7 +13448,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 22, + query_index: 16, column_index: 6, rotation: Rotation( 1, @@ -13386,7 +13548,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -13477,7 +13639,7 @@ PinnedVerificationKey { }, Negated( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -15067,14 +15229,14 @@ PinnedVerificationKey { Product( Sum( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, ), }, Advice { - query_index: 16, + query_index: 17, column_index: 9, rotation: Rotation( 1, @@ -15094,14 +15256,14 @@ PinnedVerificationKey { Sum( Product( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, ), }, Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -15120,7 +15282,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 22, + query_index: 16, column_index: 6, rotation: Rotation( 1, @@ -15161,7 +15323,7 @@ PinnedVerificationKey { 0x0000000000000000000000000000000000000000000000000000000000000002, ), Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -15678,7 +15840,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 16, + query_index: 17, column_index: 9, rotation: Rotation( 1, @@ -15797,7 +15959,7 @@ PinnedVerificationKey { Negated( Scaled( Advice { - query_index: 22, + query_index: 16, column_index: 6, rotation: Rotation( 1, @@ -15809,7 +15971,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -15923,7 +16085,7 @@ PinnedVerificationKey { Sum( Sum( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -16041,7 +16203,7 @@ PinnedVerificationKey { ), Sum( Advice { - query_index: 22, + query_index: 16, column_index: 6, rotation: Rotation( 1, @@ -16050,7 +16212,7 @@ PinnedVerificationKey { Negated( Sum( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -16058,7 +16220,7 @@ PinnedVerificationKey { }, Scaled( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -17454,7 +17616,7 @@ PinnedVerificationKey { ), }, Advice { - query_index: 22, + query_index: 16, column_index: 6, rotation: Rotation( 1, @@ -17584,7 +17746,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -17690,7 +17852,7 @@ PinnedVerificationKey { ), }, Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -17900,7 +18062,7 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -17912,7 +18074,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -18042,7 +18204,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -18053,7 +18215,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -18409,7 +18571,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -18420,7 +18582,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -18771,7 +18933,7 @@ PinnedVerificationKey { }, Scaled( Advice { - query_index: 22, + query_index: 16, column_index: 6, rotation: Rotation( 1, @@ -18782,7 +18944,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -19115,7 +19277,7 @@ PinnedVerificationKey { ), Sum( Advice { - query_index: 22, + query_index: 16, column_index: 6, rotation: Rotation( 1, @@ -19144,7 +19306,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -19610,7 +19772,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -19740,7 +19902,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -19839,7 +20001,7 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -19944,7 +20106,7 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -20049,14 +20211,14 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, ), }, Advice { - query_index: 16, + query_index: 17, column_index: 9, rotation: Rotation( 1, @@ -20191,7 +20353,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -20349,7 +20511,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -20464,7 +20626,7 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -20585,14 +20747,14 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, ), }, Advice { - query_index: 16, + query_index: 17, column_index: 9, rotation: Rotation( 1, @@ -20874,7 +21036,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -21032,7 +21194,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -21147,7 +21309,7 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -21268,14 +21430,14 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, ), }, Advice { - query_index: 16, + query_index: 17, column_index: 9, rotation: Rotation( 1, @@ -21411,7 +21573,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 22, + query_index: 16, column_index: 6, rotation: Rotation( 1, @@ -21422,7 +21584,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -21580,7 +21742,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -21695,14 +21857,14 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, ), }, Advice { - query_index: 22, + query_index: 16, column_index: 6, rotation: Rotation( 1, @@ -21816,7 +21978,7 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -21937,14 +22099,14 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, ), }, Advice { - query_index: 16, + query_index: 17, column_index: 9, rotation: Rotation( 1, @@ -22215,7 +22377,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 22, + query_index: 16, column_index: 6, rotation: Rotation( 1, @@ -22500,7 +22662,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -22743,7 +22905,7 @@ PinnedVerificationKey { ), }, Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -22864,7 +23026,7 @@ PinnedVerificationKey { ), }, Advice { - query_index: 16, + query_index: 17, column_index: 9, rotation: Rotation( 1, @@ -23106,7 +23268,7 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -23118,7 +23280,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -23264,7 +23426,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -23275,7 +23437,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -23679,7 +23841,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -23690,7 +23852,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -24089,7 +24251,7 @@ PinnedVerificationKey { }, Scaled( Advice { - query_index: 22, + query_index: 16, column_index: 6, rotation: Rotation( 1, @@ -24100,7 +24262,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -24481,7 +24643,7 @@ PinnedVerificationKey { ), Sum( Advice { - query_index: 22, + query_index: 16, column_index: 6, rotation: Rotation( 1, @@ -24510,7 +24672,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -25040,7 +25202,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -25186,7 +25348,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -25301,7 +25463,7 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -25422,7 +25584,7 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -25543,14 +25705,14 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, ), }, Advice { - query_index: 16, + query_index: 17, column_index: 9, rotation: Rotation( 1, @@ -25685,7 +25847,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -25843,7 +26005,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -25958,7 +26120,7 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -26079,14 +26241,14 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, ), }, Advice { - query_index: 16, + query_index: 17, column_index: 9, rotation: Rotation( 1, @@ -26320,7 +26482,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -26430,7 +26592,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -26497,7 +26659,7 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -26570,14 +26732,14 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, ), }, Advice { - query_index: 16, + query_index: 17, column_index: 9, rotation: Rotation( 1, @@ -26665,7 +26827,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 22, + query_index: 16, column_index: 6, rotation: Rotation( 1, @@ -26676,7 +26838,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -26786,7 +26948,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -26853,14 +27015,14 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, ), }, Advice { - query_index: 22, + query_index: 16, column_index: 6, rotation: Rotation( 1, @@ -26926,7 +27088,7 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -26999,14 +27161,14 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, ), }, Advice { - query_index: 16, + query_index: 17, column_index: 9, rotation: Rotation( 1, @@ -27181,7 +27343,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 22, + query_index: 16, column_index: 6, rotation: Rotation( 1, @@ -27370,7 +27532,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -27517,7 +27679,7 @@ PinnedVerificationKey { ), }, Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -27590,7 +27752,7 @@ PinnedVerificationKey { ), }, Advice { - query_index: 16, + query_index: 17, column_index: 9, rotation: Rotation( 1, @@ -27853,6 +28015,15 @@ PinnedVerificationKey { 1, ), ), + ( + Column { + index: 6, + column_type: Advice, + }, + Rotation( + 1, + ), + ), ( Column { index: 9, @@ -27907,15 +28078,6 @@ PinnedVerificationKey { -1, ), ), - ( - Column { - index: 6, - column_type: Advice, - }, - Rotation( - 1, - ), - ), ( Column { index: 7, @@ -28313,7 +28475,7 @@ PinnedVerificationKey { Negated( Scaled( Advice { - query_index: 16, + query_index: 17, column_index: 9, rotation: Rotation( 1, @@ -28673,7 +28835,7 @@ PinnedVerificationKey { ), ), Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, diff --git a/src/circuit_proof_test_case.bin b/src/circuit_proof_test_case.bin index 695d163d99d1571649c59a9557e1362a49f391a5..e30289e4dfcf3d17105376262f9aaff70bf14fbb 100644 GIT binary patch literal 5250 zcmV-|6n*RN@c-RwO^FDF3?C(ucwVRvUj*&(Z?!@Qv{}JU%491j#9Gs8Lh8#h`A{OO z%fzD@D0L^@8!%X*e?-S_37Q1AVQ8R8A$j+(qk(a3xt(162W`4tV`JfNzwlV&Tc#iC z*<4u3wO&f~38#y{qv($l_HLv9EtTypJS?fbs@kfBk&@lB0}vH$(Q%QYyXPr&(#ZOA zoKIiiseYCI+_V4z0mjqz?#ov1V9G{@jd>SG>q4`4yZ1zB3+5G?o+evtxmDk`zgyOF zOq+<9PMg9q1=f0h>=_1#xEFq73>*r)i`KqJn1%e>+Ik4u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Fso$f z-G_9=qTEZH23dhO46pLg%mqEx*{Iifx=caA6I`D;U;qhidKOVHx|L+*!Rlnn>eAL8o~Z-1-s|d_GBUmB|LQB*KSDFuUhhn{z9*UlFU*5vfjjuZ-489_Qj8_SqCTrhn6vtemLrOZp zUBWxBR%tvmvmycSQBB#VkbvFZIAEkgzjs;5dXfXJCA#6*jK4?TnY=#xa857j5Dz(7 zKExbdtH|X>rgrnim~i~~nbwUHE@y($4$`%Kxj`Z`Jho&_gV7Oov1>UkTT;(QkxSVh zmC1rO;hn?`dJKFswuC&k+@H3u@5|_l`c9IU4gLL2pcB$o(z z(e#7MKYW>WNNWFe$A!ItudKpparIle((R2OYf+#jlyFhhp8DuP)gX@(W(ri~;MOIn zo0|~G(44N={t{gYEm|=Qq*&kNTWw@*O^fUFuv|-BChmN93k;!*A}!mI?L%~InFd7i z?D?OwnBH2`qAAzm+g)T_q@_VQ{q?sD4^)8V8RJq45Qp3pSx)2@kOk|g1BZt;5IpBe zz%daARTkc>SUQ<}G=dEHh}Nn~lM_hFt6C3c-0+4sT5d8d@07KK#{ z1h%cR(ZeI3GG#7Nh7I02Z&^XEV|Uv5Lsrb0`xtxH9M%qB3F}g$-Clzt9s%6phS->p znPJacLTce7Y|2;ak72C2JG&3Qc7~TUVCNjn-_lPkkq3G_V2fHHiX#=m1juuZLbe|+ zZYR%gB6`=(T2i7tg8c~6;<&LnQ7(sXIekNdTv8GdqCAJ~TsR1cSy*&UNFj8A-zZS~ IYufqsJ*i3!z5oCK From 51709760cfe62d4013866a217a05542b2157acdd Mon Sep 17 00:00:00 2001 From: Constance Date: Mon, 26 Jun 2023 10:03:26 +0200 Subject: [PATCH 4/8] Fix v_old_inv evaluation --- src/circuit.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/circuit.rs b/src/circuit.rs index 12977e480..961ca8998 100644 --- a/src/circuit.rs +++ b/src/circuit.rs @@ -954,9 +954,9 @@ impl plonk::Circuit for Circuit { || { self.v_old.map(|v_old| { if v_old.inner() == 0u64 { - NoteValue::zero() + pallas::Base::zero() } else { - NoteValue::from_raw(1u64 / v_old.inner()) + pallas::Base::from(v_old.inner()).invert().unwrap() } }) }, From d54a260d198bb2a45227292e7b13e353e17da48f Mon Sep 17 00:00:00 2001 From: Constance Date: Mon, 26 Jun 2023 10:10:20 +0200 Subject: [PATCH 5/8] Fix clippy --- src/circuit.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/circuit.rs b/src/circuit.rs index 961ca8998..b45426255 100644 --- a/src/circuit.rs +++ b/src/circuit.rs @@ -1579,10 +1579,7 @@ mod tests { let (circuit, instance) = generate_circuit_instance(is_native_asset, split_flag, &mut rng); - let should_pass = match (is_native_asset, split_flag) { - (true, true) => false, - _ => true, - }; + let should_pass = !matches!((is_native_asset, split_flag), (true, true)); check_proof_of_orchard_circuit(&circuit, &instance, should_pass); From bbeea6fda53b6fef116ec6380d15a918a8682b56 Mon Sep 17 00:00:00 2001 From: Constance Date: Mon, 26 Jun 2023 10:30:52 +0200 Subject: [PATCH 6/8] Limit version of half --- Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/Cargo.toml b/Cargo.toml index 0e7f64ea6..3ad6adfb9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -53,6 +53,7 @@ plotters = { version = "0.3.0", optional = true } [dev-dependencies] bridgetree = "0.3" +half = ">= 1.8, < 2.3" criterion = "0.3" halo2_gadgets = { git = "https://github.com/QED-it/halo2", branch = "zsa1", features = ["test-dependencies"] } hex = "0.4" From 7a79a022afc6f3e0876a2092972c3971b4c7c43a Mon Sep 17 00:00:00 2001 From: Constance Date: Tue, 27 Jun 2023 15:28:01 +0200 Subject: [PATCH 7/8] Update constraint --- src/circuit.rs | 71 +---- src/circuit_description | 462 +++++++++++++------------------- src/circuit_proof_test_case.bin | Bin 5250 -> 5250 bytes 3 files changed, 202 insertions(+), 331 deletions(-) diff --git a/src/circuit.rs b/src/circuit.rs index b45426255..4e27eea37 100644 --- a/src/circuit.rs +++ b/src/circuit.rs @@ -224,14 +224,13 @@ impl plonk::Circuit for Circuit { // Constrain split_flag to be boolean // Constrain v_old * (1 - split_flag) - v_new = magnitude * sign (https://p.z.cash/ZKS:action-cv-net-integrity?partial). - // Constrain v_old = 0 or calculated root = anchor (https://p.z.cash/ZKS:action-merkle-path-validity?partial). + // Constrain (v_old = 0 and split_flag = 0) or (calculated root = anchor) (https://p.z.cash/ZKS:action-merkle-path-validity?partial). // Constrain v_old = 0 or enable_spends = 1 (https://p.z.cash/ZKS:action-enable-spend). // Constrain v_new = 0 or enable_outputs = 1 (https://p.z.cash/ZKS:action-enable-output). // Constrain is_native_asset to be boolean // Constraint if is_native_asset = 1 then asset = native_asset else asset != native_asset // Constraint if split_flag = 0 then psi_old = psi_nf // Constraint if split_flag = 1, then is_native_asset = 0 - // Constraint if split_flag = 1, then v_old != 0 let q_orchard = meta.selector(); meta.create_gate("Orchard circuit checks", |meta| { let q_orchard = meta.query_selector(q_orchard); @@ -268,8 +267,6 @@ impl plonk::Circuit for Circuit { let psi_old = meta.query_advice(advices[4], Rotation::next()); let psi_nf = meta.query_advice(advices[5], Rotation::next()); - let v_old_inv = meta.query_advice(advices[6], Rotation::next()); - Constraints::with_selector( q_orchard, [ @@ -280,13 +277,18 @@ impl plonk::Circuit for Circuit { - v_new.clone() - magnitude * sign, ), + // We already checked that + // * split_flag is boolean (just above), and + // * v_old is a 64 bit integer (in note commitment evaluation). + // So, split_flag + v_old = 0 only when both split_flag and v_old are equal to + // zero (no overflow can occur). ( - "v_old = 0 or root = anchor", - v_old.clone() * (root - anchor), + "(v_old = 0 and split_flag = 0) or (root = anchor)", + (v_old.clone() + split_flag.clone()) * (root - anchor), ), ( "v_old = 0 or enable_spends = 1", - v_old.clone() * (one.clone() - enable_spends), + v_old * (one.clone() - enable_spends), ), ( "v_new = 0 or enable_outputs = 1", @@ -317,15 +319,11 @@ impl plonk::Circuit for Circuit { ), ( "(split_flag = 0) => (psi_old = psi_nf)", - (one.clone() - split_flag.clone()) * (psi_old - psi_nf), + (one - split_flag.clone()) * (psi_old - psi_nf), ), ( "(split_flag = 1) => (is_native_asset = 0)", - split_flag.clone() * is_native_asset, - ), - ( - "(split_flag = 1) => (v_old != 0)", - split_flag * (v_old * v_old_inv - one), + split_flag * is_native_asset, ), ], ) @@ -945,23 +943,6 @@ impl plonk::Circuit for Circuit { psi_old.copy_advice(|| "psi_old", &mut region, config.advices[4], 1)?; psi_nf.copy_advice(|| "psi_nf", &mut region, config.advices[5], 1)?; - // `v_old_inv` will be used to prove that - // if split_flag = 1, then v_old != 0. - region.assign_advice( - || "v_old_inv", - config.advices[6], - 1, - || { - self.v_old.map(|v_old| { - if v_old.inner() == 0u64 { - pallas::Base::zero() - } else { - pallas::Base::from(v_old.inner()).invert().unwrap() - } - }) - }, - )?; - config.q_orchard.enable(&mut region, 0) }, )?; @@ -1692,36 +1673,6 @@ mod tests { }; check_proof_of_orchard_circuit(&circuit_wrong_psi_nf, &instance, false); } - - // If split_flag = 1 , set v_old to zero - // The proof should fail - if split_flag { - let circuit_wrong_v_old = Circuit { - path: circuit.path, - pos: circuit.pos, - g_d_old: circuit.g_d_old, - pk_d_old: circuit.pk_d_old, - v_old: Value::known(NoteValue::zero()), - rho_old: circuit.rho_old, - psi_old: circuit.psi_old, - rcm_old: circuit.rcm_old.clone(), - cm_old: circuit.cm_old.clone(), - psi_nf: circuit.psi_nf, - alpha: circuit.alpha, - ak: circuit.ak.clone(), - nk: circuit.nk, - rivk: circuit.rivk, - g_d_new: circuit.g_d_new, - pk_d_new: circuit.pk_d_new, - v_new: circuit.v_new, - psi_new: circuit.psi_new, - rcm_new: circuit.rcm_new.clone(), - rcv: circuit.rcv, - asset: circuit.asset, - split_flag: circuit.split_flag, - }; - check_proof_of_orchard_circuit(&circuit_wrong_v_old, &instance, false); - } } } } diff --git a/src/circuit_description b/src/circuit_description index 0b77f21f2..863c4e1e2 100644 --- a/src/circuit_description +++ b/src/circuit_description @@ -260,13 +260,22 @@ PinnedVerificationKey { ), ), Product( - Advice { - query_index: 0, - column_index: 0, - rotation: Rotation( - 0, - ), - }, + Sum( + Advice { + query_index: 0, + column_index: 0, + rotation: Rotation( + 0, + ), + }, + Advice { + query_index: 8, + column_index: 8, + rotation: Rotation( + 0, + ), + }, + ), Sum( Advice { query_index: 4, @@ -986,95 +995,6 @@ PinnedVerificationKey { }, ), ), - Product( - Product( - Product( - Product( - Fixed { - query_index: 18, - column_index: 18, - rotation: Rotation( - 0, - ), - }, - Sum( - Constant( - 0x0000000000000000000000000000000000000000000000000000000000000002, - ), - Negated( - Fixed { - query_index: 18, - column_index: 18, - rotation: Rotation( - 0, - ), - }, - ), - ), - ), - Sum( - Constant( - 0x0000000000000000000000000000000000000000000000000000000000000003, - ), - Negated( - Fixed { - query_index: 18, - column_index: 18, - rotation: Rotation( - 0, - ), - }, - ), - ), - ), - Sum( - Constant( - 0x0000000000000000000000000000000000000000000000000000000000000004, - ), - Negated( - Fixed { - query_index: 18, - column_index: 18, - rotation: Rotation( - 0, - ), - }, - ), - ), - ), - Product( - Advice { - query_index: 8, - column_index: 8, - rotation: Rotation( - 0, - ), - }, - Sum( - Product( - Advice { - query_index: 0, - column_index: 0, - rotation: Rotation( - 0, - ), - }, - Advice { - query_index: 16, - column_index: 6, - rotation: Rotation( - 1, - ), - }, - ), - Negated( - Constant( - 0x0000000000000000000000000000000000000000000000000000000000000001, - ), - ), - ), - ), - ), Product( Product( Product( @@ -1219,7 +1139,7 @@ PinnedVerificationKey { Product( Scaled( Advice { - query_index: 18, + query_index: 17, column_index: 9, rotation: Rotation( -1, @@ -1228,7 +1148,7 @@ PinnedVerificationKey { 0x0000000000000000000000000000000000000000000000000000000000000400, ), Advice { - query_index: 17, + query_index: 16, column_index: 9, rotation: Rotation( 1, @@ -3837,7 +3757,7 @@ PinnedVerificationKey { Negated( Scaled( Advice { - query_index: 18, + query_index: 17, column_index: 9, rotation: Rotation( -1, @@ -3863,7 +3783,7 @@ PinnedVerificationKey { Negated( Scaled( Advice { - query_index: 18, + query_index: 17, column_index: 9, rotation: Rotation( -1, @@ -4081,7 +4001,7 @@ PinnedVerificationKey { Negated( Scaled( Advice { - query_index: 18, + query_index: 17, column_index: 9, rotation: Rotation( -1, @@ -4642,7 +4562,7 @@ PinnedVerificationKey { Negated( Scaled( Advice { - query_index: 18, + query_index: 17, column_index: 9, rotation: Rotation( -1, @@ -4668,7 +4588,7 @@ PinnedVerificationKey { Negated( Scaled( Advice { - query_index: 18, + query_index: 17, column_index: 9, rotation: Rotation( -1, @@ -4886,7 +4806,7 @@ PinnedVerificationKey { Negated( Scaled( Advice { - query_index: 18, + query_index: 17, column_index: 9, rotation: Rotation( -1, @@ -5385,7 +5305,7 @@ PinnedVerificationKey { Product( Sum( Advice { - query_index: 20, + query_index: 19, column_index: 8, rotation: Rotation( 1, @@ -5401,7 +5321,7 @@ PinnedVerificationKey { ), Sum( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -5412,14 +5332,14 @@ PinnedVerificationKey { Sum( Product( Advice { - query_index: 20, + query_index: 19, column_index: 8, rotation: Rotation( 1, ), }, Advice { - query_index: 20, + query_index: 19, column_index: 8, rotation: Rotation( 1, @@ -5428,7 +5348,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -5720,7 +5640,7 @@ PinnedVerificationKey { Negated( Scaled( Advice { - query_index: 21, + query_index: 20, column_index: 6, rotation: Rotation( -1, @@ -5746,7 +5666,7 @@ PinnedVerificationKey { Negated( Scaled( Advice { - query_index: 21, + query_index: 20, column_index: 6, rotation: Rotation( -1, @@ -5948,7 +5868,7 @@ PinnedVerificationKey { Negated( Scaled( Advice { - query_index: 21, + query_index: 20, column_index: 6, rotation: Rotation( -1, @@ -6069,7 +5989,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -6221,7 +6141,7 @@ PinnedVerificationKey { }, Negated( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -6308,7 +6228,7 @@ PinnedVerificationKey { Product( Sum( Advice { - query_index: 20, + query_index: 19, column_index: 8, rotation: Rotation( 1, @@ -6324,7 +6244,7 @@ PinnedVerificationKey { ), Sum( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -6335,14 +6255,14 @@ PinnedVerificationKey { Sum( Product( Advice { - query_index: 20, + query_index: 19, column_index: 8, rotation: Rotation( 1, ), }, Advice { - query_index: 20, + query_index: 19, column_index: 8, rotation: Rotation( 1, @@ -6351,7 +6271,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -6477,7 +6397,7 @@ PinnedVerificationKey { Negated( Scaled( Advice { - query_index: 21, + query_index: 20, column_index: 6, rotation: Rotation( -1, @@ -6503,7 +6423,7 @@ PinnedVerificationKey { Negated( Scaled( Advice { - query_index: 21, + query_index: 20, column_index: 6, rotation: Rotation( -1, @@ -6721,7 +6641,7 @@ PinnedVerificationKey { Negated( Scaled( Advice { - query_index: 21, + query_index: 20, column_index: 6, rotation: Rotation( -1, @@ -6858,7 +6778,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -7026,7 +6946,7 @@ PinnedVerificationKey { }, Negated( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -7110,7 +7030,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 20, + query_index: 19, column_index: 8, rotation: Rotation( 1, @@ -7210,7 +7130,7 @@ PinnedVerificationKey { Product( Sum( Advice { - query_index: 17, + query_index: 16, column_index: 9, rotation: Rotation( 1, @@ -7222,7 +7142,7 @@ PinnedVerificationKey { 0x0000000000000000000000000000000000000000000000000000000000000002, ), Advice { - query_index: 18, + query_index: 17, column_index: 9, rotation: Rotation( -1, @@ -7238,7 +7158,7 @@ PinnedVerificationKey { Negated( Sum( Advice { - query_index: 17, + query_index: 16, column_index: 9, rotation: Rotation( 1, @@ -7250,7 +7170,7 @@ PinnedVerificationKey { 0x0000000000000000000000000000000000000000000000000000000000000002, ), Advice { - query_index: 18, + query_index: 17, column_index: 9, rotation: Rotation( -1, @@ -7355,7 +7275,7 @@ PinnedVerificationKey { Product( Sum( Advice { - query_index: 17, + query_index: 16, column_index: 9, rotation: Rotation( 1, @@ -7367,7 +7287,7 @@ PinnedVerificationKey { 0x0000000000000000000000000000000000000000000000000000000000000002, ), Advice { - query_index: 18, + query_index: 17, column_index: 9, rotation: Rotation( -1, @@ -7386,7 +7306,7 @@ PinnedVerificationKey { }, Negated( Advice { - query_index: 22, + query_index: 21, column_index: 1, rotation: Rotation( -1, @@ -7403,7 +7323,7 @@ PinnedVerificationKey { Negated( Sum( Advice { - query_index: 17, + query_index: 16, column_index: 9, rotation: Rotation( 1, @@ -7415,7 +7335,7 @@ PinnedVerificationKey { 0x0000000000000000000000000000000000000000000000000000000000000002, ), Advice { - query_index: 18, + query_index: 17, column_index: 9, rotation: Rotation( -1, @@ -7435,7 +7355,7 @@ PinnedVerificationKey { ), }, Advice { - query_index: 22, + query_index: 21, column_index: 1, rotation: Rotation( -1, @@ -7630,7 +7550,7 @@ PinnedVerificationKey { Sum( Sum( Advice { - query_index: 21, + query_index: 20, column_index: 6, rotation: Rotation( -1, @@ -7830,7 +7750,7 @@ PinnedVerificationKey { ), }, Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -7940,7 +7860,7 @@ PinnedVerificationKey { ), }, Advice { - query_index: 16, + query_index: 22, column_index: 6, rotation: Rotation( 1, @@ -7951,7 +7871,7 @@ PinnedVerificationKey { ), ), Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -8050,7 +7970,7 @@ PinnedVerificationKey { Product( Sum( Advice { - query_index: 17, + query_index: 16, column_index: 9, rotation: Rotation( 1, @@ -8076,7 +7996,7 @@ PinnedVerificationKey { Negated( Sum( Advice { - query_index: 17, + query_index: 16, column_index: 9, rotation: Rotation( 1, @@ -8191,7 +8111,7 @@ PinnedVerificationKey { Product( Sum( Advice { - query_index: 17, + query_index: 16, column_index: 9, rotation: Rotation( 1, @@ -8226,7 +8146,7 @@ PinnedVerificationKey { Negated( Sum( Advice { - query_index: 17, + query_index: 16, column_index: 9, rotation: Rotation( 1, @@ -8360,7 +8280,7 @@ PinnedVerificationKey { Product( Sum( Advice { - query_index: 17, + query_index: 16, column_index: 9, rotation: Rotation( 1, @@ -8395,7 +8315,7 @@ PinnedVerificationKey { Negated( Sum( Advice { - query_index: 17, + query_index: 16, column_index: 9, rotation: Rotation( 1, @@ -10757,7 +10677,7 @@ PinnedVerificationKey { }, Sum( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -10863,7 +10783,7 @@ PinnedVerificationKey { Product( Sum( Advice { - query_index: 20, + query_index: 19, column_index: 8, rotation: Rotation( 1, @@ -10872,7 +10792,7 @@ PinnedVerificationKey { Negated( Scaled( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -10889,7 +10809,7 @@ PinnedVerificationKey { Negated( Sum( Advice { - query_index: 20, + query_index: 19, column_index: 8, rotation: Rotation( 1, @@ -10898,7 +10818,7 @@ PinnedVerificationKey { Negated( Scaled( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -10994,7 +10914,7 @@ PinnedVerificationKey { ), }, Advice { - query_index: 16, + query_index: 22, column_index: 6, rotation: Rotation( 1, @@ -11414,7 +11334,7 @@ PinnedVerificationKey { Sum( Sum( Advice { - query_index: 21, + query_index: 20, column_index: 6, rotation: Rotation( -1, @@ -11782,7 +11702,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 16, + query_index: 22, column_index: 6, rotation: Rotation( 1, @@ -12127,7 +12047,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -12472,7 +12392,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 20, + query_index: 19, column_index: 8, rotation: Rotation( 1, @@ -13012,7 +12932,7 @@ PinnedVerificationKey { Sum( Scaled( Advice { - query_index: 16, + query_index: 22, column_index: 6, rotation: Rotation( 1, @@ -13022,7 +12942,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -13033,7 +12953,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 20, + query_index: 19, column_index: 8, rotation: Rotation( 1, @@ -13168,7 +13088,7 @@ PinnedVerificationKey { Sum( Scaled( Advice { - query_index: 16, + query_index: 22, column_index: 6, rotation: Rotation( 1, @@ -13178,7 +13098,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -13189,7 +13109,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 20, + query_index: 19, column_index: 8, rotation: Rotation( 1, @@ -13324,7 +13244,7 @@ PinnedVerificationKey { Sum( Scaled( Advice { - query_index: 16, + query_index: 22, column_index: 6, rotation: Rotation( 1, @@ -13334,7 +13254,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -13345,7 +13265,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 20, + query_index: 19, column_index: 8, rotation: Rotation( 1, @@ -13432,7 +13352,7 @@ PinnedVerificationKey { Sum( Sum( Advice { - query_index: 21, + query_index: 20, column_index: 6, rotation: Rotation( -1, @@ -13448,7 +13368,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 16, + query_index: 22, column_index: 6, rotation: Rotation( 1, @@ -13548,7 +13468,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -13639,7 +13559,7 @@ PinnedVerificationKey { }, Negated( Advice { - query_index: 20, + query_index: 19, column_index: 8, rotation: Rotation( 1, @@ -15229,14 +15149,14 @@ PinnedVerificationKey { Product( Sum( Advice { - query_index: 20, + query_index: 19, column_index: 8, rotation: Rotation( 1, ), }, Advice { - query_index: 17, + query_index: 16, column_index: 9, rotation: Rotation( 1, @@ -15256,14 +15176,14 @@ PinnedVerificationKey { Sum( Product( Advice { - query_index: 20, + query_index: 19, column_index: 8, rotation: Rotation( 1, ), }, Advice { - query_index: 20, + query_index: 19, column_index: 8, rotation: Rotation( 1, @@ -15282,7 +15202,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 16, + query_index: 22, column_index: 6, rotation: Rotation( 1, @@ -15323,7 +15243,7 @@ PinnedVerificationKey { 0x0000000000000000000000000000000000000000000000000000000000000002, ), Advice { - query_index: 20, + query_index: 19, column_index: 8, rotation: Rotation( 1, @@ -15840,7 +15760,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 17, + query_index: 16, column_index: 9, rotation: Rotation( 1, @@ -15959,7 +15879,7 @@ PinnedVerificationKey { Negated( Scaled( Advice { - query_index: 16, + query_index: 22, column_index: 6, rotation: Rotation( 1, @@ -15971,7 +15891,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -16085,7 +16005,7 @@ PinnedVerificationKey { Sum( Sum( Advice { - query_index: 20, + query_index: 19, column_index: 8, rotation: Rotation( 1, @@ -16203,7 +16123,7 @@ PinnedVerificationKey { ), Sum( Advice { - query_index: 16, + query_index: 22, column_index: 6, rotation: Rotation( 1, @@ -16212,7 +16132,7 @@ PinnedVerificationKey { Negated( Sum( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -16220,7 +16140,7 @@ PinnedVerificationKey { }, Scaled( Advice { - query_index: 20, + query_index: 19, column_index: 8, rotation: Rotation( 1, @@ -17616,7 +17536,7 @@ PinnedVerificationKey { ), }, Advice { - query_index: 16, + query_index: 22, column_index: 6, rotation: Rotation( 1, @@ -17746,7 +17666,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -17852,7 +17772,7 @@ PinnedVerificationKey { ), }, Advice { - query_index: 20, + query_index: 19, column_index: 8, rotation: Rotation( 1, @@ -18062,7 +17982,7 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -18074,7 +17994,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -18204,7 +18124,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -18215,7 +18135,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 20, + query_index: 19, column_index: 8, rotation: Rotation( 1, @@ -18571,7 +18491,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -18582,7 +18502,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 20, + query_index: 19, column_index: 8, rotation: Rotation( 1, @@ -18933,7 +18853,7 @@ PinnedVerificationKey { }, Scaled( Advice { - query_index: 16, + query_index: 22, column_index: 6, rotation: Rotation( 1, @@ -18944,7 +18864,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -19277,7 +19197,7 @@ PinnedVerificationKey { ), Sum( Advice { - query_index: 16, + query_index: 22, column_index: 6, rotation: Rotation( 1, @@ -19306,7 +19226,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -19772,7 +19692,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -19902,7 +19822,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 20, + query_index: 19, column_index: 8, rotation: Rotation( 1, @@ -20001,7 +19921,7 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -20106,7 +20026,7 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -20211,14 +20131,14 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, ), }, Advice { - query_index: 17, + query_index: 16, column_index: 9, rotation: Rotation( 1, @@ -20353,7 +20273,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -20511,7 +20431,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 20, + query_index: 19, column_index: 8, rotation: Rotation( 1, @@ -20626,7 +20546,7 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -20747,14 +20667,14 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, ), }, Advice { - query_index: 17, + query_index: 16, column_index: 9, rotation: Rotation( 1, @@ -21036,7 +20956,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -21194,7 +21114,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 20, + query_index: 19, column_index: 8, rotation: Rotation( 1, @@ -21309,7 +21229,7 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -21430,14 +21350,14 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, ), }, Advice { - query_index: 17, + query_index: 16, column_index: 9, rotation: Rotation( 1, @@ -21573,7 +21493,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 16, + query_index: 22, column_index: 6, rotation: Rotation( 1, @@ -21584,7 +21504,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -21742,7 +21662,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 20, + query_index: 19, column_index: 8, rotation: Rotation( 1, @@ -21857,14 +21777,14 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, ), }, Advice { - query_index: 16, + query_index: 22, column_index: 6, rotation: Rotation( 1, @@ -21978,7 +21898,7 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -22099,14 +22019,14 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, ), }, Advice { - query_index: 17, + query_index: 16, column_index: 9, rotation: Rotation( 1, @@ -22377,7 +22297,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 16, + query_index: 22, column_index: 6, rotation: Rotation( 1, @@ -22662,7 +22582,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 20, + query_index: 19, column_index: 8, rotation: Rotation( 1, @@ -22905,7 +22825,7 @@ PinnedVerificationKey { ), }, Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -23026,7 +22946,7 @@ PinnedVerificationKey { ), }, Advice { - query_index: 17, + query_index: 16, column_index: 9, rotation: Rotation( 1, @@ -23268,7 +23188,7 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -23280,7 +23200,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -23426,7 +23346,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -23437,7 +23357,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 20, + query_index: 19, column_index: 8, rotation: Rotation( 1, @@ -23841,7 +23761,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -23852,7 +23772,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 20, + query_index: 19, column_index: 8, rotation: Rotation( 1, @@ -24251,7 +24171,7 @@ PinnedVerificationKey { }, Scaled( Advice { - query_index: 16, + query_index: 22, column_index: 6, rotation: Rotation( 1, @@ -24262,7 +24182,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -24643,7 +24563,7 @@ PinnedVerificationKey { ), Sum( Advice { - query_index: 16, + query_index: 22, column_index: 6, rotation: Rotation( 1, @@ -24672,7 +24592,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -25202,7 +25122,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -25348,7 +25268,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 20, + query_index: 19, column_index: 8, rotation: Rotation( 1, @@ -25463,7 +25383,7 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -25584,7 +25504,7 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -25705,14 +25625,14 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, ), }, Advice { - query_index: 17, + query_index: 16, column_index: 9, rotation: Rotation( 1, @@ -25847,7 +25767,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -26005,7 +25925,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 20, + query_index: 19, column_index: 8, rotation: Rotation( 1, @@ -26120,7 +26040,7 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -26241,14 +26161,14 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, ), }, Advice { - query_index: 17, + query_index: 16, column_index: 9, rotation: Rotation( 1, @@ -26482,7 +26402,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -26592,7 +26512,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 20, + query_index: 19, column_index: 8, rotation: Rotation( 1, @@ -26659,7 +26579,7 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -26732,14 +26652,14 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, ), }, Advice { - query_index: 17, + query_index: 16, column_index: 9, rotation: Rotation( 1, @@ -26827,7 +26747,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 16, + query_index: 22, column_index: 6, rotation: Rotation( 1, @@ -26838,7 +26758,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -26948,7 +26868,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 20, + query_index: 19, column_index: 8, rotation: Rotation( 1, @@ -27015,14 +26935,14 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, ), }, Advice { - query_index: 16, + query_index: 22, column_index: 6, rotation: Rotation( 1, @@ -27088,7 +27008,7 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -27161,14 +27081,14 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, ), }, Advice { - query_index: 17, + query_index: 16, column_index: 9, rotation: Rotation( 1, @@ -27343,7 +27263,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 16, + query_index: 22, column_index: 6, rotation: Rotation( 1, @@ -27532,7 +27452,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 20, + query_index: 19, column_index: 8, rotation: Rotation( 1, @@ -27679,7 +27599,7 @@ PinnedVerificationKey { ), }, Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, @@ -27752,7 +27672,7 @@ PinnedVerificationKey { ), }, Advice { - query_index: 17, + query_index: 16, column_index: 9, rotation: Rotation( 1, @@ -28015,15 +27935,6 @@ PinnedVerificationKey { 1, ), ), - ( - Column { - index: 6, - column_type: Advice, - }, - Rotation( - 1, - ), - ), ( Column { index: 9, @@ -28078,6 +27989,15 @@ PinnedVerificationKey { -1, ), ), + ( + Column { + index: 6, + column_type: Advice, + }, + Rotation( + 1, + ), + ), ( Column { index: 7, @@ -28475,7 +28395,7 @@ PinnedVerificationKey { Negated( Scaled( Advice { - query_index: 17, + query_index: 16, column_index: 9, rotation: Rotation( 1, @@ -28835,7 +28755,7 @@ PinnedVerificationKey { ), ), Advice { - query_index: 19, + query_index: 18, column_index: 7, rotation: Rotation( 1, diff --git a/src/circuit_proof_test_case.bin b/src/circuit_proof_test_case.bin index e30289e4dfcf3d17105376262f9aaff70bf14fbb..5a8711554131107aeac547f3b033c40a9fc21d75 100644 GIT binary patch literal 5250 zcmV-|6n*Qe)T~;XOCbpz{vZe|sLxf+!-&0h$Dv4Sr%`ZLE{iTJM1N6jUPO~ zJK!xG1I!als(TRu0Sp!*vzpbhZl^`y8q}iuW zgeuMEoCfPGy9hgvxGpNMM9i$FaO)1LnSHj*S&g{IP$s~z3U&(T3`~59G;XxmAavO`v{b)%8B1yRe)$!s_{*%y0dz?%7WRzN`L|e>zMH{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zh@J%myqaXGQ{o15O_UWic4pz#U|4bclZ;dj3v2oC#3 znrVLSucTCaw_H%6s6ZYAM1IBV0gYBIuE zUSUHm&5!g!LplEkBliNqeW^Sim0bKdy-Csc$80`*zSR(5MGS@1SDdWgntu6{K%Q}8 zCmU0ps;%=as%bO>&#fp?&DkPej{k?v54qGkGZjXA74D2hh73mt1=xA_ue+ReN)DmF z(t#wJT}+c`PkZby(5t(cBZ^OvrSJI2}r zYEcQTy4Z*CA!HaVR_nA!csG)Pz+0@BwNs-Cno@Pxa;n2wDnz=mP59V?UtuK*ErS7A zkA!pk3PrVKGQps(-b$;n3N@&RU(3|)2m~l~h_dey#qm{wlQhE;JIEUIrD5wWjNzKh z!!awXb~0p&4|%*~x3B|){+L#154B?gY&N3|-S!t(=J9`UA*Thwtv>=zMj4W3XXewg zIRk6T?sVr;5;eR=YOXO%Z+3YMx_Y?vvE>cbI|u6`nD)q2%cjK@56(izYSt==dKiZ) zl978VOL1+TU%pH0vf08Y%?wL@^W5LxXi(0b)EgN&EZpy~4QJb_ALN=^p^3GoErE|h zT$r}oz$ZR`Z%z$kN0;x>W#V%nIm!CR6O%Z{X8Iqc+n4qETdlc~0YMcpkCl4$K=}sv I7QP7wFN7%+*Z=?k From 5a72c032cf9f44373943f1b27acddf786a66829d Mon Sep 17 00:00:00 2001 From: Constance Date: Thu, 29 Jun 2023 11:00:02 +0200 Subject: [PATCH 8/8] Update comments --- src/circuit.rs | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/circuit.rs b/src/circuit.rs index 4e27eea37..a8164c7bc 100644 --- a/src/circuit.rs +++ b/src/circuit.rs @@ -279,9 +279,8 @@ impl plonk::Circuit for Circuit { ), // We already checked that // * split_flag is boolean (just above), and - // * v_old is a 64 bit integer (in note commitment evaluation). - // So, split_flag + v_old = 0 only when both split_flag and v_old are equal to - // zero (no overflow can occur). + // * v_old is a 64 bit integer (in the note commitment evaluation). + // So, split_flag + v_old = 0 only when (split_flag = 0 and v_old = 0), no overflow can occur. ( "(v_old = 0 and split_flag = 0) or (root = anchor)", (v_old.clone() + split_flag.clone()) * (root - anchor), @@ -1560,11 +1559,11 @@ mod tests { let (circuit, instance) = generate_circuit_instance(is_native_asset, split_flag, &mut rng); - let should_pass = !matches!((is_native_asset, split_flag), (true, true)); + let should_pass = !(matches!((is_native_asset, split_flag), (true, true))); check_proof_of_orchard_circuit(&circuit, &instance, should_pass); - // Set cv_net to zero + // Set cv_net to be zero // The proof should fail let instance_wrong_cv_net = Instance { anchor: instance.anchor, @@ -1577,7 +1576,7 @@ mod tests { }; check_proof_of_orchard_circuit(&circuit, &instance_wrong_cv_net, false); - // Set rk_pub to dummy VerificationKey + // Set rk_pub to be a dummy VerificationKey // The proof should fail let instance_wrong_rk = Instance { anchor: instance.anchor, @@ -1590,7 +1589,7 @@ mod tests { }; check_proof_of_orchard_circuit(&circuit, &instance_wrong_rk, false); - // Set cm_old to random NoteCommitment + // Set cm_old to be a random NoteCommitment // The proof should fail let circuit_wrong_cm_old = Circuit { path: circuit.path, @@ -1618,7 +1617,7 @@ mod tests { }; check_proof_of_orchard_circuit(&circuit_wrong_cm_old, &instance, false); - // Set cmx_pub to random NoteCommitment + // Set cmx_pub to be a random NoteCommitment // The proof should fail let instance_wrong_cmx_pub = Instance { anchor: instance.anchor, @@ -1631,7 +1630,7 @@ mod tests { }; check_proof_of_orchard_circuit(&circuit, &instance_wrong_cmx_pub, false); - // Set nf_old_pub to random Nullifier + // Set nf_old_pub to be a random Nullifier // The proof should fail let instance_wrong_nf_old_pub = Instance { anchor: instance.anchor, @@ -1644,7 +1643,7 @@ mod tests { }; check_proof_of_orchard_circuit(&circuit, &instance_wrong_nf_old_pub, false); - // If split_flag = 0 , set psi_nf to random pallas Base element + // If split_flag = 0 , set psi_nf to be a random Pallas base element // The proof should fail if !split_flag { let circuit_wrong_psi_nf = Circuit {