-
Notifications
You must be signed in to change notification settings - Fork 291
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
[libp2p/consensus] p2p spamming defense #3212
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Closed
LeoHChen
force-pushed
the
p2p_spam_defense
branch
5 times, most recently
from
July 10, 2020 08:50
7256c5d
to
f57f3d7
Compare
LeoHChen
force-pushed
the
p2p_spam_defense
branch
from
July 10, 2020 09:00
f57f3d7
to
c97700c
Compare
LeoHChen
force-pushed
the
p2p_spam_defense
branch
from
July 10, 2020 20:18
c97700c
to
fb7eae5
Compare
any more comments, @JackyWYX , @sebastianj , @rlan35 ? |
It's basically rebasing the old code on top of main branch, especially after the blskey wrapper changes. |
rlan35
reviewed
Jul 14, 2020
rlan35
reviewed
Jul 14, 2020
rlan35
approved these changes
Jul 14, 2020
Note: This PR contains the rebasement of the code from #3114, which already acknowledged the original author of the code. |
LeoHChen
force-pushed
the
p2p_spam_defense
branch
2 times, most recently
from
July 15, 2020 09:04
5e2a3a0
to
b19dfaf
Compare
This is a big PR merged many small commits together. We add the message validation function in libp2p layer. In the validation function, we check the following conditions 1) the p2p message is a valid consensus message 2) the p2p message sender has a valid public key 3) the sender's public key is in the current committee 4) log the number of invalid/valid messages After the validation, the valid messages will be forward to the network, while the invalid messages will be filtered out. The messages intended for the validator will be handled in the consensus layer. Signed-off-by: Leo Chen <leo@harmony.one>
LeoHChen
force-pushed
the
p2p_spam_defense
branch
from
July 15, 2020 09:24
b19dfaf
to
cac65a4
Compare
restore the original grace period function Signed-off-by: Leo Chen <leo@harmony.one>
LeoHChen
force-pushed
the
p2p_spam_defense
branch
from
July 15, 2020 10:22
cac65a4
to
82d7210
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a big PR merged many small commits together.
We add the message validation function in libp2p layer.
In the validation function, we check the following conditions
After the validation, the valid messages will be forward to the network,
while the invalid messages will be filtered out.
The messages intended for the validator will be handled in the consensus layer.