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

Add feature to disconnect peers as part of shuffling algorithm #3347

Closed
shuse2 opened this issue Nov 22, 2018 · 1 comment
Closed

Add feature to disconnect peers as part of shuffling algorithm #3347

shuse2 opened this issue Nov 22, 2018 · 1 comment
Assignees

Comments

@shuse2
Copy link
Collaborator

shuse2 commented Nov 22, 2018

Description

In lisk-p2p phase2 from LIP0004, we are going to implement peer shuffling on outgoing connections.

Over the course of 30 blocks (approximately 5 minutes), one outgoing connection is chosen uniformly at random and terminated at a random time during the interval of 30 blocks.

We need to consider fixed and black peers list here to make sure we don't connect with blacklist peer and we don't drop connection with fixedlist peer.

@shuse2 shuse2 transferred this issue from LiskArchive/lisk-elements Apr 15, 2019
@diego-G diego-G self-assigned this May 13, 2019
@diego-G diego-G changed the title Add feature to shuffle the connected peers Add feature to maintain and shuffle the connected peers May 13, 2019
@jondubois jondubois changed the title Add feature to maintain and shuffle the connected peers Add feature to expire connected peers as part of shuffling algorithm May 17, 2019
@jondubois jondubois changed the title Add feature to expire connected peers as part of shuffling algorithm Add feature to disconnect peers as part of shuffling algorithm May 17, 2019
@jondubois
Copy link
Contributor

jondubois commented May 17, 2019

Based on a few discussions with @diego-G, it was decided to separate peer management into three concerns:

  • Populating the connected peer list up to a desired size.
  • Removing (and disconnecting) peers from the connected peer list (e.g. can be caused by banning, shuffling or failed internet connection).
  • Preventing invalid peers from connecting.

This issue should implement the 'removing' part of the shuffling. The populating algorithm will automatically replenish the list with a different peer from the network (just like it already does if an existing peer drops/loses their connection).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants