-
Notifications
You must be signed in to change notification settings - Fork 290
Bugfix: Invalid blocks were produced in the presence of invalid deposits #3639
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
Conversation
@@ -296,7 +296,7 @@ proc process_deposit*(cfg: RuntimeConfig, | |||
else: | |||
# Verify the deposit signature (proof of possession) which is not checked | |||
# by the deposit contract | |||
if skipBlsValidation in flags or verify_deposit_signature(cfg, deposit.data): | |||
if verify_deposit_signature(cfg, deposit.data): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we have tests that don't create signatures for deposits but expect them to succeed
@@ -296,7 +296,7 @@ proc process_deposit*(cfg: RuntimeConfig, | |||
else: | |||
# Verify the deposit signature (proof of possession) which is not checked | |||
# by the deposit contract | |||
if skipBlsValidation in flags or verify_deposit_signature(cfg, deposit.data): | |||
if verify_deposit_signature(cfg, deposit.data): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we have tests that don't create signatures for deposits but expect them to succeed
good find 🎉 |
c80bf84
to
74c7d4d
Compare
Since we were not verifying BLS signature in blocks that we produce, we were failing to notice that some deposits need to be ignored (due to having an invalid signature). Processing these deposits resulted in a different ending state after the state transition which caused our blocks to be rejected by the network.
74c7d4d
to
2a9dd4f
Compare
@@ -124,9 +124,11 @@ proc addTestBlock*( | |||
sync_aggregate, | |||
default(ExecutionPayload), | |||
noRollback, | |||
cache) | |||
cache, | |||
verificationFlags = {skipBlsValidation}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ping @zah this should be flags
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be removed, but there wasn't enough time before the release to investigate how the tests can be fixed. Otherwise, feel free to rename it although the flags
name would be a bit misleading in a function called makeBeaconBlock
(the flags don't affect how the block is created, but rather how it's executed (or verified), hence my name).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we use flags
as a convention for this variable throughout the spec code which makes the code easier to read - it would be nice if this code adhered to it as well
Since we were not verifying BLS signature in blocks that we produce,
we were failing to notice that some deposits need to be ignored (due
to having an invalid signature). Processing these deposits resulted
in a different ending state after the state transition which caused
our blocks to be rejected by the network.