feat(mempool): back txpool RPC with app mempool PendingTxs#2127
feat(mempool): back txpool RPC with app mempool PendingTxs#2127JayT106 wants to merge 9 commits into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This comment has been minimized.
This comment has been minimized.
91af628 to
230b4b8
Compare
|
Claude finished @JayT106's task in 1m 19s —— View job PR Review
Overall: looks correct and well-tested. No blocking issues.
|
Repin ethermint to PR #1019 head (stacked on #1016), which wires the txpool RPC namespace (content/inspect/status/contentFrom) to MempoolClient.PendingTxs. Implement Manager.PendingTxs: lock-free PoolSnapshot scan returning pooled EVM messages; skips non-EVM/multi-message txs; nil mpool reports none.
- Rename PoolSnapshot telemetry label recheck→pool; snapshot is now called from both recheck and txpool RPC paths so the label was misleading - Drop over-eager capacity hint in PendingTxs; EVM:non-EVM ratio unknown - Add missing blank line in manager_test.go (gofmt / CI lint fix)
Stacked on #1016; adds txpool RPC namespace backed by MempoolClient.PendingTxs.
Covers txpool_content, txpool_inspect, txpool_status, txpool_contentFrom:
- shape tests (always pass): verify endpoints respond with {pending,queued}
- test_txpool_pending_tx_visible: submit tx, query pool immediately, assert
tx appears in all four endpoints; @flaky(3) for reap_interval race.
Extract _assert_pool_dict_shape to deduplicate the 3 identical dict-shape assertions. Add missing pytest.xfail guard for inspect_sender None case (timing race path identified in code review).
558b9b8 to
53e468f
Compare
Stacked on #2119 — merge that first.
What this does
The
txpoolRPC namespace (txpool_content,_inspect,_status,_contentFrom) used to return empty results undermempool.type=app, becausePendingTxswas anilstub. This fills it in.Manager.PendingTxs— a lock-freePoolSnapshotscan that returns the pooled EVM messages. Non-EVM and multi-message txs have no txpool representation, so they're skipped. Anilmempool reports nothing, so the namespace stays empty instead of panicking.Result
Geth-compatible txpool inspection now works for app-mempool nodes.
Before merging
These pins move until the ethermint PRs land. Merge after #2119, then rebase this branch onto
main.