diff --git a/README.md b/README.md index dee09de..f2d6811 100644 --- a/README.md +++ b/README.md @@ -113,8 +113,8 @@ Results on an Apple M1 Pro with Rust 1.72.0-nightly: | BLS implementation | Classic mainnet | Fastnet | | ------------------ | --------------- | -------- | -| zkcrypto | 1.958 ms | 1.489 ms | -| arkworks | 1.748 ms | 1.452 ms | +| zkcrypto | 1.956 ms | 1.489 ms | +| arkworks | 1.714 ms | 1.425 ms | ## License diff --git a/src/verify.rs b/src/verify.rs index 2049c36..da8539e 100644 --- a/src/verify.rs +++ b/src/verify.rs @@ -229,11 +229,11 @@ impl fmt::Display for VerificationError { impl Error for VerificationError {} -fn message(current_round: u64, prev_sig: &[u8]) -> Vec { +fn message(current_round: u64, prev_sig: &[u8]) -> [u8; 32] { let mut hasher = Sha256::default(); hasher.update(prev_sig); hasher.update(round_to_bytes(current_round)); - hasher.finalize().to_vec() + hasher.finalize().into() } /// https://github.com/drand/drand-client/blob/master/wasm/chain/verify.go#L28-L33