Fix peer addition until malice detection is implemented

Description

The from_existing constructor should take 2 lists of peers: the current section (nodes that would be susceptible to contact us at the time of joining) and the genesis section.

The enum: PeerState should gain a few variants. Alltogether, the states to be covered must answer the following questions:

  • Should we accept gossip from that peer?

  • Should we send gossip to that peer?

  • Should we take that peer into account when counting supermajorities and "all peers" (for instance, when we need a result for all meta-elections)?

When joining a section, we start by having the genesis groups as nodes that we don't want to contact but that count in supermajorities. The "current section" members should be able to contact us but not to participate in supermajorities (until we receive gossip from any node that proves that they are current valid voters).

Until we handle malice, we want to update our peer list every time we process an event from any node (this will change when implementing ).

Binary decisions must propagate whether they come from a gossip event's `self_parent` or any other ancestor.

Environment

None

Assignee

Jon Haggblad

Reporter

Pierre Chevalier

Start date

2018/09/18

End date

2018/09/18

Task progress

None

Baseline start date

None

Baseline end date

None

Story Points

4

Components

Priority

Major
Configure