diff --git a/zebra-chain/src/orchard/keys.rs b/zebra-chain/src/orchard/keys.rs index b856ca3c..05bc222d 100644 --- a/zebra-chain/src/orchard/keys.rs +++ b/zebra-chain/src/orchard/keys.rs @@ -1,7 +1,8 @@ //! Orchard key types. //! -//! [orchardkeycomponents]: https://zips.z.cash/protocol/nu5.pdf#orchardkeycomponents +//! https://zips.z.cash/protocol/nu5.pdf#orchardkeycomponents #![allow(clippy::unit_arg)] +#![allow(dead_code)] // #[cfg(test)] // mod test_vectors; @@ -9,7 +10,7 @@ mod tests; use std::{ - convert::{From, Into, TryFrom}, + convert::{From, Into, TryFrom, TryInto}, fmt, io::{self, Write}, str::FromStr, diff --git a/zebra-chain/src/orchard/tree.rs b/zebra-chain/src/orchard/tree.rs index a998e1e4..9a73e7f6 100644 --- a/zebra-chain/src/orchard/tree.rs +++ b/zebra-chain/src/orchard/tree.rs @@ -11,11 +11,12 @@ //! A root of a note commitment tree is associated with each treestate. #![allow(clippy::unit_arg)] +#![allow(dead_code)] use std::{collections::VecDeque, fmt}; use bitvec::prelude::*; -use group::GroupEncoding; +use halo2::arithmetic::FieldExt; use lazy_static::lazy_static; #[cfg(any(test, feature = "proptest-impl"))] use proptest_derive::Arbitrary; @@ -42,7 +43,7 @@ fn merkle_crh_orchard(layer: u8, left: [u8; 32], right: [u8; 32]) -> [u8; 32] { s.extend_from_slice(&left.bits::()[0..255]); s.extend_from_slice(&right.bits::()[0..255]); - sinsemilla_hash_to_point(b"Zcash_PH", &s).to_bytes() + sinsemilla_hash(b"z.cash:Orchard-MerkleCRH", &s).to_bytes() } lazy_static! { @@ -147,7 +148,7 @@ impl From> for NoteCommitmentTree { } impl NoteCommitmentTree { - /// Get the Jubjub-based Pedersen hash of root node of this merkle tree of + /// Get the Pallas-based Pedersen hash of root node of this merkle tree of /// commitment notes. pub fn hash(&self) -> [u8; 32] { self.root.0 diff --git a/zebra-chain/src/sapling/keys.rs b/zebra-chain/src/sapling/keys.rs index bd120abc..25457d91 100644 --- a/zebra-chain/src/sapling/keys.rs +++ b/zebra-chain/src/sapling/keys.rs @@ -8,6 +8,7 @@ //! [ps]: https://zips.z.cash/protocol/protocol.pdf#saplingkeycomponents //! [3.1]: https://zips.z.cash/protocol/protocol.pdf#addressesandkeys #![allow(clippy::unit_arg)] +#![allow(dead_code)] #[cfg(test)] mod test_vectors;