-
Notifications
You must be signed in to change notification settings - Fork 8
[BE2] Fix gossip relay #1900
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
[BE2] Fix gossip relay #1900
Conversation
Pull reviewers statsStats of the last 30 days for popstellar:
|
|
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.
Nice job ! only nitpicks comments
|
||
/** Does a step of gossipping protocol for given rpc. Tries to find a random peer that hasn't already received this msg If such a peer is found, sends message and updates table accordingly. If no peer is found, ends the protocol. | ||
* @param rumorRpc | ||
* Rpc that must be spreac |
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.
* Rpc that must be spreac | |
* Rpc that must be spread |
/** When receiving a rumor that must be relayed, empacks a rumor in a new jsonRPC and tries to do a step of gossipping protocol | ||
* @param request | ||
*/ |
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.
Consider adding the second parameter in the doc ;)
} | ||
} | ||
|
||
/** When receives a new publish, empacks messages in a new rumor and starts gossipping it in the network |
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.
/** When receives a new publish, empacks messages in a new rumor and starts gossipping it in the network | |
/** When receives a new publish, packs messages in a new rumor and starts gossiping it in the network |
updateGossip(newRumorRequest) | ||
} | ||
|
||
/** Processes a response. If a response matches a active gossip protocol, uses the reponse to decide how to continue gossipping If response is Positive (Result(0)), tries to do another step of gossipping If response is Negative (Error(-3)), considers stop gossiping |
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.
/** Processes a response. If a response matches a active gossip protocol, uses the reponse to decide how to continue gossipping If response is Positive (Result(0)), tries to do another step of gossipping If response is Negative (Error(-3)), considers stop gossiping | |
/** Processes a response. If a response matches an active gossip protocol, uses the response to decide how to continue gosipping If response is Positive (Result(0)), tries to do another step of gosipping If response is Negative (Error(-3)), considers stop gossiping |
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.
Actually double checked online and "gossipping" is correct
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.
my bad, shouldn't have blindly trusted intellij !
import akka.stream.scaladsl.Flow | ||
import ch.epfl.pop.model.network.method.{Broadcast, Catchup, GetMessagesById} | ||
import ch.epfl.pop.model.network._ | ||
import ch.epfl.pop.model.network.method.{Broadcast, Catchup, GetMessagesById, Rumor} |
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 don't think that's necessary
|
|
|
|
Push gossip was not working well for relay because of a reference being wrongly set.
As been fixed and improved to match configuration on Go