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

Nonce api should detect nonce gaps and fill them with suggested/next nonce #1788

Closed
314159265359879 opened this issue Dec 28, 2023 · 2 comments

Comments

@314159265359879
Copy link

Is your feature request related to a problem? Please describe.
Nonce gaps are a situation when an address has pending transactions but the nonces do not line up, there are gaps.
Example: an address' last confirmed transaction nonce is 2, (next possible nonce is 3 in this case). But there are only pending transactions with nonce 4 and 5 for this address. The API will report the next nonce as being "6" (going off the highest pending nonce).

Describe the solution you'd like
The nonce API should realize there is no transaction with nonce 3, and suggest that instead in a situation like this.

Describe alternatives you've considered
An alternative considered is to manage this locally in the wallet by keeping track of nonces used, and to keep track of expiring transactions. Expiring transactions are an important reason for nonce gaps, user error at manual setting of nonces is another common reason. Tracking this locally in the wallet has proved difficult. By adding this enhancement to the API all wallets can benefit from it. It would actually make local tracking more reliable.

@rafaelcr
Copy link
Collaborator

Hi @314159265359879 , we already have an endpoint that shows you possible missing nonces, etc: https://docs.hiro.so/api/get-the-latest-nonce-used-by-an-account

Can you check if this would work for your needs?

@smcclellan
Copy link
Contributor

Marking this one as complete -- please reopen if more is needed here.

@smcclellan smcclellan closed this as not planned Won't fix, can't repro, duplicate, stale Jan 2, 2024
@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in API Board Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

3 participants