Skip to content

fix(preconf): restore pending eligibility after slice execution - #265

Merged
adam-xu-mantle merged 2 commits into
dev/mantle-v1.7.0from
fix/pending-sender-candidate-after-pruning
Nov 19, 2026
Merged

adam-xu-mantle merged 2 commits into
dev/mantle-v1.7.0from
fix/pending-sender-candidate-after-pruning

Conversation

@adam-xu-mantle

@adam-xu-mantle adam-xu-mantle commented Nov 19, 2026 •

Copy link
Copy Markdown

Summary

Ordinary submissions can become stuck when slice maintenance prunes an executed transaction before removing a stale lower-nonce transaction from the same sender. The pool can lose its candidate index, then select a later arrival ahead of lower transactions that are still pending, causing repeated NonceTooHigh rejections.

Use remove_transactions followed by the existing nonce and balance update in maintain_pool_at_slice_boundary. Removal temporarily parks descendants; the account update promotes eligible successors in nonce order before the builder takes its next iterator. This avoids leaving the pending sub-pool with the problematic nonce gap, without changing patches/reth-transaction-pool/src/pool/pending.rs or any other pool implementation.

Preserve transaction hashes in the pool-maintenance test helper, add a regression for a stale lower-nonce transaction with an executed successor, and cover five continuously sending accounts across slice and block boundaries.

Behavioral implications

The existing removal API emits discarded notifications for transactions removed after execution. Descendants may move from pending to queued and back at each boundary, adding pool maintenance work and promotion notifications. The final eligibility check still uses the executed sender nonce and balance; unreadable balances continue to park transactions. The underlying generic pruning limitation remains unchanged for other callers.

Test plan

  • Regression fails with pruning and the original pool implementation (selects nonce 6 instead of nonce 2), then passes with removal followed by account updates.
  • All 11 pool-maintenance tests pass.
  • Unmodified QA Python reproducer against isolated local nodes: original code stalled in 5/5 runs; this Mantle-only fix drained all accepted transactions in 5/5 runs.
  • Full just pr passed locally: fmt, clippy, workspace tests, version checks, 376 integration tests, and default/all-feature doctests. Three integration tests were skipped; nextest reported one unrelated test as LEAK.

The Python reproducer sends ordinary transactions at approximately 10 TPS and resubmits nonces 0, 1, and 2 with changed contents after 700 ms. These results establish that scenario; they do not establish that unique, monotonically increasing submissions alone always trigger the defect or identify the exact trigger of the existing qa3 sample.

Local validation uses 0f33a084a4881687ecd334ea4c41481ddc4e753f plus the final Mantle-only patch. The target dev/mantle-v1.7.0 was 65 commits ahead of that baseline when the PR was created, with identical contents for the changed files before this patch. Integration with the latest target remains subject to PR CI. No qa3 deployment has been performed.

@adam-xu-mantle adam-xu-mantle changed the title fix(txpool): preserve sender candidates after out-of-order pruning fix(preconf): restore pending eligibility after slice execution Nov 19, 2026
@adam-xu-mantle
adam-xu-mantle merged commit 536b59a into dev/mantle-v1.7.0 Nov 19, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant