-
Notifications
You must be signed in to change notification settings - Fork 239
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
fullrt should maintain its own address book #1061
Comments
@guillaumemichel are you sure things are currently bugged? Looking at the code briefly:
That being said if we want to formalize the addressbook and integrate it with a simpler / easier to use go-libp2p API is indicated in libp2p/go-libp2p#3218 that makes a lot of sense |
Thanks for the quick feedback @aschmahmann ! I missed that the I think we can even remove the following, since it is a no-op (ttl of connected peer is higher than this one) go-libp2p-kad-dht/crawler/crawler.go Lines 303 to 307 in 64ea67f
|
Closing since
This partially related discussion can continue in #1063 |
Problem
fullrt
currently depends on thego-libp2p
peerstore to open connection and make requests through theProtocolMessenger
. Thefullrt
used to pollute thego-libp2p
host peerstore with many stale addresses (fixed in #1053).fullrt
periodically runs a crawl, and tries to remember addresses between 2 crawls, to be able to dial all nodes directly. However, it fails at doing so, because addresses are flushed from the peerstore shortly after the connection to the remote peers closes. Which means that the peerstore doesn't remember the addresses during the full crawl interval. It cannot be addresses easily because of the peerstore current interface libp2p/go-libp2p#3218.Potential solution
The best solution seems to be that
fullrt
maintains its own Address Book, and uses these addresses to dial remote peers when required. To achieve this, it is required to refactor theProtocolMessenger
logic, to depend on thefullrt
address book (or provided addresses), rather than on the host peerstore to open a new stream.go-libp2p-kad-dht/internal/net/message_manager.go
Line 209 in 64ea67f
see also #1053 (comment) for context.
The text was updated successfully, but these errors were encountered: