When a block is added, we remove on-chain signed transactions by hash when we should remove conflicts by the (signer, nonce) tuple. Additionally, removal is done in a non-atomic fashion.
In practice, we should keep our eager removal (on block addition) but also add lazy removal, where when we attempt to build a block, we again filter out and prune conflicts. This would be more robust and resolve both of those concerns.
There's also an assert in Mempool::add which assumes these are always consistent which needs to be handled.
When a block is added, we remove on-chain signed transactions by hash when we should remove conflicts by the
(signer, nonce)tuple. Additionally, removal is done in a non-atomic fashion.In practice, we should keep our eager removal (on block addition) but also add lazy removal, where when we attempt to build a block, we again filter out and prune conflicts. This would be more robust and resolve both of those concerns.
There's also an
assertinMempool::addwhich assumes these are always consistent which needs to be handled.