Skip to content

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

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

    Labels

    agent-friendlyWell-scoped task suitable for an AI coding agentbugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions