diff --git a/zebra-chain/src/block.rs b/zebra-chain/src/block.rs index 584173c8..caf2e80e 100644 --- a/zebra-chain/src/block.rs +++ b/zebra-chain/src/block.rs @@ -185,7 +185,7 @@ impl Block { /// Positive values are added to the corresponding chain value pool. /// Negative values are removed from the corresponding pool. /// - /// https://zebra.zfnd.org/dev/rfcs/0012-value-pools.html#definitions + /// /// /// `utxos` must contain the [`Utxo`]s of every input in this block, /// including UTXOs created by earlier transactions in this block. diff --git a/zebra-chain/src/block/header.rs b/zebra-chain/src/block/header.rs index 53b133d7..171cce7d 100644 --- a/zebra-chain/src/block/header.rs +++ b/zebra-chain/src/block/header.rs @@ -85,7 +85,7 @@ pub struct Header { /// TODO: Use this error as the source for zebra_consensus::error::BlockError::Time, /// and make `BlockError::Time` add additional context. -/// See https://github.com/ZcashFoundation/zebra/issues/1021 for more details. +/// See for more details. #[allow(missing_docs)] #[derive(Error, Debug)] pub enum BlockTimeError { @@ -100,7 +100,7 @@ pub enum BlockTimeError { impl Header { /// TODO: Inline this function into zebra_consensus::block::check::time_is_valid_at. - /// See https://github.com/ZcashFoundation/zebra/issues/1021 for more details. + /// See for more details. pub fn time_is_valid_at( &self, now: DateTime, diff --git a/zebra-chain/src/orchard/commitment.rs b/zebra-chain/src/orchard/commitment.rs index e4de9366..2d33d446 100644 --- a/zebra-chain/src/orchard/commitment.rs +++ b/zebra-chain/src/orchard/commitment.rs @@ -26,7 +26,7 @@ use super::{ /// Generates a random scalar from the scalar field 𝔽_{q_P}. /// -/// https://zips.z.cash/protocol/nu5.pdf#pallasandvesta +/// pub fn generate_trapdoor(csprng: &mut T) -> pallas::Scalar where T: RngCore + CryptoRng, @@ -44,7 +44,7 @@ pub struct CommitmentRandomness(pallas::Scalar); impl From for CommitmentRandomness { /// rcm = ToScalar^Orchard((PRF^expand_rseed ([5])) /// - /// https://zips.z.cash/protocol/nu5.pdf#orchardsend + /// fn from(rseed: SeedRandomness) -> Self { Self(pallas::Scalar::from_bytes_wide(&prf_expand( rseed.0, @@ -111,7 +111,7 @@ impl NoteCommitment { /// /// NoteCommit^Orchard_rcm(repr_P(gd),repr_P(pkd), v, ρ, ψ) := /// - /// https://zips.z.cash/protocol/nu5.pdf#concretewindowedcommit + /// #[allow(non_snake_case)] pub fn new(note: Note) -> Option { // s as in the argument name for WindowedPedersenCommit_r(s) @@ -156,7 +156,7 @@ impl NoteCommitment { /// A homomorphic Pedersen commitment to the net value of a _note_, used in /// Action descriptions. /// -/// https://zips.z.cash/protocol/nu5.pdf#concretehomomorphiccommit +/// #[derive(Clone, Copy, Deserialize, PartialEq, Eq, Serialize)] pub struct ValueCommitment(#[serde(with = "serde_helpers::Affine")] pub pallas::Affine); @@ -209,7 +209,7 @@ impl From for ValueCommitment { /// LEBS2OSP256(repr_P(cv)) /// -/// https://zips.z.cash/protocol/nu5.pdf#pallasandvesta +/// impl From for [u8; 32] { fn from(cm: ValueCommitment) -> [u8; 32] { cm.0.to_bytes() @@ -252,7 +252,7 @@ impl std::iter::Sum for ValueCommitment { /// LEBS2OSP256(repr_P(cv)) /// -/// https://zips.z.cash/protocol/nu5.pdf#pallasandvesta +/// impl TryFrom<[u8; 32]> for ValueCommitment { type Error = &'static str; @@ -283,7 +283,7 @@ impl ZcashDeserialize for ValueCommitment { impl ValueCommitment { /// Generate a new _ValueCommitment_. /// - /// https://zips.z.cash/protocol/nu5.pdf#concretehomomorphiccommit + /// pub fn randomized(csprng: &mut T, value: Amount) -> Self where T: RngCore + CryptoRng, @@ -297,7 +297,7 @@ impl ValueCommitment { /// /// ValueCommit^Orchard(v) := /// - /// https://zips.z.cash/protocol/nu5.pdf#concretehomomorphiccommit + /// #[allow(non_snake_case)] pub fn new(rcv: pallas::Scalar, value: Amount) -> Self { lazy_static! { diff --git a/zebra-chain/src/orchard/note.rs b/zebra-chain/src/orchard/note.rs index bf7e7c09..544ae0c5 100644 --- a/zebra-chain/src/orchard/note.rs +++ b/zebra-chain/src/orchard/note.rs @@ -42,7 +42,7 @@ impl SeedRandomness { /// for the actual output note. When creating a dummy note, its _rho_ is chosen /// as a random Pallas point's x-coordinate. /// -/// https://zips.z.cash/protocol/nu5.pdf#orcharddummynotes +/// #[derive(Clone, Debug)] pub struct Rho(pub(crate) pallas::Base); diff --git a/zebra-chain/src/orchard/shielded_data.rs b/zebra-chain/src/orchard/shielded_data.rs index 41b2b826..7a2fb5fe 100644 --- a/zebra-chain/src/orchard/shielded_data.rs +++ b/zebra-chain/src/orchard/shielded_data.rs @@ -97,7 +97,7 @@ impl ShieldedData { /// of the value commitments in the Action descriptions of the transaction, and /// the balancing value. /// - /// https://zips.z.cash/protocol/protocol.pdf#orchardbalance + /// pub fn binding_verification_key(&self) -> redpallas::VerificationKeyBytes { let cv: ValueCommitment = self.actions().map(|action| action.cv).sum(); let cv_balance: ValueCommitment = @@ -162,7 +162,7 @@ impl AuthorizedAction { /// Actions are 5 * 32 + 580 + 80 bytes so the total size of each Action is 820 bytes. /// [7.5 Action Description Encoding and Consensus][ps] /// -/// [ps] https://zips.z.cash/protocol/nu5.pdf#actionencodingandconsensus +/// [ps] pub const ACTION_SIZE: u64 = 5 * 32 + 580 + 80; /// The size of a single Signature @@ -170,7 +170,7 @@ pub const ACTION_SIZE: u64 = 5 * 32 + 580 + 80; /// Each Signature is 64 bytes. /// [7.1 Transaction Encoding and Consensus][ps] /// -/// [ps] https://zips.z.cash/protocol/nu5.pdf#actionencodingandconsensus +/// [ps] pub const SPEND_AUTH_SIG_SIZE: u64 = 64; /// The size of a single AuthorizedAction diff --git a/zebra-chain/src/orchard/sinsemilla.rs b/zebra-chain/src/orchard/sinsemilla.rs index 4210431f..6928a20d 100644 --- a/zebra-chain/src/orchard/sinsemilla.rs +++ b/zebra-chain/src/orchard/sinsemilla.rs @@ -167,7 +167,7 @@ pub fn sinsemilla_hash(D: &[u8], M: &BitVec) -> Option { /// /// SinsemillaCommit_r(D, M) := SinsemillaHashToPoint(D || "-M", M) + [r]GroupHash^P(D || "-r", "") /// -/// https://zips.z.cash/protocol/nu5.pdf#concretesinsemillacommit +/// #[allow(non_snake_case)] pub fn sinsemilla_commit( r: pallas::Scalar, @@ -180,7 +180,7 @@ pub fn sinsemilla_commit( /// SinsemillaShortCommit_r(D, M) := Extract⊥ P(SinsemillaCommit_r(D, M)) /// -/// https://zips.z.cash/protocol/nu5.pdf#concretesinsemillacommit +/// #[allow(non_snake_case)] pub fn sinsemilla_short_commit( r: pallas::Scalar, diff --git a/zebra-chain/src/orchard/tests/vectors/key_components.rs b/zebra-chain/src/orchard/tests/vectors/key_components.rs index 95591679..c7a2606b 100644 --- a/zebra-chain/src/orchard/tests/vectors/key_components.rs +++ b/zebra-chain/src/orchard/tests/vectors/key_components.rs @@ -1,7 +1,7 @@ //! Test vectors for generating Orchard keys, addresses, notes, note //! commitments, and nullifiers. //! -//! Produced by https://github.com/zcash-hackworks/zcash-test-vectors/blob/ec5fe3abef5219d0f8c9edbc93bb4038f1729dfe/orchard_key_components.py +//! Produced by #![allow(dead_code)] diff --git a/zebra-chain/src/orchard/tree.rs b/zebra-chain/src/orchard/tree.rs index b7432084..06eb48e7 100644 --- a/zebra-chain/src/orchard/tree.rs +++ b/zebra-chain/src/orchard/tree.rs @@ -48,8 +48,8 @@ pub(super) const MERKLE_DEPTH: usize = 32; /// l = I2LEBSP_10(MerkleDepth^Orchard − 1 − layer), and left, right, and /// the output are the x-coordinates of Pallas affine points. /// -/// https://zips.z.cash/protocol/protocol.pdf#orchardmerklecrh -/// https://zips.z.cash/protocol/protocol.pdf#constants +/// +/// fn merkle_crh_orchard(layer: u8, left: pallas::Base, right: pallas::Base) -> pallas::Base { let mut s = bitvec![u8, Lsb0;]; @@ -70,7 +70,7 @@ lazy_static! { /// /// The list is indexed by the layer number (0: root; MERKLE_DEPTH: leaf). /// - /// https://zips.z.cash/protocol/protocol.pdf#constants + /// pub(super) static ref EMPTY_ROOTS: Vec = { // The empty leaf node. This is layer 32. let mut v = vec![NoteCommitmentTree::uncommitted()]; diff --git a/zebra-chain/src/parameters/network.rs b/zebra-chain/src/parameters/network.rs index c10dfd58..b6abd95e 100644 --- a/zebra-chain/src/parameters/network.rs +++ b/zebra-chain/src/parameters/network.rs @@ -27,7 +27,7 @@ mod tests; /// > plaintext according to the preceding rule MUST have note plaintext lead byte equal to 0x02. /// > (This applies even during the “grace period” specified in [ZIP-212].) /// -/// https://zips.z.cash/protocol/protocol.pdf#txnencodingandconsensus +/// /// /// Wallets have a grace period of 32,256 blocks after Canopy's activation to validate those blocks, /// but nodes do not. @@ -38,7 +38,7 @@ mod tests; /// > Let ActivationHeight be the activation height of this ZIP, and let GracePeriodEndHeight be /// > ActivationHeight + 32256. /// -/// https://zips.z.cash/zip-0212#changes-to-the-process-of-receiving-sapling-or-orchard-notes +/// /// /// Zebra uses `librustzcash` to validate that rule, but it won't validate it during the grace /// period. Therefore Zebra must validate those blocks during the grace period using checkpoints. diff --git a/zebra-chain/src/parameters/network_upgrade.rs b/zebra-chain/src/parameters/network_upgrade.rs index a3fc1c78..1a917804 100644 --- a/zebra-chain/src/parameters/network_upgrade.rs +++ b/zebra-chain/src/parameters/network_upgrade.rs @@ -207,18 +207,18 @@ pub const POW_AVERAGING_WINDOW: usize = 17; /// The multiplier used to derive the testnet minimum difficulty block time gap /// threshold. /// -/// Based on https://zips.z.cash/zip-0208#minimum-difficulty-blocks-on-the-test-network +/// Based on const TESTNET_MINIMUM_DIFFICULTY_GAP_MULTIPLIER: i32 = 6; /// The start height for the testnet minimum difficulty consensus rule. /// -/// Based on https://zips.z.cash/zip-0208#minimum-difficulty-blocks-on-the-test-network +/// Based on const TESTNET_MINIMUM_DIFFICULTY_START_HEIGHT: block::Height = block::Height(299_188); /// The activation height for the block maximum time rule on Testnet. /// /// Part of the block header consensus rules in the Zcash specification at -/// https://zips.z.cash/protocol/protocol.pdf#blockheader +/// pub const TESTNET_MAX_TIME_START_HEIGHT: block::Height = block::Height(653_606); impl NetworkUpgrade { @@ -370,7 +370,7 @@ impl NetworkUpgrade { /// Returns the minimum difficulty block spacing for `network` and `height`. /// Returns `None` if the testnet minimum difficulty consensus rule is not active. /// - /// Based on https://zips.z.cash/zip-0208#minimum-difficulty-blocks-on-the-test-network + /// Based on pub fn minimum_difficulty_spacing_for_height( network: Network, height: block::Height, @@ -440,7 +440,7 @@ impl NetworkUpgrade { /// TESTNET_MAX_TIME_START_HEIGHT to return true. /// Returns false otherwise. /// - /// Part of the consensus rules at https://zips.z.cash/protocol/protocol.pdf#blockheader + /// Part of the consensus rules at pub fn is_max_block_time_enforced(network: Network, height: block::Height) -> bool { match network { Network::Mainnet => true, diff --git a/zebra-chain/src/primitives/redpallas/signing_key.rs b/zebra-chain/src/primitives/redpallas/signing_key.rs index c9011178..bce9a3b0 100644 --- a/zebra-chain/src/primitives/redpallas/signing_key.rs +++ b/zebra-chain/src/primitives/redpallas/signing_key.rs @@ -86,7 +86,7 @@ impl SigningKey { /// Create a signature of type `T` on `msg` using this `SigningKey`. /// - /// https://zips.z.cash/protocol/nu5.pdf#concretereddsa + /// // Similar to signature::Signer but without boxed errors. pub fn sign(&self, mut rng: R, msg: &[u8]) -> Signature { use super::HStar; diff --git a/zebra-chain/src/primitives/zcash_primitives.rs b/zebra-chain/src/primitives/zcash_primitives.rs index b4a2c5da..8ddf35cb 100644 --- a/zebra-chain/src/primitives/zcash_primitives.rs +++ b/zebra-chain/src/primitives/zcash_primitives.rs @@ -259,7 +259,7 @@ pub(crate) fn sighash( /// /// If passed a pre-v5 transaction. /// -/// [ZIP-244]: https://zips.z.cash/zip-0244. +/// [ZIP-244]: https://zips.z.cash/zip-0244 pub(crate) fn auth_digest(trans: &Transaction) -> AuthDigest { let alt_tx: zp_tx::Transaction = trans .try_into() diff --git a/zebra-chain/src/sapling/commitment.rs b/zebra-chain/src/sapling/commitment.rs index 4668c2e4..ea69a0fe 100644 --- a/zebra-chain/src/sapling/commitment.rs +++ b/zebra-chain/src/sapling/commitment.rs @@ -32,7 +32,7 @@ use pedersen_hashes::*; /// the uniform distribution on 𝔽_{r_𝕁} needed for Sapling commitment schemes' /// trapdoor generators. /// -/// https://zips.z.cash/protocol/protocol.pdf#jubjub +/// pub fn generate_trapdoor(csprng: &mut T) -> jubjub::Fr where T: RngCore + CryptoRng, @@ -96,7 +96,7 @@ impl NoteCommitment { /// NoteCommit^Sapling_rcm (g*_d , pk*_d , v) := /// WindowedPedersenCommit_rcm([1; 6] || I2LEBSP_64(v) || g*_d || pk*_d) /// - /// https://zips.z.cash/protocol/protocol.pdf#concretewindowedcommit + /// #[allow(non_snake_case)] pub fn new( csprng: &mut T, @@ -142,7 +142,7 @@ impl NoteCommitment { /// Hash Extractor for Jubjub (?) /// - /// https://zips.z.cash/protocol/protocol.pdf#concreteextractorjubjub + /// pub fn extract_u(&self) -> jubjub::Fq { self.0.get_u() } @@ -154,7 +154,7 @@ impl NoteCommitment { /// type actually stored in Spend and Output descriptions, see /// [`NotSmallOrderValueCommitment`]. /// -/// https://zips.z.cash/protocol/protocol.pdf#concretehomomorphiccommit +/// #[derive(Clone, Copy, Deserialize, PartialEq, Eq, Serialize)] pub struct ValueCommitment(#[serde(with = "serde_helpers::AffinePoint")] jubjub::AffinePoint); @@ -199,8 +199,8 @@ impl From for ValueCommitment { /// LEBS2OSP256(repr_J(cv)) /// -/// https://zips.z.cash/protocol/protocol.pdf#spendencoding -/// https://zips.z.cash/protocol/protocol.pdf#jubjub +/// +/// impl From for [u8; 32] { fn from(cm: ValueCommitment) -> [u8; 32] { cm.0.to_bytes() @@ -243,8 +243,8 @@ impl std::iter::Sum for ValueCommitment { /// LEBS2OSP256(repr_J(cv)) /// -/// https://zips.z.cash/protocol/protocol.pdf#spendencoding -/// https://zips.z.cash/protocol/protocol.pdf#jubjub +/// +/// impl TryFrom<[u8; 32]> for ValueCommitment { type Error = &'static str; @@ -263,7 +263,7 @@ impl TryFrom<[u8; 32]> for ValueCommitment { impl ValueCommitment { /// Generate a new _ValueCommitment_. /// - /// https://zips.z.cash/protocol/protocol.pdf#concretehomomorphiccommit + /// pub fn randomized(csprng: &mut T, value: Amount) -> Self where T: RngCore + CryptoRng, @@ -275,7 +275,7 @@ impl ValueCommitment { /// Generate a new _ValueCommitment_ from an existing _rcv_ on a _value_. /// - /// https://zips.z.cash/protocol/protocol.pdf#concretehomomorphiccommit + /// #[allow(non_snake_case)] pub fn new(rcv: jubjub::Fr, value: Amount) -> Self { let v = jubjub::Fr::from(value); @@ -298,8 +298,8 @@ impl ValueCommitment { /// /// This is denoted by `cv` in the specification. /// -/// https://zips.z.cash/protocol/protocol.pdf#spenddesc -/// https://zips.z.cash/protocol/protocol.pdf#outputdesc +/// +/// #[derive(Debug, Clone, Copy, Deserialize, PartialEq, Eq, Serialize)] pub struct NotSmallOrderValueCommitment(ValueCommitment); diff --git a/zebra-chain/src/sapling/commitment/pedersen_hashes.rs b/zebra-chain/src/sapling/commitment/pedersen_hashes.rs index 26d5aabf..4f75c353 100644 --- a/zebra-chain/src/sapling/commitment/pedersen_hashes.rs +++ b/zebra-chain/src/sapling/commitment/pedersen_hashes.rs @@ -8,7 +8,7 @@ use super::super::keys::find_group_hash; /// /// Expects i to be 1-indexed from the loop it's called in. /// -/// https://zips.z.cash/protocol/protocol.pdf#concretepedersenhash +/// #[allow(non_snake_case)] fn I_i(domain: [u8; 8], i: u32) -> jubjub::ExtendedPoint { find_group_hash(domain, &(i - 1).to_le_bytes()) @@ -18,7 +18,7 @@ fn I_i(domain: [u8; 8], i: u32) -> jubjub::ExtendedPoint { /// /// Σ j={0,k-1}: (1 - 2x₂)⋅(1 + x₀ + 2x₁)⋅2^(4⋅j) /// -/// https://zips.z.cash/protocol/protocol.pdf#concretepedersenhash +/// #[allow(non_snake_case)] fn M_i(segment: &BitSlice) -> jubjub::Fr { let mut m_i = jubjub::Fr::zero(); @@ -66,7 +66,7 @@ fn M_i(segment: &BitSlice) -> jubjub::Fr { /// Sapling incremental Merkle tree (§ 5.4.1.3 'MerkleCRH^Sapling Hash /// Function'). /// -/// https://zips.z.cash/protocol/protocol.pdf#concretepedersenhash +/// #[allow(non_snake_case)] pub fn pedersen_hash_to_point(domain: [u8; 8], M: &BitVec) -> jubjub::ExtendedPoint { let mut result = jubjub::ExtendedPoint::identity(); @@ -92,7 +92,7 @@ pub fn pedersen_hash_to_point(domain: [u8; 8], M: &BitVec) -> jubjub:: /// /// This is technically returning 255 (l_MerkleSapling) bits, not 256. /// -/// https://zips.z.cash/protocol/protocol.pdf#concretepedersenhash +/// #[allow(non_snake_case)] pub fn pedersen_hash(domain: [u8; 8], M: &BitVec) -> jubjub::Fq { jubjub::AffinePoint::from(pedersen_hash_to_point(domain, M)).get_u() @@ -106,7 +106,7 @@ pub fn pedersen_hash(domain: [u8; 8], M: &BitVec) -> jubjub::Fq { /// /// MixingPedersenHash(P, x) := P + [x]FindGroupHash^J^(r)("Zcash_J_", "") /// -/// https://zips.z.cash/protocol/protocol.pdf#concretemixinghash +/// #[allow(non_snake_case)] pub fn mixing_pedersen_hash(P: jubjub::ExtendedPoint, x: jubjub::Fr) -> jubjub::ExtendedPoint { const J: [u8; 8] = *b"Zcash_J_"; @@ -120,7 +120,7 @@ pub fn mixing_pedersen_hash(P: jubjub::ExtendedPoint, x: jubjub::Fr) -> jubjub:: /// WindowedPedersenCommit_r (s) := \ /// PedersenHashToPoint("Zcash_PH", s) + [r]FindGroupHash^J^(r)("Zcash_PH", "r") /// -/// https://zips.z.cash/protocol/protocol.pdf#concretewindowedcommit +/// pub fn windowed_pedersen_commitment(r: jubjub::Fr, s: &BitVec) -> jubjub::ExtendedPoint { const D: [u8; 8] = *b"Zcash_PH"; diff --git a/zebra-chain/src/sapling/keys.rs b/zebra-chain/src/sapling/keys.rs index d738c894..b0737d2a 100644 --- a/zebra-chain/src/sapling/keys.rs +++ b/zebra-chain/src/sapling/keys.rs @@ -52,7 +52,7 @@ pub(super) const RANDOMNESS_BEACON_URS: &[u8; 64] = /// /// PRF^expand(sk, t) := BLAKE2b-512("Zcash_ExpandSeed", sk || t) /// -/// https://zips.z.cash/protocol/protocol.pdf#concreteprfs +/// fn prf_expand(sk: [u8; 32], t: &[u8]) -> [u8; 64] { let hash = blake2b_simd::Params::new() .hash_length(64) @@ -69,7 +69,7 @@ fn prf_expand(sk: [u8; 32], t: &[u8]) -> [u8; 64] { /// /// PRF^ock(ovk, cv, cm_u, ephemeralKey) := BLAKE2b-256(“Zcash_Derive_ock”, ovk || cv || cm_u || ephemeralKey) /// -/// https://zips.z.cash/protocol/nu5.pdf#concreteprfs +/// fn prf_ock(ovk: [u8; 32], cv: [u8; 32], cm_u: [u8; 32], ephemeral_key: [u8; 32]) -> [u8; 32] { let hash = blake2b_simd::Params::new() .hash_length(32) @@ -89,7 +89,7 @@ fn prf_ock(ovk: [u8; 32], cv: [u8; 32], cm_u: [u8; 32], ephemeral_key: [u8; 32]) /// /// _CRH^ivk(ak, nk) := BLAKE2s-256("Zcashivk", ak || nk)_ /// -/// https://zips.z.cash/protocol/protocol.pdf#concretecrhivk +/// fn crh_ivk(ak: [u8; 32], nk: [u8; 32]) -> [u8; 32] { let hash = blake2s_simd::Params::new() .hash_length(32) @@ -112,7 +112,7 @@ fn crh_ivk(ak: [u8; 32], nk: [u8; 32]) -> [u8; 32] { /// input. /// /// [0]: https://github.com/zcash/librustzcash/blob/master/zcash_primitives/src/group_hash.rs#L15 -/// https://zips.z.cash/protocol/protocol.pdf#concretegrouphashjubjub +/// fn jubjub_group_hash(d: [u8; 8], m: &[u8]) -> Option { let hash = blake2s_simd::Params::new() .hash_length(32) @@ -143,7 +143,7 @@ fn jubjub_group_hash(d: [u8; 8], m: &[u8]) -> Option { /// input. /// /// [0]: https://github.com/zcash/librustzcash/blob/master/zcash_primitives/src/jubjub/mod.rs#L409 -/// https://zips.z.cash/protocol/protocol.pdf#concretegrouphashjubjub +/// // TODO: move common functions like these out of the keys module into // a more appropriate location pub(super) fn find_group_hash(d: [u8; 8], m: &[u8]) -> jubjub::ExtendedPoint { @@ -167,14 +167,14 @@ pub(super) fn find_group_hash(d: [u8; 8], m: &[u8]) -> jubjub::ExtendedPoint { /// Instance of FindGroupHash for JubJub, using personalized by /// BLAKE2s for picking the proof generation key base point. /// -/// https://zips.z.cash/protocol/protocol.pdf#saplingkeycomponents +/// fn zcash_h() -> jubjub::ExtendedPoint { find_group_hash(*b"Zcash_H_", b"") } /// Used to derive a diversified base point from a diversifier value. /// -/// https://zips.z.cash/protocol/protocol.pdf#concretediversifyhash +/// fn diversify_hash(d: [u8; 11]) -> Option { jubjub_group_hash(*b"Zcash_gd", &d) } @@ -331,8 +331,8 @@ impl From for SpendAuthorizingKey { /// Invokes Blake2b-512 as _PRF^expand_, t=0, to derive a /// SpendAuthorizingKey from a SpendingKey. /// - /// https://zips.z.cash/protocol/protocol.pdf#saplingkeycomponents - /// https://zips.z.cash/protocol/protocol.pdf#concreteprfs + /// + /// fn from(spending_key: SpendingKey) -> SpendAuthorizingKey { let hash_bytes = prf_expand(spending_key.bytes, &[0]); @@ -388,8 +388,8 @@ impl From for [u8; 32] { impl From for ProofAuthorizingKey { /// For this invocation of Blake2b-512 as _PRF^expand_, t=1. /// - /// https://zips.z.cash/protocol/protocol.pdf#saplingkeycomponents - /// https://zips.z.cash/protocol/protocol.pdf#concreteprfs + /// + /// fn from(spending_key: SpendingKey) -> ProofAuthorizingKey { let hash_bytes = prf_expand(spending_key.bytes, &[1]); @@ -442,8 +442,8 @@ impl From for [u8; 32] { impl From for OutgoingViewingKey { /// For this invocation of Blake2b-512 as _PRF^expand_, t=2. /// - /// https://zips.z.cash/protocol/protocol.pdf#saplingkeycomponents - /// https://zips.z.cash/protocol/protocol.pdf#concreteprfs + /// + /// fn from(spending_key: SpendingKey) -> OutgoingViewingKey { let hash_bytes = prf_expand(spending_key.bytes, &[2]); @@ -575,9 +575,9 @@ impl From for NullifierDerivingKey { /// the resulting generator point to scalar multiply the /// ProofAuthorizingKey into the new NullifierDerivingKey /// - /// https://github.com/zcash/librustzcash/blob/master/zcash_primitives/src/group_hash.rs - /// https://zips.z.cash/protocol/protocol.pdf#saplingkeycomponents - /// https://zips.z.cash/protocol/protocol.pdf#concretegrouphashjubjub + /// + /// + /// fn from(nsk: ProofAuthorizingKey) -> Self { // Should this point, when generated, be fixed for the rest of // the protocol instance? Since this is kind of hash-and-pray, it @@ -668,9 +668,9 @@ impl From<[u8; 32]> for IncomingViewingKey { impl From<(AuthorizingKey, NullifierDerivingKey)> for IncomingViewingKey { /// For this invocation of Blake2s-256 as _CRH^ivk_. /// - /// https://zips.z.cash/protocol/protocol.pdf#saplingkeycomponents - /// https://zips.z.cash/protocol/protocol.pdf#concreteprfs - /// https://zips.z.cash/protocol/protocol.pdf#jubjub + /// + /// + /// // TODO: return None if ivk = 0 // // "If ivk = 0, discard this key and start over with a new @@ -815,8 +815,8 @@ impl Diversifier { /// as a preimage to a valid diversified base point when used to /// derive a diversified payment address. /// - /// https://zips.z.cash/protocol/protocol.pdf#saplingkeycomponents - /// https://zips.z.cash/protocol/protocol.pdf#concretediversifyhash + /// + /// pub fn new(csprng: &mut T) -> Self where T: RngCore + CryptoRng, @@ -870,8 +870,8 @@ impl TryFrom<[u8; 32]> for TransmissionKey { /// Attempts to interpret a byte representation of an affine Jubjub point, failing if the /// element is not on the curve, non-canonical, or not in the prime-order subgroup. /// - /// https://github.com/zkcrypto/jubjub/blob/master/src/lib.rs#L411 - /// https://zips.z.cash/zip-0216 + /// + /// fn try_from(bytes: [u8; 32]) -> Result { let affine_point = jubjub::AffinePoint::from_bytes(bytes).unwrap(); // Check if it's identity or has prime order (i.e. is in the prime-order subgroup). @@ -895,8 +895,8 @@ impl TryFrom<(IncomingViewingKey, Diversifier)> for TransmissionKey { /// This includes _KA^Sapling.DerivePublic(ivk, G_d)_, which is just a /// scalar mult _\[ivk\]G_d_. /// - /// https://zips.z.cash/protocol/protocol.pdf#saplingkeycomponents - /// https://zips.z.cash/protocol/protocol.pdf#concretesaplingkeyagreement + /// + /// fn try_from((ivk, d): (IncomingViewingKey, Diversifier)) -> Result { let affine_point = jubjub::AffinePoint::from( diversify_hash(d.0).ok_or("invalid diversifier")? * ivk.scalar, @@ -932,7 +932,7 @@ mod fvk_hrp { /// Human-Readable Part is "zviews". For incoming viewing keys on the /// test network, the Human-Readable Part is "zviewtestsapling". /// -/// https://zips.z.cash/protocol/protocol.pdf#saplingfullviewingkeyencoding +/// #[derive(Copy, Clone, Eq, PartialEq)] pub struct FullViewingKey { network: Network, diff --git a/zebra-chain/src/sapling/note/nullifiers.rs b/zebra-chain/src/sapling/note/nullifiers.rs index a3b8febd..ba0b2c2d 100644 --- a/zebra-chain/src/sapling/note/nullifiers.rs +++ b/zebra-chain/src/sapling/note/nullifiers.rs @@ -12,7 +12,7 @@ use super::super::{ /// /// PRF^nfSapling(ρ*) := BLAKE2s-256("Zcash_nf", nk* || ρ*) /// -/// https://zips.z.cash/protocol/protocol.pdf#concreteprfs +/// fn prf_nf(nk: [u8; 32], rho: [u8; 32]) -> [u8; 32] { let hash = blake2s_simd::Params::new() .hash_length(32) @@ -56,7 +56,7 @@ impl From for [u8; 32] { impl From for [jubjub::Fq; 2] { /// Add the nullifier through multiscalar packing /// - /// Informed by https://github.com/zkcrypto/bellman/blob/main/src/gadgets/multipack.rs + /// Informed by fn from(n: Nullifier) -> Self { use std::ops::AddAssign; diff --git a/zebra-chain/src/sapling/output.rs b/zebra-chain/src/sapling/output.rs index 30e6f09c..688605f9 100644 --- a/zebra-chain/src/sapling/output.rs +++ b/zebra-chain/src/sapling/output.rs @@ -41,7 +41,7 @@ pub struct Output { /// Wrapper for `Output` serialization in a `V4` transaction. /// -/// https://zips.z.cash/protocol/protocol.pdf#outputencoding +/// #[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] pub struct OutputInTransactionV4(pub Output); diff --git a/zebra-chain/src/sapling/tree.rs b/zebra-chain/src/sapling/tree.rs index 8d50332c..eab6bc7e 100644 --- a/zebra-chain/src/sapling/tree.rs +++ b/zebra-chain/src/sapling/tree.rs @@ -48,7 +48,7 @@ pub(super) const MERKLE_DEPTH: usize = 32; /// where l = I2LEBSP_6(MerkleDepth^Sapling − 1 − layer) and /// left, right, and the output are all technically 255 bits (l_MerkleSapling), not 256. /// -/// https://zips.z.cash/protocol/protocol.pdf#merklecrh +/// fn merkle_crh_sapling(layer: u8, left: [u8; 32], right: [u8; 32]) -> [u8; 32] { let mut s = bitvec![u8, Lsb0;]; @@ -66,7 +66,7 @@ lazy_static! { /// /// The list is indexed by the layer number (0: root; MERKLE_DEPTH: leaf). /// - /// https://zips.z.cash/protocol/protocol.pdf#constants + /// pub(super) static ref EMPTY_ROOTS: Vec<[u8; 32]> = { // The empty leaf node. This is layer 32. let mut v = vec![NoteCommitmentTree::uncommitted()]; @@ -88,7 +88,7 @@ lazy_static! { /// The index of a note's commitment at the leafmost layer of its Note /// Commitment Tree. /// -/// https://zips.z.cash/protocol/protocol.pdf#merkletree +/// pub struct Position(pub(crate) u64); /// Sapling note commitment tree root node hash. diff --git a/zebra-chain/src/sprout/address.rs b/zebra-chain/src/sprout/address.rs index b23c8dc7..14582eb1 100644 --- a/zebra-chain/src/sprout/address.rs +++ b/zebra-chain/src/sprout/address.rs @@ -21,7 +21,7 @@ mod magics { /// Sprout Shielded Payment Addresses /// -/// https://zips.z.cash/protocol/protocol.pdf#sproutpaymentaddrencoding +/// #[derive(Copy, Clone)] pub struct SproutShieldedAddress { network: Network, diff --git a/zebra-chain/src/sprout/commitment.rs b/zebra-chain/src/sprout/commitment.rs index fa61ed4f..05f46a09 100644 --- a/zebra-chain/src/sprout/commitment.rs +++ b/zebra-chain/src/sprout/commitment.rs @@ -35,7 +35,7 @@ impl From<[u8; 32]> for NoteCommitment { impl From for NoteCommitment { /// NoteCommit_rcm^Sprout(a_pk, v, rho) /// - /// https://zips.z.cash/protocol/protocol.pdf#concretesproutnotecommit + /// fn from(note: Note) -> NoteCommitment { let leading_byte: u8 = 0xB0; let mut hasher = Sha256::default(); diff --git a/zebra-chain/src/sprout/joinsplit.rs b/zebra-chain/src/sprout/joinsplit.rs index 32d4bae3..4d70884e 100644 --- a/zebra-chain/src/sprout/joinsplit.rs +++ b/zebra-chain/src/sprout/joinsplit.rs @@ -102,7 +102,7 @@ impl JoinSplit

{ /// Return the sprout value balance, /// the change in the transaction value pool due to this sprout [`JoinSplit`]. /// - /// https://zebra.zfnd.org/dev/rfcs/0012-value-pools.html#definitions + /// /// /// See [`Transaction::sprout_value_balance`] for details. pub fn value_balance(&self) -> Amount { diff --git a/zebra-chain/src/sprout/keys.rs b/zebra-chain/src/sprout/keys.rs index 55f40f5b..1015d30c 100644 --- a/zebra-chain/src/sprout/keys.rs +++ b/zebra-chain/src/sprout/keys.rs @@ -34,8 +34,8 @@ mod sk_magics { /// a spending key, and instantiated using the SHA-256 compression /// function. /// -/// https://zips.z.cash/protocol/protocol.pdf#abstractprfs -/// https://zips.z.cash/protocol/protocol.pdf#sproutkeycomponents +/// +/// fn prf_addr(x: [u8; 32], t: u8) -> [u8; 32] { let mut state = [0u32; 8]; let mut block = GenericArray::::default(); @@ -170,8 +170,8 @@ impl From for ReceivingKey { /// is populated by default in an empty block of all zeros to /// start. /// - /// https://zips.z.cash/protocol/protocol.pdf#sproutkeycomponents - /// https://zips.z.cash/protocol/protocol.pdf#concreteprfs + /// + /// fn from(spending_key: SpendingKey) -> ReceivingKey { let derived_bytes = prf_addr(spending_key.bytes, 0); @@ -204,8 +204,8 @@ impl fmt::Debug for PayingKey { impl From for PayingKey { /// For this invocation of SHA256Compress as PRF^addr, t=1. /// - /// https://zips.z.cash/protocol/protocol.pdf#sproutkeycomponents - /// https://zips.z.cash/protocol/protocol.pdf#concreteprfs + /// + /// fn from(spending_key: SpendingKey) -> PayingKey { let derived_bytes = prf_addr(spending_key.bytes, 1); diff --git a/zebra-chain/src/sprout/note.rs b/zebra-chain/src/sprout/note.rs index cd86e6a1..df5f3df7 100644 --- a/zebra-chain/src/sprout/note.rs +++ b/zebra-chain/src/sprout/note.rs @@ -26,7 +26,7 @@ pub use nullifiers::{Nullifier, NullifierSeed}; /// holds the spending key corresponding to a given shielded payment /// address. /// -/// https://zips.z.cash/protocol/protocol.pdf#notes +/// #[derive(Clone, Debug)] #[cfg_attr( any(test, feature = "proptest-impl"), diff --git a/zebra-chain/src/sprout/note/nullifiers.rs b/zebra-chain/src/sprout/note/nullifiers.rs index b9de721f..164f3b79 100644 --- a/zebra-chain/src/sprout/note/nullifiers.rs +++ b/zebra-chain/src/sprout/note/nullifiers.rs @@ -10,8 +10,8 @@ use super::super::keys::SpendingKey; /// spending key a_sk and a nullifier seed ρ, instantiated using the /// SHA-256 compression function. /// -/// https://zips.z.cash/protocol/protocol.pdf#abstractprfs -/// https://zips.z.cash/protocol/protocol.pdf#commitmentsandnullifiers +/// +/// fn prf_nf(a_sk: [u8; 32], rho: [u8; 32]) -> [u8; 32] { let mut state = [0u32; 8]; let mut block = GenericArray::::default(); diff --git a/zebra-chain/src/sprout/tree.rs b/zebra-chain/src/sprout/tree.rs index 1c009041..60cd5904 100644 --- a/zebra-chain/src/sprout/tree.rs +++ b/zebra-chain/src/sprout/tree.rs @@ -37,7 +37,7 @@ pub(super) const MERKLE_DEPTH: usize = 29; /// Note: the implementation of MerkleCRH^Sprout does not use the `layer` /// argument from the definition above since the argument does not affect the output. /// -/// [MerkleCRH^Sprout]: https://zips.z.cash/protocol/protocol.pdf#merklecrh. +/// [MerkleCRH^Sprout]: https://zips.z.cash/protocol/protocol.pdf#merklecrh fn merkle_crh_sprout(left: [u8; 32], right: [u8; 32]) -> [u8; 32] { let mut other_block = [0u8; 64]; other_block[..32].copy_from_slice(&left[..]); @@ -83,7 +83,7 @@ lazy_static! { /// The index of a note's commitment at the leafmost layer of its Note /// Commitment Tree. /// -/// https://zips.z.cash/protocol/protocol.pdf#merkletree +/// pub struct Position(pub(crate) u64); /// Sprout note commitment tree root node hash. diff --git a/zebra-chain/src/transaction.rs b/zebra-chain/src/transaction.rs index a5a652fd..e9afa82e 100644 --- a/zebra-chain/src/transaction.rs +++ b/zebra-chain/src/transaction.rs @@ -984,7 +984,7 @@ impl Transaction { /// Negative values are removed from the transparent chain value pool, /// and added to this transaction. /// - /// https://zebra.zfnd.org/dev/rfcs/0012-value-pools.html#definitions + /// /// /// `utxos` must contain the utxos of every input in the transaction, /// including UTXOs created by earlier transactions in this block. @@ -1247,7 +1247,7 @@ impl Transaction { /// Negative values are removed from this transaction, /// and added to the sprout pool. /// - /// https://zebra.zfnd.org/dev/rfcs/0012-value-pools.html#definitions + /// fn sprout_value_balance(&self) -> Result, ValueBalanceError> { self.sprout_joinsplit_value_balances().sum() } @@ -1262,7 +1262,7 @@ impl Transaction { /// Negative values are removed from this transaction, /// and added to sapling pool. /// - /// https://zebra.zfnd.org/dev/rfcs/0012-value-pools.html#definitions + /// pub fn sapling_value_balance(&self) -> ValueBalance { let sapling_value_balance = match self { Transaction::V4 { @@ -1329,7 +1329,7 @@ impl Transaction { /// Negative values are removed from this transaction, /// and added to orchard pool. /// - /// https://zebra.zfnd.org/dev/rfcs/0012-value-pools.html#definitions + /// pub fn orchard_value_balance(&self) -> ValueBalance { let orchard_value_balance = self .orchard_shielded_data() @@ -1375,7 +1375,7 @@ impl Transaction { /// Negative values are removed from this transaction, /// and added to the corresponding pool. /// - /// https://zebra.zfnd.org/dev/rfcs/0012-value-pools.html#definitions + /// /// /// `utxos` must contain the utxos of every input in the transaction, /// including UTXOs created by earlier transactions in this block. diff --git a/zebra-chain/src/transaction/joinsplit.rs b/zebra-chain/src/transaction/joinsplit.rs index 105ba09c..9882ce8a 100644 --- a/zebra-chain/src/transaction/joinsplit.rs +++ b/zebra-chain/src/transaction/joinsplit.rs @@ -83,7 +83,7 @@ impl JoinSplitData

{ /// Return the sprout value balance, /// the change in the transaction value pool due to sprout [`JoinSplit`]s. /// - /// https://zebra.zfnd.org/dev/rfcs/0012-value-pools.html#definitions + /// /// /// See [`Transaction::sprout_value_balance`] for details. pub fn value_balance(&self) -> Result, amount::Error> { diff --git a/zebra-chain/src/transaction/sighash.rs b/zebra-chain/src/transaction/sighash.rs index 4076c4a6..354430ed 100644 --- a/zebra-chain/src/transaction/sighash.rs +++ b/zebra-chain/src/transaction/sighash.rs @@ -9,7 +9,7 @@ use crate::primitives::zcash_primitives::sighash; static ZIP143_EXPLANATION: &str = "Invalid transaction version: after Overwinter activation transaction versions 1 and 2 are rejected"; bitflags::bitflags! { - /// The different SigHash types, as defined in https://zips.z.cash/zip-0143 + /// The different SigHash types, as defined in pub struct HashType: u32 { /// Sign all the outputs const ALL = 0b0000_0001; @@ -23,7 +23,7 @@ bitflags::bitflags! { } /// A Signature Hash (or SIGHASH) as specified in -/// https://zips.z.cash/protocol/protocol.pdf#sighash +/// #[derive(Copy, Clone, Eq, PartialEq, Debug)] pub struct SigHash(pub [u8; 32]); diff --git a/zebra-chain/src/transparent/address.rs b/zebra-chain/src/transparent/address.rs index 5fac5756..077167e2 100644 --- a/zebra-chain/src/transparent/address.rs +++ b/zebra-chain/src/transparent/address.rs @@ -40,7 +40,7 @@ mod magics { /// imply that a transparent Zcash address can be parsed identically /// to a Bitcoin address just by removing the "t".) /// -/// https://zips.z.cash/protocol/protocol.pdf#transparentaddrencoding +/// #[derive( Copy, Clone, Eq, PartialEq, Hash, serde_with::SerializeDisplay, serde_with::DeserializeFromStr, )] @@ -241,7 +241,7 @@ impl Address { /// /// The resulting hash in both of these cases is always exactly 20 /// bytes. - /// https://en.bitcoin.it/Base58Check_encoding#Encoding_a_Bitcoin_address + /// fn hash_payload(bytes: &[u8]) -> [u8; 20] { let sha_hash = Sha256::digest(bytes); let ripe_hash = Ripemd160::digest(&sha_hash); diff --git a/zebra-chain/src/work/difficulty/tests/vectors.rs b/zebra-chain/src/work/difficulty/tests/vectors.rs index 5a9c33fe..7e9ac06c 100644 --- a/zebra-chain/src/work/difficulty/tests/vectors.rs +++ b/zebra-chain/src/work/difficulty/tests/vectors.rs @@ -217,7 +217,7 @@ fn compact_extremes() { /// Bitcoin test vectors for CompactDifficulty, and their corresponding /// ExpandedDifficulty and Work values. -/// See https://developer.bitcoin.org/reference/block_chain.html#target-nbits +/// See static COMPACT_DIFFICULTY_CASES: &[(u32, Option, Option)] = &[ // These Work values will never happen in practice, because the corresponding // difficulties are extremely high. So it is ok for us to reject them. diff --git a/zebra-consensus/src/block.rs b/zebra-consensus/src/block.rs index 49d7edea..0711d199 100644 --- a/zebra-consensus/src/block.rs +++ b/zebra-consensus/src/block.rs @@ -83,7 +83,7 @@ pub enum VerifyBlockError { /// We re-use some `zcashd` C++ script code via `zebra-script` and `zcash_script`. /// /// See: -/// https://github.com/zcash/zcash/blob/bad7f7eadbbb3466bebe3354266c7f69f607fcfd/src/consensus/consensus.h#L30 +/// pub const MAX_BLOCK_SIGOPS: u64 = 20_000; impl BlockVerifier diff --git a/zebra-consensus/src/block/subsidy/funding_streams.rs b/zebra-consensus/src/block/subsidy/funding_streams.rs index ed090970..9801295b 100644 --- a/zebra-consensus/src/block/subsidy/funding_streams.rs +++ b/zebra-consensus/src/block/subsidy/funding_streams.rs @@ -122,7 +122,7 @@ pub fn funding_stream_address( /// Given a funding stream address, create a script and check if it is the same /// as the given lock_script as described in [protocol specification §7.10][7.10] /// -/// [7.10]: https://zips.z.cash/protocol/protocol.pdf#fundingstreams. +/// [7.10]: https://zips.z.cash/protocol/protocol.pdf#fundingstreams pub fn check_script_form(lock_script: &Script, address: Address) -> bool { let mut address_hash = address .zcash_serialize_to_vec() diff --git a/zebra-consensus/src/primitives/groth16.rs b/zebra-consensus/src/primitives/groth16.rs index 444c2a68..d45c454d 100644 --- a/zebra-consensus/src/primitives/groth16.rs +++ b/zebra-consensus/src/primitives/groth16.rs @@ -112,7 +112,7 @@ pub static OUTPUT_VERIFIER: Lazy< /// Global batch verification context for Groth16 proofs of JoinSplit statements. /// /// This service does not yet batch verifications, see -/// https://github.com/ZcashFoundation/zebra/issues/3127 +/// /// /// Note that making a `Service` call requires mutable access to the service, so /// you should call `.clone()` on the global handle to create a local, mutable @@ -249,7 +249,7 @@ impl Description for (&JoinSplit, &ed25519::VerificationKeyBytes) /// the transaction. (All JoinSplits in a transaction share the same validation key.) /// /// This is not yet officially documented; see the reference implementation: - /// https://github.com/zcash/librustzcash/blob/0ec7f97c976d55e1a194a37b27f247e8887fca1d/zcash_proofs/src/sprout.rs#L152-L166 + /// /// fn primary_inputs(&self) -> Vec { let (joinsplit, joinsplit_pub_key) = self; @@ -299,7 +299,7 @@ pub type Item = batch::Item; /// A wrapper to allow a TryFrom blanket implementation of the [`Description`] /// trait for the [`Item`] struct. -/// See https://github.com/rust-lang/rust/issues/50133 for more details. +/// See for more details. pub struct DescriptionWrapper(pub T); impl TryFrom> for Item diff --git a/zebra-consensus/src/transaction.rs b/zebra-consensus/src/transaction.rs index 3f19389f..b31be576 100644 --- a/zebra-consensus/src/transaction.rs +++ b/zebra-consensus/src/transaction.rs @@ -135,7 +135,7 @@ pub enum Response { /// > The remaining value in the transparent transaction value pool /// > of a coinbase transaction is destroyed. /// - /// https://zips.z.cash/protocol/protocol.pdf#transactions + /// miner_fee: Option>, /// The number of legacy signature operations in this transaction's diff --git a/zebra-consensus/src/transaction/check.rs b/zebra-consensus/src/transaction/check.rs index e77c5931..3db55b66 100644 --- a/zebra-consensus/src/transaction/check.rs +++ b/zebra-consensus/src/transaction/check.rs @@ -169,8 +169,8 @@ pub fn joinsplit_has_vpub_zero(tx: &Transaction) -> Result<(), TransactionError> /// Check if a transaction is adding to the sprout pool after Canopy /// network upgrade given a block height and a network. /// -/// https://zips.z.cash/zip-0211 -/// https://zips.z.cash/protocol/protocol.pdf#joinsplitdesc +/// +/// pub fn disabled_add_to_sprout_pool( tx: &Transaction, height: Height, @@ -211,13 +211,13 @@ pub fn disabled_add_to_sprout_pool( /// Any subsequent reference is a forbidden double spend- /// an attempt to spend the same satoshis twice." /// -/// https://developer.bitcoin.org/devguide/block_chain.html#introduction +/// /// /// A _nullifier_ *MUST NOT* repeat either within a _transaction_, or across _transactions_ in a /// _valid blockchain_ . *Sprout* and *Sapling* and *Orchard* _nulliers_ are considered disjoint, /// even if they have the same bit pattern. /// -/// https://zips.z.cash/protocol/protocol.pdf#nullifierset +/// pub fn spend_conflicts(transaction: &Transaction) -> Result<(), TransactionError> { use crate::error::TransactionError::*; @@ -284,7 +284,7 @@ where /// /// TODO: Currently, a 0x01 lead byte is allowed in the "grace period" mentioned since we're /// using `librustzcash` to implement this and it doesn't currently allow changing that behavior. -/// https://github.com/ZcashFoundation/zebra/issues/3027 +/// pub fn coinbase_outputs_are_decryptable( transaction: &Transaction, network: Network, @@ -309,8 +309,8 @@ pub fn coinbase_outputs_are_decryptable( /// Returns `Ok(())` if the expiry height for the coinbase transaction is valid /// according to specifications [7.1] and [ZIP-203]. /// -/// [7.1]: -/// [ZIP-203]: +/// [7.1]: https://zips.z.cash/protocol/protocol.pdf#txnencodingandconsensus +/// [ZIP-203]: https://zips.z.cash/zip-0203 pub fn coinbase_expiry_height( block_height: &Height, coinbase: &Transaction, @@ -351,8 +351,8 @@ pub fn coinbase_expiry_height( /// Returns `Ok(())` if the expiry height for a non coinbase transaction is /// valid according to specifications [7.1] and [ZIP-203]. /// -/// [7.1]: -/// [ZIP-203]: +/// [7.1]: https://zips.z.cash/protocol/protocol.pdf#txnencodingandconsensus +/// [ZIP-203]: https://zips.z.cash/zip-0203 pub fn non_coinbase_expiry_height( block_height: &Height, transaction: &Transaction, diff --git a/zebra-network/src/constants.rs b/zebra-network/src/constants.rs index 31df41c3..2e562315 100644 --- a/zebra-network/src/constants.rs +++ b/zebra-network/src/constants.rs @@ -194,13 +194,13 @@ pub const GET_ADDR_FANOUT: usize = 1; /// `addr`: /// > The number of IP address entries up to a maximum of 1,000. /// -/// https://developer.bitcoin.org/reference/p2p_networking.html#addr +/// /// /// `addrv2`: /// > One message can contain up to 1,000 addresses. /// > Clients MUST reject messages with more addresses. /// -/// https://zips.z.cash/zip-0155#specification +/// pub const MAX_ADDRS_IN_MESSAGE: usize = 1000; /// The fraction of addresses Zebra sends in response to a `Peers` request. @@ -316,8 +316,8 @@ lazy_static! { /// [6.1.3.3 Efficient Resource Usage] from [RFC 1123: Requirements for Internet Hosts] /// suggest no less than 5 seconds for resolving timeout. /// -/// [RFC 1123: Requirements for Internet Hosts] https://tools.ietf.org/rfcmarkup?doc=1123 -/// [6.1.3.3 Efficient Resource Usage] https://tools.ietf.org/rfcmarkup?doc=1123#page-77 +/// [RFC 1123: Requirements for Internet Hosts] +/// [6.1.3.3 Efficient Resource Usage] pub const DNS_LOOKUP_TIMEOUT: Duration = Duration::from_secs(5); /// Magic numbers used to identify different Zcash networks. diff --git a/zebra-network/src/peer/error.rs b/zebra-network/src/peer/error.rs index 7fb46e8b..223d7fdc 100644 --- a/zebra-network/src/peer/error.rs +++ b/zebra-network/src/peer/error.rs @@ -154,7 +154,7 @@ impl PeerError { /// > that provides non-async methods for performing operations on the data within, /// > and only lock the mutex inside these methods /// -/// https://docs.rs/tokio/1.15.0/tokio/sync/struct.Mutex.html#which-kind-of-mutex-should-you-use +/// #[derive(Default, Clone)] pub struct ErrorSlot(Arc>>); diff --git a/zebra-network/src/policies.rs b/zebra-network/src/policies.rs index 025eb2fc..9b97a7df 100644 --- a/zebra-network/src/policies.rs +++ b/zebra-network/src/policies.rs @@ -5,7 +5,7 @@ use tower::retry::Policy; /// A very basic retry policy with a limited number of retry attempts. /// -/// XXX Remove this when https://github.com/tower-rs/tower/pull/414 lands. +/// XXX Remove this when lands. #[derive(Copy, Clone, Debug, Eq, PartialEq, Hash)] pub struct RetryLimit { remaining_tries: usize, diff --git a/zebra-network/src/protocol/external/addr/v2.rs b/zebra-network/src/protocol/external/addr/v2.rs index 009d3b59..7d768f0d 100644 --- a/zebra-network/src/protocol/external/addr/v2.rs +++ b/zebra-network/src/protocol/external/addr/v2.rs @@ -39,31 +39,31 @@ use zebra_chain::serialization::{zcash_serialize_bytes, ZcashSerialize}; /// > Field addr has a variable length, with a maximum of 512 bytes (4096 bits). /// > Clients MUST reject messages with a longer addr field, irrespective of the network ID. /// -/// https://zips.z.cash/zip-0155#specification +/// pub const MAX_ADDR_V2_ADDR_SIZE: usize = 512; /// The network ID of [`Ipv4Addr`]s in `addrv2` messages. /// /// > 0x01 IPV4 4 IPv4 address (globally routed internet) /// -/// https://zips.z.cash/zip-0155#specification +/// pub const ADDR_V2_IPV4_NETWORK_ID: u8 = 0x01; /// The size of [`Ipv4Addr`]s in `addrv2` messages. /// -/// https://zips.z.cash/zip-0155#specification +/// pub const ADDR_V2_IPV4_ADDR_SIZE: usize = 4; /// The network ID of [`Ipv6Addr`]s in `addrv2` messages. /// /// > 0x02 IPV6 16 IPv6 address (globally routed internet) /// -/// https://zips.z.cash/zip-0155#specification +/// pub const ADDR_V2_IPV6_NETWORK_ID: u8 = 0x02; /// The size of [`Ipv6Addr`]s in `addrv2` messages. /// -/// https://zips.z.cash/zip-0155#specification +/// pub const ADDR_V2_IPV6_ADDR_SIZE: usize = 16; /// The second format used for Bitcoin node addresses. @@ -253,7 +253,7 @@ impl ZcashSerialize for AddrV2 { } /// Deserialize an `addrv2` entry according to: -/// https://zips.z.cash/zip-0155#specification +/// /// /// Unimplemented and unrecognised addresses are deserialized as [`AddrV2::Unsupported`]. /// (Deserialization consumes the correct number of bytes for unsupported addresses.) diff --git a/zebra-rpc/src/methods.rs b/zebra-rpc/src/methods.rs index eed188db..bbafb127 100644 --- a/zebra-rpc/src/methods.rs +++ b/zebra-rpc/src/methods.rs @@ -208,7 +208,7 @@ pub trait Rpc { /// # Notes /// /// Only the multi-argument format is used by lightwalletd and this is what we currently support: - /// https://github.com/zcash/lightwalletd/blob/631bb16404e3d8b045e74a7c5489db626790b2f6/common/common.go#L97-L102 + /// #[rpc(name = "getaddresstxids")] fn get_address_tx_ids(&self, request: GetAddressTxIdsRequest) -> BoxFuture>>; @@ -224,7 +224,7 @@ pub trait Rpc { /// # Notes /// /// lightwalletd always uses the multi-address request, without chaininfo: - /// https://github.com/zcash/lightwalletd/blob/master/frontend/service.go#L402 + /// #[rpc(name = "getaddressutxos")] fn get_address_utxos( &self, diff --git a/zebra-state/src/request.rs b/zebra-state/src/request.rs index ad7162a2..1007bcf0 100644 --- a/zebra-state/src/request.rs +++ b/zebra-state/src/request.rs @@ -399,7 +399,7 @@ pub enum Request { /// Returns /// /// [`Response::BlockHashes(Vec)`](Response::BlockHashes). - /// See https://en.bitcoin.it/wiki/Protocol_documentation#getblocks + /// See FindBlockHashes { /// Hashes of known blocks, ordered from highest height to lowest height. known_blocks: Vec, @@ -422,7 +422,7 @@ pub enum Request { /// Returns /// /// [`Response::BlockHeaders(Vec)`](Response::BlockHeaders). - /// See https://en.bitcoin.it/wiki/Protocol_documentation#getheaders + /// See FindBlockHeaders { /// Hashes of known blocks, ordered from highest height to lowest height. known_blocks: Vec, diff --git a/zebra-state/src/service/check/nullifier.rs b/zebra-state/src/service/check/nullifier.rs index b7cde265..ac2adfc1 100644 --- a/zebra-state/src/service/check/nullifier.rs +++ b/zebra-state/src/service/check/nullifier.rs @@ -22,7 +22,7 @@ use crate::{ /// > Sprout and Sapling and Orchard nullifiers are considered disjoint, /// > even if they have the same bit pattern. /// -/// https://zips.z.cash/protocol/protocol.pdf#nullifierset +/// #[tracing::instrument(skip(prepared, finalized_state))] pub(crate) fn no_duplicates_in_finalized_chain( prepared: &PreparedBlock, @@ -67,7 +67,7 @@ pub(crate) fn no_duplicates_in_finalized_chain( /// > Sprout and Sapling and Orchard nullifiers are considered disjoint, /// > even if they have the same bit pattern. /// -/// https://zips.z.cash/protocol/protocol.pdf#nullifierset +/// /// /// We comply with the "disjoint" rule by storing the nullifiers for each /// pool in separate sets (also with different types), so that even if @@ -104,7 +104,7 @@ where /// to a different best valid block chain that does not contain /// the transaction in which a note was output" /// -/// https://zips.z.cash/protocol/nu5.pdf#decryptivk +/// /// /// Note: reorganizations can also change the best chain to one /// where a note was unspent, rather than spent. diff --git a/zebra-state/src/service/check/utxo.rs b/zebra-state/src/service/check/utxo.rs index 00fe5fbb..24242c64 100644 --- a/zebra-state/src/service/check/utxo.rs +++ b/zebra-state/src/service/check/utxo.rs @@ -103,14 +103,14 @@ pub fn transparent_spend( /// This ensures that any program parsing block chain transactions linearly /// will encounter each output before it is used as an input." /// -/// https://developer.bitcoin.org/reference/block_chain.html#merkle-trees +/// /// /// "each output of a particular transaction /// can only be used as an input once in the block chain. /// Any subsequent reference is a forbidden double spend- /// an attempt to spend the same satoshis twice." /// -/// https://developer.bitcoin.org/devguide/block_chain.html#introduction +/// /// /// # Consensus /// @@ -229,7 +229,7 @@ pub fn transparent_coinbase_spend( /// Consensus rule: The remaining value in the transparent transaction value pool /// MUST be nonnegative." /// -/// https://zips.z.cash/protocol/protocol.pdf#transactions +/// pub fn remaining_transaction_value( prepared: &PreparedBlock, utxos: &HashMap, diff --git a/zebra-state/src/service/finalized_state/disk_db.rs b/zebra-state/src/service/finalized_state/disk_db.rs index da88e1a8..81fa1c00 100644 --- a/zebra-state/src/service/finalized_state/disk_db.rs +++ b/zebra-state/src/service/finalized_state/disk_db.rs @@ -345,7 +345,7 @@ impl DiskDb { /// /// On Windows, the default limit is 512 high-level I/O files, and 8192 /// low-level I/O files: - /// https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/setmaxstdio?view=msvc-160#remarks + /// const MIN_OPEN_FILE_LIMIT: u64 = 512; /// The number of files used internally by Zebra. @@ -356,7 +356,7 @@ impl DiskDb { /// The size of the database memtable RAM cache in megabytes. /// - /// https://github.com/facebook/rocksdb/wiki/RocksDB-FAQ#configuration-and-tuning + /// const MEMTABLE_RAM_CACHE_MEGABYTES: usize = 128; /// Opens or creates the database at `config.path` for `network`, diff --git a/zebra-state/src/service/finalized_state/zebra_db/block/tests/snapshot.rs b/zebra-state/src/service/finalized_state/zebra_db/block/tests/snapshot.rs index 0691aa09..e40c2c28 100644 --- a/zebra-state/src/service/finalized_state/zebra_db/block/tests/snapshot.rs +++ b/zebra-state/src/service/finalized_state/zebra_db/block/tests/snapshot.rs @@ -548,7 +548,7 @@ fn snapshot_transparent_address_data(state: &FinalizedState, height: u32) { /// Return true if `list` is sorted in ascending order. /// /// TODO: replace with Vec::is_sorted when it stabilises -/// https://github.com/rust-lang/rust/issues/53485 +/// pub fn is_sorted(list: &[T]) -> bool { // This could perform badly, but it is only used in tests, and the test vectors are small. let mut sorted_list = list.to_owned(); diff --git a/zebra-state/src/service/non_finalized_state/chain.rs b/zebra-state/src/service/non_finalized_state/chain.rs index 7d5c6918..1ea6995a 100644 --- a/zebra-state/src/service/non_finalized_state/chain.rs +++ b/zebra-state/src/service/non_finalized_state/chain.rs @@ -1403,7 +1403,7 @@ impl Ord for Chain { /// the vast majority of nodes should eventually agree on their best valid block chain /// up to that height." /// - /// https://zips.z.cash/protocol/protocol.pdf#blockchain + /// /// /// # Correctness /// diff --git a/zebra-test/src/vectors.rs b/zebra-test/src/vectors.rs index 3b6d66c5..cfcd48e8 100644 --- a/zebra-test/src/vectors.rs +++ b/zebra-test/src/vectors.rs @@ -165,27 +165,27 @@ lazy_static! { // ZIP transaction test vectors /// Test vector 1 from ZIP-143 - /// https://github.com/zcash/zips/blob/master/zip-0143.rst#test-vector-1 + /// pub static ref ZIP143_1: Vec = >::from_hex("030000807082c4030002e7719811893e0000095200ac6551ac636565b2835a0805750200025151481cdd86b3cc431800") .expect("Transaction bytes are in valid hex representation"); /// Test vector 2 from ZIP-143 - /// https://github.com/zcash/zips/blob/master/zip-0143.rst#test-vector-2 + /// pub static ref ZIP143_2: Vec = >::from_hex("030000807082c403024201cfb1cd8dbf69b8250c18ef41294ca97993db546c1fe01f7e9c8e36d6a5e29d4e30a703ac6a0098421c69378af1e40f64e125946f62c2fa7b2fecbcb64b6968912a6381ce3dc166d56a1d62f5a8d7056363635353e8c7203d02d2da86387ae60100080063656a63ac5200a7622997f4ff0400075151005353656597b0e4e4c705fc05020000000000000000000000000000000076495c222f7fba1e31defa3d5a57efc2e1e9b01a035587d5fb1a38e01d94903d3c3e0ad3360c1d3710acd20b183e31d49f25c9a138f49b1a537edcf04be34a9851a7af9db6990ed83dd64af3597c04323ea51b0052ad8084a8b9da948d320dadd64f5431e61ddf658d24ae67c22c8d1309131fc00fe7f235734276d38d47f1e191e00c7a1d48af046827591e9733a97fa6b679f3dc601d008285edcbdae69ce8fc1be4aac00ff2711ebd931de518856878f73476f21a482ec9378365c8f7393c94e2885315eb4671098b79535e790fe53e29fef2b3766697ac32b4f473f468a008e72389fc03880d780cb07fcfaabe3f1a84b27db59a4a153d882d2b2103596555ed9494c6ac893c49723833ec8926c1039586a7afcf4a0d9c731e985d99589c03b838e8aaf745533ed9e8ae3a1cd074a51a20da8aba18d1dbebbc862ded42435e02476930d069896cff30eb414f727b89e001afa2fb8dc3436d75a4a6f26572504b0b2232ecb9f0c02411e52596bc5e90457e745939ffedbd12863ce71a02af117d417adb3d15cc54dcb1fce467500c6b8fb86b12b56da9c382857deecc40a98d5f2903395ee4762dd21afdbb5d47fa9a6dd984d567db2857b927b7fae2db587105415d0242789d38f50b8dbcc129cab3d17d19f3355bcf73cecb8cb8a5da01307152f13902a270572670dc82d39026c6cb4cd4b0f7f5aa2a4f5a5341ec5dd715406f2fdd2a02733f5f641c8c21862a1bafce2609d9eecfa158cfb5cd79f88008e315dc7d8388036c1782fd2795d18a763624c25fa959cc97489ce75745824b77868c53239cfbdf73caec65604037314faaceb56218c6bd30f8374ac13386793f21a9fb80ad03bc0cda4a44946c00e1b1a1df0e5b87b5bece477a709649e950060591394812951e1fe3895b8cc3d14d2cf6556df6ed4b4ddd3d9a69f53357d7767f4f5ccbdbc596631277f8fecd08cb056b95e3025b9792fff7f244fc716269b926d62e9596fa825c6bf21aff9e68625a192440ea06828123d97884806f15fa08da52754a1095e3ff1abd5ce4fddfccfc3a6128aef784a64610a89d1a7099216d0814d3a2d452431c32d411ac1cce82ad0229407bbc48985675e3f874a4533f1d63a84dfa3e0f460fe2f57e34fbc75423c3737f5b2a0615f5722db041a3ef66fa483afd3c2e19e59444a64add6df1d963f5dd5b5010d3d025f0287c4cf19c75f33d51ddddba5d657b43ee8da645443814cc7329f3e9b4e54c236c29af3923101756d9fa4bd0f7d2ddaacb6b0f86a2658e0a07a05ac5b950051cd24c47a88d13d659ba2a46ca1830816d09cd7646f76f716abec5de07fe9b523410806ea6f288f8736c23357c85f45791e1708029d9824d90704607f387a03e49bf9836574431345a7877efaa8a08e73081ef8d62cb780ab6883a50a0d470190dfba10a857f82842d3825b3d6da0573d316eb160dc0b716c48fbd467f75b780149ae8808f4e68f50c0536acddf6f1aeab016b6bc1ec144b4e553acfd670f77e755fc88e0677e31ba459b44e307768958fe3789d41c2b1ff434cb30e15914f01bc6bc2307b488d2556d7b7380ea4ffd712f6b02fe806b94569cd4059f396bf29b99d0a40e5e1711ca944f72d436a102fca4b97693da0b086fe9d2e7162470d02e0f05d4bec9512bfb3f38327296efaa74328b118c27402c70c3a90b49ad4bbc68e37c0aa7d9b3fe17799d73b841e751713a02943905aae0803fd69442eb7681ec2a05600054e92eed555028f21b6a155268a2dd6640a69301a52a38d4d9f9f957ae35af7167118141ce4c9be0a6a492fe79f1581a155fa3a2b9dafd82e650b386ad3a08cb6b83131ac300b0846354a7eef9c410e4b62c47c5426907dfc6685c5c99b7141ac626ab4761fd3f41e728e1a28f89db89ffdeca364dd2f0f0739f0534556483199c71f189341ac9b78a269164206a0ea1ce73bfb2a942e7370b247c046f8e75ef8e3f8bd821cf577491864e20e6d08fd2e32b555c92c661f19588b72a89599710a88061253ca285b6304b37da2b5294f5cb354a894322848ccbdc7c2545b7da568afac87ffa005c312241c2d57f4b45d6419f0d2e2c5af33ae243785b325cdab95404fc7aed70525cddb41872cfcc214b13232edc78609753dbff930eb0dc156612b9cb434bc4b693392deb87c530435312edcedc6a961133338d786c4a3e103f60110a16b1337129704bf4754ff6ba9fbe65951e610620f71cda8fc877625f2c5bb04cbe1228b1e886f4050afd8fe94e97d2e9e85c6bb748c0042d3249abb1342bb0eebf62058bf3de080d94611a3750915b5dc6c0b3899d41222bace760ee9c8818ded599e34c56d7372af1eb86852f2a732104bdb750739de6c2c6e0f9eb7cb17f1942bfc9f4fd6ebb6b4cdd4da2bca26fac4578e9f543405acc7d86ff59158bd0cba3aef6f4a8472d144d99f8b8d1dedaa9077d4f01d4bb27bbe31d88fbefac3dcd4797563a26b1d61fcd9a464ab21ed550fe6fa09695ba0b2f10e00000000000000000000000000000000ea6468cc6e20a66f826e3d14c5006f0563887f5e1289be1b2004caca8d3f34d6e84bf59c1e04619a7c23a996941d889e4622a9b9b1d59d5e319094318cd405ba27b7e2c084762d31453ec4549a4d97729d033460fcf89d6494f2ffd789e98082ea5ce9534b3acd60fe49e37e4f666931677319ed89f85588741b3128901a93bd78e4be0225a9e2692c77c969ed0176bdf9555948cbd5a332d045de6ba6bf4490adfe7444cd467a09075417fcc0062e49f008c51ad4227439c1b4476ccd8e97862dab7be1e8d399c05ef27c6e22ee273e15786e394c8f1be31682a30147963ac8da8d41d804258426a3f70289b8ad19d8de13be4eebe3bd4c8a6f55d6e0c373d456851879f5fbc282db9e134806bff71e11bc33ab75dd6ca067fb73a043b646a70339cab4928386786d2f24141ee120fdc34d6764eafc66880ee0204f53cc1167ed02b43a52dea3ca7cff8ef35cd8e6d7c111a68ef44bcd0c1513ad47ca61c659cc5d0a5b440f6b9f59aff66879bb6688fd2859362b182f207b3175961f6411a493bffd048e7d0d87d82fe6f990a2b0a25f5aa0111a6e68f37bf6f3ac2d26b84686e569038d99c1383597fad81193c4c1b16e6a90e2d507cdfe6fbdaa86163e9cf5de310003ca7e8da047b090db9f37952fbfee76af61668190bd52ed490e677b515d0143840307219c7c0ee7fc7bfc79f325644e4df4c0d7db08e9f0bd024943c705abff899403a605cfbc7ed746a7d3f7c37d9e8bdc433b7d79e08a12f738a8f0dbddfef2f26502f3e47d1b0fd11e6a13311fb799c79c641d9da43b33e7ad012e28255398789262275f1175be8462c01491c4d842406d0ec4282c9526174a09878fe8fdde33a29604e5e5e7b2a025d6650b97dbb52befb59b1d30a57433b0a351474444099daa371046613260cf3354cfcdada663ece824ffd7e44393886a86165ddddf2b4c41773554c86995269408b11e6737a4c447586f69173446d8e48bf84cbc000a807899973eb93c5e819aad669413f8387933ad1584aa35e43f4ecd1e2d0407c0b1b89920ffdfdb9bea51ac95b557af71b89f903f5d9848f14fcbeb1837570f544d6359eb23faf38a0822da36ce426c4a2fbeffeb0a8a2e297a9d19ba15024590e3329d9fa9261f9938a4032dd34606c9cf9f3dd33e576f05cd1dd6811c6298757d77d9e810abdb226afcaa4346a6560f8932b3181fd355d5d391976183f8d99388839632d6354f666d09d3e5629ea19737388613d38a34fd0f6e50ee5a0cc9677177f50028c141378187bd2819403fc534f80076e9380cb4964d3b6b45819d3b8e9caf54f051852d671bf8c1ffde2d1510756418cb4810936aa57e6965d6fb656a760b7f19adf96c173488552193b147ee58858033dac7cd0eb204c06490bbdedf5f7571acb2ebe76acef3f2a01ee987486dfe6c3f0a5e234c127258f97a28fb5d164a8176be946b8097d0e317287f33bf9c16f9a545409ce29b1f4273725fc0df02a04ebae178b3414fb0a82d50deb09fcf4e6ee9d180ff4f56ff3bc1d3601fc2dc90d814c3256f4967d3a8d64c83fea339c51f5a8e5801fbb97835581b602465dee04b5922c2761b54245bec0c9eef2db97d22b2b3556cc969fbb13d06509765a52b3fac54b93f421bf08e18d52ddd52cc1c8ca8adfaccab7e5cc2f4573fbbf8239bb0b8aedbf8dad16282da5c9125dba1c059d0df8abf621078f02d6c4bc86d40845ac1d59710c45f07d585eb48b32fc0167ba256e73ca3b9311c62d109497957d8dbe10aa3e866b40c0baa2bc492c19ad1e6372d9622bf163fbffeaeee796a3cd9b6fbbfa4d792f34d7fd6e763cd5859dd26833d21d9bc5452bd19515dff9f4995b35bc0c1f876e6ad11f2452dc9ae85aec01fc56f8cbfda75a7727b75ebbd6bbffb43b63a3b1b671e40feb0db002974a3c3b1a788567231bf6399ff89236981149d423802d2341a3bedb9ddcbac1fe7b6435e1479c72e7089d029e7fbbaf3cf37e9b9a6b776791e4c5e6fda57e8d5f14c8c35a2d270846b9dbe005cda16af4408f3ab06a916eeeb9c9594b70424a4c1d171295b6763b22f47f80b53ccbb904bd68fd65fbd3fbdea1035e98c21a7dbc91a9b5bc7690f05ec317c97f8764eb48e911d428ec8d861b708e8298acb62155145155ae95f0a1d1501034753146e22d05f586d7f6b4fe12dad9a17f5db70b1db96b8d9a83edadc966c8a5466b61fc998c31f1070d9a5c9a6d268d304fe6b8fd3b4010348611abdcbd49fe4f85b623c7828c71382e1034ea67bc8ae97404b0c50b2a04f559e49950afcb0ef462a2ae024b0f0224dfd73684b88c7fbe92d02b68f759c4752663cd7b97a14943649305521326bde085630864629291bae25ff8822a14c4b666a9259ad0dc42a8290ac7bc7f53a16f379f758e5de750f04fd7cad47701c8597f97888bea6fa0bf2999956fbfd0ee68ec36e4688809ae231eb8bc4369f5fe1573f57e099d9c09901bf39caac48dc11956a8ae905ead86954547c448ae43d315e669c4242da565938f417bf43ce7b2b30b1cd4018388e1a910f0fc41fb0877a5925e466819d375b0a912d4fe843b76ef6f223f0f7c894f38f7ab780dfd75f669c8c06cffa43eb47565a50e3b1fa45ad61ce9a1c4727b7aaa53562f523e73952") .expect("Transaction bytes are in valid hex representation"); /// Test vector 1 from ZIP-243 - /// https://github.com/zcash/zips/blob/master/zip-0243.rst#test-vector-1 + /// pub static ref ZIP243_1: Vec = >::from_hex("0400008085202f890002e7719811893e0000095200ac6551ac636565b2835a0805750200025151481cdd86b3cc4318442117623ceb0500031b3d1a027c2c40590958b7eb13d742a997738c46a458965baf276ba92f272c721fe01f7e9c8e36d6a5e29d4e30a73594bf5098421c69378af1e40f64e125946f62c2fa7b2fecbcb64b6968912a6381ce3dc166d56a1d62f5a8d7551db5fd931325c9a138f49b1a537edcf04be34a9851a7af9db6990ed83dd64af3597c04323ea51b0052ad8084a8b9da948d320dadd64f5431e61ddf658d24ae67c22c8d1309131fc00fe7f235734276d38d47f1e191e00c7a1d48af046827591e9733a97fa6b679f3dc601d008285edcbdae69ce8fc1be4aac00ff2711ebd931de518856878f73476f21a482ec9378365c8f7393c94e2885315eb4671098b79535e790fe53e29fef2b3766697ac32b4f473f468a008e72389fc03880d780cb07fcfaabe3f1a84b27db59a4a153d882d2b2103596555ed9494c6ac893c49723833ec8926c1039586a7afcf4a0d9c731e985d99589c8bb838e8aaf745533ed9e8ae3a1cd074a51a20da8aba18d1dbebbc862ded42435e92476930d069896cff30eb414f727b895a4b7be1769367e1fe8ad18de11e58d88a0ad5511d3525122b7b0a6f25d28b16457e745939ffedbd12863ce71a02af117d417adb3d15cc54dcb1fce467500c6b8fb86b12b56da9c382857deecc40a98d5f2935395ee4762dd21afdbb5d47fa9a6dd984d567db2857b927b7fae2db587105415d4642789d38f50b8dbcc129cab3d17d19f3355bcf73cecb8cb8a5da01307152f13936a270572670dc82d39026c6cb4cd4b0f7f5aa2a4f5a5341ec5dd715406f2fdd2afa733f5f641c8c21862a1bafce2609d9eecfa158cfb5cd79f88008e315dc7d8388e76c1782fd2795d18a763624c25fa959cc97489ce75745824b77868c53239cfbdf73caec65604037314faaceb56218c6bd30f8374ac13386793f21a9fb80ad03bc0cda4a44946c00e1b1a1df0e5b87b5bece477a709649e950060591394812951e1fe3895b8cc3d14d2cf6556df6ed4b4ddd3d9a69f53357d7767f4f5ccbdbc596631277f8fecd08cb056b95e3025b9792fff7f244fc716269b926d62e9596fa825c6bf21aff9e68625a6b4cbc4b700a364fa76bd8298bc3ec608d4cf7f3566658d5588714ec9448b0f0396128aef884a646114c9f1a6df56319033c3199cc7a09e9e9567482c92695390229407bbc48985675e3f874a4533f1d63a84dfa3e0f460fe2f57e34fbc75423b6883a50a0d470190dfba10a857f82842d3825b3d6da0573d316eb160dc0b716c48fbd467f75b780149ae8808f4e68f50c0536acddf6f1aeab016b6bc1ec144b4e553acfd670f77e755fc88e0677e31ba459b44e307768958fe3789d41c2b1ff434cb30e15914f01bc6bc2307b488d2556d7b7380ea4ffd712f6b02fe806b94569cd4059f396bf29b99d0a40e5e1711ca944f72d436a102fca4b97693da0b086fe9d2e7162470d02e0f05d4bec9512bfb3f38327296efaa74328b118c27402c70c3a90b49ad4bbc68e37c0aa7d9b3fe17799d73b841e751713a02943905aae0803fd69442eb7681ec2a05600054e92eed555028f21b6a155268a2dd6640a69301a52a38d4d9f9f957ae35af7167118141ce4c9be0a6a492fe79f1581a155fa3a034999c538f7a758bb5b1d28fd218fba1938744bdb77b4a4dfa7a5fae96e8cd49b26907dfc6685c5c99b7141ac626ab4761fd3f41e728e1a28f89db89ffdeca364e4b22d81d9968d0119e4c7a189adf22ad96830a54e40dc73eaba6b2aaf14f7ca942e7370b247c046f8e75ef8e3f8bd821cf577491864e20e6d08fd2e32b555c92c661f19588b72a89599710a88061253ca285b6304b37da2b5294f5cb354a894322848ccbdc7c2545b7da568afac87ffa005c312241c2d57f4b45d6419f0d2e2c5af33ae243785b325cdab95404fc7aed70525cddb41872cfcc214b13232edc78609753dbff930eb0dc156612b9cb434bc4b693392deb87c530435312edcedc6a961133338d786c4a3e103f60110a16b1337129704bf4754ff6ba9fbe65951e610620f71cda8fc877625f2c5bb04cbe1228b1e886f4050afd8fe94e97d2e9e85c6bb748c0042d3249abb1342bb0eebf62058bf3de080d94611a3750915b5dc6c0b3899d41222bace760ee9c8818ded599e34c56d7372af1eb86852f2a732104bdb750739de6c2c6e0f9eb7cb17f1942bfc9f4fd6ebb6b4cdd4da2bca26fac4578e9f543405acc7d86ff59158bd0cba3aef6f4a8472d144d99f8b8d1dedaa9077d4f01d4bb27bbe31d88fbefac3dcd4797563a26b1d61fcd9a464ab21ed550fe6fa09695ba0b2f10eea6468cc6e20a66f826e3d14c5006f0563887f5e1289be1b2004caca8d3f34d6e84bf59c1e04619a7c23a996941d889e4622a9b9b1d59d5e319094318cd405ba27b7e2c084762d31453ec4549a4d97729d033460fcf89d6494f2ffd789e98082ea5ce9534b3acd60fe49e37e4f666931677319ed89f85588741b3128901a93bd78e4be0225a9e2692c77c969ed0176bdf9555948cbd5a332d045de6ba6bf4490adfe7444cd467a09075417fcc0062e49f008c51ad4227439c1b4476ccd8e97862dab7be1e8d399c05ef27c6e22ee273e15786e394c8f1be31682a30147963ac8da8d41d804258426a3f70289b8ad19d8de13be4eebe3bd4c8a6f55d6e0c373d456851879f5fbc282db9e134806bff71e11bc33ab75dd6ca067fb73a043b646a7cf39cab4928386786d2f24141ee120fdc34d6764eafc66880ee0204f53cc1167ed20b43a52dea3ca7cff8ef35cd8e6d7c111a68ef44bcd0c1513ad47ca61c659cc5d325b440f6b9f59aff66879bb6688fd2859362b182f207b3175961f6411a493bffd048e7d0d87d82fe6f990a2b0a25f5aa0111a6e68f37bf6f3ac2d26b84686e569d58d99c1383597fad81193c4c1b16e6a90e2d507cdfe6fbdaa86163e9cf5de3100fbca7e8da047b09079362d7792deb3ca9dc1561b87c82e3cb99eb5837319582216a3226774efa90efb7bfc79f425644e4e98c2d7d8642b9db82aa739bf2d71cc4117227db227cf0a05ad9a95832e23c94f271ca0e4694fac6322282ebac6986b8fdc8ad863084ff10fd11e6a13311fb799c79c641d9da43b33e7ad012e28255398789262275f1175be8462c01491c4d842406d0ec4282c9526174a09878fe8fdde33a29604e5e5e7b2a025d6650b97dbb52befb59b1d30a57433b0a351474444099daa371046613260cf3354cfcdada663ece824ffd7e44393886a86165ddddf2b4c41773554c86995269408b11e6737a4c447586f69173446d8e48bf84cbc000a807899973eb93c5e819aad669413f8387933ad1584aa35e43f4ecd1e2d0407c0b1b89920ffdfdb9bea51ac95b557af71b89f903f5d9848f14fcbeb1837570f544d6359eb23faf38a0822da36ce426c4a2fbeffeb0a8a2e297a9d19ba15024590e3329d9fa9261f9938a4032dd34606c9cf9f3dd33e576f05cd1dd6811c6298757d77d9e810abdb226afcaa4346a6560f8932b3181fd355d5d391976183f8d99388839632d6354f666d09d3e5629ea19737388613d38a34fd0f6e50ee5a0cc9677177f50028c141378187bd2819403fc534f80076e9380cb4964d3b6b45819d3b8e9caf54f051852d671bf8c1ffde2d1510756418cb4810936aa57e6965d6fb656a760b7f19adf96c173488552193b147ee58858033dac7cd0eb204c06490bbdedf5f7571acb2ebe76acef3f2a01ee987486dfe6c3f0a5e234c127258f97a28fb5d164a8176be946b8097d0e317287f33bf9c16f9a545409ce29b1f4273725fc0df02a04ebae178b3414fb0a82d50deb09fcf4e6ee9d180ff4f56ff3bc1d3601fc2dc90d814c3256f4967d3a8d64c83fea339c51f5a8e5801fbb97835581b602465dee04b5922c2761b54245bec0c9eef2db97d22b2b3556cc969fbb13d06509765a52b3fac54b93f421bf08e18d52ddd52cc1c8ca8adfaccab7e5cc2f4573fbbf8239bb0b8aedbf8dad16282da5c9125dba1c059d0df8abf621078f02d6c4bc86d40845ac1d59710c45f07d585eb48b32fc0167ba256e73ca3b9311c62d109497957d8dbe10aa3e866b40c0baa2bc492c19ad1e6372d9622bf163fbffeaeee796a3cd9b6fbbfa4d792f34d7fd6e763cd5859dd26833d21d9bc5452bd19515dff9f4995b35bc0c1f876e6ad11f2452dc9ae85aec01fc56f8cbfda75a7727b75ebbd6bbffb43b63a3b1b671e40feb0db002974a3c3b1a788567231bf6399ff89236981149d423802d2341a3bedb9ddcbac1fe7b6435e1479c72e7089b51bfe2ff345857da9b545e88e3221f3f5f72d1e069c9a85dd2236d390989587be005cda16af4408f3ab06a916eeeb9c9594b70424a4c1d171295b6763b22f4712ba7beff0ff27883afaff26034b895735709cf937bd2231891e70eb2771e9927c97f8764eb48e911d428ec8d861b708e8298acb62155145155ae95f0a1d1501034753146e22d05f586d7f6b4fe12dad9a17f5db70b1db96b8d9a83edadc966c8a5466b61fc998c31f1070d9a5c9a6d268d304fe6b8fd3b4010348611abdcbd49fe4f85b623c7828c71382e1034ea67bc8ae97404b0c50b2a04f559e49950afcb0ef462a2ae024b0f0224dfd73684b88c7fbe92d02b68f759c4752663cd7b97a14943649305521326bde085630864629291bae25ff8822a14c4b666a9259ad0dc42a8290ac7bc7f53a16f379f758e5de750f04fd7cad47701c8597f97888bea6fa0bf2999956fbfd0ee68ec36e4688809ae231eb8bc4369f5fe1573f57e099d9c09901bf39caac48dc11956a8ae905ead86954547c448ae43d315e669c4242da565938f417bf43ce7b2b30b1cd4018388e1a910f0fc41fb0877a5925e466819d375b0a912d4fe843b76ef6f223f0f7c894f38f7ab780dfd75f669c8c06cffa43eb47565a50e3b1fa45ad61ce9a1c4727b7aaa53562f523e73952bbf33d8a4104078ade3eaaa49699a69fdf1c5ac7732146ee5e1d6b6ca9b9180f964cc9d0878ae1373524d7d510e58227df6de9d30d271867640177b0f1856e28d5c8afb095ef6184fed651589022eeaea4c0ce1fa6f085092b04979489172b3ef8194a798df5724d6b05f1ae000013a08d612bca8a8c31443c10346dbf61de8475c0bbec5104b47556af3d514458e2321d146071789d2335934a680614e83562f82dfd405b54a45eb32c165448d4d5d61ca2859585369f53f1a137e9e82b67b8fdaf01bda54a317311896ae10280a032440c420a421e944d1e952b70d5826cd3b08b7db9630fe4fd5f22125de840fcc40b98038af11d55be25432597b4b65b9ec1c7a8bbfd052cbf7e1c1785314934b262d5853754f1f17771cfb7503072655753fa3f54ecc587e9f83b581916092df26e63e18994cb0db91a0bbdc7b6119b32222adf5e61d8d8ae89dae4954b54813bb33f08d562ba513fee1b09c0fcd516055419474dd7fda038a89c84ea7b9468287f0eb0c10c4b132520194d3d8d5351fc10d09c15c8cc101aa1663bbf17b84111f38bb439f07353bdea3596d15e713e1e2e7d3f1c383135b47fa7f81f46df7a902a404699ec912f5656c35b85763e4de583aecaa1dfd5d2677d9c8ffee877f63f40a5ca0d67f6e554124700f805af876aeede53aa8b0f8e5604a73c30cbd09dad963d6f8a5dcc40def40797342113ba206fae8ebe4f3bc3caf69259e462eff9ba8b3f4bfaa1300c26925a87") .expect("Transaction bytes are in valid hex representation"); /// Test vector 2 from ZIP-243 - /// https://github.com/zcash/zips/blob/master/zip-0243.rst#test-vector-2 + /// pub static ref ZIP243_2: Vec = >::from_hex("0400008085202f89020bbe32a598c22adfb48cef72ba5d4287c0cefbacfd8ce195b4963c34a94bba7a175dae4b0465ac656353708915090f47a068e227433f9e49d3aa09e356d8d66d0c0121e91a3c4aa3f27fa1b63396e2b41d090063535300ac53ac514e97056802da071b970d4807000152a844550bdc2002000752526a65520052d7034302011b9a076620edc067ff0200000353e3b8a71face1c9f37745ed36883529304bfd5a390b37bc5a3445241f03f64a818820dfeddd75375159fbd21eca9872104f8d7b3c8c869703a1e7848a5c941e45a9c7943446d0dc9627cb31f80e7aa596d4821dc99a7d777cd57e194842a023471f0f6288a150647b2afe9df7cccf01f5cde5f04680bbfed87f6cf429fb27ad6babe791766611cf5bc20e48bef119259b9b8a0e39c3df28cb9582ea338601cdc481b32fb82adeebb3dade25d1a3df20c37e712506b5d996c49a9f0f30ddcb91fe9004e1e83294a6c9203d94e8dc2cbb449de4155032604e47997016b304fd437d8235045e255a19b743a0a9f2e336b44cae307bb3987bd3e4e777fbb34c0ab8cc3d67466c0a88dd4ccad18a07a8d1068df5b629e5718d0f6df5c957cf71bb00a5178f175caca944e635c5159f738e2402a2d21aa081e10e456afb00b9f62416c8b9c0f7228f510729e0be3f305313d77f7379dc2af24869c6c74ee4471498861d192f0ff0f508285dab6b6a36ccf7d12256cc76b95503720ac672d08268d2cf7773b6ba2a5f664847bf707f2fc10c98f2f006ec22ccb5a8c8b7c40c7c2d49a6639b9f2ce33c25c04bc461e744dfa536b00d94baddf4f4d14044c695a33881477df124f0fcf206a9fb2e65e304cdbf0c4d2390170c130ab849c2f22b5cdd3921640c8cf1976ae1010b0dfd9cb2543e45f99749cc4d61f2e8aabfe98bd905fa39951b33ea769c45ab9531c57209862ad12fd76ba4807e65417b6cd12fa8ec916f013ebb8706a96effeda06c4be24b04846392e9d1e6930eae01fa21fbd700583fb598b92c8f4eb8a61aa6235db60f2841cf3a1c6ab54c67066844711d091eb931a1bd6281aedf2a0e8fab18817202a9be06402ed9cc720c16bfe881e4df4255e87afb7fc62f38116bbe03cd8a3cb11a27d568414782f47b1a44c97c680467694bc9709d32916c97e8006cbb07ba0e4180a3738038c374c4cce8f32959afb25f303f5815c4533124acf9d18940e77522ac5dc4b9570aae8f47b7f57fd8767bea1a24ae7bed65b4afdc8f1278c30e2db98fd172730ac6bbed4f1127cd32b04a95b205526cfcb4c4e1cc955175b3e8de1f5d81b18669692350aaa1a1d797617582e54d7a5b57a683b32fb1098062dad7b0c2eb518f6862e83db25e3dbaf7aed504de932acb99d735992ce62bae9ef893ff6acc0ffcf8e3483e146b9d49dd8c7835f43a37dca0787e3ec9f6605223d5ba7ae0ab9025b73bc03f7fac36c009a56d4d95d1e81d3b3ebca7e54cc1a12d127b57c8138976e791013b015f06a624f521b6ee04ec980893c7e5e01a336203594094f82833d74427880084d35863c8e7ebb5c9eed98e72572ec40c79b26623b58022f489b0893d88be63f3f8c0d23249ebcde13db9312941c36c1d1cbcabac0c78cb3b1912db0dcbfe1893d9b51be4af1d000bac1ad0a3ae2ce1e73225fb114d05af4cefc06e875f074ffeae0cba7da3a516c173be1c513323e119f635e8209a074b216b7023fadc2d25949c90037e71e3e550726d210a2c688342e52440635e9cc14afe10102621a9c9accb782e9e4a5fa87f0a956f5b85509960285c22627c59483a5a4c28cce4b156e551406a7ee8355656a21e43e38ce129fdadb759eddfa08f00fc8e567cef93c6792d01df05e6d580f4d5d48df042451a33590d3e8cf49b2627218f0c292fa66ada945fa55bb23548e33a83a562957a3149a993cc472362298736a8b778d97ce423013d64b32cd172efa551bf7f368f04bdaec6091a3004a757598b801dcf675cb83e43a53ae8b254d333bcda20d4817d3477abfba25bb83df5949c126f149b1d99341e4e6f9120f4d41e629185002c72c012c414d2382a6d47c7b3deaba770c400ca96b2814f6b26c3ef17429f1a98c85d83db20efad48be8996fb1bff591efff360fe1199056c56e5feec61a7b8b9f699d6012c2849232f329fef95c7af370098ffe4918e0ca1df47f275867b739e0a514d3209325e217045927b479c1ce2e5d54f25488cad1513e3f44a21266cfd841633327dee6cf810fbf7393e317d9e53d1be1d5ae7839b66b943b9ed18f2c530e975422332c3439cce49a29f2a336a4851263c5e9bd13d731109e844b7f8c392a5c1dcaa2ae5f50ff63fab9765e016702c35a67cd7364d3fab552fb349e35c15c50250453fd18f7b855992632e2c76c0fbf1ef963ea80e3223de3277bc559251725829ec03f213ba8955cab2822ff21a9b0a4904d668fcd77224bde3dd01f6ffc4828f6b64230b35c6a049873494276ea1d7ed5e92cb4f90ba83a9e49601b194042f2900d99d312d7b70508cf176066d154dbe96ef9d4367e4c840e4a17b5e5122e8ebe2158a3c5f4cbae21ea3fa1ae6c25a9462ebcbb0fd5f14554bc97747c33e34da90c816d8d0d50bfe37618c5812891484fa259322c15092d4155d8696d6f12f24fd364496b3be0871ca3dd9625348a614b59bde45885649bae36de34def8fcec85343475d976ae1e9b27829ce2ac5efd0b399a8b448be6504294ee6b3c1c6a5342d7c01ae9d8ad3070c2b1a91573af5e0c5e4cbbf4acdc6b54c9272200d9970250c17c1036f06085c41858ed3a0c48150bc697e4a695fef335f7ad07e1a46dc767ff822db70e6669080b9816b2232c81a4c66cc586abfe1eaa8ca6cf41fc30eb8dc57c37a3c39c59c94232df9d388dbfa35c2cd5c75f328e9fea78f65568f2bb934c82c4142da69d12ca7de9a7df706400ec79878d868e17e8f71ea31495a8bae7bdc2e48b5118771c2fca078cca1fce0d7ef0af3478cf36f69e85a41dd29b4294a65d3e055ff718dd9dc8c75e7e5b2efe442637371b7c48f6ee99e3ea38a4b0f2f67fc2b908cda657eae754e037e262e9a9f9bd7ec4267ed8e96930e1084783c37d6f9dd15fd29f4cc477e66f130d630430dcc0104899b4f9f46eb090ef7fc90b479abf61f93955ee00e6a1848f1ab14ad334f2b68035808cdf1bb9e9d9a816baf728a955b960b7701fa626687dc3c9cba646337b53e29816e9482ddf5578a8768aae477fce410ac2d5de6095861c111d7feb3e6bb4fbb5a54955495972798350a253f05f66c2ecfcbc0ed43f5ec2e6d8dba15a51254d97b1821107c07dd9a16ef8406f943e282b95d4b362530c913d6ba421df6027de5af1e4745d5868106954be6c1962780a2941072e95131b1679df0637625042c37d48ffb152e5ebc185c8a2b7d4385f1c95af937df78dfd8757fab434968b0b57c66574468f160b447ac8221e5060676a842a1c6b7172dd3340f764070ab1fe091c5c74c95a5dc043390723a4c127da14cdde1dc2675a62340b3e6afd0522a31de26e7d1ec3a9c8a091ffdc75b7ecfdc7c12995a5e37ce3488bd29f8629d68f696492448dd526697476dc061346ebe3f677217ff9c60efce943af28dfd3f9e59692598a6047c23c4c01400f1ab5730eac0ae8d5843d5051c376240172af218d7a1ecfe65b4f75100638983c14de4974755dade8018c9b8f4543fb095961513e67c61dbc59c607f9b51f8d09bdcad28bcfb9e5d2744ea8848b2623ac07f8ef61a81a35910b8a1baf39a919a7b60bc604d63185f759221d847cc54a22765a4c33475b5791e9af3271fc8d9350667090d8184ec50522d804f23c4fb44ffa481bc92ae408d1b9f2b131904f9705c59e2f4bde7a3b2c085d93fd2abc5e14d163001a12f51938d021afa92239b873dc6c357eaa8af4ee6d00540657fe32914103b5d98f68bd3e2b5359f08ccd88d0c811e4c31fbb49f3a90bbd05dce62f344e7077593159ae35050b04c9e6b86bc432dc8b048c73c0018ca5b69411297732a4e1aa99a928c71e7a24fd277856aa42501e51b012aea9446a2104e93f815a0b3a29b458314f3d8be2b9823d342f46213e942a7e19a46e970b5c506708430317b1bb3b35df68ae33a4926a03e6bfeb5510416fcbb0524c9ca5074156cc5a5d6fe1c995edc60a2f550411aa41e3da3bdcf64bcf04a0510571b936d47e55cec0330008dfe73563404f047d7f3a8a3d7743bc554955210f1eb0d08599ea77d5f974d87176d37d98b9c0ad440407209ed6a9f08464d565593e1a63b938536b49244e97d") .expect("Transaction bytes are in valid hex representation"); /// Test vector 3 from ZIP-243 - /// https://github.com/zcash/zips/blob/master/zip-0243.rst#test-vector-3 + /// pub static ref ZIP243_3: Vec = >::from_hex("0400008085202f8901a8c685478265f4c14dada651969c45a65e1aeb8cd6791f2f5bb6a1d9952104d9010000006b483045022100a61e5d557568c2ddc1d9b03a7173c6ce7c996c4daecab007ac8f34bee01e6b9702204d38fdc0bcf2728a69fde78462a10fb45a9baa27873e6a5fc45fb5c76764202a01210365ffea3efa3908918a8b8627724af852fc9b86d7375b103ab0543cf418bcaa7ffeffffff02005a6202000000001976a9148132712c3ff19f3a151234616777420a6d7ef22688ac8b959800000000001976a9145453e4698f02a38abdaa521cd1ff2dee6fac187188ac29b0040048b004000000000000000000000000") .expect("Transaction bytes are in valid hex representation"); } diff --git a/zebra-test/src/zip0244.rs b/zebra-test/src/zip0244.rs index c9196fa9..e7289961 100644 --- a/zebra-test/src/zip0244.rs +++ b/zebra-test/src/zip0244.rs @@ -33,7 +33,7 @@ pub struct TestVector { lazy_static! { /// Array of ZIP-244 test vectors. - /// From https://github.com/zcash-hackworks/zcash-test-vectors/blob/master/zip_0244.py + /// From pub static ref TEST_VECTORS: Vec = vec![ TestVector { tx: vec![ diff --git a/zebrad/src/application.rs b/zebrad/src/application.rs index add1a878..e78bee43 100644 --- a/zebrad/src/application.rs +++ b/zebrad/src/application.rs @@ -41,7 +41,7 @@ pub fn app_config() -> config::Reader { /// Includes the git commit and the number of commits since the last version /// tag, if available. /// -/// For details, see https://semver.org/ +/// For details, see pub fn app_version() -> Version { const CARGO_PKG_VERSION: &str = env!("CARGO_PKG_VERSION"); let vergen_git_semver: Option<&str> = option_env!("VERGEN_GIT_SEMVER_LIGHTWEIGHT"); diff --git a/zebrad/tests/common/mod.rs b/zebrad/tests/common/mod.rs index 988b5c62..3fa04adb 100644 --- a/zebrad/tests/common/mod.rs +++ b/zebrad/tests/common/mod.rs @@ -7,7 +7,7 @@ //! //! This module uses the legacy directory structure, //! to avoid compiling an empty "common" test binary: -//! https://doc.rust-lang.org/book/ch11-03-test-organization.html#submodules-in-integration-tests +//! pub mod cached_state; pub mod check;