From 86f8c2e642310ecab8cf6e39756e2e5d2ca95496 Mon Sep 17 00:00:00 2001 From: Michael Sproul Date: Mon, 1 Dec 2025 12:23:39 +1100 Subject: [PATCH 1/4] EIP-7916: ProgressiveList and tests --- Cargo.lock | 3 +-- Cargo.toml | 3 +++ consensus/types/src/lib.rs | 2 +- testing/ef_tests/Makefile | 2 +- testing/ef_tests/check_all_files_accessed.py | 1 - testing/ef_tests/src/cases/ssz_generic.rs | 13 ++++++++++++- testing/ef_tests/src/handler.rs | 2 ++ testing/ef_tests/tests/tests.rs | 5 +++++ 8 files changed, 25 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e3730f132b3..e78cd10205e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5859,8 +5859,7 @@ dependencies = [ [[package]] name = "milhouse" version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "259dd9da2ae5e0278b95da0b7ecef9c18c309d0a2d9e6db57ed33b9e8910c5e7" +source = "git+https://github.com/sigp/milhouse?branch=progressive-list#52bae1f50da93519cfb4ec31f7dab19659be4d14" dependencies = [ "alloy-primitives", "arbitrary", diff --git a/Cargo.toml b/Cargo.toml index 6ccf429b6c6..4fb72987bfc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -285,3 +285,6 @@ debug = true [patch.crates-io] quick-protobuf = { git = "https://github.com/sigp/quick-protobuf.git", rev = "681f413312404ab6e51f0b46f39b0075c6f4ebfd" } +# FIXME(sproul): REMOVE patch +# milhouse = { path = "../milhouse" } +milhouse = { git = "https://github.com/sigp/milhouse", branch = "progressive-list" } diff --git a/consensus/types/src/lib.rs b/consensus/types/src/lib.rs index 8e83fed1d9a..35ef299ff71 100644 --- a/consensus/types/src/lib.rs +++ b/consensus/types/src/lib.rs @@ -293,6 +293,6 @@ pub use bls::{ }; pub use context_deserialize::{ContextDeserialize, context_deserialize}; pub use kzg::{KzgCommitment, KzgProof, VERSIONED_HASH_VERSION_KZG}; -pub use milhouse::{self, List, Vector}; +pub use milhouse::{self, List, ProgressiveList, Vector}; pub use ssz_types::{BitList, BitVector, FixedVector, VariableList, typenum, typenum::Unsigned}; pub use superstruct::superstruct; diff --git a/testing/ef_tests/Makefile b/testing/ef_tests/Makefile index 0ead9d00472..724990cbecc 100644 --- a/testing/ef_tests/Makefile +++ b/testing/ef_tests/Makefile @@ -1,6 +1,6 @@ # To download/extract nightly tests, run: # CONSENSUS_SPECS_TEST_VERSION=nightly make -CONSENSUS_SPECS_TEST_VERSION ?= v1.6.0-beta.1 +CONSENSUS_SPECS_TEST_VERSION ?= v1.6.1 REPO_NAME := consensus-spec-tests OUTPUT_DIR := ./$(REPO_NAME) diff --git a/testing/ef_tests/check_all_files_accessed.py b/testing/ef_tests/check_all_files_accessed.py index 1f70881a887..4f278916db0 100755 --- a/testing/ef_tests/check_all_files_accessed.py +++ b/testing/ef_tests/check_all_files_accessed.py @@ -51,7 +51,6 @@ "tests/.*/fulu/ssz_static/MatrixEntry/.*", # EIP-7916 is still in draft and hasn't been implemented yet https://eips.ethereum.org/EIPS/eip-7916 "tests/general/phase0/ssz_generic/progressive_bitlist", - "tests/general/phase0/ssz_generic/basic_progressive_list", "tests/general/phase0/ssz_generic/containers/.*/ProgressiveBitsStruct.*", "tests/general/phase0/ssz_generic/containers/.*/ProgressiveTestStruct.*", "tests/general/phase0/ssz_generic/progressive_containers/.*", diff --git a/testing/ef_tests/src/cases/ssz_generic.rs b/testing/ef_tests/src/cases/ssz_generic.rs index 8742f8a1409..a4c6dd24b9f 100644 --- a/testing/ef_tests/src/cases/ssz_generic.rs +++ b/testing/ef_tests/src/cases/ssz_generic.rs @@ -10,7 +10,7 @@ use ssz_derive::{Decode, Encode}; use tree_hash::TreeHash; use tree_hash_derive::TreeHash; use types::typenum::*; -use types::{BitList, BitVector, FixedVector, ForkName, VariableList, Vector}; +use types::{BitList, BitVector, FixedVector, ForkName, ProgressiveList, VariableList, Vector}; #[derive(Debug, Clone, Deserialize)] #[context_deserialize(ForkName)] @@ -157,6 +157,17 @@ impl Case for SszGeneric { [length => typenum] )?; } + "basic_progressive_list" => { + let elem_ty = parts[1]; + + type_dispatch!( + ssz_generic_test, + (&self.path, fork_name), + ProgressiveList, + <>, + [elem_ty => primitive_type] + )?; + } "bitlist" => { let mut limit = parts[1]; diff --git a/testing/ef_tests/src/handler.rs b/testing/ef_tests/src/handler.rs index a5b2ffada37..46eb61d7a3a 100644 --- a/testing/ef_tests/src/handler.rs +++ b/testing/ef_tests/src/handler.rs @@ -1135,6 +1135,8 @@ impl Handler for SszGenericHandler { // Supported SSZ generic handlers pub struct BasicVector; type_name!(BasicVector, "basic_vector"); +pub struct BasicProgressiveList; +type_name!(BasicProgressiveList, "basic_progressive_list"); pub struct Bitlist; type_name!(Bitlist, "bitlist"); pub struct Bitvector; diff --git a/testing/ef_tests/tests/tests.rs b/testing/ef_tests/tests/tests.rs index 089e4464cd7..6ccb906c728 100644 --- a/testing/ef_tests/tests/tests.rs +++ b/testing/ef_tests/tests/tests.rs @@ -733,6 +733,11 @@ fn ssz_generic() { SszGenericHandler::::default().run(); } +#[test] +fn ssz_generic_progressive() { + SszGenericHandler::::default().run(); +} + #[test] fn epoch_processing_justification_and_finalization() { EpochProcessingHandler::::default().run(); From 9e15231ba2c3e9f0a325d89bbf6bc78ce3431104 Mon Sep 17 00:00:00 2001 From: Michael Sproul Date: Wed, 10 Dec 2025 16:48:12 +1100 Subject: [PATCH 2/4] Test runners for basic progressive containers and bitlists --- Cargo.lock | 25 +++++------- Cargo.toml | 4 ++ consensus/types/src/lib.rs | 1 + testing/ef_tests/Cargo.toml | 1 + testing/ef_tests/src/cases/ssz_generic.rs | 47 +++++++++++++++++++++-- testing/ef_tests/src/handler.rs | 4 ++ testing/ef_tests/tests/tests.rs | 2 + 7 files changed, 65 insertions(+), 19 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 901ff659520..a5bf115961e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -698,7 +698,7 @@ version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -709,7 +709,7 @@ checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" dependencies = [ "anstyle", "once_cell_polyfill", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -2856,6 +2856,7 @@ dependencies = [ "context_deserialize", "educe", "eth2_network_config", + "ethereum_hashing", "ethereum_ssz", "ethereum_ssz_derive", "execution_layer", @@ -3118,7 +3119,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -3283,8 +3284,6 @@ dependencies = [ [[package]] name = "ethereum_ssz" version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e8cd8c4f47dfb947dbfe3cdf2945ae1da808dbedc592668658e827a12659ba1" dependencies = [ "alloy-primitives", "arbitrary", @@ -3300,8 +3299,6 @@ dependencies = [ [[package]] name = "ethereum_ssz_derive" version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78d247bc40823c365a62e572441a8f8b12df03f171713f06bc76180fcd56ab71" dependencies = [ "darling 0.20.11", "proc-macro2", @@ -4759,7 +4756,7 @@ checksum = "3640c1c38b8e4e43584d8df18be5fc6b0aa314ce6ebf51b53313d4306cca8e46" dependencies = [ "hermit-abi 0.5.2", "libc", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -6344,7 +6341,7 @@ version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -7786,7 +7783,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.11.0", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -8873,7 +8870,7 @@ dependencies = [ "getrandom 0.3.4", "once_cell", "rustix 1.1.2", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -9446,8 +9443,6 @@ dependencies = [ [[package]] name = "tree_hash" version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2db21caa355767db4fd6129876e5ae278a8699f4a6959b1e3e7aff610b532d52" dependencies = [ "alloy-primitives", "ethereum_hashing", @@ -9459,8 +9454,6 @@ dependencies = [ [[package]] name = "tree_hash_derive" version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711cc655fcbb48384a87dc2bf641b991a15c5ad9afc3caa0b1ab1df3b436f70f" dependencies = [ "darling 0.21.3", "proc-macro2", @@ -10209,7 +10202,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.48.0", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 9e388fed841..157ef556020 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -288,3 +288,7 @@ quick-protobuf = { git = "https://github.com/sigp/quick-protobuf.git", rev = "68 # FIXME(sproul): REMOVE patch # milhouse = { path = "../milhouse" } milhouse = { git = "https://github.com/sigp/milhouse", branch = "progressive-list" } +ethereum_ssz = { path = "../packages/ethereum_ssz/ssz" } +ethereum_ssz_derive = { path = "../packages/ethereum_ssz/ssz_derive" } +tree_hash = { path = "../packages/tree_hash/tree_hash" } +tree_hash_derive = { path = "../packages/tree_hash/tree_hash_derive" } diff --git a/consensus/types/src/lib.rs b/consensus/types/src/lib.rs index 9d02f71a3ee..2663eda38fb 100644 --- a/consensus/types/src/lib.rs +++ b/consensus/types/src/lib.rs @@ -174,5 +174,6 @@ pub use bls::{ pub use context_deserialize::{ContextDeserialize, context_deserialize}; pub use fixed_bytes::FixedBytesExtended; pub use milhouse::{self, List, ProgressiveList, Vector}; +pub use ssz::ProgressiveBitList; pub use ssz_types::{BitList, BitVector, FixedVector, VariableList, typenum, typenum::Unsigned}; pub use superstruct::superstruct; diff --git a/testing/ef_tests/Cargo.toml b/testing/ef_tests/Cargo.toml index 581785e2a97..17ad777699a 100644 --- a/testing/ef_tests/Cargo.toml +++ b/testing/ef_tests/Cargo.toml @@ -19,6 +19,7 @@ compare_fields = { workspace = true } context_deserialize = { workspace = true } educe = { workspace = true } eth2_network_config = { workspace = true } +ethereum_hashing = { workspace = true } # FIXME(sproul): remove ethereum_ssz = { workspace = true } ethereum_ssz_derive = { workspace = true } execution_layer = { workspace = true } diff --git a/testing/ef_tests/src/cases/ssz_generic.rs b/testing/ef_tests/src/cases/ssz_generic.rs index a4c6dd24b9f..c632439bc7e 100644 --- a/testing/ef_tests/src/cases/ssz_generic.rs +++ b/testing/ef_tests/src/cases/ssz_generic.rs @@ -8,9 +8,13 @@ use context_deserialize::{ContextDeserialize, context_deserialize}; use serde::{Deserialize, Deserializer, de::Error as SerdeError}; use ssz_derive::{Decode, Encode}; use tree_hash::TreeHash; +use tree_hash::{PackedEncoding, ProgressiveMerkleHasher, TreeHashType}; use tree_hash_derive::TreeHash; use types::typenum::*; -use types::{BitList, BitVector, FixedVector, ForkName, ProgressiveList, VariableList, Vector}; +use types::{ + BitList, BitVector, FixedVector, ForkName, Hash256, ProgressiveBitList, ProgressiveList, + VariableList, Vector, +}; #[derive(Debug, Clone, Deserialize)] #[context_deserialize(ForkName)] @@ -111,8 +115,7 @@ macro_rules! type_dispatch { "VarTestStruct" => type_dispatch!($function, ($($arg),*), $base_ty, <$($param_ty,)* VarTestStruct>, $($rest)*), "ComplexTestStruct" => type_dispatch!($function, ($($arg),*), $base_ty, <$($param_ty,)* ComplexTestStruct>, $($rest)*), "BitsStruct" => type_dispatch!($function, ($($arg),*), $base_ty, <$($param_ty,)* BitsStruct>, $($rest)*), - // EIP-7916 is still in draft and hasn't been implemented yet https://eips.ethereum.org/EIPS/eip-7916 - "ProgressiveTestStruct" | "ProgressiveBitsStruct" => Err(Error::SkippedKnownFailure), + "ProgressiveSingleFieldContainerTestStruct" => type_dispatch!($function, ($($arg),*), $base_ty, <$($param_ty,)* ProgressiveSingleFieldContainerTestStruct>, $($rest)*), _ => Err(Error::FailedToParseTest(format!("unsupported: {}", $value))), } }; @@ -195,6 +198,14 @@ impl Case for SszGeneric { [length => typenum] )?; } + "progressive_bitlist" => { + type_dispatch!( + ssz_generic_test, + (&self.path, fork_name), + ProgressiveBitList, + <>, + )?; + } "boolean" => { ssz_generic_test::(&self.path, fork_name)?; } @@ -220,6 +231,22 @@ impl Case for SszGeneric { [type_name => test_container] )?; } + "progressive_containers" => { + let type_name = parts[0]; + + // FIXME(sproul): delete + if type_name != "ProgressiveSingleFieldContainerTestStruct" { + return Ok(()); + } + + type_dispatch!( + ssz_generic_test, + (&self.path, fork_name), + _, + <>, + [type_name => test_container] + )?; + } _ => panic!("unsupported handler: {}", self.handler_name), } Ok(()) @@ -321,6 +348,20 @@ struct BitsStruct { E: BitVector, } +#[derive(Debug, Clone, PartialEq, Decode, Encode, TreeHash, Deserialize)] +#[tree_hash(struct_behaviour = "progressive_container", active_fields(1))] +#[context_deserialize(ForkName)] +struct ProgressiveSingleFieldContainerTestStruct { + A: u8, +} + +#[derive(Debug, Clone, PartialEq, Decode, Encode, TreeHash, Deserialize)] +#[tree_hash(struct_behaviour = "progressive_container", active_fields(1))] +#[context_deserialize(ForkName)] +struct ProgressiveSingleListContainerTestStruct { + C: ProgressiveBitList, +} + fn byte_list_from_hex_str<'de, D, N: Unsigned>( deserializer: D, ) -> Result, D::Error> diff --git a/testing/ef_tests/src/handler.rs b/testing/ef_tests/src/handler.rs index 46eb61d7a3a..15ff0c70e57 100644 --- a/testing/ef_tests/src/handler.rs +++ b/testing/ef_tests/src/handler.rs @@ -1141,9 +1141,13 @@ pub struct Bitlist; type_name!(Bitlist, "bitlist"); pub struct Bitvector; type_name!(Bitvector, "bitvector"); +pub struct ProgressiveBitlist; +type_name!(ProgressiveBitlist, "progressive_bitlist"); pub struct Boolean; type_name!(Boolean, "boolean"); pub struct Uints; type_name!(Uints, "uints"); pub struct Containers; type_name!(Containers, "containers"); +pub struct ProgressiveContainers; +type_name!(ProgressiveContainers, "progressive_containers"); diff --git a/testing/ef_tests/tests/tests.rs b/testing/ef_tests/tests/tests.rs index 6ccb906c728..4504e366dbb 100644 --- a/testing/ef_tests/tests/tests.rs +++ b/testing/ef_tests/tests/tests.rs @@ -736,6 +736,8 @@ fn ssz_generic() { #[test] fn ssz_generic_progressive() { SszGenericHandler::::default().run(); + SszGenericHandler::::default().run(); + SszGenericHandler::::default().run(); } #[test] From fffd203cc5156cda0bba4a27100d894ed93c7ccd Mon Sep 17 00:00:00 2001 From: Michael Sproul Date: Thu, 18 Dec 2025 21:50:02 +1100 Subject: [PATCH 3/4] Rest of the progressive container tests --- Cargo.lock | 1 - Cargo.toml | 3 +- testing/ef_tests/src/cases/ssz_generic.rs | 76 ++++++++++++++++++++--- 3 files changed, 69 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a5bf115961e..1e9e774f6c6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5857,7 +5857,6 @@ dependencies = [ [[package]] name = "milhouse" version = "0.9.0" -source = "git+https://github.com/sigp/milhouse?branch=progressive-list#52bae1f50da93519cfb4ec31f7dab19659be4d14" dependencies = [ "alloy-primitives", "arbitrary", diff --git a/Cargo.toml b/Cargo.toml index 157ef556020..37d07d467f4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -286,8 +286,7 @@ debug = true [patch.crates-io] quick-protobuf = { git = "https://github.com/sigp/quick-protobuf.git", rev = "681f413312404ab6e51f0b46f39b0075c6f4ebfd" } # FIXME(sproul): REMOVE patch -# milhouse = { path = "../milhouse" } -milhouse = { git = "https://github.com/sigp/milhouse", branch = "progressive-list" } +milhouse = { path = "../milhouse" } ethereum_ssz = { path = "../packages/ethereum_ssz/ssz" } ethereum_ssz_derive = { path = "../packages/ethereum_ssz/ssz_derive" } tree_hash = { path = "../packages/tree_hash/tree_hash" } diff --git a/testing/ef_tests/src/cases/ssz_generic.rs b/testing/ef_tests/src/cases/ssz_generic.rs index c632439bc7e..ca42ac1d1d4 100644 --- a/testing/ef_tests/src/cases/ssz_generic.rs +++ b/testing/ef_tests/src/cases/ssz_generic.rs @@ -8,14 +8,16 @@ use context_deserialize::{ContextDeserialize, context_deserialize}; use serde::{Deserialize, Deserializer, de::Error as SerdeError}; use ssz_derive::{Decode, Encode}; use tree_hash::TreeHash; -use tree_hash::{PackedEncoding, ProgressiveMerkleHasher, TreeHashType}; use tree_hash_derive::TreeHash; use types::typenum::*; use types::{ - BitList, BitVector, FixedVector, ForkName, Hash256, ProgressiveBitList, ProgressiveList, + BitList, BitVector, FixedVector, ForkName, List, ProgressiveBitList, ProgressiveList, VariableList, Vector, }; +type U1280 = op!(U128 * U10); +type U1281 = op!(U1280 + U1); + #[derive(Debug, Clone, Deserialize)] #[context_deserialize(ForkName)] struct Metadata { @@ -115,7 +117,12 @@ macro_rules! type_dispatch { "VarTestStruct" => type_dispatch!($function, ($($arg),*), $base_ty, <$($param_ty,)* VarTestStruct>, $($rest)*), "ComplexTestStruct" => type_dispatch!($function, ($($arg),*), $base_ty, <$($param_ty,)* ComplexTestStruct>, $($rest)*), "BitsStruct" => type_dispatch!($function, ($($arg),*), $base_ty, <$($param_ty,)* BitsStruct>, $($rest)*), + "ProgressiveBitsStruct" => type_dispatch!($function, ($($arg),*), $base_ty, <$($param_ty,)* ProgressiveBitsStruct>, $($rest)*), "ProgressiveSingleFieldContainerTestStruct" => type_dispatch!($function, ($($arg),*), $base_ty, <$($param_ty,)* ProgressiveSingleFieldContainerTestStruct>, $($rest)*), + "ProgressiveSingleListContainerTestStruct" => type_dispatch!($function, ($($arg),*), $base_ty, <$($param_ty,)* ProgressiveSingleListContainerTestStruct>, $($rest)*), + "ProgressiveVarTestStruct" => type_dispatch!($function, ($($arg),*), $base_ty, <$($param_ty,)* ProgressiveVarTestStruct>, $($rest)*), + "ProgressiveComplexTestStruct" => type_dispatch!($function, ($($arg),*), $base_ty, <$($param_ty,)* ProgressiveComplexTestStruct>, $($rest)*), + "ProgressiveTestStruct" => type_dispatch!($function, ($($arg),*), $base_ty, <$($param_ty,)* ProgressiveTestStruct>, $($rest)*), _ => Err(Error::FailedToParseTest(format!("unsupported: {}", $value))), } }; @@ -234,11 +241,6 @@ impl Case for SszGeneric { "progressive_containers" => { let type_name = parts[0]; - // FIXME(sproul): delete - if type_name != "ProgressiveSingleFieldContainerTestStruct" { - return Ok(()); - } - type_dispatch!( ssz_generic_test, (&self.path, fork_name), @@ -338,6 +340,15 @@ struct ComplexTestStruct { G: Vector, } +#[derive(Debug, Clone, PartialEq, Decode, Encode, TreeHash, Deserialize)] +#[context_deserialize(ForkName)] +struct ProgressiveTestStruct { + A: ProgressiveList, + B: ProgressiveList, + C: ProgressiveList, + D: ProgressiveList>, +} + #[derive(Debug, Clone, PartialEq, Decode, Encode, TreeHash, Deserialize)] #[context_deserialize(ForkName)] struct BitsStruct { @@ -348,6 +359,23 @@ struct BitsStruct { E: BitVector, } +#[derive(Debug, Clone, PartialEq, Decode, Encode, TreeHash, Deserialize)] +#[context_deserialize(ForkName)] +struct ProgressiveBitsStruct { + A: BitVector, + B: BitList, + C: ProgressiveBitList, + D: BitVector, + E: BitList, + F: ProgressiveBitList, + G: BitVector, + H: BitList, + I: ProgressiveBitList, + J: BitVector, + K: BitList, + L: ProgressiveBitList, +} + #[derive(Debug, Clone, PartialEq, Decode, Encode, TreeHash, Deserialize)] #[tree_hash(struct_behaviour = "progressive_container", active_fields(1))] #[context_deserialize(ForkName)] @@ -356,12 +384,44 @@ struct ProgressiveSingleFieldContainerTestStruct { } #[derive(Debug, Clone, PartialEq, Decode, Encode, TreeHash, Deserialize)] -#[tree_hash(struct_behaviour = "progressive_container", active_fields(1))] +#[tree_hash( + struct_behaviour = "progressive_container", + active_fields(0, 0, 0, 0, 1) +)] #[context_deserialize(ForkName)] struct ProgressiveSingleListContainerTestStruct { C: ProgressiveBitList, } +#[derive(Debug, Clone, PartialEq, Decode, Encode, TreeHash, Deserialize)] +#[tree_hash( + struct_behaviour = "progressive_container", + active_fields(1, 0, 1, 0, 1) +)] +#[context_deserialize(ForkName)] +struct ProgressiveVarTestStruct { + A: u8, + B: List, + C: ProgressiveBitList, +} + +#[derive(Debug, Clone, PartialEq, Decode, Encode, TreeHash, Deserialize)] +#[tree_hash( + struct_behaviour = "progressive_container", + active_fields(1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1) +)] +#[context_deserialize(ForkName)] +struct ProgressiveComplexTestStruct { + A: u8, + B: List, + C: ProgressiveBitList, + D: ProgressiveList, + E: ProgressiveList, + F: ProgressiveList>, + G: List, + H: ProgressiveList, +} + fn byte_list_from_hex_str<'de, D, N: Unsigned>( deserializer: D, ) -> Result, D::Error> From 30289cd750eaedf6fbd79ac17a971e7913dd8320 Mon Sep 17 00:00:00 2001 From: Michael Sproul Date: Thu, 18 Dec 2025 21:54:31 +1100 Subject: [PATCH 4/4] Remove path patches --- Cargo.lock | 21 +++++++++++++-------- Cargo.toml | 10 +++++----- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1e9e774f6c6..0ea1bdb0119 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -698,7 +698,7 @@ version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" dependencies = [ - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -709,7 +709,7 @@ checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" dependencies = [ "anstyle", "once_cell_polyfill", - "windows-sys 0.60.2", + "windows-sys 0.61.2", ] [[package]] @@ -3119,7 +3119,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -3284,6 +3284,7 @@ dependencies = [ [[package]] name = "ethereum_ssz" version = "0.10.0" +source = "git+https://github.com/sigp/ethereum_ssz?branch=progressive#952eb175cf463ec92d3abaf232e42fb72af7314e" dependencies = [ "alloy-primitives", "arbitrary", @@ -3299,6 +3300,7 @@ dependencies = [ [[package]] name = "ethereum_ssz_derive" version = "0.10.0" +source = "git+https://github.com/sigp/ethereum_ssz?branch=progressive#952eb175cf463ec92d3abaf232e42fb72af7314e" dependencies = [ "darling 0.20.11", "proc-macro2", @@ -4756,7 +4758,7 @@ checksum = "3640c1c38b8e4e43584d8df18be5fc6b0aa314ce6ebf51b53313d4306cca8e46" dependencies = [ "hermit-abi 0.5.2", "libc", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -5857,6 +5859,7 @@ dependencies = [ [[package]] name = "milhouse" version = "0.9.0" +source = "git+https://github.com/sigp/milhouse?branch=progressive-list#556e7bb1f18af5c0ffeccc4ecaa9cd52ebb9003c" dependencies = [ "alloy-primitives", "arbitrary", @@ -6340,7 +6343,7 @@ version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -7782,7 +7785,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.11.0", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -8869,7 +8872,7 @@ dependencies = [ "getrandom 0.3.4", "once_cell", "rustix 1.1.2", - "windows-sys 0.59.0", + "windows-sys 0.61.2", ] [[package]] @@ -9442,6 +9445,7 @@ dependencies = [ [[package]] name = "tree_hash" version = "0.12.0" +source = "git+https://github.com/sigp/tree_hash?branch=progressive#7400510546840a3985474380d934d33f9ba0d417" dependencies = [ "alloy-primitives", "ethereum_hashing", @@ -9453,6 +9457,7 @@ dependencies = [ [[package]] name = "tree_hash_derive" version = "0.12.0" +source = "git+https://github.com/sigp/tree_hash?branch=progressive#7400510546840a3985474380d934d33f9ba0d417" dependencies = [ "darling 0.21.3", "proc-macro2", @@ -10201,7 +10206,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.61.2", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 37d07d467f4..2b988524cd1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -286,8 +286,8 @@ debug = true [patch.crates-io] quick-protobuf = { git = "https://github.com/sigp/quick-protobuf.git", rev = "681f413312404ab6e51f0b46f39b0075c6f4ebfd" } # FIXME(sproul): REMOVE patch -milhouse = { path = "../milhouse" } -ethereum_ssz = { path = "../packages/ethereum_ssz/ssz" } -ethereum_ssz_derive = { path = "../packages/ethereum_ssz/ssz_derive" } -tree_hash = { path = "../packages/tree_hash/tree_hash" } -tree_hash_derive = { path = "../packages/tree_hash/tree_hash_derive" } +milhouse = { git = "https://github.com/sigp/milhouse", branch = "progressive-list" } +ethereum_ssz = { git = "https://github.com/sigp/ethereum_ssz", branch = "progressive" } +ethereum_ssz_derive = { git = "https://github.com/sigp/ethereum_ssz", branch = "progressive" } +tree_hash = { git = "https://github.com/sigp/tree_hash", branch = "progressive" } +tree_hash_derive = { git = "https://github.com/sigp/tree_hash", branch = "progressive" }