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] Pending response from send and subscribe should return immediately #6573

Open
Tracked by #6163
peterargue opened this issue Oct 18, 2024 · 0 comments
Open
Tracked by #6163

Comments

@peterargue
Copy link
Contributor

Problem Definition

The SendAndSubscribe streaming grpc endpoint allows a user to send a transaction and immediately subscribe to status updates. Currently, it takes one or more seconds before receiving the first response indicating the transaction is pending. Since the transaction was submitted to that streaming node, it should know that the tx is pending immediately.

I suspect the issue is that it waits until the next block is finalized before triggering, then searches several blocks to catch up with the block the tx was included in.

Proposed Solution

Instead of waiting, add the pending status message immediately after creating the subscription:

return b.subscriptionHandler.Subscribe(ctx, nextHeight, b.getTransactionStatusResponse(&txInfo))

Definition of Done

When calling SendAndSubscribe, the pending response should be received immediately with no delay.

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

No branches or pull requests

1 participant