-
Notifications
You must be signed in to change notification settings - Fork 959
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
Implement the Brahms discovery protocol #867
Conversation
Since we don't have to conform to any existing protocol, we probably want to make Brahms generic in order to be able to pass additional metadata for peers. The user would have to pass a protocol name if they don't use the default type. This can look something like: impl Brahms<()> {
pub fn new() -> Self {
Self::with_protocol_name("/brahms/1.0.0")
}
}
impl<T> Brahms<T> {
pub fn with_protocol_name(name: ...) -> Self { ... }
} This metadata would be useful for example for Substrate to pass information such as the authority node ID or whether a node has full/light client capacity. |
This idea of metadata causes a big problem, which is how to "merge" metadata if it is diverging (ie. multiple nodes report multiple different metadata for the same target). |
Any idea what role the metadata serves? |
@burdges This metadata thing is an invention of mine. I thought it would be easy to do, but it turns out that not. We will see later if it could be useful. As for this PR, what remains to be done is:
|
Integrates #910 |
Here are some difficulties I've encountered: Duplicates in pull responsesImagine we perform 10 pull requests, and each request returns up to 10 nodes. According to the original, we are supposed to randomly pick 10 entries within these 100 results. BootstrappingThe original Brahms paper mentions that a round should happen only if we received any push request, or received any response to one of our pull requests. This creates two issues:
|
This pull request has merge conflicts. Could you please resolve them @tomaka? 🙏 |
Closing as stale. |
https://gnunet.org/sites/default/files/Brahms-Comnet-Mar09.pdf
Will rework a bit the code after #833