-
Notifications
You must be signed in to change notification settings - Fork 162
some groundwork for peer/content discovery #256
Conversation
Signed-off-by: ljedrz <ljedrz@gmail.com>
b325b9b
to
6428df5
Compare
Signed-off-by: ljedrz <ljedrz@gmail.com>
Signed-off-by: ljedrz <ljedrz@gmail.com>
6428df5
to
e2297fd
Compare
src/lib.rs
Outdated
@@ -608,6 +616,35 @@ impl<Types: IpfsTypes> Ipfs<Types> { | |||
rx.await? | |||
} | |||
|
|||
pub async fn bootstrap(&self) -> Result<(), Error> { |
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.
pub async fn bootstrap(&self) -> Result<(), Error> { | |
// Initiate a query for random key to discover peers. | |
pub async fn bootstrap(&self) -> Result<(), Error> { |
Is there a reason for this to be in the API or is it only while we are not doing this periodically ourselves?
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 know if we are doing it at all automatically; I can check
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.
doesn't seem that way, at least not in tests
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.
No we are not yet doing it automatically, but we probably should eventually.
What is the reason for exposing this as a method? Does kad queue these bootstraps or are they executed concurrently?
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.
Does kad queue these bootstraps or are they executed concurrently?
good question; I don't know, but I'd expect it to be concurrent; a single call can result in a few logs that the bootstrapping query has completed
Signed-off-by: ljedrz <ljedrz@gmail.com>
…_generated_keys Signed-off-by: ljedrz <ljedrz@gmail.com>
Signed-off-by: ljedrz <ljedrz@gmail.com>
Co-authored-by: Joonas Koivunen <joonas.koivunen@gmail.com> Signed-off-by: ljedrz <ljedrz@gmail.com>
… names Signed-off-by: ljedrz <ljedrz@gmail.com>
2beae18
to
b41490f
Compare
Signed-off-by: ljedrz <ljedrz@gmail.com>
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.
Looking good, thanks! bors r+
bors r+ |
Build failed: |
I dont think anything changed with the bitswap so that's probably a transient one. bors retry |
Build succeeded: |
Some groundwork for peer and content discovery using
libp2p::kad
.Very much a WIP with plenty of prototyping and wildprintln!
s.Cc #10