Skip to content
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] SendAndSubscribeTransactionStatuses should include the transaction result in the response. #5566

Closed
Guitarheroua opened this issue Mar 21, 2024 · 2 comments
Assignees
Labels

Comments

@Guitarheroua
Copy link
Contributor

Problem Definition

The SendAndSubscribeTransactionStatuses was implemented for the Access API, but the response of this subscription contains only TX Status, TX ID, and MessageIndex. It would be useful to add TX Result to the response when TX was executed.

Proposed Solution

Add another TX result field to the SendAndSubscribeTransactionStatuses response and retrieve it when TX is executed.

Definition of Done

Update unit and integration tests to ensure that the new field is in place and correct.

@Guitarheroua
Copy link
Contributor Author

This issue could also be fixed in the scope of this task.

@peterargue
Copy link
Contributor

peterargue commented Mar 21, 2024

The SendAndSubscribeTransactionStatuses should have a new field that returns a TransactionResultResponse message. This field should be populated by the server when sending the "executed" response.

A single message should be sent for each of the status in the tx lifecycle, and message should be sent in order:
pending -> finalized -> executed -> sealed [or]
pending -> expired

If the backend runs into a situation where it discovers the tx is finalized and executed in the same run, it should send 2 back-to-back messages, the first for finalization, the second for executed including the result. It should not wait 1 block before sending the executed message. The goal for this endpoint is to provide access to the real time processing of a tx, so we should avoid adding any unnecessary delays.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants