stacks-network / stacks-core

The Stacks blockchain implementation
https://docs.stacks.co
GNU General Public License v3.0
3.01k stars 667 forks source link

Miners ignore transactions on an address that were previously unprocessable although the address balance changed that situation #4118

Open 314159265359879 opened 10 months ago

314159265359879 commented 10 months ago

Describe the bug An address has some pending transactions, the first transaction is send with a fee of 2 STX but the address does not have the funds to cover it. https://explorer.hiro.so/txid/0x2317582028933048cebcfd24fbff44bd7a2e2358b2891d2742fa1abbb042cc48?chain=mainnet Two hours later 3.5 STX is deposited on the address. yet 19 hours later the transaction is still not processed. https://explorer.hiro.so/txid/0x2317582028933048cebcfd24fbff44bd7a2e2358b2891d2742fa1abbb042cc48?chain=mainnet

Steps To Reproduce Create transaction with 2 STX fee on an address with no STX balance Two hours later send enough STX to the address to cover that fee Transaction is not processed after enough STX is on the address

Expected behavior When the state of the address changes, miners should reconsider the transaction.

Additional context https://explorer.hiro.so/txid/0x80b8f02edb928b8067f6753876337ef7e9c79289846e9a17266806aa7b00d2a4?chain=mainnet

Additional pending transactions on the address https://explorer.hiro.so/txid/0x2317582028933048cebcfd24fbff44bd7a2e2358b2891d2742fa1abbb042cc48?chain=mainnet confirmed transfer of STX to the address https://explorer.hiro.so/txid/0x85aa2b57428e127cf08ec6754a0b259e5e5eef0fada3e7c74c3a9cf6ed53fb62?chain=mainnet Other pending transactions https://explorer.hiro.so/txid/0x85aa2b57428e127cf08ec6754a0b259e5e5eef0fada3e7c74c3a9cf6ed53fb62?chain=mainnet https://explorer.hiro.so/txid/0x02593361831301de483c4208e2d6586341bd2e0d315ce144e1b17465f8e7970b?chain=mainnet https://explorer.hiro.so/txid/0xff2fee478571a8d152acd3fbd5479014620870759c09455f68dcb3dde6d206f8?chain=mainnet https://explorer.hiro.so/txid/0x4b79c8dc3ac7b712888ee10fc8dcd803719620bed6ec01abd95083759bfc3a62?chain=mainnet https://explorer.hiro.so/txid/0xe6548ccf0ca3ad9bc52c08cdf82bdf8b036817e286bcf76aa8043a379c435279?chain=mainnet

address https://explorer.hiro.so/address/SP3Z2Q06Y9F4W1JHVDQ0C414211D59DFNJSWSK9V2?chain=mainnet

image

Workaround: Increase the fee on the "ignored" transactions 0.000001 STX can be enough because it creates new transactions and miners will reconsider it.

obycode commented 9 months ago

What happens in this case is that when the miner first processes that transaction and sees that the fee is greater than the balance, it puts the transaction in an ignore list, and never checks it again. If the user replaces this transaction, then it will be re-processed by the miners.

friedger commented 9 months ago

Is there a way to inform the user about the ignored state? I experienced the same with a sponsored tx. It was much more difficult to discover with the current tools.