fix!: remove truncating VariableList conversions and migrate consumers#70
Merged
fix!: remove truncating VariableList conversions and migrate consumers#70
VariableList conversions and migrate consumers#70Conversation
delbonis
approved these changes
Apr 7, 2026
Collaborator
delbonis
left a comment
There was a problem hiding this comment.
So now I would kinda expect that new wouldn't take any arguments and would always construct an empty list, since now it's behaviorally duplicating try_from.
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.
Description
From<Vec<T>> for VariableList<T, N>because it silently truncated oversized inputsTryFrom<Vec<T>> for VariableList<T, N>backed byVariableList::new(...)ssz_typesdecode/docs/tests to use checked constructionVariableListconstructionssz_codegenexpected outputs to match the new generated codeexpect("valid view")Type of Change
Notes to Reviewers
This is breaking, that's why the last commit bumps the version to
0.15.0Vec<T>values can no longer be converted intoVariableList<T, N>by truncation.VariableList::try_from(...)orVariableList::new(...).expect("valid view")depending on whether the path is externally fallible or already protected by SSZ/view invariants.ssz_codegengenerated output changed in many snapshot files because list-to-owned conversion now uses checked construction.Checklist
Related Issues
STR-2856 and subtasks from it: STR-2857 and STR-2858