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

ignore synthetic transactions for "next possible nonce" calculations #2191

Open
rafaelcr opened this issue Jan 3, 2025 · 0 comments
Open

Comments

@rafaelcr
Copy link
Collaborator

rafaelcr commented Jan 3, 2025

Stacks transactions done over Bitcoin are always stored with nonce = 0 on the API DB. This, however, can cause problems if it was the first executed transaction for an account because the "next possible nonce" reported by the nonces endpoint would be shown as 1.

We should either make those synthetic transaction nonces be null or -1 or we should ignore them from the next nonce calculation query.

A related idea is to add a synthetic boolean column to the transactions table to mark these transactions and avoid them during nonce calculations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 New
Development

No branches or pull requests

1 participant