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

Fix slot checks in light client p2p spec #3086

Merged
merged 3 commits into from
Nov 11, 2022

Conversation

michaelsproul
Copy link
Contributor

@michaelsproul michaelsproul commented Nov 8, 2022

I think the p2p spec for light client updates should require the received update to be newer than previously forwarded updates. In other words, the condition should be corrected to:

No other finality_update with a lower greater or equal finalized_header.slot was already forwarded on the network

However I think it's somewhat clearer to state the condition without a negation, as in:

[IGNORE] The finalized_header.slot is greater than the slot of all previously forwarded finality updates

Copy link
Member

@ralexstokes ralexstokes left a comment

Choose a reason for hiding this comment

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

makes sense, otherwise there is a mild DoS vector where I just keep spamming the current update to add load to the gossip net

specs/altair/light-client/p2p-interface.md Outdated Show resolved Hide resolved
specs/altair/light-client/p2p-interface.md Outdated Show resolved Hide resolved
Co-authored-by: Alex Stokes <r.alex.stokes@gmail.com>
Copy link
Collaborator

@dapplion dapplion left a comment

Choose a reason for hiding this comment

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

Looks reasonable to me, CC: @etan-status

Copy link
Contributor

@etan-status etan-status left a comment

Choose a reason for hiding this comment

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

Thanks, yes, that was the intention (slots must strictly monotonically increase in gossip), and is also how it is implemented in Nimbus. The new wording is clearer as well.

@ralexstokes ralexstokes merged commit faf3083 into ethereum:dev Nov 11, 2022
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.

None yet

5 participants