diff --git a/Cargo.toml b/Cargo.toml index a0929100c..efcc06945 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,9 +35,10 @@ hex = "0.4" lazy_static = "1" memuse = { version = "0.2.1", features = ["nonempty"] } pasta_curves = "0.5" +tempfile = "= 3.5.0" # Last version required rust 1.63 proptest = { version = "1.0.0", optional = true } rand = "0.8" -reddsa = "0.5" +reddsa = "=0.5.0" # Last version required rust 1.65 nonempty = "0.7" serde = { version = "1.0", features = ["derive"] } subtle = "2.3" @@ -49,6 +50,7 @@ tracing = "0.1" # Developer tooling dependencies image = { version = ">= 0.24, < 0.24.5", optional = true } # 0.24.5 has MSRV 1.61 +flate2 = ">= 1.0, <1.0.27" # Clippy issues in last version plotters = { version = "0.3.0", optional = true } [dev-dependencies] diff --git a/benches/circuit.rs b/benches/circuit.rs index 03868a418..f26cc3507 100644 --- a/benches/circuit.rs +++ b/benches/circuit.rs @@ -28,7 +28,7 @@ fn criterion_benchmark(c: &mut Criterion) { let create_bundle = |num_recipients| { let mut builder = Builder::new( - Flags::from_parts(true, true), + Flags::from_parts(true, true, false), Anchor::from_bytes([0; 32]).unwrap(), ); for _ in 0..num_recipients { diff --git a/benches/note_decryption.rs b/benches/note_decryption.rs index 6bd6fa10f..ce051cf03 100644 --- a/benches/note_decryption.rs +++ b/benches/note_decryption.rs @@ -47,7 +47,7 @@ fn bench_note_decryption(c: &mut Criterion) { let bundle = { let mut builder = Builder::new( - Flags::from_parts(true, true), + Flags::from_parts(true, true, false), Anchor::from_bytes([0; 32]).unwrap(), ); // The builder pads to two actions, and shuffles their order. Add two recipients diff --git a/src/builder.rs b/src/builder.rs index 06b8a431a..bae73569b 100644 --- a/src/builder.rs +++ b/src/builder.rs @@ -947,7 +947,7 @@ pub mod testing { /// Create a bundle from the set of arbitrary bundle inputs. fn into_bundle + Copy + Into>(mut self) -> Bundle { let fvk = FullViewingKey::from(&self.sk); - let flags = Flags::from_parts(true, true); + let flags = Flags::from_parts(true, true, true); let mut builder = Builder::new(flags, self.anchor); for (note, path) in self.notes.into_iter() { @@ -1068,7 +1068,7 @@ mod tests { let recipient = fvk.address_at(0u32, Scope::External); let mut builder = Builder::new( - Flags::from_parts(true, true), + Flags::from_parts(true, true, false), EMPTY_ROOTS[MERKLE_DEPTH_ORCHARD].into(), ); diff --git a/src/bundle.rs b/src/bundle.rs index 2e5d5a034..23beb4a86 100644 --- a/src/bundle.rs +++ b/src/bundle.rs @@ -38,6 +38,7 @@ impl Action { cmx: *self.cmx(), enable_spend: flags.spends_enabled, enable_output: flags.outputs_enabled, + enable_zsa: flags.zsa_enabled, } } } @@ -57,18 +58,25 @@ pub struct Flags { /// guaranteed to be dummy notes. If `true`, the created notes may be either real or /// dummy notes. outputs_enabled: bool, + /// Flag denoting whether ZSA transaction is enabled. + /// + /// If `false`, all notes within [`Action`]s in the transaction's [`Bundle`] are + /// guaranteed to be notes with native asset. + zsa_enabled: bool, } const FLAG_SPENDS_ENABLED: u8 = 0b0000_0001; const FLAG_OUTPUTS_ENABLED: u8 = 0b0000_0010; -const FLAGS_EXPECTED_UNSET: u8 = !(FLAG_SPENDS_ENABLED | FLAG_OUTPUTS_ENABLED); +const FLAG_ZSA_ENABLED: u8 = 0b0000_0100; +const FLAGS_EXPECTED_UNSET: u8 = !(FLAG_SPENDS_ENABLED | FLAG_OUTPUTS_ENABLED | FLAG_ZSA_ENABLED); impl Flags { /// Construct a set of flags from its constituent parts - pub fn from_parts(spends_enabled: bool, outputs_enabled: bool) -> Self { + pub fn from_parts(spends_enabled: bool, outputs_enabled: bool, zsa_enabled: bool) -> Self { Flags { spends_enabled, outputs_enabled, + zsa_enabled, } } @@ -90,6 +98,14 @@ impl Flags { self.outputs_enabled } + /// Flag denoting whether ZSA transaction is enabled. + /// + /// If `false`, all notes within [`Action`]s in the transaction's [`Bundle`] are + /// guaranteed to be notes with native asset. + pub fn zsa_enabled(&self) -> bool { + self.zsa_enabled + } + /// Serialize flags to a byte as defined in [Zcash Protocol Spec ยง 7.1: Transaction /// Encoding And Consensus][txencoding]. /// @@ -102,6 +118,9 @@ impl Flags { if self.outputs_enabled { value |= FLAG_OUTPUTS_ENABLED; } + if self.zsa_enabled { + value |= FLAG_ZSA_ENABLED; + } value } @@ -116,6 +135,7 @@ impl Flags { Some(Self::from_parts( value & FLAG_SPENDS_ENABLED != 0, value & FLAG_OUTPUTS_ENABLED != 0, + value & FLAG_ZSA_ENABLED != 0, )) } else { None @@ -607,8 +627,8 @@ pub mod testing { prop_compose! { /// Create an arbitrary set of flags. - pub fn arb_flags()(spends_enabled in prop::bool::ANY, outputs_enabled in prop::bool::ANY) -> Flags { - Flags::from_parts(spends_enabled, outputs_enabled) + pub fn arb_flags()(spends_enabled in prop::bool::ANY, outputs_enabled in prop::bool::ANY, zsa_enabled in prop::bool::ANY) -> Flags { + Flags::from_parts(spends_enabled, outputs_enabled, zsa_enabled) } } diff --git a/src/circuit.rs b/src/circuit.rs index 9d550e5d2..d88bfa2a8 100644 --- a/src/circuit.rs +++ b/src/circuit.rs @@ -27,6 +27,7 @@ use self::{ }; use crate::{ builder::SpendInfo, + bundle::Flags, circuit::gadget::mux_chip::{MuxChip, MuxConfig}, constants::{ OrchardCommitDomains, OrchardFixedBases, OrchardFixedBasesFull, OrchardHashDomains, @@ -79,6 +80,7 @@ const RK_Y: usize = 5; const CMX: usize = 6; const ENABLE_SPEND: usize = 7; const ENABLE_OUTPUT: usize = 8; +const ENABLE_ZSA: usize = 9; /// Configuration needed to use the Orchard Action circuit. #[derive(Clone, Debug)] @@ -231,6 +233,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 enable_zsa = 0, then is_native_asset = 1 let q_orchard = meta.selector(); meta.create_gate("Orchard circuit checks", |meta| { let q_orchard = meta.query_selector(q_orchard); @@ -267,6 +270,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 enable_zsa = meta.query_advice(advices[6], Rotation::next()); + Constraints::with_selector( q_orchard, [ @@ -318,11 +323,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 * is_native_asset.clone(), + ), + ( + "(enable_zsa = 0) => (is_native_asset = 1)", + (one.clone() - enable_zsa) * (one - is_native_asset), ), ], ) @@ -942,6 +951,14 @@ 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)?; + region.assign_advice_from_instance( + || "enable zsa", + config.primary, + ENABLE_ZSA, + config.advices[6], + 1, + )?; + config.q_orchard.enable(&mut region, 0) }, )?; @@ -999,6 +1016,7 @@ pub struct Instance { pub(crate) cmx: ExtractedNoteCommitment, pub(crate) enable_spend: bool, pub(crate) enable_output: bool, + pub(crate) enable_zsa: bool, } impl Instance { @@ -1015,8 +1033,7 @@ impl Instance { nf_old: Nullifier, rk: VerificationKey, cmx: ExtractedNoteCommitment, - enable_spend: bool, - enable_output: bool, + flags: Flags, ) -> Self { Instance { anchor, @@ -1024,13 +1041,14 @@ impl Instance { nf_old, rk, cmx, - enable_spend, - enable_output, + enable_spend: flags.spends_enabled(), + enable_output: flags.outputs_enabled(), + enable_zsa: flags.zsa_enabled(), } } - fn to_halo2_instance(&self) -> [[vesta::Scalar; 9]; 1] { - let mut instance = [vesta::Scalar::zero(); 9]; + fn to_halo2_instance(&self) -> [[vesta::Scalar; 10]; 1] { + let mut instance = [vesta::Scalar::zero(); 10]; instance[ANCHOR] = self.anchor.inner(); instance[CV_NET_X] = self.cv_net.x(); @@ -1048,6 +1066,7 @@ impl Instance { instance[CMX] = self.cmx.inner(); instance[ENABLE_SPEND] = vesta::Scalar::from(u64::from(self.enable_spend)); instance[ENABLE_OUTPUT] = vesta::Scalar::from(u64::from(self.enable_output)); + instance[ENABLE_ZSA] = vesta::Scalar::from(u64::from(self.enable_zsa)); [instance] } @@ -1167,6 +1186,7 @@ mod tests { use super::{Circuit, Instance, Proof, ProvingKey, VerifyingKey, K}; use crate::builder::SpendInfo; + use crate::bundle::Flags; use crate::note::commitment::NoteCommitTrapdoor; use crate::note::{AssetBase, Nullifier}; use crate::primitives::redpallas::VerificationKey; @@ -1234,6 +1254,7 @@ mod tests { cmx, enable_spend: true, enable_output: true, + enable_zsa: false, }, ) } @@ -1314,6 +1335,7 @@ mod tests { w.write_all(&[ if instance.enable_spend { 1 } else { 0 }, if instance.enable_output { 1 } else { 0 }, + if instance.enable_zsa { 1 } else { 0 }, ])?; w.write_all(proof.as_ref())?; @@ -1344,8 +1366,15 @@ mod tests { crate::note::ExtractedNoteCommitment::from_bytes(&read_32_bytes(&mut r)).unwrap(); let enable_spend = read_bool(&mut r); let enable_output = read_bool(&mut r); - let instance = - Instance::from_parts(anchor, cv_net, nf_old, rk, cmx, enable_spend, enable_output); + let enable_zsa = read_bool(&mut r); + let instance = Instance::from_parts( + anchor, + cv_net, + nf_old, + rk, + cmx, + Flags::from_parts(enable_spend, enable_output, enable_zsa), + ); let mut proof_bytes = vec![]; r.read_to_end(&mut proof_bytes)?; @@ -1533,6 +1562,7 @@ mod tests { cmx, enable_spend: true, enable_output: true, + enable_zsa: true, }, ) } @@ -1573,6 +1603,7 @@ mod tests { cmx: instance.cmx, enable_spend: instance.enable_spend, enable_output: instance.enable_output, + enable_zsa: instance.enable_zsa, }; check_proof_of_orchard_circuit(&circuit, &instance_wrong_cv_net, false); @@ -1586,6 +1617,7 @@ mod tests { cmx: instance.cmx, enable_spend: instance.enable_spend, enable_output: instance.enable_output, + enable_zsa: instance.enable_zsa, }; check_proof_of_orchard_circuit(&circuit, &instance_wrong_rk, false); @@ -1627,6 +1659,7 @@ mod tests { cmx: random_note_commitment(&mut rng).into(), enable_spend: instance.enable_spend, enable_output: instance.enable_output, + enable_zsa: instance.enable_zsa, }; check_proof_of_orchard_circuit(&circuit, &instance_wrong_cmx_pub, false); @@ -1640,6 +1673,7 @@ mod tests { cmx: instance.cmx, enable_spend: instance.enable_spend, enable_output: instance.enable_output, + enable_zsa: instance.enable_zsa, }; check_proof_of_orchard_circuit(&circuit, &instance_wrong_nf_old_pub, false); @@ -1672,6 +1706,22 @@ mod tests { }; check_proof_of_orchard_circuit(&circuit_wrong_psi_nf, &instance, false); } + + // If asset is not equal to the native asset, set enable_zsa = 0 + // The proof should fail + if !is_native_asset { + let instance_wrong_enable_zsa = Instance { + anchor: instance.anchor, + cv_net: instance.cv_net.clone(), + nf_old: instance.nf_old, + rk: instance.rk.clone(), + cmx: instance.cmx, + enable_spend: instance.enable_spend, + enable_output: instance.enable_output, + enable_zsa: false, + }; + check_proof_of_orchard_circuit(&circuit, &instance_wrong_enable_zsa, false); + } } } } diff --git a/src/circuit_description b/src/circuit_description index 7a9d35f07..cffc54ff8 100644 --- a/src/circuit_description +++ b/src/circuit_description @@ -1002,6 +1002,93 @@ 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( + Sum( + Constant( + 0x0000000000000000000000000000000000000000000000000000000000000001, + ), + Negated( + Advice { + query_index: 16, + column_index: 6, + rotation: Rotation( + 1, + ), + }, + ), + ), + Sum( + Constant( + 0x0000000000000000000000000000000000000000000000000000000000000001, + ), + Negated( + Advice { + query_index: 9, + column_index: 9, + rotation: Rotation( + 0, + ), + }, + ), + ), + ), + ), Product( Product( Product( @@ -1146,7 +1233,7 @@ PinnedVerificationKey { Product( Scaled( Advice { - query_index: 17, + query_index: 18, column_index: 9, rotation: Rotation( -1, @@ -1155,7 +1242,7 @@ PinnedVerificationKey { 0x0000000000000000000000000000000000000000000000000000000000000400, ), Advice { - query_index: 16, + query_index: 17, column_index: 9, rotation: Rotation( 1, @@ -3764,7 +3851,7 @@ PinnedVerificationKey { Negated( Scaled( Advice { - query_index: 17, + query_index: 18, column_index: 9, rotation: Rotation( -1, @@ -3790,7 +3877,7 @@ PinnedVerificationKey { Negated( Scaled( Advice { - query_index: 17, + query_index: 18, column_index: 9, rotation: Rotation( -1, @@ -4008,7 +4095,7 @@ PinnedVerificationKey { Negated( Scaled( Advice { - query_index: 17, + query_index: 18, column_index: 9, rotation: Rotation( -1, @@ -4569,7 +4656,7 @@ PinnedVerificationKey { Negated( Scaled( Advice { - query_index: 17, + query_index: 18, column_index: 9, rotation: Rotation( -1, @@ -4595,7 +4682,7 @@ PinnedVerificationKey { Negated( Scaled( Advice { - query_index: 17, + query_index: 18, column_index: 9, rotation: Rotation( -1, @@ -4813,7 +4900,7 @@ PinnedVerificationKey { Negated( Scaled( Advice { - query_index: 17, + query_index: 18, column_index: 9, rotation: Rotation( -1, @@ -5312,7 +5399,7 @@ PinnedVerificationKey { Product( Sum( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -5328,7 +5415,7 @@ PinnedVerificationKey { ), Sum( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -5339,14 +5426,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, @@ -5355,7 +5442,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -5647,7 +5734,7 @@ PinnedVerificationKey { Negated( Scaled( Advice { - query_index: 20, + query_index: 21, column_index: 6, rotation: Rotation( -1, @@ -5673,7 +5760,7 @@ PinnedVerificationKey { Negated( Scaled( Advice { - query_index: 20, + query_index: 21, column_index: 6, rotation: Rotation( -1, @@ -5875,7 +5962,7 @@ PinnedVerificationKey { Negated( Scaled( Advice { - query_index: 20, + query_index: 21, column_index: 6, rotation: Rotation( -1, @@ -5996,7 +6083,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -6148,7 +6235,7 @@ PinnedVerificationKey { }, Negated( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -6235,7 +6322,7 @@ PinnedVerificationKey { Product( Sum( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -6251,7 +6338,7 @@ PinnedVerificationKey { ), Sum( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -6262,14 +6349,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, @@ -6278,7 +6365,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -6404,7 +6491,7 @@ PinnedVerificationKey { Negated( Scaled( Advice { - query_index: 20, + query_index: 21, column_index: 6, rotation: Rotation( -1, @@ -6430,7 +6517,7 @@ PinnedVerificationKey { Negated( Scaled( Advice { - query_index: 20, + query_index: 21, column_index: 6, rotation: Rotation( -1, @@ -6648,7 +6735,7 @@ PinnedVerificationKey { Negated( Scaled( Advice { - query_index: 20, + query_index: 21, column_index: 6, rotation: Rotation( -1, @@ -6785,7 +6872,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -6953,7 +7040,7 @@ PinnedVerificationKey { }, Negated( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -7037,7 +7124,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -7137,7 +7224,7 @@ PinnedVerificationKey { Product( Sum( Advice { - query_index: 16, + query_index: 17, column_index: 9, rotation: Rotation( 1, @@ -7149,7 +7236,7 @@ PinnedVerificationKey { 0x0000000000000000000000000000000000000000000000000000000000000002, ), Advice { - query_index: 17, + query_index: 18, column_index: 9, rotation: Rotation( -1, @@ -7165,7 +7252,7 @@ PinnedVerificationKey { Negated( Sum( Advice { - query_index: 16, + query_index: 17, column_index: 9, rotation: Rotation( 1, @@ -7177,7 +7264,7 @@ PinnedVerificationKey { 0x0000000000000000000000000000000000000000000000000000000000000002, ), Advice { - query_index: 17, + query_index: 18, column_index: 9, rotation: Rotation( -1, @@ -7282,7 +7369,7 @@ PinnedVerificationKey { Product( Sum( Advice { - query_index: 16, + query_index: 17, column_index: 9, rotation: Rotation( 1, @@ -7294,7 +7381,7 @@ PinnedVerificationKey { 0x0000000000000000000000000000000000000000000000000000000000000002, ), Advice { - query_index: 17, + query_index: 18, column_index: 9, rotation: Rotation( -1, @@ -7313,7 +7400,7 @@ PinnedVerificationKey { }, Negated( Advice { - query_index: 21, + query_index: 22, column_index: 1, rotation: Rotation( -1, @@ -7330,7 +7417,7 @@ PinnedVerificationKey { Negated( Sum( Advice { - query_index: 16, + query_index: 17, column_index: 9, rotation: Rotation( 1, @@ -7342,7 +7429,7 @@ PinnedVerificationKey { 0x0000000000000000000000000000000000000000000000000000000000000002, ), Advice { - query_index: 17, + query_index: 18, column_index: 9, rotation: Rotation( -1, @@ -7362,7 +7449,7 @@ PinnedVerificationKey { ), }, Advice { - query_index: 21, + query_index: 22, column_index: 1, rotation: Rotation( -1, @@ -7557,7 +7644,7 @@ PinnedVerificationKey { Sum( Sum( Advice { - query_index: 20, + query_index: 21, column_index: 6, rotation: Rotation( -1, @@ -7757,7 +7844,7 @@ PinnedVerificationKey { ), }, Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -7867,7 +7954,7 @@ PinnedVerificationKey { ), }, Advice { - query_index: 22, + query_index: 16, column_index: 6, rotation: Rotation( 1, @@ -7878,7 +7965,7 @@ PinnedVerificationKey { ), ), Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -7977,7 +8064,7 @@ PinnedVerificationKey { Product( Sum( Advice { - query_index: 16, + query_index: 17, column_index: 9, rotation: Rotation( 1, @@ -8003,7 +8090,7 @@ PinnedVerificationKey { Negated( Sum( Advice { - query_index: 16, + query_index: 17, column_index: 9, rotation: Rotation( 1, @@ -8118,7 +8205,7 @@ PinnedVerificationKey { Product( Sum( Advice { - query_index: 16, + query_index: 17, column_index: 9, rotation: Rotation( 1, @@ -8153,7 +8240,7 @@ PinnedVerificationKey { Negated( Sum( Advice { - query_index: 16, + query_index: 17, column_index: 9, rotation: Rotation( 1, @@ -8287,7 +8374,7 @@ PinnedVerificationKey { Product( Sum( Advice { - query_index: 16, + query_index: 17, column_index: 9, rotation: Rotation( 1, @@ -8322,7 +8409,7 @@ PinnedVerificationKey { Negated( Sum( Advice { - query_index: 16, + query_index: 17, column_index: 9, rotation: Rotation( 1, @@ -10684,7 +10771,7 @@ PinnedVerificationKey { }, Sum( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -10790,7 +10877,7 @@ PinnedVerificationKey { Product( Sum( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -10799,7 +10886,7 @@ PinnedVerificationKey { Negated( Scaled( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -10816,7 +10903,7 @@ PinnedVerificationKey { Negated( Sum( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -10825,7 +10912,7 @@ PinnedVerificationKey { Negated( Scaled( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -10921,7 +11008,7 @@ PinnedVerificationKey { ), }, Advice { - query_index: 22, + query_index: 16, column_index: 6, rotation: Rotation( 1, @@ -11341,7 +11428,7 @@ PinnedVerificationKey { Sum( Sum( Advice { - query_index: 20, + query_index: 21, column_index: 6, rotation: Rotation( -1, @@ -11709,7 +11796,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 22, + query_index: 16, column_index: 6, rotation: Rotation( 1, @@ -12054,7 +12141,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -12399,7 +12486,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -12939,7 +13026,7 @@ PinnedVerificationKey { Sum( Scaled( Advice { - query_index: 22, + query_index: 16, column_index: 6, rotation: Rotation( 1, @@ -12949,7 +13036,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -12960,7 +13047,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -13095,7 +13182,7 @@ PinnedVerificationKey { Sum( Scaled( Advice { - query_index: 22, + query_index: 16, column_index: 6, rotation: Rotation( 1, @@ -13105,7 +13192,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -13116,7 +13203,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -13251,7 +13338,7 @@ PinnedVerificationKey { Sum( Scaled( Advice { - query_index: 22, + query_index: 16, column_index: 6, rotation: Rotation( 1, @@ -13261,7 +13348,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -13272,7 +13359,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -13359,7 +13446,7 @@ PinnedVerificationKey { Sum( Sum( Advice { - query_index: 20, + query_index: 21, column_index: 6, rotation: Rotation( -1, @@ -13375,7 +13462,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 22, + query_index: 16, column_index: 6, rotation: Rotation( 1, @@ -13475,7 +13562,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -13566,7 +13653,7 @@ PinnedVerificationKey { }, Negated( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -15156,14 +15243,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, @@ -15183,14 +15270,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, @@ -15209,7 +15296,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 22, + query_index: 16, column_index: 6, rotation: Rotation( 1, @@ -15250,7 +15337,7 @@ PinnedVerificationKey { 0x0000000000000000000000000000000000000000000000000000000000000002, ), Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -15767,7 +15854,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 16, + query_index: 17, column_index: 9, rotation: Rotation( 1, @@ -15886,7 +15973,7 @@ PinnedVerificationKey { Negated( Scaled( Advice { - query_index: 22, + query_index: 16, column_index: 6, rotation: Rotation( 1, @@ -15898,7 +15985,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -16012,7 +16099,7 @@ PinnedVerificationKey { Sum( Sum( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -16130,7 +16217,7 @@ PinnedVerificationKey { ), Sum( Advice { - query_index: 22, + query_index: 16, column_index: 6, rotation: Rotation( 1, @@ -16139,7 +16226,7 @@ PinnedVerificationKey { Negated( Sum( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -16147,7 +16234,7 @@ PinnedVerificationKey { }, Scaled( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -17543,7 +17630,7 @@ PinnedVerificationKey { ), }, Advice { - query_index: 22, + query_index: 16, column_index: 6, rotation: Rotation( 1, @@ -17673,7 +17760,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -17779,7 +17866,7 @@ PinnedVerificationKey { ), }, Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -17989,7 +18076,7 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -18001,7 +18088,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -18131,7 +18218,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -18142,7 +18229,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -18498,7 +18585,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -18509,7 +18596,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -18860,7 +18947,7 @@ PinnedVerificationKey { }, Scaled( Advice { - query_index: 22, + query_index: 16, column_index: 6, rotation: Rotation( 1, @@ -18871,7 +18958,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -19204,7 +19291,7 @@ PinnedVerificationKey { ), Sum( Advice { - query_index: 22, + query_index: 16, column_index: 6, rotation: Rotation( 1, @@ -19233,7 +19320,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -19699,7 +19786,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -19829,7 +19916,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -19928,7 +20015,7 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -20033,7 +20120,7 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -20138,14 +20225,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, @@ -20280,7 +20367,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -20438,7 +20525,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -20553,7 +20640,7 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -20674,14 +20761,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, @@ -20963,7 +21050,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -21121,7 +21208,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -21236,7 +21323,7 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -21357,14 +21444,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, @@ -21500,7 +21587,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 22, + query_index: 16, column_index: 6, rotation: Rotation( 1, @@ -21511,7 +21598,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -21669,7 +21756,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -21784,14 +21871,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, @@ -21905,7 +21992,7 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -22026,14 +22113,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, @@ -22304,7 +22391,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 22, + query_index: 16, column_index: 6, rotation: Rotation( 1, @@ -22589,7 +22676,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -22832,7 +22919,7 @@ PinnedVerificationKey { ), }, Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -22953,7 +23040,7 @@ PinnedVerificationKey { ), }, Advice { - query_index: 16, + query_index: 17, column_index: 9, rotation: Rotation( 1, @@ -23195,7 +23282,7 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -23207,7 +23294,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -23353,7 +23440,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -23364,7 +23451,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -23768,7 +23855,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -23779,7 +23866,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -24178,7 +24265,7 @@ PinnedVerificationKey { }, Scaled( Advice { - query_index: 22, + query_index: 16, column_index: 6, rotation: Rotation( 1, @@ -24189,7 +24276,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -24570,7 +24657,7 @@ PinnedVerificationKey { ), Sum( Advice { - query_index: 22, + query_index: 16, column_index: 6, rotation: Rotation( 1, @@ -24599,7 +24686,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -25129,7 +25216,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -25275,7 +25362,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -25390,7 +25477,7 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -25511,7 +25598,7 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -25632,14 +25719,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, @@ -25774,7 +25861,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -25932,7 +26019,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -26047,7 +26134,7 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -26168,14 +26255,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, @@ -26409,7 +26496,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -26519,7 +26606,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -26586,7 +26673,7 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -26659,14 +26746,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, @@ -26754,7 +26841,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 22, + query_index: 16, column_index: 6, rotation: Rotation( 1, @@ -26765,7 +26852,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -26875,7 +26962,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -26942,14 +27029,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, @@ -27015,7 +27102,7 @@ PinnedVerificationKey { ), Product( Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -27088,14 +27175,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, @@ -27270,7 +27357,7 @@ PinnedVerificationKey { ), Scaled( Advice { - query_index: 22, + query_index: 16, column_index: 6, rotation: Rotation( 1, @@ -27459,7 +27546,7 @@ PinnedVerificationKey { ), Negated( Advice { - query_index: 19, + query_index: 20, column_index: 8, rotation: Rotation( 1, @@ -27606,7 +27693,7 @@ PinnedVerificationKey { ), }, Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -27679,7 +27766,7 @@ PinnedVerificationKey { ), }, Advice { - query_index: 16, + query_index: 17, column_index: 9, rotation: Rotation( 1, @@ -27942,6 +28029,15 @@ PinnedVerificationKey { 1, ), ), + ( + Column { + index: 6, + column_type: Advice, + }, + Rotation( + 1, + ), + ), ( Column { index: 9, @@ -27996,15 +28092,6 @@ PinnedVerificationKey { -1, ), ), - ( - Column { - index: 6, - column_type: Advice, - }, - Rotation( - 1, - ), - ), ( Column { index: 7, @@ -28402,7 +28489,7 @@ PinnedVerificationKey { Negated( Scaled( Advice { - query_index: 16, + query_index: 17, column_index: 9, rotation: Rotation( 1, @@ -28762,7 +28849,7 @@ PinnedVerificationKey { ), ), Advice { - query_index: 18, + query_index: 19, column_index: 7, rotation: Rotation( 1, @@ -29006,14 +29093,14 @@ PinnedVerificationKey { ], permutation: VerifyingKey { commitments: [ - (0x3b61bede3f87e9208caf3626fbe7a645e1b9f9b241a96160c68b708196e86cbb, 0x0932e9c67d6bb593c9b3d6bd9697efe79bb2f81bee35abeaa8a2a0a828d8fcc6), + (0x26d7150d98acf5efa7739440641d97629e2d6553547920432e43d747b998d49e, 0x3223285fb44e1736e7216cd51276087bce39f7e5c0fdb1ef49ab4c6de26b256d), (0x07800024b352149368405f222a8dfbf373bd4603df89929a5d00f7ac9ffac504, 0x250be8a84de9a8ded91e85860f1b1751f6bd2c0aba96329ee2d6f0e377f4679f), (0x3384b0dbfa6553ad5adf0b218df2cbe6243c33102a97774b4e023ec1dc2d83e9, 0x2873fe49458cd70b9d72419e0d6a6ceadb8070f4b62a0bb47c58a89269e0b583), (0x38def0fd8f233ef8651a28ffb7ae6f1e4eaeb0acec19453a3e5a0d70b2058782, 0x0512c67736284a225f0b6617cabd76ac2e4a6805940af4480798ca884e02d277), (0x26b6d69fd8c13013c6ab5fb74bd3fbe85d01b0abb57e149ff53e77a535c6bf40, 0x05ae4f52e4ab72ff3cf2b64df6d371fda270f4f78ed0bccce8e3138d4e30e4a0), (0x3f1b6f3ea5a2b24646dbe1c6f7c7dbf797fe6602a344bed59668ba5413519631, 0x0401a6f6ed893aa112f234127f8c30ee6e09b45f75993351aea9974389b261d6), (0x2f34843015cfc9c9ff59c7ecab3cbb6aea69dcf6f5af79e166f25d90f70353d5, 0x2bcfde5880412d171705b41124b404a323697c4d1008b2e8b2bf9966e5809d3d), - (0x1241f0e0058575ff769809aa569ab0ff12d5b2d7d840eae76912c16433be00ff, 0x33339365e1edbdb387b0a0b7dc5a9212c0313bb0a131c9302bc57db36174f3b0), + (0x082e9af26adc31f97c38ce587ffde9af5d8238d16ad61a236bbd3c805515f144, 0x051d36eb85b6402dfb2a55ae1507b358319d016483d7ecf6be49793bbb64e79e), (0x240a361e73afa04a2e5cc578680e54bf28e3375dbb35a8918c3cdbc91f1bc25b, 0x161c53e65c1b6500b576d8fa982e2565dbe35954840b0bab8a3d912158b9dbe7), (0x32f883bbd63b0700f0150ea8d71f6f5d7cdcc4463289983d71e9bc104d4a5c28, 0x33aeb42bec794138b8db28696bd7cef4946a8a89edcbf3f8289655ff9f9129ee), (0x03f33d3064517ab1a8e538444013bd0d6b011f9923f8cb964763a88d6d7409e0, 0x16f534b6d12d9e011b951e374982f048f0bed808099fd3ed97cd827360f6fb65), diff --git a/src/circuit_proof_test_case.bin b/src/circuit_proof_test_case.bin index 9005e06bc..83ca7c053 100644 Binary files a/src/circuit_proof_test_case.bin and b/src/circuit_proof_test_case.bin differ diff --git a/tests/builder.rs b/tests/builder.rs index 506ef1154..5d69209ab 100644 --- a/tests/builder.rs +++ b/tests/builder.rs @@ -62,7 +62,7 @@ fn bundle_chain() { // Use the empty tree. let anchor = MerkleHashOrchard::empty_root(32.into()).into(); - let mut builder = Builder::new(Flags::from_parts(false, true), anchor); + let mut builder = Builder::new(Flags::from_parts(false, true, false), anchor); assert_eq!( builder.add_recipient( None, @@ -96,7 +96,7 @@ fn bundle_chain() { let (merkle_path, anchor) = build_merkle_path(¬e); - let mut builder = Builder::new(Flags::from_parts(true, true), anchor); + let mut builder = Builder::new(Flags::from_parts(true, true, false), anchor); assert_eq!(builder.add_spend(fvk, note, merkle_path), Ok(())); assert_eq!( builder.add_recipient( diff --git a/tests/zsa.rs b/tests/zsa.rs index 649d5e8cf..584b25b5b 100644 --- a/tests/zsa.rs +++ b/tests/zsa.rs @@ -189,7 +189,7 @@ fn create_native_note(keys: &Keychain) -> Note { // Use the empty tree. let anchor = MerkleHashOrchard::empty_root(32.into()).into(); - let mut builder = Builder::new(Flags::from_parts(false, true), anchor); + let mut builder = Builder::new(Flags::from_parts(false, true, false), anchor); assert_eq!( builder.add_recipient( None, @@ -244,7 +244,7 @@ fn build_and_verify_bundle( ) -> Result<(), String> { let rng = OsRng; let shielded_bundle: Bundle<_, i64> = { - let mut builder = Builder::new(Flags::from_parts(true, true), anchor); + let mut builder = Builder::new(Flags::from_parts(true, true, true), anchor); spends .iter()