You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you run new examples onflow/flow-go-sdk#794 via make stream-account-statuses, you will run into an error msg received out of order. The current implementation expects it to start from 0, but it actually starts from 1 even though the tests expect it to start from zero. So, this is the bug and it has to be fixed asap
Problem Definition
The
SendAndSubscribeTransactionStatuses
endpoints includes aMessageIndex
field to help the client check that they received all messages. Currently, this value starts at 1 instead of 0, which is a little confusing since almost all iteration fields start at 0, and it's documented that it starts at 0.https://github.com/onflow/flow/blob/0b0946dbb2683cec184522b0e3e88246b076a2dc/protobuf/flow/access/access.proto#L753-L754
Other endpoints are documented to start at 1, but actually start at 0:
https://github.com/onflow/flow/blob/0b0946dbb2683cec184522b0e3e88246b076a2dc/protobuf/flow/executiondata/executiondata.proto#L469-L470
https://github.com/onflow/flow/blob/0b0946dbb2683cec184522b0e3e88246b076a2dc/protobuf/flow/executiondata/executiondata.proto#L621-L622
Proposed Solution
Let's update the logic and docs to use 0 as the first value for all endpoints.
This is the current logic for
SendAndSubscribeTransactionStatuses
flow-go/access/handler.go
Lines 1435 to 1450 in 0dde730
We could update it to be similar to the logic in other endpoints
flow-go/engine/access/state_stream/backend/handler.go
Lines 417 to 427 in f6814f8
The text was updated successfully, but these errors were encountered: