go-ethereum/core/txpool/legacypool
Daniel Liu b5eec529d0
perf(core/txpool): pre-filter dynamic fees during pending tx retrieval #29005 (#2137)
Introduce dynamic-fee pre-filtering in txpool pending retrieval to reduce
allocations and downstream processing work during mining and tx propagation.

What changed:
- Change the `Pending` API from `Pending(enforceTips bool)` to
  `Pending(minTip *uint256.Int, baseFee *uint256.Int)` in txpool interfaces.
- Implement pre-filtering in `legacypool.Pending` by comparing effective tip
  against the provided `minTip/baseFee` for non-local, non-special txs.
- Update call sites to the new API:
  - miner work assembly (`miner/worker.go`)
  - tx sync (`eth/sync.go`)
  - pool transaction retrieval (`eth/api_backend.go`)
  - protocol/test interfaces (`eth/protocol.go`, `eth/helper_test.go`).

Tests:
- Add targeted coverage for pending filtering semantics in
  `core/txpool/legacypool/legacypool_test.go`, including:
  - minTip threshold boundary behavior
  - baseFee-aware effective tip filtering
  - local/special transaction exemption behavior
  - dynamic-fee boundary behavior when baseFee is nil.

Impact:
- Preserves existing behavior while making pending selection cheaper for
  downstream consumers.
- Improves confidence in edge-case behavior through dedicated tests.
2026-03-11 08:42:09 +05:30
..
journal.go all: move main transaction pool into a subpool #27463 (#1890) 2026-01-05 15:43:50 +05:30
legacypool.go perf(core/txpool): pre-filter dynamic fees during pending tx retrieval #29005 (#2137) 2026-03-11 08:42:09 +05:30
legacypool2_test.go refactor(core/txpool/legacypool): use uint256.Int instead of big.Int #28606 (#2134) 2026-03-10 18:50:40 +05:30
legacypool_test.go perf(core/txpool): pre-filter dynamic fees during pending tx retrieval #29005 (#2137) 2026-03-11 08:42:09 +05:30
lending_pool.go refactor(all): remove term whitelist and blacklist (#1994) 2026-02-10 17:09:21 +05:30
lending_pool_test.go refactor(crypto): vendor in golang.org/x/crypto/sha3 #33323 (#2046) 2026-02-28 17:23:57 +04:00
lending_tx_journal.go all: move main transaction pool into a subpool #27463 (#1890) 2026-01-05 15:43:50 +05:30
lending_tx_list.go docs(core/txpool/legacypool): fix typos #28258 (#2126) 2026-03-10 18:45:06 +05:30
list.go refactor(core/txpool/legacypool): use uint256.Int instead of big.Int #28606 (#2134) 2026-03-10 18:50:40 +05:30
list_test.go refactor(core/txpool/legacypool): use uint256.Int instead of big.Int #28606 (#2134) 2026-03-10 18:50:40 +05:30
noncer.go all: move main transaction pool into a subpool #27463 (#1890) 2026-01-05 15:43:50 +05:30
order_pool.go refactor(all): remove term whitelist and blacklist (#1994) 2026-02-10 17:09:21 +05:30
order_tx_journal.go all: move main transaction pool into a subpool #27463 (#1890) 2026-01-05 15:43:50 +05:30
order_tx_list.go docs(core/txpool/legacypool): fix typos #28258 (#2126) 2026-03-10 18:45:06 +05:30