From 52bfa6bfd7672de2ee1c75e9bbcbcaf572fe0e7c Mon Sep 17 00:00:00 2001 From: Trevor Lovell Date: Thu, 10 Oct 2024 00:25:20 -0600 Subject: [PATCH] feat: remove std requirement for ark-serialize implementations These implementations do not use any std functionality. The save_to_file and load_from_file utilities do, which remain behind the "std" feature. Being able to serialize and deserialize public parameters will be important for some no_std use cases. --- .../src/proof_primitive/dory/public_parameters.rs | 4 ---- 1 file changed, 4 deletions(-) diff --git a/crates/proof-of-sql/src/proof_primitive/dory/public_parameters.rs b/crates/proof-of-sql/src/proof_primitive/dory/public_parameters.rs index 604eedd75..59cf6a640 100644 --- a/crates/proof-of-sql/src/proof_primitive/dory/public_parameters.rs +++ b/crates/proof-of-sql/src/proof_primitive/dory/public_parameters.rs @@ -1,7 +1,6 @@ use super::{G1Affine, G2Affine}; use alloc::vec::Vec; use ark_ff::UniformRand; -#[cfg(feature = "std")] use ark_serialize::{ CanonicalDeserialize, CanonicalSerialize, Compress, SerializationError, Valid, Validate, }; @@ -98,7 +97,6 @@ impl PublicParameters { } } -#[cfg(feature = "std")] impl CanonicalSerialize for PublicParameters { fn serialize_with_mode( &self, @@ -164,7 +162,6 @@ impl CanonicalSerialize for PublicParameters { } } -#[cfg(feature = "std")] impl CanonicalDeserialize for PublicParameters { fn deserialize_with_mode( mut reader: R, @@ -207,7 +204,6 @@ impl CanonicalDeserialize for PublicParameters { // Remove unnecessary methods if they're not overridden } -#[cfg(feature = "std")] // Implement the Valid trait to perform validation on deserialized data impl Valid for PublicParameters { fn check(&self) -> Result<(), SerializationError> {