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

Transactions squeezed out in-between submit and statusChange calls hang indefinitely #2936

Closed
nedsalk opened this issue Aug 14, 2024 · 2 comments · Fixed by #3101
Closed
Assignees
Labels
bug Issue is a bug

Comments

@nedsalk
Copy link
Contributor

nedsalk commented Aug 14, 2024

@Torres-ssf did tests on devnet and found that sending a transaction would sometimes hang indefinitely. After some investigation, the problem was found to be transactions being squeezed out after submitting them but before a statusChange subscription is established. This statusChange subscription would then hang indefinitely because the squeezed out transaction is unavailable on the node.

Solution

To solve this, we'd have to use the submitAndAwait endpoint instead of submit in Provider.sendTransaction. This way the SqueezedOutStatus status wouldn't be lost as it'd be sent as the second event on the subscription after SubmittedStatus.

There are other considerations here. For example, what happens if we submit the transaction and the connection breaks? We'd have to use the statusChange subscription then, but we'd be back on square one because the transaction can be squeezed out in the meantime. That would require some internal "squeezed out timer" on statusChange which'd throw an error if there's no response from the node after e.g. 20 seconds, and this error would be something like "The transaction was probably squeezed out". This can be a separate issue.

Another thing worthy of covering is that a node has a maximum active subscriptions limit. What happens when that limit is reached and how do we account for that?

@nedsalk
Copy link
Contributor Author

nedsalk commented Aug 20, 2024

Blocked by:

Work has already been done on this issue and exists on the branch ns/feat/submit-and-await.

@maschad
Copy link
Contributor

maschad commented Aug 27, 2024

FuelLabs/fuel-core#2120 has been merged so this is no longer blocked

EDIT: Work can continue on a PR but we can't merge this until it's released in a fuel-core version post-v0.34.0

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

Successfully merging a pull request may close this issue.

2 participants