Its day 17th of #web3glossary 🚀🚀
If you’ve found yourself pulling your hair out when a transaction seemingly pauses forever, this thread is for you🤯
The impounding question is,
Why is my transaction queued? 🤔
Is it pending or queued? Let’s get some clarity, shall we?
👇👇
Transactions submitted to a network through an EVM node can have one
of the two following statuses before they are propagated to the network
and included in a block:
👉Pending
👉Queued
What’s really the difference though?
Pending are the transactions in the transaction pool that are ready to be included in a block.
Queued transactions are the ones waiting to become the pending transactions.
Where does this queue put up?
The queued pool
👇👇
It’s a pool of txns in the mempool that are not yet ready to be processed because they are out of order
Out of order? What does it imply?
Every txn has an account nonce (not block nonce). Every time an account does a txn, the account nonce of the transaction is incremented by 1
If a txn is sent with a nonce that is higher than the current txn count for the sender’s account (creating a gap in the nonces), then the txn will be added to the node’s local transaction pool with a queued state.
An example would help
👇👇
An account 0x463.. creates a txn for the first time. The txn gets the account nonce 0. The transaction goes directly into the pending pool and is eventually added to the block.
The next transaction from account 0x463... is automatically incremented by 1 and gets the acct nonce 1
The transaction goes directly into the pending pool and is eventually processed. Say account 0x463... creates a 3rd txn & manually sets the transaction's account nonce to 3, the txn will get the status queued coz there’s no txn with the account nonce 2.
👇👇
The queued txn will not be propagated to the network until there is a txn with the account nonce in sequence.
How to fix it?🤔
📌Fill the gap
Once account 0x463... creates a valid txn with account nonce 2, the queued transaction gets unclogged and is added to a block.
👇👇
📌Send a rescue transaction
To effectively cancel a queued transaction, send another txn from the same acct with the same nonce, but a gasPrice that is at least 10% higher than the gasPrice of the original txn. You could send 0ETH with fromAccount=toAccount so that...
.....the only cost of the transaction is its gas.
Nonce ordering is only one of the reasons why your transaction is pending, there could be other reasons like, sending a very small amount with insufficient fees, high n/w volume to count a few.
Thats a wrap for Day 17!
I’ll be sharing information on the new vocabulary of the web for next 30 days.🚀
It’s like a free crash course on the terms and methodolgies in Web3.
📌Follow me @laishawadhwa for more such web3 gyaan!
📌RT the first tweet to share with the community
Share this Scrolly Tale with your friends.
A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.
