-
Notifications
You must be signed in to change notification settings - Fork 230
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
Zero sig checks #2733
Zero sig checks #2733
Conversation
So the genesis block needs a real full zero signature not an infinity signature #374 while for the empty Altair sync committees we need infinity signatures #2736 So we need to choose a proper default for serializing a full zero |
aka: back to ethereum/consensus-specs#1713 |
Actually the zero sig test that was initially failing when introduced in https://github.com/status-im/nimbus-eth2/pull/400/files predates ethereum/consensus-specs#1713 and it's possible that it's irrelevant and can be deleted. |
This looks complicated - ie |
Closing. From Discord discussion. One Altair issue was due to different expectations between the BLS spec and the Altair test vector (which isn't supposed to happen in prod anyway). Fixed in #2741. see ethereum/consensus-specs#1713 Next steps is adding tests to ensure that a default init ValidatorSig cannot be deserialized (aka, only infinity points can). |
We sent blocks with a zero signature instead of an infinity signature in Altair.
This adds checks to ensure that on serialization of signatures, in particular empty aggregates or defautl init ones we send
0xc000...0000
which is the infinity point serialized.Source of the bug:
By delaying the deserialization of signatures up until they are needed (#2259)
nimbus-eth2/beacon_chain/spec/crypto.nim
Lines 64 to 65 in 07a1c57
In that case empty signatures will be hex-serialized as 0x0000...0000.
Solution, we need to check for a full zero byte array in a custom
toHex
function.