Skip to content
This repository has been archived by the owner on Aug 2, 2021. It is now read-only.

Robustness #1153

Closed
wants to merge 5 commits into from
Closed

Robustness #1153

wants to merge 5 commits into from

Conversation

holisticode
Copy link
Contributor

@holisticode holisticode commented Jan 22, 2019

This PR adds the parameter Robust to the Healthy structure.

Robust denotes

whether we are connected to a minimum of peers in all the bins we have known peers in.

It is meant as a discussion PR until we reach consensus on how this parameter will be used.

For reviewers other than @nolash :
You are welcome to leave comments but this is not yet ready for formal review.

swarm/network/kademlia.go Outdated Show resolved Hide resolved
swarm/network/kademlia_test.go Show resolved Hide resolved
swarm/network/kademlia_test.go Outdated Show resolved Hide resolved
swarm/network/simulations/discovery/discovery_test.go Outdated Show resolved Hide resolved
swarm/network/kademlia.go Outdated Show resolved Hide resolved
Copy link
Contributor

@nolash nolash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For my part this is now ok. But I am not at all sure whether the idea I have of "healthiness" is the right one anymore. So I defer judgement. My advice is to have two more approvals of this besides mine from someone who understands the terms that are in use.

@zelig
Copy link
Member

zelig commented Feb 1, 2019

I had a discussion with @holisticode about this. IMHO healthy is primarily used as a stop condition in simulation tests
Since the current version only checks nearest neighbours, saturation of bins shallower than depth is not checked.
With another implementation of hive discovery, unhealthy kademlias could pass as healthy.
But saturation check cannot be absolute since we can have situations that there is simply less than MinBinSize peers for a node in a bin. Therefore the peer pot has to be enriched with the counts of potential peers for each bin (upto depth at least) for each node.
These cardinalities can be passed to the health function via a slice of integers which are compared to known and connected peers.

@zelig
Copy link
Member

zelig commented Feb 12, 2019

obsoleted by #1195

@zelig zelig closed this Feb 12, 2019
@holisticode holisticode deleted the robustness branch February 28, 2019 17:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants