build(deps): bump serde-big-array from 0.3.2 to 0.4.1 (#4004)

Bumps [serde-big-array](https://github.com/est31/serde-big-array) from 0.3.2 to 0.4.1.
- [Release notes](https://github.com/est31/serde-big-array/releases)
- [Commits](https://github.com/est31/serde-big-array/compare/v0.3.2...v0.4.1)

---
updated-dependencies:
- dependency-name: serde-big-array
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
Conrado Gouvea 2022-03-30 22:33:52 -03:00 committed by GitHub
parent 2ecb7739d4
commit ee6a38dffc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 30 additions and 36 deletions

5
Cargo.lock generated
View File

@ -3836,12 +3836,11 @@ dependencies = [
[[package]] [[package]]
name = "serde-big-array" name = "serde-big-array"
version = "0.3.2" version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "18b20e7752957bbe9661cff4e0bb04d183d0948cdab2ea58cdb9df36a61dfe62" checksum = "3323f09a748af288c3dc2474ea6803ee81f118321775bffa3ac8f7e65c5e90e7"
dependencies = [ dependencies = [
"serde", "serde",
"serde_derive",
] ]
[[package]] [[package]]

View File

@ -39,7 +39,7 @@ rand_core = "0.6.3"
ripemd160 = "0.9" ripemd160 = "0.9"
serde = { version = "1.0.136", features = ["serde_derive", "rc"] } serde = { version = "1.0.136", features = ["serde_derive", "rc"] }
secp256k1 = { version = "0.21.3", features = ["serde"] } secp256k1 = { version = "0.21.3", features = ["serde"] }
serde-big-array = "0.3.2" serde-big-array = "0.4.1"
sha2 = { version = "0.9.9", features=["compress"] } sha2 = { version = "0.9.9", features=["compress"] }
static_assertions = "1.1.0" static_assertions = "1.1.0"
subtle = "2.4.1" subtle = "2.4.1"

View File

@ -11,8 +11,6 @@
#[macro_use] #[macro_use]
extern crate serde; extern crate serde;
#[macro_use]
extern crate serde_big_array;
#[macro_use] #[macro_use]
extern crate bitflags; extern crate bitflags;

View File

@ -1,12 +1,14 @@
use std::{fmt, io}; use std::{fmt, io};
use crate::serialization::{serde_helpers, SerializationError, ZcashDeserialize, ZcashSerialize}; use serde_big_array::BigArray;
use crate::serialization::{SerializationError, ZcashDeserialize, ZcashSerialize};
/// A ciphertext component for encrypted output notes. /// A ciphertext component for encrypted output notes.
/// ///
/// Corresponds to the Orchard 'encCiphertext's /// Corresponds to the Orchard 'encCiphertext's
#[derive(Deserialize, Serialize)] #[derive(Deserialize, Serialize)]
pub struct EncryptedNote(#[serde(with = "serde_helpers::BigArray")] pub(crate) [u8; 580]); pub struct EncryptedNote(#[serde(with = "BigArray")] pub(crate) [u8; 580]);
// These impls all only exist because of array length restrictions. // These impls all only exist because of array length restrictions.
// TODO: use const generics https://github.com/ZcashFoundation/zebra/issues/2042 // TODO: use const generics https://github.com/ZcashFoundation/zebra/issues/2042
@ -68,7 +70,7 @@ impl ZcashDeserialize for EncryptedNote {
/// ///
/// Corresponds to Orchard's 'outCiphertext' /// Corresponds to Orchard's 'outCiphertext'
#[derive(Deserialize, Serialize)] #[derive(Deserialize, Serialize)]
pub struct WrappedNoteKey(#[serde(with = "serde_helpers::BigArray")] pub(crate) [u8; 80]); pub struct WrappedNoteKey(#[serde(with = "BigArray")] pub(crate) [u8; 80]);
impl fmt::Debug for WrappedNoteKey { impl fmt::Debug for WrappedNoteKey {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {

View File

@ -1,12 +1,13 @@
use std::{fmt, io}; use std::{fmt, io};
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use serde_big_array::BigArray;
use crate::serialization::{serde_helpers, SerializationError, ZcashDeserialize, ZcashSerialize}; use crate::serialization::{SerializationError, ZcashDeserialize, ZcashSerialize};
/// An encoding of a BCTV14 proof, as used in Zcash. /// An encoding of a BCTV14 proof, as used in Zcash.
#[derive(Serialize, Deserialize)] #[derive(Serialize, Deserialize)]
pub struct Bctv14Proof(#[serde(with = "serde_helpers::BigArray")] pub [u8; 296]); pub struct Bctv14Proof(#[serde(with = "BigArray")] pub [u8; 296]);
impl fmt::Debug for Bctv14Proof { impl fmt::Debug for Bctv14Proof {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {

View File

@ -1,11 +1,13 @@
use serde::{Deserialize, Serialize};
use std::{fmt, io}; use std::{fmt, io};
use crate::serialization::{serde_helpers, SerializationError, ZcashDeserialize, ZcashSerialize}; use serde::{Deserialize, Serialize};
use serde_big_array::BigArray;
use crate::serialization::{SerializationError, ZcashDeserialize, ZcashSerialize};
/// An encoding of a Groth16 proof, as used in Zcash. /// An encoding of a Groth16 proof, as used in Zcash.
#[derive(Serialize, Deserialize)] #[derive(Serialize, Deserialize)]
pub struct Groth16Proof(#[serde(with = "serde_helpers::BigArray")] pub [u8; 192]); pub struct Groth16Proof(#[serde(with = "BigArray")] pub [u8; 192]);
impl fmt::Debug for Groth16Proof { impl fmt::Debug for Groth16Proof {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {

View File

@ -9,6 +9,7 @@ mod tests;
use std::{collections::BTreeMap, convert::TryInto, io, sync::Arc}; use std::{collections::BTreeMap, convert::TryInto, io, sync::Arc};
use serde_big_array::BigArray;
pub use zcash_history::{V1, V2}; pub use zcash_history::{V1, V2};
use crate::{ use crate::{
@ -18,8 +19,6 @@ use crate::{
sapling, sapling,
}; };
big_array! { BigArray; zcash_history::MAX_ENTRY_SIZE }
/// A trait to represent a version of `Tree`. /// A trait to represent a version of `Tree`.
pub trait Version: zcash_history::Version { pub trait Version: zcash_history::Version {
/// Convert a Block into the NodeData for this version. /// Convert a Block into the NodeData for this version.

View File

@ -1,12 +1,14 @@
use std::{fmt, io}; use std::{fmt, io};
use crate::serialization::{serde_helpers, SerializationError, ZcashDeserialize, ZcashSerialize}; use serde_big_array::BigArray;
use crate::serialization::{SerializationError, ZcashDeserialize, ZcashSerialize};
/// A ciphertext component for encrypted output notes. /// A ciphertext component for encrypted output notes.
/// ///
/// Corresponds to the Sapling 'encCiphertext's /// Corresponds to the Sapling 'encCiphertext's
#[derive(Deserialize, Serialize)] #[derive(Deserialize, Serialize)]
pub struct EncryptedNote(#[serde(with = "serde_helpers::BigArray")] pub(crate) [u8; 580]); pub struct EncryptedNote(#[serde(with = "BigArray")] pub(crate) [u8; 580]);
impl fmt::Debug for EncryptedNote { impl fmt::Debug for EncryptedNote {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
@ -55,7 +57,7 @@ impl ZcashDeserialize for EncryptedNote {
/// ///
/// Corresponds to Sapling's 'outCiphertext' /// Corresponds to Sapling's 'outCiphertext'
#[derive(Deserialize, Serialize)] #[derive(Deserialize, Serialize)]
pub struct WrappedNoteKey(#[serde(with = "serde_helpers::BigArray")] pub(crate) [u8; 80]); pub struct WrappedNoteKey(#[serde(with = "BigArray")] pub(crate) [u8; 80]);
impl fmt::Debug for WrappedNoteKey { impl fmt::Debug for WrappedNoteKey {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {

View File

@ -1,17 +1,5 @@
use group::GroupEncoding; use group::GroupEncoding;
use halo2::{arithmetic::FieldExt, pasta::pallas}; use halo2::{arithmetic::FieldExt, pasta::pallas};
use serde_big_array::big_array;
big_array! {
BigArray;
+ 1344, // `EquihashSolution`
80, // `sapling::OutCiphertext`
580, // `sapling::EncryptedCiphertext`
601, // `sprout::EncryptedCiphertext`
296, // `Bctv14Proof`
196, // `Groth16Proof`
}
#[derive(Deserialize, Serialize)] #[derive(Deserialize, Serialize)]
#[serde(remote = "jubjub::AffinePoint")] #[serde(remote = "jubjub::AffinePoint")]
pub struct AffinePoint { pub struct AffinePoint {

View File

@ -1,14 +1,15 @@
use std::{fmt, io}; use std::{fmt, io};
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use serde_big_array::BigArray;
use crate::serialization::{serde_helpers, SerializationError, ZcashDeserialize, ZcashSerialize}; use crate::serialization::{SerializationError, ZcashDeserialize, ZcashSerialize};
/// A ciphertext component for encrypted output notes. /// A ciphertext component for encrypted output notes.
/// ///
/// Corresponds to the Sprout 'encCiphertext's /// Corresponds to the Sprout 'encCiphertext's
#[derive(Serialize, Deserialize)] #[derive(Serialize, Deserialize)]
pub struct EncryptedNote(#[serde(with = "serde_helpers::BigArray")] pub [u8; 601]); pub struct EncryptedNote(#[serde(with = "BigArray")] pub [u8; 601]);
impl fmt::Debug for EncryptedNote { impl fmt::Debug for EncryptedNote {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {

View File

@ -2,11 +2,13 @@
use std::{fmt, io}; use std::{fmt, io};
use serde_big_array::BigArray;
use crate::{ use crate::{
block::Header, block::Header,
serialization::{ serialization::{
serde_helpers, zcash_serialize_bytes, SerializationError, ZcashDeserialize, zcash_serialize_bytes, SerializationError, ZcashDeserialize, ZcashDeserializeInto,
ZcashDeserializeInto, ZcashSerialize, ZcashSerialize,
}, },
}; };
@ -28,7 +30,7 @@ pub(crate) const SOLUTION_SIZE: usize = 1344;
/// The size of an Equihash solution in bytes is always 1344 so the /// The size of an Equihash solution in bytes is always 1344 so the
/// length of this type is fixed. /// length of this type is fixed.
#[derive(Deserialize, Serialize)] #[derive(Deserialize, Serialize)]
pub struct Solution(#[serde(with = "serde_helpers::BigArray")] pub [u8; SOLUTION_SIZE]); pub struct Solution(#[serde(with = "BigArray")] pub [u8; SOLUTION_SIZE]);
impl Solution { impl Solution {
/// The length of the portion of the header used as input when verifying /// The length of the portion of the header used as input when verifying