flow-go icon indicating copy to clipboard operation
flow-go copied to clipboard

[EFM] EpochExtended event and emission logic

Open kc1116 opened this issue 10 months ago • 2 comments

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

Design

### Depends on
- [ ] https://github.com/onflow/flow-go/issues/5717
- [ ] https://github.com/onflow/flow-go/issues/5724

kc1116 avatar Apr 18 '24 17:04 kc1116

prerequisite for https://github.com/onflow/flow-go/issues/5730

AlexHentschel avatar Apr 23 '24 19:04 AlexHentschel

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

durkmurder avatar May 08 '24 15:05 durkmurder

there might be some overlap with #6013

AlexHentschel avatar May 30 '24 21:05 AlexHentschel

Closed by https://github.com/onflow/flow-go/pull/6062

jordanschalm avatar Jun 24 '24 15:06 jordanschalm