firoorg / firo

The privacy-focused cryptocurrency
https://firo.org
MIT License
720 stars 354 forks source link

Spark transactions not mined #1268

Closed justanwar closed 1 year ago

justanwar commented 1 year ago

Certain Spark transactions when created en masse are accepted into mempool but not mined. https://github.com/firoorg/firo/commit/f463bda3d6e8586d21376970ca5167d7175dfba2

justanwar commented 1 year ago

These two transactions were to the same address, but didn't get mined. sendrawtransaction was manually executed on the miner for both transactions, and they were in the miner's mempool at the same time. But when a block was mined, only one transaction was mined into the block, the other one was removed from mempool with no errors in logs.

testnet-miner-didnotmine.txt

justanwar commented 1 year ago

When Spark spends were created, sometimes the transaction will have a 'not in memory pool' status. When this happens, two things were observed:

  1. the transaction is not in wallet's mempool, but can be found in other nodes' mempool (will be mined), or
  2. the transaction is not in wallet and other nodes' mempool (not mined, ever)

Was observed by creating 5 Spark spends in rapid sucession. As blocks were mined and transactions were included, some wallet transactions were dropped from the wallet's mempool ('not in memory pool') but were eventually mined

justanwar commented 1 year ago

Fixed in https://github.com/firoorg/firo/commit/9ffd44bc0a54d2abdf1d8780015013065221cfdc