From dbd2ce6dd8a29b639e13ffaa6673cf8243a018ce Mon Sep 17 00:00:00 2001 From: Deirdre Connolly Date: Thu, 18 Mar 2021 10:20:23 -0400 Subject: [PATCH] Update zebra-chain/src/orchard/sinsemilla.rs Co-authored-by: teor --- zebra-chain/src/orchard/sinsemilla.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/zebra-chain/src/orchard/sinsemilla.rs b/zebra-chain/src/orchard/sinsemilla.rs index 4f2d7261..04cbd97a 100644 --- a/zebra-chain/src/orchard/sinsemilla.rs +++ b/zebra-chain/src/orchard/sinsemilla.rs @@ -108,8 +108,11 @@ pub fn sinsemilla_hash_to_point(D: &[u8], M: &BitVec) -> pallas::Point /// proof systems including Halo 2." /// /// https://zips.z.cash/protocol/protocol.pdf#concretesinsemillahash +/// +/// # Panics +/// +/// If `M` is greater than `k*c = 2530` bits in `sinsemilla_hash_to_point`. #[allow(non_snake_case)] -// XXX: M is a max of k*c = 2530 bits, sinsemilla_hash_to_point checks this pub fn sinsemilla_hash(D: &[u8], M: &BitVec) -> pallas::Base { extract_p(sinsemilla_hash_to_point(D, M)) }