diff --git a/taiga_halo2/Cargo.toml b/taiga_halo2/Cargo.toml index 6ab33dd0..468bd0a4 100644 --- a/taiga_halo2/Cargo.toml +++ b/taiga_halo2/Cargo.toml @@ -22,7 +22,7 @@ byteorder = "1.4" num-bigint = "0.4" serde = { version = "1.0", features = ["derive"], optional = true } -borsh = { version = "0.10", features = ["const-generics"], optional = true } +borsh = { version = "1.0.0-alpha.3", features = ["derive"], optional = true } [dev-dependencies] criterion = "0.5" diff --git a/taiga_halo2/src/action.rs b/taiga_halo2/src/action.rs index cc0b4e87..4e1a67ed 100644 --- a/taiga_halo2/src/action.rs +++ b/taiga_halo2/src/action.rs @@ -52,7 +52,7 @@ impl ActionInstance { #[cfg(feature = "borsh")] impl BorshSerialize for ActionInstance { - fn serialize(&self, writer: &mut W) -> borsh::maybestd::io::Result<()> { + fn serialize(&self, writer: &mut W) -> std::io::Result<()> { use ff::PrimeField; writer.write_all(&self.anchor.to_repr())?; writer.write_all(&self.nf.to_bytes())?; diff --git a/taiga_halo2/src/binding_signature.rs b/taiga_halo2/src/binding_signature.rs index 8eaf9778..3266c18b 100644 --- a/taiga_halo2/src/binding_signature.rs +++ b/taiga_halo2/src/binding_signature.rs @@ -92,7 +92,7 @@ impl BindingSigningKey { #[cfg(feature = "borsh")] impl BorshSerialize for BindingSigningKey { - fn serialize(&self, writer: &mut W) -> borsh::maybestd::io::Result<()> { + fn serialize(&self, writer: &mut W) -> std::io::Result<()> { writer.write_all(&self.to_bytes()) } } diff --git a/taiga_halo2/src/circuit/vp_circuit.rs b/taiga_halo2/src/circuit/vp_circuit.rs index cdf1ebac..cbc76b2f 100644 --- a/taiga_halo2/src/circuit/vp_circuit.rs +++ b/taiga_halo2/src/circuit/vp_circuit.rs @@ -112,7 +112,7 @@ impl VPVerifyingInfo { #[cfg(feature = "borsh")] impl BorshSerialize for VPVerifyingInfo { - fn serialize(&self, writer: &mut W) -> borsh::maybestd::io::Result<()> { + fn serialize(&self, writer: &mut W) -> std::io::Result<()> { use ff::PrimeField; // Write vk self.vk.write(writer)?; diff --git a/taiga_halo2/src/note.rs b/taiga_halo2/src/note.rs index 7f04e103..ba46b1fa 100644 --- a/taiga_halo2/src/note.rs +++ b/taiga_halo2/src/note.rs @@ -311,7 +311,7 @@ impl Note { #[cfg(feature = "borsh")] impl BorshSerialize for Note { - fn serialize(&self, writer: &mut W) -> borsh::maybestd::io::Result<()> { + fn serialize(&self, writer: &mut W) -> std::io::Result<()> { use byteorder::{LittleEndian, WriteBytesExt}; // Write app_vk writer.write_all(&self.note_type.app_vk.to_repr())?; diff --git a/taiga_halo2/src/shielded_ptx.rs b/taiga_halo2/src/shielded_ptx.rs index 359ca981..bc841cf5 100644 --- a/taiga_halo2/src/shielded_ptx.rs +++ b/taiga_halo2/src/shielded_ptx.rs @@ -214,7 +214,7 @@ impl Executable for ShieldedPartialTransaction { #[cfg(feature = "borsh")] impl BorshSerialize for ShieldedPartialTransaction { - fn serialize(&self, writer: &mut W) -> borsh::maybestd::io::Result<()> { + fn serialize(&self, writer: &mut W) -> std::io::Result<()> { for action in self.actions.iter() { action.serialize(writer)?; }