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
{{ message }}
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.
If transactions land to the nodes in such a way that early-nonce-transaction arrives later than the rest of the batch, and the batch makes it in the block, the delayed transaction will get rejected with INVALID_NONCE. See more context here and here. The solution is to use a pool of access keys or wait until it is resolved on the protocol level NEP-522: Optional Transaction Ordering near/NEPs#522
As part of this issue, I want us to doublecheck that it is possible to use near-api-rs in such situation and if not having a nice solution, at least have the option to have a helper wrapper with a pool of access keys.
The text was updated successfully, but these errors were encountered:
The nonce caching and key pooling are implemented on the Signer level.
As long as the user keeps using the same Signer instance (that is wrapped into Arc). It should be fine.
The nonce issue could happen if the number of keys is less than the amount of TXs per sending period.
Also, there is a potential issue that several instances of the same key are running concurrently. They may mess with each other, but it's up to the developer to provide unique keys.
Let's also ensure we test the API usability when app developers need to make concurrent transactions (function calls).
There are several challenges there:
As part of this issue, I want us to doublecheck that it is possible to use near-api-rs in such situation and if not having a nice solution, at least have the option to have a helper wrapper with a pool of access keys.
The text was updated successfully, but these errors were encountered: