-
Notifications
You must be signed in to change notification settings - Fork 22
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
Clean up homogeneous composite sedes length pre-conditions #116
Comments
@hwwhww I think the Lines 19 to 22 in 7e9c107
Lines 25 to 32 in 7e9c107
|
You're right, sorry! Fixing the suggested proposal:
I think this is more clear than overriding? |
@hwwhww that seems like a good way to do it :) |
hwwhww
changed the title
0-length List/Bitlist should be legal
Clean up homogeneous composite sedes length pre-conditions
Jun 18, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
updated the issue: 2020, June 18th
What was wrong?
As ethereum/consensus-specs#1863 pointed out, it seems
py-ssz/ssz/sedes/basic.py
Lines 177 to 180 in 7e9c107
is only for
Vector
, and then override it inList
. It made the illegal condition unclear.How can it be fixed?
1. Use illegal conditionmax_length < 0
forHomogeneousProperCompositeSedes
(wow it's so long)2. Override vector types' (Vector
andBitvector
)__init__()
with illegal conditionmax_length < 1
.HomogeneousProperCompositeSedes.__init_()
Vector
andBitvector
)__init__()
with illegal conditionmax_length < 1
.List
andBitlist
)__init__()
with illegal conditionmax_length < 0
.The text was updated successfully, but these errors were encountered: