-
Notifications
You must be signed in to change notification settings - Fork 165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Access] Add endpoints to execution nodes to support tx result err msgs #1398
[Access] Add endpoints to execution nodes to support tx result err msgs #1398
Conversation
…chuk/4754-add-endpoints-to-execution-nodes-to-suppport-tx-result-err-msgs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @AndriiDiachuk!
I think this is a good start, and there's a little more needed for the usecase. I think we will need 2 new endpoints:
GetTransactionErrorMessage
-> Takes a transactionID and blockID, and returns the error message string for that tx.
GetTransactionErrorMessagesByBlockID
-> similar to what you have. takes a blockID, and returns a set of objects, one for each tx with an error.
I think the GetTransactionErrorMessagesByBlockID
response should contain a repeated message that includes the transaction's ID, index and error string.
@@ -50,6 +50,11 @@ service ExecutionAPI { | |||
rpc GetTransactionResultsByBlockID(GetTransactionsByBlockIDRequest) | |||
returns (GetTransactionResultsResponse); | |||
|
|||
// GetTransactionErrorMessagesByBlockID gets the error messages of all failed transactions in the | |||
// block ordered by transaction index | |||
rpc GetTransactionErrorMessagesByBlockID(GetTransactionsByBlockIDRequest) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's create a separate request object for this GetTransactionErrorMessagesByBlockIDRequest
@@ -141,6 +146,10 @@ message GetTransactionResultsResponse { | |||
entities.EventEncodingVersion event_encoding_version = 2; | |||
} | |||
|
|||
message GetTransactionErrorMessagesResponse { | |||
repeated string error_messages = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we'll need a way to differentiate between the messages for different errors.
Thanks for response @peterargue. Originally, I wanted to implement a few methods like you have suggested but after taking a closer look on current implementation I have noticed that we sync execution data using execution data sync module which syncs error messages only block by block basis. So I thought that we should mirror this logic and sync error messages for all failed transactions in the block. Regarding the response, I've omitted txid and index since we can derive that data by looking at the transactions in block and filtering failed transactions. For example, if we consider block txns: If you are worried about consistency of mapping error messages to the actual light execution results we can add a checksum of involved tx ids or a mechanism similar to signer indices(a bitset of tx indexes that are returned). If you think we can neglect with extra space I can always include full tx ids and indexes. |
…chuk/4754-add-endpoints-to-execution-nodes-to-suppport-tx-result-err-msgs
So my thinking on this is:
|
…chuk/4754-add-endpoints-to-execution-nodes-to-suppport-tx-result-err-msgs
@peterargue Made some changes with your suggestions. Waiting for you feedback. Thanks in advance. |
Description
onflow/flow-go#4754
This pull request introduces a new GRPC API call which gets the error messages of all failed transactions in the block ordered by transaction index.