hirosystems / explorer

Explore transactions and accounts on the Stacks blockchain. Clone any contract and experiment in your browser with the Explorer sandbox.
https://explorer.hiro.so/
MIT License
136 stars 102 forks source link

Conflicting nonce error on broadcast of transaction when no pending transactions are shown for the account (ghost transaction) #1009

Open 314159265359879 opened 1 year ago

314159265359879 commented 1 year ago

Describe the bug A user with no pending transactions on their account, last executed nonce 9. Tries to create a new transaction, with nonce 10, when confirming it fails with "conflictingNonce" error in both Xverse and Hiro Wallet.

Transaction ID n.a. Address SPAZ3MHRTX13SYN5BKKFFDFEEFPB9P87NZTASQWD Block# n.a. Time stamp n.a.

To Reproduce Steps to reproduce the behavior: Uncertain, haven't been able to reproduce myself. This particular case is described here https://discord.com/channels/621759717756370964/745197302255321108/1078706540279758963

Expected behavior Transaction should be accepted without error.

Screenshots not available

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context

314159265359879 commented 1 year ago

a few more details it looks like the nonce 10 and nonce 11 transactions were indeed in the mempool but not showing up for some reason. https://stacks-node-api.mainnet.stacks.co/extended/v1/address/SPAZ3MHRTX13SYN5BKKFFDFEEFPB9P87NZTASQWD/nonces also returned nonce 10 as next nonce.

The user tried to make a transaction and the nonce 10 transaction would keep failing with "conflictingNonce" error. They tried making transactions with nonce 10, 11, 12 and 13. 10 and 11 would fail 12 and 13 did succeed.

I assumed nonce 10 and nonce 11 transactions were there but just not visible for some reason. The user recalled sending them with a fee of 3 STX eventually.

The user then (a day later or so) created a new transaction with nonce 10, and a fee of 4 STX, to test if that would make a difference. 10 seconds later four transactions were in a microblock (second screenshot).

Nonce 10 and nonce 11 transactions not showing image

This is after RBF-ing the ghost-nonce10-transaction: image