Constellation-Labs / constellation

:milky_way::satellite: Decentralized Application Integration Platform
Apache License 2.0
153 stars 40 forks source link

Trigger fetching missing proposals when majority state chooser selects lower majority than others #1465

Closed kpudlik closed 3 years ago

kpudlik commented 3 years ago

The basic case is described in #1464 but sometimes node doesn't know that there is a gap in proposals.

Example:

  1. A gossips proposal at height 8, whole cluster gets the proposal.
  2. A gossips proposal at height 10 but node D doesn't get proposal.
  3. A goes offline.
  4. Whole cluster has proposal 8 of A but D doesn't know that there is newer proposal than 8 for D. It means that we need to find a way to inform D about missing proposal. One of possible solutions is to send lastMajorityHeight together with other proposals so for example if D gets proposal from B with information that lastMajorityHeight is 10 then in the next round of MajorityStateChooser it sees that B calculated majority at 10 so it must have received proposal from A at 10 (by calculating diff).