Skip to content

Add EIP-7916 ProgressiveList specs and tests #4445

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

etan-status
Copy link
Contributor

@etan-status etan-status commented Jul 16, 2025

EIP-7916 defines a new SSZ type for lists of unknown length.

Historically, we used List[type, N] with very large N values for this:

  • This wastes hashes, as log(N) hashes are still required even if only a single item is present. This is especially bad when nesting lists.

  • Generalized indices break, as is what happened when the Attestation count got reduced in Electra, introducing maintenance burden to apps that possibly involves security countil for upgrading smart contracts.

This PR adds specs and tests for EIP-7916 which fixes these issues, making the new list type available to EIP implementations in _features.

EIP-7916 defines a new SSZ type for lists of unknown length.

Historically, we used List[type, N] with very large N values for this:

- This wastes hashes, as log(N) hashes are still required even if only
  a single item is present. This is especially bad when nesting lists.

- Generalized indicse break, as is what happened when the Attestation
  count got reduced in Electra, introducing maintenance burden to apps
  that possibly involves security countil for upgrading smart contracts.

This PR adds specs and tests for EIP-7916 which fixes these issues,
making the new list type available to EIP implementations in _features.

- https://eips.ethereum.org/EIPS/eip-7916
etan-status added a commit to status-im/nimbus-eth2 that referenced this pull request Jul 16, 2025
Implement test runner for new consensus-spec test format for EIP-7916
ProgressiveList, so that we will immediately pick up the new tests when
they become available.

- ethereum/consensus-specs#4445
@etan-status
Copy link
Contributor Author

@jtraglia
Copy link
Member

Hey @etan-status, I like the idea, but I believe there must be sufficient support from the community (core devs) before this can be merged. If there isn't sufficient support, we could try to make a ssz/_features/eip7916/simple-serialize.md file with the changes here. Let's bring this PR up on the next ACDC call and see what people think.

tersec pushed a commit to status-im/nimbus-eth2 that referenced this pull request Jul 17, 2025
Implement test runner for new consensus-spec test format for EIP-7916
ProgressiveList, so that we will immediately pick up the new tests when
they become available.

- ethereum/consensus-specs#4445
@leolara leolara added the testing CI, actions, tests label Jul 21, 2025
@leolara
Copy link
Member

leolara commented Jul 21, 2025

Please, let me know if this change to the specs is accepted for inclusion. Then, I can review the tests and check if I can add more tests to it :-)

etan-status added a commit to status-im/nimbus-eth2 that referenced this pull request Jul 25, 2025
Copy link
Member

@jtraglia jtraglia left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @etan-status!

We will wait until July 31st to merge this, to give others time to review.

cc @leolara

tersec pushed a commit to status-im/nimbus-eth2 that referenced this pull request Jul 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing CI, actions, tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants