Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Implement peerbook or some similar list of peers #31

Closed
Tracked by #1
matjazv opened this issue Dec 15, 2022 · 0 comments · Fixed by #52
Closed
Tracked by #1

Implement peerbook or some similar list of peers #31

matjazv opened this issue Dec 15, 2022 · 0 comments · Fixed by #52
Assignees
Milestone

Comments

@matjazv
Copy link
Contributor

matjazv commented Dec 15, 2022

Description

New P2P package needs handling of all (known) peers. List of known peers needs to be saved in non-volatile memory so it can be reused in case of node reset.
It should be possible to provide different lists of peers to internal functions and external packages.

In gossip sub, we need

getConnectedPeers(): []peerID
getBlacklistedPeers(): []peerID

and in the initialization, we want gossipsub to start with

NewGossipSub(&Option{
  seedPeers: []peerID,
  knownPeers: []peerID,
  staticPeers: []peerID,
  blacklistedPeers: []peerID,
})

Acceptance Criteria

  • Internal functions and external packages have possibility to get a different lists of peers.
  • All new code is unit tested.

Additional Information

  • we need to check what we can passed to the gossipsub for the initial state, and discuss the input when creating the option
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants