- ADD_CHAIN138_TO_LEDGER_LIVE: Ledger form done; public code review repo bis-innovations/LedgerLive; init/push commands - CONTRACT_DEPLOYMENT_RUNBOOK: Chain 138 gas price 1 gwei, 36-addr check, TransactionMirror workaround - CONTRACT_*: AddressMapper, MirrorManager deployed 2026-02-12; 36-address on-chain check - NEXT_STEPS_FOR_YOU: Ledger done; steps completable now (no LAN); run-completable-tasks-from-anywhere - MASTER_INDEX, OPERATOR_OPTIONAL, SMART_CONTRACTS_INVENTORY_SIMPLE: updates - LEDGER_BLOCKCHAIN_INTEGRATION_COMPLETE: bis-innovations/LedgerLive reference Co-authored-by: Cursor <cursoragent@cursor.com>
3.3 KiB
Tx-Pool Eviction to Prevent Stuck Transactions
Last Updated: 2026-02-07
Status: Active
Goal
Reduce stuck transactions by having the transaction pool evict transactions that are not included within a short window. Besu’s layered pool does not support a literal “drop after N blocks”; this doc describes the equivalent we use.
“Drop Within 3 Blocks” Equivalent
- Ideal: “Drop any transaction not included within 3 blocks.”
- Besu layered pool: No block-count-based retention. Eviction is driven by:
- Memory: When layer capacity is reached, low-priority transactions are evicted.
- Score: Each pending transaction has a score (127 → -128). Transient invalid / not-yet-included transactions are penalized over time; when score falls below tx-pool-min-score, they are evicted.
So we approximate “drop within a short window” by:
-
tx-pool-min-score=0 (if supported by your Besu build)
Transactions that are penalized (e.g. not included, or transiently invalid) eventually drop below 0 and are evicted. Note: Some Besu builds do not supporttx-pool-min-score(e.g. "Unknown option in TOML"); on those deployments do not add this option—use layered settings only. See BLOCK_PRODUCTION_FIX_RUNBOOK.md. -
Layered settings (optional but recommended)
tx-pool-max-future-by-sender=200tx-pool-layer-max-capacity=12500000tx-pool-max-prioritized=2000tx-pool-price-bump=10
With ~2s block time, “a few blocks” is a few seconds; the scoring mechanism will penalize unincluded transactions over time, and tx-pool-min-score=0 ensures they are dropped once their score goes to 0 or below.
What We Do Not Use
- Legacy options (Besu 23.10+ layered pool):
Do not settx-pool-max-size,tx-pool-limit-by-account-percentage, ortx-pool-retention-hours. They are incompatible with the layered implementation and can crash the node.
Applying the Fix
Validators (and optionally RPC):
- Remove any legacy tx-pool options from
/etc/besu/config-validator.toml(and RPC config if you apply there). - Add layered options and eviction:
- Layered options as above.
- tx-pool-min-score=0 so penalized transactions are evicted (omit if your Besu build does not support it).
Script (validators only):
# From project root
bash scripts/fix-all-validators-and-txpool.sh
Dry-run:
bash scripts/fix-all-validators-and-txpool.sh --dry-run
The script updates all five validators (1000–1004) on their Proxmox hosts, then restarts besu-validator.
RPC Nodes (Optional)
To reduce stuck transactions seen via RPC, apply the same layered + tx-pool-min-score=0 in the RPC node config (e.g. /etc/besu/config-rpc-core.toml or the config used by VMID 2101), then restart the RPC service. The same “no legacy options” rule applies.
References
- BESU_VERSION_CONFIGURATION_GUIDE.md — Layered pool, no legacy options.
- STUCK_TRANSACTIONS_SOLUTION.md — Skip nonce and clear RPC state.
- Besu: Transaction pool (layered) — scoring and eviction.