-
Notifications
You must be signed in to change notification settings - Fork 7
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
452 vault client retries transaction submission for unrecoverable errors #453
452 vault client retries transaction submission for unrecoverable errors #453
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it possible to recreate POOL_UNACTIONABLE
and/or POOL_UNKNOWN_VALIDITY
and test it?
examples:
POOL_INVALID_TX
POOL_TOO_LOW_PRIORITY
I am not sure we can test this since we would need to modify the pool logic. I could not find much information about these errors, but the assumption was that a pool error would not be a problem with the transaction itself. I removed Update: I also removed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, the error still occurred:
Dec 05 18:42:57.878 WARN runtime::retry: Subxt runtime error: Runtime error: Module(ModuleError { pallet: "StellarRelay", error: "InvalidQuorumSetNotEnoughValidators", description: [], error_data: ModuleErrorData { pallet_index: 68, error: [12, 0, 0, 0] } }) - next retry in 0.904 s
Dec 05 18:42:57.879 INFO vault::requests::structs: Successfully executed Redeem request #0x6ec8…9392
Dec 05 18:42:57.879 INFO vault::requests::execution: Successfully executed Redeem request #0x6ec8…9392
Dec 05 18:42:58.198 INFO vault::requests::structs: Successfully executed Redeem request #0xcb6f…4fbd
Dec 05 18:42:58.200 INFO vault::requests::execution: Successfully executed Redeem request #0xcb6f…4fbd
Dec 05 18:43:50.791 WARN runtime::retry: Subxt runtime error: Runtime error: Module(ModuleError { pallet: "StellarRelay", error: "InvalidQuorumSetNotEnoughValidators", description: [], error_data: ModuleErrorData { pallet_index: 68, error: [12, 0, 0, 0] } }) - next retry in 1.691 s
Let's take @ebma 's assumption and go ahead flag as "unrecoverable" the module errors.
Thanks @b-yap for testing this. I found that there is a second call to As soon as I can test this and replicate that scenario I will update this comment. Update: Running locally the vault I know get that the vault is not retrying with Quorum Errors and gives up on the request.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's wait for @ebma
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good overall. Though one remark that I noticed while testing it:
If the extrinsic to execute the request fails and returns an error, then we are still retrying it up to three times. I think we should not increment the retry_counter here but rather break
and exit from the loop. Because we know that the request cannot be executed when we retry.
Or do you remember if there was a good reason to also add the retry here @b-yap? It makes sense in this error block but not in the other one IMO.
But if there is a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can ignore the Timeout
that is thrown in the backoff policy here.
Maybe I'm wrong but the way I see it, then with our current implementation, we will stay here until we either hit an Unrecoverable
error or the error is recoverable and it was already retried so many times that we encounter the Timeout error you mentioned. In both cases we wouldn't want to retry in this outer loop again. Because, if it was Unrecoverable
we don't want to retry and if we get the Timeout
then we already retried a lot anyways.
Yes you may be right about the outer retry loop. Either way, if we needed more retries just changing the backoff policy would be enough. Let's wait for @b-yap take on it? Otherwise we just remove the counter there and put a break like you say. |
@gianfra-t Yes you can remove the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great changes, good job @gianfra-t 👍
Tested it locally and looks good to me. Ready for merge once CI passed.
Closes #452
Changes
data
filed on the parsed error to detect recoverable errors (lack of funds, incorrect nonce).POOL_UNACTIONABLE
orPOOL_UNKNOWN_VALIDITY
(which are not necessarily invalid transactions) the vault will retry the transaction.