flow-go
flow-go copied to clipboard
[EFM] EpochExtended event and emission logic
Context
When a block containing a new EpochExtension is finalized, the Protocol State emits an event to notify consumers. In particular, suppose we are finalizing block $B$ and block $A$ is $B$’s parent. An EpochExtended event is emitted iff:
len(B.ProtocolState.CurrentEpoch.Extensions) = len(A.ProtocolState.CurrentEpoch}.Extensions)+1
Definition of done
### Tasks
- [ ] Adding event to notification consumer and distributer
- [ ] FollowerState implementation - check for epoch extension and emit event
- [ ] FollowerState - add tests
https://github.com/onflow/flow-go/blob/871174eb00fdc1149bbc1c7bafe94f43fa5a6e4c/state/protocol/events.go
Further Reading
### Depends on
- [ ] https://github.com/onflow/flow-go/issues/5717
- [ ] https://github.com/onflow/flow-go/issues/5724
prerequisite for https://github.com/onflow/flow-go/issues/5730
Recording discussion about reporting of fallback state to downstream components. Can be handled as part of this issue. https://github.com/onflow/flow-go/pull/5773/files#r1579713925
there might be some overlap with #6013
Closed by https://github.com/onflow/flow-go/pull/6062