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

Make vault retry Stellar transaction submission for tx_insufficient_fee error #499

Closed
ebma opened this issue Mar 27, 2024 · 5 comments · Fixed by #500
Closed

Make vault retry Stellar transaction submission for tx_insufficient_fee error #499

ebma opened this issue Mar 27, 2024 · 5 comments · Fixed by #500
Assignees

Comments

@ebma
Copy link
Member

ebma commented Mar 27, 2024

When the vault client submits a Stellar payment transaction to fulfill a redeem request, it might encounter a tx_insufficient_fee error because the fee prices surged from one ledger to another. This means the transaction is rejected and the vault needs to create a new payment with a higher fee. This retry is currently not done and the submission is only retried when the vault performs its periodic restart ie. every 3 hours.

TODO

We need to change the logic so that the payment is retried with a new transaction and a higher fee when the tx_insufficient_fee response is returned by Stellar horizon.

@ebma ebma self-assigned this Mar 27, 2024
@vadaynujra
Copy link

@ebma Not fully aware of the factor by which fees on Stellar could sometimes increase up to, but do we need to consider a max here such that if the transaction fee is higher than that, the transaction would still fail?
Also, what would be the new expected time for a redemption request to be executed?

@ebma
Copy link
Member Author

ebma commented Mar 27, 2024

but do we need to consider a max here such that if the transaction fee is higher than that, the transaction would still fail?

Good question. I changed the implementation so that the vault will try to resubmit the same payment with a larger fee but never exceeding the maximum fee of 1 XLM ($0.11). Are you okay with this value? Generally, the fee charged should end up lower but we of course also want to be able to bridge during higher load on the Stellar network. If the payment still fails with 1 XLM, the vault will keep retrying with that value until the submission succeeds without further increasing this value.

Also, what would be the new expected time for a redemption request to be executed?

This change doesn't improve the execution time of redeem requests in the happy cases ie. with fast block times on Pendulum and low load on Stellar. However, this change should prevent users from waiting more than a couple of minutes.

@vadaynujra
Copy link

Sounds like a sensible approach @ebma with the 1 XLM max.

@vadaynujra
Copy link

So this change would make it highly probable for the redeem requests to be completed within a few minutes.
@annatekl for Portal wording.

@ebma
Copy link
Member Author

ebma commented Mar 28, 2024

Yes 👍 there is one more problem that sometimes happens during very heavy loads on Stellar mainnet and we are still looking into this but this change should already improve the likelihood a lot.

@ebma ebma closed this as completed in #500 Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants