Skip to content

add DoS prevention validation conditions to additional gossipsub topics#1617

Merged
protolambda merged 2 commits into
devfrom
extra-message-gossip-vals
Feb 13, 2020
Merged

add DoS prevention validation conditions to additional gossipsub topics#1617
protolambda merged 2 commits into
devfrom
extra-message-gossip-vals

Conversation

@djrtwo

@djrtwo djrtwo commented Feb 12, 2020

Copy link
Copy Markdown
Contributor

add DoS prevention validation conditions to voluntary_exit, proposer_slashing, and attester_slashing gossipsub channels.

For each, only gossip the message if have not yet seen a prior valid message of that type for the relevant validator(s)

[also clarify in some other conditions that the no-repeat clause is only for valid messages]

…slashing, and attester_slashing gossipsub channels
@djrtwo djrtwo requested a review from protolambda February 12, 2020 23:00
Comment thread specs/phase0/p2p-interface.md Outdated
- The proposer slashing is the first valid proposer slashing received for the proposer with index `proposer_slashing.index`.
- All of the conditions within `process_proposer_slashing` pass validation.
- `attester_slashing` - This topic is used solely for propagating attester slashings to proposers on the network. Attester slashings are sent in their entirety. Clients who receive an attester slashing on this topic MUST validate the conditions within `process_attester_slashing` before forwarding it across the network.
- At least one index in the intersection of the attesting indices of each attestation has not yet been seen in any prior `attester_slashing` (i.e. `any((set(attestation_1.attesting_indices).intersection(attestation_2.attesting_indices)).difference(prior_seen_attester_slashed_indices))`).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Open to suggestions on making the code snippet more readable

Comment thread specs/phase0/p2p-interface.md Outdated
Co-Authored-By: Diederik Loerakker <proto@protolambda.com>
@djrtwo

djrtwo commented Feb 13, 2020

Copy link
Copy Markdown
Contributor Author

Addressed your comment @protolambda

@protolambda protolambda left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

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.

2 participants