go-ethereum/miner
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
..
agent.go all: fix staticcheck warning ST1006: don't use generic name self 2024-10-25 21:30:54 +08:00
miner.go feat(eth,miner): wire miner gas tip updates from RPC #28933 (#2136) 2026-03-11 07:26:47 +05:30
ordering.go refactor(core/txpool): migrate tx subscription to SubscribeTransactions #28243 (#2125) 2026-03-10 18:44:38 +05:30
ordering_test.go refactor(core/txpool): migrate tx subscription to SubscribeTransactions #28243 (#2125) 2026-03-10 18:44:38 +05:30
remote_agent.go all: remove ethash pow 27178 (#1378) 2025-08-26 11:54:01 +08:00
unconfirmed.go all: remove duplicate word in comments (#1570) 2025-09-24 07:57:33 +08:00
unconfirmed_test.go metrics: fix some typos (#25551) 2024-12-13 14:00:12 +08:00
worker.go perf(core/txpool): pre-filter dynamic fees during pending tx retrieval #29005 (#2137) 2026-03-11 08:42:09 +05:30
worker_test.go feat(eth,miner): wire miner gas tip updates from RPC #28933 (#2136) 2026-03-11 07:26:47 +05:30