Skip to content

Comments

Progressive data structures and tests EIP-7916, EIP-8016#8505

Open
michaelsproul wants to merge 12 commits intounstablefrom
progressive-list-tests
Open

Progressive data structures and tests EIP-7916, EIP-8016#8505
michaelsproul wants to merge 12 commits intounstablefrom
progressive-list-tests

Conversation

@michaelsproul
Copy link
Member

@michaelsproul michaelsproul commented Dec 1, 2025

Proposed Changes

Run the EF tests for new types from EIP-7916 and EIP-8016:

  • ProgressiveList
  • ProgressiveBitList
  • Progressive containers
  • Compatible unions

The SSZ generic tests are passing if you run them without compiling the rest of Lighthouse:

cargo test -p ef_tests --release --features ef_tests -- ssz_generic

Everything else is probably broken.

Additional Info

Depends on:

Known Issues

  • The introduction of BitList<Progressive>::with_capacity has created some type inference ambiguities causing state_processing not to compile. We should probably rename this method in ethereum_ssz.
  • Haven't merged unstable since the types refactor nor the gloas-containers merge.

@michaelsproul michaelsproul added spec_change A change related to the Eth2 spec test improvement Improve tests work-in-progress PR is a work-in-progress consensus An issue/PR that touches consensus code, such as state_processing or block verification. labels Dec 1, 2025
@michaelsproul
Copy link
Member Author

I've made a bunch of progress on this, but it requires local checkouts of ethereum_ssz and tree_hash at the moment. These branches:

Progressive bitlist tests are currently not passing, need to dig into why. The derive macro for progressive containers with 1 field works though 😅

Comment on lines +389 to +397
#[derive(Debug, Clone, PartialEq, Decode, Encode, TreeHash, Deserialize)]
#[tree_hash(
struct_behaviour = "progressive_container",
active_fields(0, 0, 0, 0, 1)
)]
#[context_deserialize(ForkName)]
struct ProgressiveSingleListContainerTestStruct {
C: ProgressiveBitList,
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking for feedback on the UX of this.

I quite like this UX for progressive containers because it closely follows the spec. We can just copy the active_fields vec straight into the struct attributes.

@michaelsproul michaelsproul changed the title EIP-7916: ProgressiveList and tests Progressive data structures and tests EIP-7916, EIP-8016 Jan 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

consensus An issue/PR that touches consensus code, such as state_processing or block verification. gloas spec_change A change related to the Eth2 spec test improvement Improve tests work-in-progress PR is a work-in-progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants