-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Accept attestations when node is optimistic #11319
Conversation
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.
Looks good to me, good catch! a regression test would be to make sure that we accept an attestation while optimistic.
Good point. Added! |
@@ -588,7 +588,7 @@ func TestValidateSyncCommitteeMessage_Optimistic(t *testing.T) { | |||
Topic: &topic, | |||
}, | |||
} | |||
res, err := r.validateCommitteeIndexBeaconAttestation(ctx, "foobar", msg) | |||
res, err := r.validateSyncCommitteeMessage(ctx, "foobar", msg) |
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.
These tests are bad to begin with. TestValidateSyncCommitteeMessage_Optimistic
is calling validateCommitteeIndexBeaconAttestation
. I fixed it here but they will be removed in #11320
It doesn't make sense why a node would stop accepting attestations over the wire under optimistic mode. The node should account for these attestations in fork choice. I understand that a node should not perform duties under optimistic mode but this is very different than performing duties