-
Notifications
You must be signed in to change notification settings - Fork 54
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
GS: Relay messages to direct peers #949
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -106,10 +106,10 @@ | |
let topic = graft.topicId | ||
trace "peer grafted topic", peer, topic | ||
|
||
# It is an error to GRAFT on a explicit peer | ||
# It is an error to GRAFT on a direct peer | ||
if peer.peerId in g.parameters.directPeers: | ||
# receiving a graft from a direct peer should yield a more prominent warning (protocol violation) | ||
warn "an explicit peer attempted to graft us, peering agreements should be reciprocal", | ||
warn "a direct peer attempted to graft us, peering agreements should be reciprocal", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this can cause a log spam issue if they keep doing this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we are supposed to trust them somewhat There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hm, right about the trust - let's make a comment about it |
||
peer, topic | ||
# and such an attempt should be logged and rejected with a PRUNE | ||
prunes.add(ControlPrune( | ||
|
@@ -352,7 +352,7 @@ | |
# avoid negative score peers | ||
it.score >= 0.0 and | ||
it notin currentMesh[] and | ||
# don't pick explicit peers | ||
# don't pick direct peers | ||
it.peerId notin g.parameters.directPeers and | ||
# and avoid peers we are backing off | ||
it.peerId notin backingOff: | ||
|
@@ -392,7 +392,7 @@ | |
it notin currentMesh[] and | ||
# avoid negative score peers | ||
it.score >= 0.0 and | ||
# don't pick explicit peers | ||
# don't pick direct peers | ||
it.peerId notin g.parameters.directPeers and | ||
# and avoid peers we are backing off | ||
it.peerId notin backingOff: | ||
|
@@ -494,7 +494,7 @@ | |
# avoid negative score peers | ||
it.score >= median.score and | ||
it notin currentMesh[] and | ||
# don't pick explicit peers | ||
# don't pick direct peers | ||
it.peerId notin g.parameters.directPeers and | ||
# and avoid peers we are backing off | ||
it.peerId notin backingOff: | ||
|
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'll assume this gets filtered somewhere so we don't send to peers that have already seen the message?
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.
It wasn't, fixed