-
Notifications
You must be signed in to change notification settings - Fork 74
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 unfair IWANT penalty #166
Conversation
…d is not getting penalized with Eth2 params
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
src/test/kotlin/io/libp2p/pubsub/gossip/GossipPubsubRouterTest.kt
Outdated
Show resolved
Hide resolved
val AttestTopicPrefix = "/eth2/00000000/beacon_attestation_" | ||
val AttestTopicSuffix = "/ssz_snappy" | ||
|
||
val Eth2DefaultGossipParams = GossipParams( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't find the source for these params to confirm they are all set correctly. But as I understand it at this point they're only used for the test - we'd have to specifically chose to use them on the Teku side before scoring is activated right?
We just need to be cautious about how we enable peer scoring - probably should have a CLI option to toggle it for a while so we can test it really carefully in real world conditions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The source was some draft (I created this file a couple of months ago) from the group investigating Gossip params for Eth2.
Right this is just for testing purposes for now and the precise numbers are not too important here.
Yes, when enabling scoring in Teku we would need to revisit them for sure.
Co-authored-by: Adrian Sutton <adrian.sutton@consensys.net>
Fix the following scenario:
IHAVE
for messageM
from peerP1
IWANT M
toP1
M
from peerP2
notify the client and waits for its validationM
is received fromP1
(as a response toIWANT
)notifyAnyValidMessage
is not called for the latter inbound and pending entry is not removed fromiWantRequests
P1
is penalized forIWANT
response timeoutThe
iWantRequests
entry need to be cleared on any message. If a message occurs invalid the peer would be penalized in another wayAlso add the test verifying that a long period of Gossip
IGNORE
(i.e. not publishing any messages) doesn't underscore the node with Eth2 params