From 15fe5632c77f7736e52baf07181043375700a957 Mon Sep 17 00:00:00 2001 From: Kevin Jue Date: Sun, 18 Feb 2024 15:00:15 -0800 Subject: [PATCH] some deserialization stuff --- core/src/stark/types.rs | 4 ---- core/src/utils/prove.rs | 11 ++--------- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/core/src/stark/types.rs b/core/src/stark/types.rs index e2ef76298c..c55ee198ff 100644 --- a/core/src/stark/types.rs +++ b/core/src/stark/types.rs @@ -129,10 +129,6 @@ pub struct ShardOpenedValues { #[cfg(feature = "perf")] #[derive(Serialize, Deserialize)] -#[serde(bound( - serialize = "SC: StarkGenericConfig", - deserialize = "SC: StarkGenericConfig" -))] pub struct ShardProof { pub index: usize, pub commitment: ShardCommitment>, diff --git a/core/src/utils/prove.rs b/core/src/utils/prove.rs index 318faa3755..23fb9326cd 100644 --- a/core/src/utils/prove.rs +++ b/core/src/utils/prove.rs @@ -467,6 +467,8 @@ pub(super) mod baby_bear_blake3 { type Pcs = TwoAdicFriPcs>; + #[derive(Deserialize)] + #[serde(from = "std::marker::PhantomData")] pub struct BabyBearBlake3 { perm: Perm, pcs: Pcs, @@ -488,15 +490,6 @@ pub(super) mod baby_bear_blake3 { } } - impl<'de> Deserialize<'de> for BabyBearBlake3 { - fn deserialize(_deserializer: D) -> Result - where - D: serde::Deserializer<'de>, - { - Ok(Self::new()) - } - } - impl BabyBearBlake3 { pub fn new() -> Self { let perm = Perm::new(8, 22, RC_16_30.to_vec(), DiffusionMatrixBabybear);