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

Add receipts to status subscription #1364

Closed
Voxelot opened this issue Sep 12, 2023 · 1 comment · Fixed by #1504
Closed

Add receipts to status subscription #1364

Voxelot opened this issue Sep 12, 2023 · 1 comment · Fixed by #1504
Assignees

Comments

@Voxelot
Copy link
Member

Voxelot commented Sep 12, 2023

We currently have a way to submit a transaction which also creates a subscription to the transaction status. However, most users of the node will still need to fetch the receipts after receiving the final status update. This requires the use of sticky sessions to ensure that the 2nd request for receipts goes to the same node that provided the status update.

Instead, we should include receipts on the final status update in the subscription. This simplifies the logic in the sdk to avoid making multiple requests, and also guarantees consistency without needing to use sticky sessions.

@xgreenx
Copy link
Collaborator

xgreenx commented Sep 21, 2023

Some notes regarding the implementation:

  1. Add receipts to the SuccessStatus

Image

  1. Add receipts to the FailureStatus

Image

  1. And update submit_and_await_commit_with_receipts function to fetch receipts in one request
    Image

bvrooman pushed a commit that referenced this issue Nov 28, 2023
Related issues:
- Closes #1364

This PR adds receipts to the transaction status objects returned by
transaction-related GraphQL queries. When querying for the status of a
transaction, a status of `Failed` or `Success` will now include the
transaction receipts.

Note that this PR does not remove Receipts from `OpaqueTransaction` or
other places that would constitute a breaking change, thus preserving
existing behaviour. We can remove receipts from redundant areas in a
follow up PR after the beta release.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants