Skip to content

misc: add a PeerStore behaviour #4103

@thomaseizinger

Description

@thomaseizinger

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:

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions