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

[Access] Unify Event streaming endpoint on the execution data gRPC API

Open UlyanaAndrukhiv opened this issue 1 year ago • 1 comments

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.

UlyanaAndrukhiv avatar Mar 19 '24 10:03 UlyanaAndrukhiv

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.

peterargue avatar Mar 21 '24 23:03 peterargue