You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To skip the potentially slow process of a trusted getter submission to get the nonce, the client could store known account nonces locally within a Hashmap<AccountId, Index>.
The process should be relatively simple:
First the local hashmap is checked if account entry exists.
-If yes: use local nonce,
-If no: create trusted getter and get nonce. Store nonce within hashmap.
The challenge is now: How does the client know if the locally stored nonce of the account is not valid anymore? (due to call submission from different client for example).
I see the following option: If an error is returned after a call submission, the local hashmap entry is removed. The call could be automatically resubmitted after getting the updated nonce via trusted getter.
This way, the client does not need to manually resubmit the same call due to an invalid local nonce. However, currently the error cause is not known to the client, hence every call failure would link to a second submission.
Is this a valid approach, or what are your thoughts @brenzi ?
The text was updated successfully, but these errors were encountered:
To skip the potentially slow process of a trusted getter submission to get the nonce, the client could store known account nonces locally within a Hashmap<AccountId, Index>.
The process should be relatively simple:
First the local hashmap is checked if account entry exists.
-If yes: use local nonce,
-If no: create trusted getter and get nonce. Store nonce within hashmap.
The challenge is now: How does the client know if the locally stored nonce of the account is not valid anymore? (due to call submission from different client for example).
I see the following option: If an error is returned after a call submission, the local hashmap entry is removed. The call could be automatically resubmitted after getting the updated nonce via trusted getter.
This way, the client does not need to manually resubmit the same call due to an invalid local nonce. However, currently the error cause is not known to the client, hence every call failure would link to a second submission.
Is this a valid approach, or what are your thoughts @brenzi ?
The text was updated successfully, but these errors were encountered: