-
Notifications
You must be signed in to change notification settings - Fork 223
Description
After the change introduced in #984, consensus nodes now remove transactions from their mempool when they fail to reach agreement (TxInvalid).
The issue is that this logic currently exists only in the DBFTPlugin, meaning that non-consensus nodes do not remove these transactions from their mempool.
As a result, transactions marked as TxInvalid by consensus nodes may remain in the mempool of non-consensus nodes until ValidUntilBlock is reached.
In an extreme scenario, an attacker could craft transactions that are protocol-valid but consistently rejected by consensus (TxInvalid), assigning them very high fees so they remain at the top of the mempool priority. Since they are never included in a block, the fees are never actually charged. Once the mempool reaches MemoryPoolMaxTransactions, the RemoveOverCapacity mechanism would evict lower-fee (legitimate) transactions, and new transactions with the normal fee will be rejected. This situation could persist until ValidUntilBlock is reached, potentially disrupting legitimate network activity for up to 24 hours per batch.