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 getting rejected due to "UTXO does not exist" #903

Closed
MujkicA opened this issue Mar 22, 2023 · 2 comments
Closed

Transactions getting rejected due to "UTXO does not exist" #903

MujkicA opened this issue Mar 22, 2023 · 2 comments
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@MujkicA
Copy link
Contributor

MujkicA commented Mar 22, 2023

Transactions on the beta network will occasionally be rejected with the following reason "UTXO does not exist".

One possible cause could be that resources_to_spend API is returning coins that have already been included in other transactions they've submitted (due to the delay between submitting a transaction and marking the inputs as spent).

If the cause is confirmed to be the above, we can consider the following solution suggested by @Voxelot:

The SDK should maintain a cache of recently used UTXOs, which are to be excluded calling resources_to_spend. When a transaction is confirmed or rejected, these UTXOs can be removed from the cache. This may require users to wait for their change outputs to become available before making subsequent transactions, but the process can be optimized by spending the change outputs of pending transactions in-flight. The SDK can predict the change outputs of previously submitted transactions during dry-run, which can aid in selecting pending outputs.

@MujkicA MujkicA self-assigned this Mar 22, 2023
@MujkicA MujkicA added enhancement New feature or request bug Something isn't working labels Mar 22, 2023
@diyahir
Copy link

diyahir commented Apr 18, 2023

Yes, please fix this, I've been running into the same issue I am manually wrapping my calls with a

try {}
catch { try_again }

which is far from ideal

@digorithm
Copy link
Member

Resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants