Generalize TranscriptRepr implementation for slices (#150) * generalize the slice implementation * bump the version
Srinath Setty srinath@microsoft.com
Fri, 10 Mar 2023 09:27:48 -0800
2 files changed,
3 insertions(+),
5 deletions(-)
M
Cargo.toml
→
Cargo.toml
@@ -1,6 +1,6 @@
[package] name = "nova-snark" -version = "0.18.0" +version = "0.18.1" authors = ["Srinath Setty <srinath@microsoft.com>"] edition = "2021" description = "Recursive zkSNARKs without trusted setup"
M
src/traits/mod.rs
→
src/traits/mod.rs
@@ -234,12 +234,10 @@ /// Returns a scalar representing the bytes
fn from_uniform(bytes: &[u8]) -> Self; } -impl<G: Group<Scalar = F>, F: PrimeField + TranscriptReprTrait<G>> TranscriptReprTrait<G> - for &[F] -{ +impl<G: Group, T: TranscriptReprTrait<G>> TranscriptReprTrait<G> for &[T] { fn to_transcript_bytes(&self) -> Vec<u8> { (0..self.len()) - .map(|i| <F as TranscriptReprTrait<G>>::to_transcript_bytes(&self[i])) + .map(|i| self[i].to_transcript_bytes()) .collect::<Vec<_>>() .into_iter() .flatten()