flow-go
flow-go copied to clipboard
[Access] Unify Event streaming endpoint on the execution data gRPC API
Problem Definition
Currently, event streaming endpoint includes both startBlockID and startHeight. However, only one may be provided in a single request. This adds more complexity and code to the client.
Proposed Solution
Unify event streaming by separating SubscribeEventsendpoint into next endpoints:
- SubscribeEventsFromStartBlockID
- SubscribeEventsFromStartHeight
- SubscribeEventsFromLatest
As an example, SubcribeBlocks endpoints can be used.
Definition of Done
- Add separate messages for
SubscribeEvents. - Create new versions of the backend methods.
- Modify unit and functional tests covering the new endpoints.
Please also add the messageIndex to responses. This was missed in the original design, and is needed to allow pagination as well as tracking responses for sparse data sets.