onflow / flow-go

A fast, secure, and developer-friendly blockchain built to support the next generation of games, apps, and the digital assets that power them.
GNU Affero General Public License v3.0
531 stars 170 forks source link

[EFM] Update Consensus Committee EFM processing #5730

Open kc1116 opened 2 months ago

kc1116 commented 2 months ago

Context

The Consensus Committee maintains a cache for epochs by counter. Currently, the Consensus Committee performs explicit handling of EFM by inserting a special fallback epoch (see code).

Changes:

⚠️ Required overall Behavior:

Further Reading

Design

### Depends on
- [ ] https://github.com/onflow/flow-go/issues/5717
- [ ] https://github.com/onflow/flow-go/issues/5724
- [ ] https://github.com/onflow/flow-go/issues/5726
AlexHentschel commented 2 months ago

ideally, the Consensus Committee would behave consistently:

In my opinion, the Epoch State Machine in the Protocol state should emit events accordingly, such that the consensus committee only need to follow the view ranges from the Epoch State Machine.

suggestion: I think we should re-frame this issue toRestructure Notifications emitted by the Epoch State Machine (Protocol state) to unambiguously specify committed view ranges for leader selection (Consensus Committee)

AlexHentschel commented 2 months ago

depends on https://github.com/onflow/flow-go/issues/5723

AlexHentschel commented 1 month ago

List of places in the code that need updating

Caution: This list is likely not exhaustive! Be on the lookout for additional spots in the codebase.