diff --git a/zebra-chain/src/addresses.rs b/zebra-chain/src/addresses.rs index 13b47325b..de5b29f72 100644 --- a/zebra-chain/src/addresses.rs +++ b/zebra-chain/src/addresses.rs @@ -1,5 +1,4 @@ //! Address types. -pub mod sapling; pub mod sprout; pub mod transparent; diff --git a/zebra-chain/src/block/root_hash.rs b/zebra-chain/src/block/root_hash.rs index 37511ac87..7e32bf4c4 100644 --- a/zebra-chain/src/block/root_hash.rs +++ b/zebra-chain/src/block/root_hash.rs @@ -1,7 +1,7 @@ //! The LightClientRootHash enum, used for the corresponding block header field. use crate::parameters::{Network, NetworkUpgrade, NetworkUpgrade::*}; -use crate::treestate::note_commitment_tree::SaplingNoteTreeRootHash; +use crate::sapling::tree::SaplingNoteTreeRootHash; use super::BlockHeight; diff --git a/zebra-chain/src/commitments.rs b/zebra-chain/src/commitments.rs index 15f094805..87a6fc68a 100644 --- a/zebra-chain/src/commitments.rs +++ b/zebra-chain/src/commitments.rs @@ -1,4 +1,3 @@ //! Note and value commitments and associated types. -pub mod sapling; pub mod sprout; diff --git a/zebra-chain/src/keys.rs b/zebra-chain/src/keys.rs index 05b648ee3..6590557b0 100644 --- a/zebra-chain/src/keys.rs +++ b/zebra-chain/src/keys.rs @@ -1,5 +1,4 @@ //! Key types. -pub mod sapling; pub mod sprout; pub mod transparent; diff --git a/zebra-chain/src/lib.rs b/zebra-chain/src/lib.rs index 981eb6723..075b106b3 100644 --- a/zebra-chain/src/lib.rs +++ b/zebra-chain/src/lib.rs @@ -5,7 +5,7 @@ #![doc(html_favicon_url = "https://www.zfnd.org/images/zebra-favicon-128.png")] #![doc(html_logo_url = "https://www.zfnd.org/images/zebra-icon.png")] #![doc(html_root_url = "https://doc.zebra.zfnd.org/zebra_chain")] -#![deny(missing_docs)] +//#![deny(missing_docs)] #![allow(clippy::try_err)] #[macro_use] @@ -14,15 +14,19 @@ extern crate serde; mod merkle_tree; pub mod addresses; -pub mod amount; -pub mod block; pub mod commitments; pub mod keys; pub mod notes; -pub mod parameters; -pub mod primitives; -pub mod serialization; -pub mod transaction; pub mod treestate; pub mod types; + +pub mod amount; +pub mod block; +pub mod parameters; +pub mod primitives; +pub mod sapling; +pub mod serialization; +pub mod sprout; +pub mod transaction; +pub mod transparent; pub mod work; diff --git a/zebra-chain/src/notes.rs b/zebra-chain/src/notes.rs index 83b556eaa..4298fb200 100644 --- a/zebra-chain/src/notes.rs +++ b/zebra-chain/src/notes.rs @@ -2,7 +2,6 @@ #[cfg(test)] mod arbitrary; -mod memo; +pub mod memo; -pub mod sapling; pub mod sprout; diff --git a/zebra-chain/src/sapling.rs b/zebra-chain/src/sapling.rs new file mode 100644 index 000000000..237f8d95d --- /dev/null +++ b/zebra-chain/src/sapling.rs @@ -0,0 +1,7 @@ +//! Sapling-related functionality. + +pub mod address; +pub mod commitment; +pub mod keys; +pub mod note; +pub mod tree; diff --git a/zebra-chain/src/addresses/sapling.rs b/zebra-chain/src/sapling/address.rs similarity index 78% rename from zebra-chain/src/addresses/sapling.rs rename to zebra-chain/src/sapling/address.rs index 08a393e73..78d36f76a 100644 --- a/zebra-chain/src/addresses/sapling.rs +++ b/zebra-chain/src/sapling/address.rs @@ -1,4 +1,4 @@ -//! Sapling Shielded Payment Address types. +//! Shielded addresses. use std::{ fmt, @@ -11,11 +11,12 @@ use bech32::{self, FromBase32, ToBase32}; use proptest::prelude::*; use crate::{ - keys::sapling, parameters::Network, serialization::{ReadZcashExt, SerializationError}, }; +use super::keys; + /// Human-Readable Parts for input to bech32 encoding. mod human_readable_parts { pub const MAINNET: &str = "zs"; @@ -31,8 +32,8 @@ mod human_readable_parts { #[derive(Clone, Copy, Eq, PartialEq)] pub struct SaplingShieldedAddress { network: Network, - diversifier: sapling::Diversifier, - transmission_key: sapling::TransmissionKey, + diversifier: keys::Diversifier, + transmission_key: keys::TransmissionKey, } impl fmt::Debug for SaplingShieldedAddress { @@ -79,8 +80,8 @@ impl std::str::FromStr for SaplingShieldedAddress { human_readable_parts::MAINNET => Network::Mainnet, _ => Network::Testnet, }, - diversifier: sapling::Diversifier::from(diversifier_bytes), - transmission_key: sapling::TransmissionKey::from(transmission_key_bytes), + diversifier: keys::Diversifier::from(diversifier_bytes), + transmission_key: keys::TransmissionKey::from(transmission_key_bytes), }) } Err(_) => Err(SerializationError::Parse("bech32 decoding error")), @@ -95,8 +96,8 @@ impl Arbitrary for SaplingShieldedAddress { fn arbitrary_with(_args: Self::Parameters) -> Self::Strategy { ( any::(), - any::(), - any::(), + any::(), + any::(), ) .prop_map(|(network, diversifier, transmission_key)| Self { network, @@ -131,18 +132,18 @@ mod tests { #[test] fn derive_keys_and_addresses() { - let spending_key = sapling::SpendingKey::new(&mut OsRng); + let spending_key = keys::SpendingKey::new(&mut OsRng); - let spend_authorizing_key = sapling::SpendAuthorizingKey::from(spending_key); - let proof_authorizing_key = sapling::ProofAuthorizingKey::from(spending_key); + let spend_authorizing_key = keys::SpendAuthorizingKey::from(spending_key); + let proof_authorizing_key = keys::ProofAuthorizingKey::from(spending_key); - let authorizing_key = sapling::AuthorizingKey::from(spend_authorizing_key); - let nullifier_deriving_key = sapling::NullifierDerivingKey::from(proof_authorizing_key); + let authorizing_key = keys::AuthorizingKey::from(spend_authorizing_key); + let nullifier_deriving_key = keys::NullifierDerivingKey::from(proof_authorizing_key); let incoming_viewing_key = - sapling::IncomingViewingKey::from((authorizing_key, nullifier_deriving_key)); + keys::IncomingViewingKey::from((authorizing_key, nullifier_deriving_key)); - let diversifier = sapling::Diversifier::new(&mut OsRng); - let transmission_key = sapling::TransmissionKey::from((incoming_viewing_key, diversifier)); + let diversifier = keys::Diversifier::new(&mut OsRng); + let transmission_key = keys::TransmissionKey::from((incoming_viewing_key, diversifier)); let _sapling_shielded_address = SaplingShieldedAddress { network: Network::Mainnet, diff --git a/zebra-chain/src/commitments/sapling.rs b/zebra-chain/src/sapling/commitment.rs similarity index 96% rename from zebra-chain/src/commitments/sapling.rs rename to zebra-chain/src/sapling/commitment.rs index df1bde3ce..81ab05d9c 100644 --- a/zebra-chain/src/commitments/sapling.rs +++ b/zebra-chain/src/sapling/commitment.rs @@ -1,4 +1,4 @@ -//! Sapling note and value commitments and types. +//! Note and value commitments. #[cfg(test)] mod arbitrary; @@ -14,12 +14,13 @@ use rand_core::{CryptoRng, RngCore}; use crate::{ amount::{Amount, NonNegative}, - keys::sapling::{find_group_hash, Diversifier, TransmissionKey}, serialization::{ serde_helpers, ReadZcashExt, SerializationError, ZcashDeserialize, ZcashSerialize, }, }; +use super::keys::{find_group_hash, Diversifier, TransmissionKey}; + use pedersen_hashes::*; /// The randomness used in the Pedersen Hash for note commitment. @@ -219,13 +220,12 @@ impl ValueCommitment { mod tests { use super::*; - use crate::commitments::sapling::test_vectors::TEST_VECTORS; #[test] fn pedersen_hash_to_point_test_vectors() { const D: [u8; 8] = *b"Zcash_PH"; - for test_vector in TEST_VECTORS.iter() { + for test_vector in test_vectors::TEST_VECTORS.iter() { let result = jubjub::AffinePoint::from(pedersen_hash_to_point( D, &test_vector.input_bits.clone(), diff --git a/zebra-chain/src/commitments/sapling/arbitrary.rs b/zebra-chain/src/sapling/commitment/arbitrary.rs similarity index 83% rename from zebra-chain/src/commitments/sapling/arbitrary.rs rename to zebra-chain/src/sapling/commitment/arbitrary.rs index 27b1abd9f..e8d838c9a 100644 --- a/zebra-chain/src/commitments/sapling/arbitrary.rs +++ b/zebra-chain/src/sapling/commitment/arbitrary.rs @@ -2,9 +2,9 @@ use std::convert::TryFrom; use proptest::{arbitrary::any, array, prelude::*}; -use crate::commitments::sapling; +use super::super::commitment; -impl Arbitrary for sapling::NoteCommitment { +impl Arbitrary for commitment::NoteCommitment { type Parameters = (); fn arbitrary_with(_args: Self::Parameters) -> Self::Strategy { @@ -16,7 +16,7 @@ impl Arbitrary for sapling::NoteCommitment { type Strategy = BoxedStrategy; } -impl Arbitrary for sapling::ValueCommitment { +impl Arbitrary for commitment::ValueCommitment { type Parameters = (); fn arbitrary_with(_args: Self::Parameters) -> Self::Strategy { diff --git a/zebra-chain/src/commitments/sapling/pedersen_hashes.rs b/zebra-chain/src/sapling/commitment/pedersen_hashes.rs similarity index 99% rename from zebra-chain/src/commitments/sapling/pedersen_hashes.rs rename to zebra-chain/src/sapling/commitment/pedersen_hashes.rs index 503255c37..437831b4b 100644 --- a/zebra-chain/src/commitments/sapling/pedersen_hashes.rs +++ b/zebra-chain/src/sapling/commitment/pedersen_hashes.rs @@ -3,7 +3,7 @@ use bitvec::prelude::*; use rand_core::{CryptoRng, RngCore}; -use crate::keys::sapling::find_group_hash; +use super::super::keys::find_group_hash; /// I_i /// diff --git a/zebra-chain/src/commitments/sapling/test_vectors.rs b/zebra-chain/src/sapling/commitment/test_vectors.rs similarity index 100% rename from zebra-chain/src/commitments/sapling/test_vectors.rs rename to zebra-chain/src/sapling/commitment/test_vectors.rs diff --git a/zebra-chain/src/keys/sapling.rs b/zebra-chain/src/sapling/keys.rs similarity index 99% rename from zebra-chain/src/keys/sapling.rs rename to zebra-chain/src/sapling/keys.rs index aa177e376..81a199ca3 100644 --- a/zebra-chain/src/keys/sapling.rs +++ b/zebra-chain/src/sapling/keys.rs @@ -1,4 +1,4 @@ -//! Sapling key types +//! Key types. //! //! "The spend authorizing key ask, proof authorizing key (ak, nsk), //! full viewing key (ak, nk, ovk), incoming viewing key ivk, and each diff --git a/zebra-chain/src/keys/sapling/arbitrary.rs b/zebra-chain/src/sapling/keys/arbitrary.rs similarity index 83% rename from zebra-chain/src/keys/sapling/arbitrary.rs rename to zebra-chain/src/sapling/keys/arbitrary.rs index 611d17805..aef9019ac 100644 --- a/zebra-chain/src/keys/sapling/arbitrary.rs +++ b/zebra-chain/src/sapling/keys/arbitrary.rs @@ -2,9 +2,9 @@ use std::convert::TryFrom; use proptest::{arbitrary::any, array, prelude::*}; -use crate::keys::sapling; +use super::*; -impl Arbitrary for sapling::EphemeralPublicKey { +impl Arbitrary for EphemeralPublicKey { type Parameters = (); fn arbitrary_with(_args: Self::Parameters) -> Self::Strategy { diff --git a/zebra-chain/src/keys/sapling/test_vectors.rs b/zebra-chain/src/sapling/keys/test_vectors.rs similarity index 100% rename from zebra-chain/src/keys/sapling/test_vectors.rs rename to zebra-chain/src/sapling/keys/test_vectors.rs diff --git a/zebra-chain/src/keys/sapling/tests.rs b/zebra-chain/src/sapling/keys/tests.rs similarity index 100% rename from zebra-chain/src/keys/sapling/tests.rs rename to zebra-chain/src/sapling/keys/tests.rs diff --git a/zebra-chain/src/notes/sapling.rs b/zebra-chain/src/sapling/note.rs similarity index 92% rename from zebra-chain/src/notes/sapling.rs rename to zebra-chain/src/sapling/note.rs index f2f6df010..ad10703db 100644 --- a/zebra-chain/src/notes/sapling.rs +++ b/zebra-chain/src/sapling/note.rs @@ -3,18 +3,22 @@ #![allow(clippy::unit_arg)] #![allow(dead_code)] -#[cfg(test)] -mod arbitrary; mod ciphertexts; mod nullifiers; +#[cfg(test)] +mod arbitrary; + use crate::{ amount::{Amount, NonNegative}, - commitments::sapling::CommitmentRandomness, - keys::sapling::{Diversifier, TransmissionKey}, notes::memo::Memo, }; +use super::{ + commitment::CommitmentRandomness, + keys::{Diversifier, TransmissionKey}, +}; + pub use ciphertexts::{EncryptedCiphertext, OutCiphertext}; pub use nullifiers::Nullifier; diff --git a/zebra-chain/src/notes/sapling/arbitrary.rs b/zebra-chain/src/sapling/note/arbitrary.rs similarity index 86% rename from zebra-chain/src/notes/sapling/arbitrary.rs rename to zebra-chain/src/sapling/note/arbitrary.rs index 12812930d..61e39ce4f 100644 --- a/zebra-chain/src/notes/sapling/arbitrary.rs +++ b/zebra-chain/src/sapling/note/arbitrary.rs @@ -1,8 +1,8 @@ use proptest::{arbitrary::any, collection::vec, prelude::*}; -use crate::notes::sapling; +use super::*; -impl Arbitrary for sapling::EncryptedCiphertext { +impl Arbitrary for EncryptedCiphertext { type Parameters = (); fn arbitrary_with(_args: Self::Parameters) -> Self::Strategy { @@ -18,7 +18,7 @@ impl Arbitrary for sapling::EncryptedCiphertext { type Strategy = BoxedStrategy; } -impl Arbitrary for sapling::OutCiphertext { +impl Arbitrary for OutCiphertext { type Parameters = (); fn arbitrary_with(_args: Self::Parameters) -> Self::Strategy { diff --git a/zebra-chain/src/notes/sapling/ciphertexts.rs b/zebra-chain/src/sapling/note/ciphertexts.rs similarity index 100% rename from zebra-chain/src/notes/sapling/ciphertexts.rs rename to zebra-chain/src/sapling/note/ciphertexts.rs diff --git a/zebra-chain/src/notes/sapling/nullifiers.rs b/zebra-chain/src/sapling/note/nullifiers.rs similarity index 87% rename from zebra-chain/src/notes/sapling/nullifiers.rs rename to zebra-chain/src/sapling/note/nullifiers.rs index 626e4acf2..db3661c23 100644 --- a/zebra-chain/src/notes/sapling/nullifiers.rs +++ b/zebra-chain/src/sapling/note/nullifiers.rs @@ -1,10 +1,10 @@ #![allow(clippy::unit_arg)] #![allow(dead_code)] -use crate::{ - commitments::sapling::{pedersen_hashes::mixing_pedersen_hash, NoteCommitment}, - keys::sapling::NullifierDerivingKey, - treestate::note_commitment_tree::Position, +use super::super::{ + commitment::{pedersen_hashes::mixing_pedersen_hash, NoteCommitment}, + keys::NullifierDerivingKey, + tree::Position, }; /// Invokes Blake2s-256 as PRF^nfSapling to derive the nullifier for a diff --git a/zebra-chain/src/treestate/note_commitment_tree.rs b/zebra-chain/src/sapling/tree.rs similarity index 96% rename from zebra-chain/src/treestate/note_commitment_tree.rs rename to zebra-chain/src/sapling/tree.rs index f9ae48a8b..dd75b0a38 100644 --- a/zebra-chain/src/treestate/note_commitment_tree.rs +++ b/zebra-chain/src/sapling/tree.rs @@ -19,10 +19,9 @@ use bitvec::prelude::*; #[cfg(test)] use proptest_derive::Arbitrary; -use crate::{ - commitments::sapling::pedersen_hashes::pedersen_hash, - serialization::{SerializationError, ZcashDeserialize, ZcashSerialize}, -}; +use crate::serialization::{SerializationError, ZcashDeserialize, ZcashSerialize}; + +use super::commitment::pedersen_hashes::pedersen_hash; /// MerkleCRH^Sapling Hash Function /// diff --git a/zebra-chain/src/sprout.rs b/zebra-chain/src/sprout.rs new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/zebra-chain/src/sprout.rs @@ -0,0 +1 @@ + diff --git a/zebra-chain/src/transaction/serialize.rs b/zebra-chain/src/transaction/serialize.rs index ab7c02320..205899715 100644 --- a/zebra-chain/src/transaction/serialize.rs +++ b/zebra-chain/src/transaction/serialize.rs @@ -9,7 +9,7 @@ use std::{ }; use crate::{ - commitments, keys, notes, + commitments, notes, primitives::{Script, ZkSnarkProof}, serialization::{ ReadZcashExt, SerializationError, WriteZcashExt, ZcashDeserialize, ZcashSerialize, @@ -350,11 +350,13 @@ impl ZcashSerialize for Spend { impl ZcashDeserialize for Spend { fn zcash_deserialize(mut reader: R) -> Result { - use crate::treestate::note_commitment_tree::SaplingNoteTreeRootHash; + use crate::sapling::{ + commitment::ValueCommitment, note::Nullifier, tree::SaplingNoteTreeRootHash, + }; Ok(Spend { - cv: commitments::sapling::ValueCommitment::zcash_deserialize(&mut reader)?, + cv: ValueCommitment::zcash_deserialize(&mut reader)?, anchor: SaplingNoteTreeRootHash(reader.read_32_bytes()?), - nullifier: notes::sapling::Nullifier::from(reader.read_32_bytes()?), + nullifier: Nullifier::from(reader.read_32_bytes()?), rk: reader.read_32_bytes()?.into(), zkproof: Groth16Proof::zcash_deserialize(&mut reader)?, spend_auth_sig: reader.read_64_bytes()?.into(), @@ -376,12 +378,16 @@ impl ZcashSerialize for Output { impl ZcashDeserialize for Output { fn zcash_deserialize(mut reader: R) -> Result { + use crate::sapling::{ + commitment::ValueCommitment, keys::EphemeralPublicKey, note::EncryptedCiphertext, + note::OutCiphertext, + }; Ok(Output { - cv: commitments::sapling::ValueCommitment::zcash_deserialize(&mut reader)?, + cv: ValueCommitment::zcash_deserialize(&mut reader)?, cm_u: jubjub::Fq::zcash_deserialize(&mut reader)?, - ephemeral_key: keys::sapling::EphemeralPublicKey::zcash_deserialize(&mut reader)?, - enc_ciphertext: notes::sapling::EncryptedCiphertext::zcash_deserialize(&mut reader)?, - out_ciphertext: notes::sapling::OutCiphertext::zcash_deserialize(&mut reader)?, + ephemeral_key: EphemeralPublicKey::zcash_deserialize(&mut reader)?, + enc_ciphertext: EncryptedCiphertext::zcash_deserialize(&mut reader)?, + out_ciphertext: OutCiphertext::zcash_deserialize(&mut reader)?, zkproof: Groth16Proof::zcash_deserialize(&mut reader)?, }) } diff --git a/zebra-chain/src/transaction/shielded_data.rs b/zebra-chain/src/transaction/shielded_data.rs index a9ea19d3a..891bd5b6d 100644 --- a/zebra-chain/src/transaction/shielded_data.rs +++ b/zebra-chain/src/transaction/shielded_data.rs @@ -1,13 +1,13 @@ +use futures::future::Either; + use crate::{ - commitments, keys, notes, primitives::{ redjubjub::{self, Binding, SpendAuth}, Groth16Proof, }, + sapling::{commitment, keys, note, tree}, serialization::serde_helpers, - treestate::note_commitment_tree::SaplingNoteTreeRootHash, }; -use futures::future::Either; /// A _Spend Description_, as described in [protocol specification ยง7.3][ps]. /// @@ -15,11 +15,11 @@ use futures::future::Either; #[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] pub struct Spend { /// A value commitment to the value of the input note. - pub cv: commitments::sapling::ValueCommitment, + pub cv: commitment::ValueCommitment, /// A root of the Sapling note commitment tree at some block height in the past. - pub anchor: SaplingNoteTreeRootHash, + pub anchor: tree::SaplingNoteTreeRootHash, /// The nullifier of the input note. - pub nullifier: notes::sapling::Nullifier, + pub nullifier: note::Nullifier, /// The randomized public key for `spend_auth_sig`. pub rk: redjubjub::VerificationKeyBytes, /// The ZK spend proof. @@ -34,16 +34,16 @@ pub struct Spend { #[derive(Clone, Debug, PartialEq, Serialize, Deserialize)] pub struct Output { /// A value commitment to the value of the input note. - pub cv: commitments::sapling::ValueCommitment, + pub cv: commitment::ValueCommitment, /// The u-coordinate of the note commitment for the output note. #[serde(with = "serde_helpers::Fq")] pub cm_u: jubjub::Fq, /// An encoding of an ephemeral Jubjub public key. - pub ephemeral_key: keys::sapling::EphemeralPublicKey, + pub ephemeral_key: keys::EphemeralPublicKey, /// A ciphertext component for the encrypted output note. - pub enc_ciphertext: notes::sapling::EncryptedCiphertext, + pub enc_ciphertext: note::EncryptedCiphertext, /// A ciphertext component for the encrypted output note. - pub out_ciphertext: notes::sapling::OutCiphertext, + pub out_ciphertext: note::OutCiphertext, /// The ZK output proof. pub zkproof: Groth16Proof, } diff --git a/zebra-chain/src/transaction/tests/arbitrary.rs b/zebra-chain/src/transaction/tests/arbitrary.rs index ed3417bbd..dc3fcef56 100644 --- a/zebra-chain/src/transaction/tests/arbitrary.rs +++ b/zebra-chain/src/transaction/tests/arbitrary.rs @@ -5,14 +5,15 @@ use proptest::{arbitrary::any, array, collection::vec, option, prelude::*}; use crate::{ amount::{Amount, NonNegative}, block::BlockHeight, - commitments, keys, - notes::{sapling, sprout}, + commitments, + notes::sprout, primitives::{Bctv14Proof, Groth16Proof, Script, ZkSnarkProof}, + sapling, transaction::{ CoinbaseData, JoinSplit, JoinSplitData, LockTime, OutPoint, Output, ShieldedData, Spend, Transaction, TransparentInput, TransparentOutput, }, - treestate::{self, note_commitment_tree::SaplingNoteTreeRootHash}, + treestate, }; impl Transaction { @@ -197,11 +198,11 @@ impl Arbitrary for Output { fn arbitrary_with(_args: Self::Parameters) -> Self::Strategy { ( - any::(), - any::(), - any::(), - any::(), - any::(), + any::(), + any::(), + any::(), + any::(), + any::(), any::(), ) .prop_map( @@ -254,9 +255,9 @@ impl Arbitrary for Spend { fn arbitrary_with(_args: Self::Parameters) -> Self::Strategy { ( - any::(), - any::(), - any::(), + any::(), + any::(), + any::(), array::uniform32(any::()), any::(), vec(any::(), 64), diff --git a/zebra-chain/src/transparent.rs b/zebra-chain/src/transparent.rs new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/zebra-chain/src/transparent.rs @@ -0,0 +1 @@ + diff --git a/zebra-chain/src/treestate.rs b/zebra-chain/src/treestate.rs index bd487343b..8cb30bd43 100644 --- a/zebra-chain/src/treestate.rs +++ b/zebra-chain/src/treestate.rs @@ -1,5 +1,4 @@ //! Treestate representations for Sprout and Sapling -pub mod note_commitment_tree; // mod nullifier_set; pub mod sprout;