Describe the bug
Affected crate: tempo-transaction-pool (crates/transaction-pool/src/tempo_pool.rs).
evict_invalidated_transactions() can push the same tx hash twice when one pending AA transaction matches both Check 4 (blacklist addition) and Check 5 (whitelist removal) in the same maintenance scan.
On current HEAD, Checks 1-3 continue after pushing to to_remove, but Checks 4-5 do not. The same hash can therefore be returned twice, while crates/transaction-pool/src/maintain.rs increments metrics.transactions_invalidated with evicted.len(). This can inflate the Prometheus metric and txpool debug counters, and state.untrack(hash) can run twice for the same tx.
Steps to reproduce
- Add a pending AA transaction with an explicit fee token whose transfer policy is compound.
- In the same maintenance scan, include:
- a blacklist addition for the fee payer on the sender-side policy
- a whitelist removal for
TIP_FEE_MANAGER_ADDRESS on the recipient-side policy
- Run
evict_invalidated_transactions().
-
- The same tx hash can be pushed once in Check 4 and again in Check 5 because neither branch exits the outer loop after the first invalidation.
Confirmed by code inspection on current HEAD. I also verified a local fix with a targeted regression test.
Logs
Platform(s)
No response
Container Type
Not running in a container
What version/commit are you on?
Current HEAD on main: d5b27eaa
If you've built from source, provide the full command you used
No response
Code of Conduct
Describe the bug
Affected crate: tempo-transaction-pool (
crates/transaction-pool/src/tempo_pool.rs).evict_invalidated_transactions()can push the same tx hash twice when one pending AA transaction matches both Check 4 (blacklist addition) and Check 5 (whitelist removal) in the same maintenance scan.On current HEAD, Checks 1-3
continueafter pushing toto_remove, but Checks 4-5 do not. The same hash can therefore be returned twice, whilecrates/transaction-pool/src/maintain.rsincrementsmetrics.transactions_invalidatedwithevicted.len(). This can inflate the Prometheus metric and txpool debug counters, andstate.untrack(hash)can run twice for the same tx.Steps to reproduce
TIP_FEE_MANAGER_ADDRESSon the recipient-side policyevict_invalidated_transactions().Confirmed by code inspection on current HEAD. I also verified a local fix with a targeted regression test.
Logs
Platform(s)
No response
Container Type
Not running in a container
What version/commit are you on?
Current HEAD on main:
d5b27eaaIf you've built from source, provide the full command you used
No response
Code of Conduct