Skip to content

acknowledged map grows unboundedly — confirmed/rolled-back txs are never evicted. #894

@scarmuega

Description

@scarmuega

In @crates/core/src/mempool.rs around lines 208 - 230, The acknowledged HashMap
in apply() (mempool.write().unwrap(), acknowledged) is never pruned causing
unbounded growth; after you set tx.confirmed and call
notify(MempoolTxStage::Confirmed, ...) or notify(MempoolTxStage::RolledBack,
...) collect the corresponding TxHash keys and remove them from
state.acknowledged (e.g., gather keys in seen_txs/unseen_txs handling or call
state.acknowledged.retain to keep only non-final entries) so
confirmed/rolled-back transactions are evicted after notification; ensure you
still clone the Tx for notify before removal to avoid borrow issues.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions