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

Ignore sync committee contributions that are a subset of ones we've already seen #5440

Merged
merged 8 commits into from
May 8, 2022

Conversation

ajsutton
Copy link
Contributor

@ajsutton ajsutton commented May 6, 2022

PR Description

Sync sync contribution validation rules to ignore any contribution that we've seen a non-strict superset for already.

Also reduced the cache size for sync committee gossip. There are only 512 members of the sync committee and we automatically ignore messages that aren't for the current slot so at most we need to remember 512 seen messages.

Fixed Issue(s)

fixes #5304

Documentation

  • I thought about documentation and added the doc-change-required label to this PR if updates are required.

Changelog

  • I thought about adding a changelog entry, and added one if I deemed necessary.

Comment on lines +40 to +41
public static final int VALID_CONTRIBUTION_AND_PROOF_SET_SIZE = 512;
public static final int VALID_SYNC_COMMITTEE_MESSAGE_SET_SIZE = 512;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if it still breaks, maybe increase this to be large enough for 2 slots.. i have vague memories...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be all good now. Having that too low would make it more likely to pass as we'd process more messages than we need to. But for sync committee messages I'm pretty confident there's no need to keep two slots since we ignore anything not from the current slot anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, all good now.

Copy link
Contributor

@rolfyone rolfyone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ajsutton ajsutton enabled auto-merge (squash) May 8, 2022 22:00
@ajsutton ajsutton merged commit 4f3076b into Consensys:master May 8, 2022
@ajsutton ajsutton deleted the ignore-subset-contributions branch May 8, 2022 22:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Ignore aggregate gossip that's a subset of previous messages
2 participants