Skip to content
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

Merged
merged 5 commits into from
Aug 25, 2022
Merged

Conversation

terencechain
Copy link
Member

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

@terencechain terencechain marked this pull request as ready for review August 25, 2022 21:55
@terencechain terencechain requested a review from a team as a code owner August 25, 2022 21:55
@terencechain terencechain requested review from kasey, saolyn and potuz August 25, 2022 21:55
@terencechain terencechain self-assigned this Aug 25, 2022
@potuz potuz added the Bug Something isn't working label Aug 25, 2022
potuz
potuz previously approved these changes Aug 25, 2022
Copy link
Contributor

@potuz potuz left a 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.

@terencechain
Copy link
Member Author

Looks good to me, good catch! a regression test would be to make sure that we accept an attestation while optimistic.

Good point. Added!

potuz
potuz previously approved these changes Aug 25, 2022
@@ -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)
Copy link
Member Author

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

@potuz potuz merged commit a2193ee into develop Aug 25, 2022
@terencechain terencechain deleted the accept-atts-optimistic branch May 13, 2024 04:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants