eip8016: add CompatibleUnion specs and tests#4581
Merged
Merged
Conversation
This follows up on ethereum#4445, ethereum#4480, and ethereum#4529 to extend EIP-8016 support for unions, making the `CompatibleUnion` type available to _features. - https://eips.ethereum.org/EIPS/eip-8016
etan-status
added a commit
to status-im/nimbus-eth2
that referenced
this pull request
Sep 11, 2025
Implement test runner for new consensus-spec test format for EIP-8016 CompatibleUnion. New tests will automatically be picked up once they become available. - ethereum/consensus-specs#4581
Contributor
Author
Contributor
Author
|
This is the final of the new SSZ types. |
jtraglia
reviewed
Sep 25, 2025
Comment on lines
+164
to
+165
| - `CompatibleUnion({selector: type})` with a selector outside `uint8(1)` through | ||
| `uint8(127)` are illegal. |
Member
There was a problem hiding this comment.
Shouldn't this allow 0 as a valid selector? [0..127].
Contributor
Author
There was a problem hiding this comment.
https://eips.ethereum.org/EIPS/eip-8016#why-are-compatibleunion-selectors-limited-to-1--127
Currently reserving 0 for two reasons:
- Preventing bugs from default zero initialization (require selection of a specific case)
- Allow future expansion into None values (right now not needed)
The selector does not indicate an offset, so does not have a base, one might use values 5 and 12 without 1 through 4.
Member
There was a problem hiding this comment.
I see. This makes sense. My only concern is that this will be a bit confusing in practice.
If this is how it must be, I understand 👍
jtraglia
reviewed
Sep 25, 2025
jtraglia
reviewed
Sep 25, 2025
jtraglia
reviewed
Sep 25, 2025
etan-status
commented
Sep 25, 2025
jtraglia
reviewed
Sep 25, 2025
Co-authored-by: Justin Traglia <95511699+jtraglia@users.noreply.github.com>
leolara
suggested changes
Sep 26, 2025
leolara
suggested changes
Sep 26, 2025
leolara
suggested changes
Sep 27, 2025
leolara
approved these changes
Oct 7, 2025
jtraglia
reviewed
Oct 7, 2025
leolara
pushed a commit
to leolara/consensus-specs
that referenced
this pull request
Oct 14, 2025
This follows up on ethereum#4445, ethereum#4480, and ethereum#4529 to extend EIP-8016 support for unions, making the `CompatibleUnion` type available to _features. - https://eips.ethereum.org/EIPS/eip-8016
leolara
pushed a commit
to leolara/consensus-specs
that referenced
this pull request
Oct 16, 2025
This follows up on ethereum#4445, ethereum#4480, and ethereum#4529 to extend EIP-8016 support for unions, making the `CompatibleUnion` type available to _features. - https://eips.ethereum.org/EIPS/eip-8016
tersec
pushed a commit
to status-im/nimbus-eth2
that referenced
this pull request
Oct 17, 2025
Implement test runner for new consensus-spec test format for EIP-8016 CompatibleUnion. New tests will automatically be picked up once they become available. - ethereum/consensus-specs#4581
tersec
pushed a commit
to status-im/nimbus-eth2
that referenced
this pull request
Oct 21, 2025
* Extend SSZ generic tests with CompatibleUnion tests Implement test runner for new consensus-spec test format for EIP-8016 CompatibleUnion. New tests will automatically be picked up once they become available. - ethereum/consensus-specs#4581 * Properly process proglist SSZ generic tests * Split loading fix for next beta * Split coverage fix into next beta
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This follows up on #4445, #4480, and #4529 to extend EIP-8016 support for unions, making the
CompatibleUniontype available to _features.