-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Description
Description
Other implementations have the concept of a PeerStore
, should we add one to rust-libp2p
too? I am thinking of a NetworkBehaviour
implementation tracks currently connected peers and allows to add / remove addresses.
See related discussions:
- chore(libp2p): expose
Behaviour::connected
andBehaviour::addresses
#4101 - libp2p-kad: provide a way to get known addresses of a peer from address book #3633
- On connection management #2118
Motivation
Users should be able to query the connected peers in a simple way and add known addresses of peers that will contribute to establishing new connections.
Open questions
- Are the two topics connected-peers and adding new addresses related enough to merge them in one behaviour?
- Is storing addresses in-memory fine for now?
- Should we add a persistent address book as well? e.g. an SQL-based one?
Are you planning to do it yourself in a pull request?
No
mxinden, dariusc93, DougAnderson444 and drHuangMHT