Fix serde quoting of u64 lists & vectors

This commit is contained in:
Michael Sproul
2023-01-23 17:24:22 +11:00
parent 1fd944a09b
commit 90797a1b04
3 changed files with 8 additions and 9 deletions

6
Cargo.lock generated
View File

@@ -4704,7 +4704,7 @@ dependencies = [
[[package]]
name = "milhouse"
version = "0.1.0"
source = "git+https://github.com/sigp/milhouse?branch=main#7712800a18796640a722a219997fc6b2cd745ba2"
source = "git+https://github.com/sigp/milhouse?branch=main#373b601b12c5b0038681334716cc671f76aea31c"
dependencies = [
"derivative",
"ethereum_hashing",
@@ -7341,13 +7341,13 @@ dependencies = [
[[package]]
name = "ssz_types"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "babb2d535656e2f243adc91642033d476f0b411a7c6fbc338f4bc89ef50261d0"
source = "git+https://github.com/sigp/ssz_types?branch=abstract-serde#eab67903fe39828d5735ab48910556445b0fa3d2"
dependencies = [
"arbitrary",
"derivative",
"ethereum_serde_utils",
"ethereum_ssz",
"itertools",
"serde",
"serde_derive",
"smallvec",

View File

@@ -87,6 +87,8 @@ resolver = "2"
[patch.crates-io]
fixed-hash = { git = "https://github.com/paritytech/parity-common", rev="df638ab0885293d21d656dc300d39236b69ce57d" }
warp = { git = "https://github.com/macladson/warp", rev="7e75acc368229a46a236a8c991bf251fe7fe50ef" }
# FIXME(sproul): remove
ssz_types = { git = "https://github.com/sigp/ssz_types", branch = "abstract-serde" }
[profile.maxperf]
inherits = "release"

View File

@@ -283,8 +283,7 @@ where
// Registry
#[test_random(default)]
pub validators: VList<GenericValidator, T::ValidatorRegistryLimit>,
// FIXME(sproul): serde quoting
// #[serde(with = "ssz_types::serde_utils::quoted_u64_var_list")]
#[serde(with = "ssz_types::serde_utils::quoted_u64_var_list")]
#[test_random(default)]
pub balances: VList<u64, T::ValidatorRegistryLimit>,
@@ -294,8 +293,7 @@ where
// Slashings
#[test_random(default)]
// FIXME(sproul): serde quoting
// #[serde(with = "ssz_types::serde_utils::quoted_u64_fixed_vec")]
#[serde(with = "ssz_types::serde_utils::quoted_u64_fixed_vec")]
pub slashings: FixedVector<u64, T::EpochsPerSlashingsVector>,
// Attestations (genesis fork only)
@@ -329,8 +327,7 @@ where
pub finalized_checkpoint: Checkpoint,
// Inactivity
// FIXME(sproul): quoting
// #[serde(with = "ssz_types::serde_utils::quoted_u64_var_list")]
#[serde(with = "ssz_types::serde_utils::quoted_u64_var_list")]
#[superstruct(only(Altair, Merge))]
#[test_random(default)]
pub inactivity_scores: VList<u64, T::ValidatorRegistryLimit>,