Skip to content

feat(mempool): support direct insert tx via app mempool#2119

Merged
JayT106 merged 27 commits into
mainfrom
jt/ethermint-insertTx
Jul 11, 2026
Merged

feat(mempool): support direct insert tx via app mempool#2119
JayT106 merged 27 commits into
mainfrom
jt/ethermint-insertTx

Conversation

@JayT106

@JayT106 JayT106 commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Under mempool.type=app, EVM RPC txs now insert straight into the app mempool instead of going through BroadcastTx -> CheckTx (which returns an empty response and spawns a goroutine per tx). Uses ethermint's appmempool.MempoolClient (crypto-org-chain/ethermint#1016).

Why:

Changes:

  • Manager: extract admit(); InsertTxHandler becomes a thin adapter over it; add Manager.InsertTx (RPC path) and PendingTxs (txpool stub — app mempool holds generic sdk.Tx, not decoded MsgEthereumTx, so it reports none).
  • App.MempoolClient(): returns the Manager, or nil under flood mode so ethermint falls back to BroadcastTx. Method on *App avoids a clash with the promoted BaseApp.InsertTx.

Depends on crypto-org-chain/ethermint#1016.

Under mempool.type=app, route eth_sendRawTransaction/sendTransaction/etherbase
straight into the app mempool via ethermint's MempoolTxInserter
(crypto-org-chain/ethermint#1016) instead of BroadcastTx -> CheckTx. EVM RPC
now gets a correct synchronous ABCI response and back-pressure (CodeTypeRetry
on capacity), sharing one admission path with p2p gossip.

- Manager: extract shared admit(); InsertTxHandler becomes a thin adapter;
  add Manager.InsertTx returning code+codespace+log for the RPC caller.
- App: add InsertMempoolTx + MempoolInsertEnabled. The ethermint server gates
  registration on MempoolInsertEnabled(), so the default flood mempool keeps
  the unchanged BroadcastTx submission path.
- Bump ethermint pin to the gated-interface follow-up.

Addresses PR #2091 review r3361761130 (divergent RPC vs gossip admission).
@JayT106 JayT106 requested a review from a team as a code owner June 24, 2026 01:52
@JayT106 JayT106 requested review from calvinaco and thomas-nguy June 24, 2026 01:52
@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds direct RPC-based EVM transaction insertion into the app mempool by refactoring Manager to share a common admit path between gossip (InsertTxHandler) and a new InsertTx method. App gains a MempoolClient() accessor satisfying appmempool.MempoolClientProvider. Dependencies are bumped to pick up the upstream appmempool interface, and an integration test fixes eth_getBlockReceipts to pass a hex-encoded block number.

Changes

EVM direct mempool insertion

Layer / File(s) Summary
Shared admission and RPC response
app/mempool/manager.go
InsertTxHandler and InsertTx both route through the new admit(txBytes) helper that decodes before locking, runs RunTx(ExecModeCheck), maps mempool-full to CodeTypeRetry, caches accepted txs, and returns (code, codespace, log).
App mempool client exposure
app/app.go
Adds App.MempoolClient() returning nil when mempoolManager is unset, otherwise returning it as appmempool.MempoolClient; includes a compile-time MempoolClientProvider assertion.
Manager admission tests
app/mempool/manager_test.go
Seven new unit tests cover OK admission, rejection, mempool-full retry (direct and wrapped), canonical byte caching, suppressed caching on reject, and concurrent gossip+RPC admission under the manager mutex.
App-level insertion tests
app/mempool/admission_test.go
Two tests verify end-to-end insertion via MempoolClient().InsertTx (valid tx accepted, tampered tx rejected) and that MempoolClient() is nil when using a non-app mempool type.
Dependency metadata and release note
go.mod, gomod2nix.toml, CHANGELOG.md
Bumps ethermint replace target to crypto-org-chain/ethermint fork with appmempool wiring, updates several indirect deps, and adds the UNRELEASED changelog entry.

Receipt RPC argument formatting

Layer / File(s) Summary
Receipt call argument update
integration_tests/test_basic.py
eth_getBlockReceipts now receives hex(block_number) instead of the raw integer.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • crypto-org-chain/cronos#1823: Overlaps at assert_receipt_transaction_and_block in integration_tests/test_basic.py where eth_getBlockReceipts usage was previously modified.

Suggested labels

cronos

Suggested reviewers

  • yihuang
  • calvinaco

🐇 A tx hops in through the RPC door,
admit() checks it, then caches the core.
The gossip and RPC both share the same lock,
No race in the mempool, no slip through the clock.
The rabbit says: insert with delight! 🎉

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 21.43% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding direct tx insertion support through the app mempool.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jt/ethermint-insertTx

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@JayT106

JayT106 commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

@claude review

@github-actions

github-actions Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Claude finished @JayT106's task in 2m 33s —— View job


PR #2119 Review

  • Gather context and read PR changes
  • Review app/mempool/manager.go
  • Review app/app.go and cmd/cronosd/cmd/root.go
  • Review tests
  • Check for state-breaking changes
  • Post final review

Summary

Good, well-scoped PR. The refactor is clean — extracting admit() as a shared path avoids duplication between the gossip and RPC admission paths, and the compile-time interface assertion in root.go is the right way to enforce the ethermint contract. No consensus/state-breaking changes detected (this is a pure mempool path, not state machine logic).


Issues Found

Medium — Nil-safety gap in InsertMempoolTx

app/app.go:1307 (inline comment posted)

InsertMempoolTx calls app.mempoolManager.InsertTx(txBytes) without a nil guard. The doc comment says "Only called when MempoolInsertEnabled() is true", but that contract is on ethermint's side. If ethermint calls this without gating on MempoolInsertEnabled(), the process panics. All other mempoolManager call sites in app.go explicitly guard with != nil checks (lines 527, 1637, 1662). This one should too.

func (app *App) InsertMempoolTx(txBytes []byte) (*sdk.TxResponse, error) {
    if app.mempoolManager == nil {
        return &sdk.TxResponse{Code: sdkerrors.ErrNotSupported.ABCICode(), RawLog: "mempool insert not enabled"}, nil
    }
    code, codespace, log := app.mempoolManager.InsertTx(txBytes)
    return &sdk.TxResponse{Code: code, Codespace: codespace, RawLog: log}, nil
}

Minor — Missing wrapped-error test for InsertTx

app/mempool/manager_test.go (inline comment posted)

TestInsertTxHandler_RetryOnWrappedMempoolFull covers the gossip handler's errors.Join(outer, ErrMempoolTxMaxCapacity)CodeTypeRetry case. No equivalent test exists for InsertTx. Since both go through admit(), the behavior is correct, but a dedicated test would guard against future refactors splitting the paths.


Observations (non-blocking)

  • evict() in manager.go:469 calls a.encCache.Evict(tx) unconditionally, but EncoderCache.Evict already has a nil-receiver guard (if e == nil { return }), so this is safe. No change needed.

  • InsertTxHandler discards codespace and log (code, _, _ := a.admit(req.Tx)). This is correct for the P2P gossip path (CometBFT only uses the code), but worth confirming the ethermint interface only exposes the code from ResponseInsertTx — which the walkthrough confirms.

  • Dependency bump adds kcalvinalvin/anet as an indirect dependency. This is pulled in transitively by the ethermint bump; worth a brief audit of what it is (it's a network utility lib used by ethermint's libp2p stack).

  • TestManagerInsertTx_SharesAdmitWithHandler is a nice -race validator. One nit: it only tests interleaving; it doesn't assert that each unique tx actually lands in the pool (just that the raceRunner.state map has the right count). Still a good test.

  • No breaking changes: InsertMempoolTx / MempoolInsertEnabled are new methods on App. admit() is unexported. The gossip InsertTxHandler behavior is preserved. This is mempool-local and does not affect consensus, store migrations, or the state machine.


Comment thread app/app.go Outdated
Comment thread app/mempool/manager_test.go
JayT106 added 2 commits June 23, 2026 22:09
Address PR #2119 review: InsertMempoolTx relied on ethermint gating the call on
MempoolInsertEnabled(), a cross-repo contract. Add a nil guard returning
ErrNotSupported (matching the other mempoolManager call sites) so a stray call
returns a code instead of panicking. Add wrapped-capacity and flood-gate tests.
… uint32 casts

- gomod2nix.toml still pinned the pre-#1003 ethermint, so the Nix build failed
  with 'undefined: ethermintserver.MempoolTxInserter'. Regenerate to match the
  go.mod pin (#1016, b8b15b3); also pulls the new transitive deps.
- Drop unnecessary uint32(abci.CodeTypeOK) conversions flagged by unconvert.
@JayT106 JayT106 self-assigned this Jun 24, 2026
The ethermint bump changes GetBlockReceipts param from BlockNumber to
BlockNumberOrHash. BlockNumber accepted a plain decimal int (cast.ToUint64
fallback on missing 0x prefix); BlockNumberOrHash does not, so the raw int
arg now returns an error and the response has no 'result'. Pass hex().
@thomas-nguy

Copy link
Copy Markdown
Collaborator

please rework on the comment in this PR, they are too verbose

Comment thread CHANGELOG.md Outdated
Comment thread app/app.go Outdated
@JayT106 JayT106 changed the title feat(mempool): submit EVM RPC txs via app-mempool direct insert feat(mempool): support direct insert tx via app mempool Jun 25, 2026
JayT106 added 3 commits June 25, 2026 14:35
…ia nil response

InsertMempoolTx now returns (nil, nil) when mempool.type != app, so ethermint
falls back to BroadcastTx — no separate predicate gating registration. Re-pin
ethermint to the matching single-method MempoolTxInserter interface.
@JayT106

JayT106 commented Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

please rework on the comment in this PR, they are too verbose

done!

@JayT106

JayT106 commented Jun 25, 2026

Copy link
Copy Markdown
Contributor Author

update pin once ethermint got merged.

Comment thread app/app.go Outdated
JayT106 added 3 commits June 26, 2026 13:23
…nserter

Ethermint moved the app-mempool contracts into a new appmempool package and
dropped the package-global inserter registration (stack #1016+#1019+#1011).

- Bump ethermint pin to 562fa2a2 (go.mod, go.sum, gomod2nix.toml).
- Repoint root.go interface assertion: server.MempoolTxInserter -> appmempool.Inserter.
  App.InsertMempoolTx signature is unchanged, so ethermint StartJSONRPC casts it
  automatically; no app wiring change.
Address review: App.InsertMempoolTx no longer constructs the sdk.TxResponse.
Manager.InsertTx now returns *sdk.TxResponse; App is a thin delegate (nil-decline
gate + forward), keeping mempool response logic in the mempool package.
The InsertMempoolTx method now lives on the mempool Manager, which satisfies
ethermint's appmempool.Inserter directly. App implements the new InserterProvider
(MempoolInserter), returning the manager or nil under flood mode. This keeps all
mempool response logic in the mempool package and removes the (nil,nil) decline
sentinel from app.go.

Repin ethermint to 2ae3aaf8 (adds appmempool.InserterProvider).
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Claude finished @JayT106's task in 4m 11s —— View job


PR #2119 Review

  • Gather context and read PR changes
  • Review app/mempool/manager.go
  • Review app/app.go
  • Review tests
  • Check for state-breaking changes
  • Post final review

Summary

Clean, well-scoped PR. The admit() refactor correctly unifies gossip and RPC admission paths, and the MempoolClient() accessor pattern (returning the manager rather than implementing the interface on *App) neatly sidesteps the BaseApp.InsertTx promotion clash. No consensus/state-breaking changes — this is entirely a mempool/RPC path, with no state machine, message, or serialization impact.


Issues Found

Minor — No compile-time assertion for appmempool.MempoolClient

*Manager is documented as satisfying appmempool.MempoolClient (lines 142–151 in manager.go) but there's no var _ appmempool.MempoolClient = (*Manager)(nil) guard. app/app.go has the existing var _ runtime.AppI = (*App)(nil) pattern (lines 271–272). Adding this guard to manager.go (or at least to app.go where the import already exists) would catch upstream interface changes at compile time rather than at the ethermint integration point.

Minor — PendingTxs() stub silently empties eth_txpool_* RPCs

Posted as inline comment. The stub is correct for now, but eth_txpool_content and eth_txpool_status will always return empty. A TODO comment would capture this known gap for a future pass.

Minor — nil-tx path in admit() is implicit

Posted as inline comment. When encCache == nil, tx is nil and passed to RunTx. This matches the pre-refactor behavior in InsertTxHandler, so no regression. Just implicit.


Observations (non-blocking)

  • ethermint pin is still at PR head SHA (v0.22.1-0.20260701023501-2f1ceeab1a02). The comment in go.mod correctly marks it as "PR head"; this pin should be updated to the merged tag/commit once ethermint Problem: memiavl persisted node queries is not optimal #1016 lands (already tracked in the PR description and in a prior coderabbit comment).

  • kcalvinalvin/anet pulled in transitively via the ethermint bump — worth a brief audit to confirm it's a legitimate transitive dep (it is: anet is a network utility library used by ethermint's libp2p stack).

  • InsertTxHandler codespace/log discard (code, _, _ := a.admit(req.Tx)) is correct: CometBFT's P2P path only uses the ABCI code, not codespace or log. No change needed.

  • Test coverage is thorough: accept, reject, retry (direct + wrapped), cache register/no-register on reject, and the concurrent RPC+gossip race test. The prior coderabbit concern about test isolation (accounts[1] for the tampered case) has been correctly addressed in the current code.

  • integration_tests/test_basic.py: hex(block_number) fix for eth_getBlockReceipts is a correct standalone bugfix included here.

  • No state-breaking changes: all changes are mempool-local. No consensus impact, no store migrations, no message/signing changes.

Comment thread app/mempool/manager.go
Comment thread app/mempool/manager.go
BaseApp.RunTx accepts nil sdk.Tx and falls back to txBytes; cacheTx is
a no-op without encCache, so passing nil is safe.
Comment thread app/mempool/manager.go Outdated
JayT106 added 3 commits July 2, 2026 12:30
Combines PR #2119's shared admission path with #2120's lock-free
EVM sig pre-verifier: preVerify runs unlocked before the admission
mutex in Manager.admit, ahead of both gossip InsertTxHandler and RPC
InsertTx. Pins ethermint fork to de2396e91b1958d67c4cd656315e7c2c3fb7d83a.
@JayT106 JayT106 added this pull request to the merge queue Jul 10, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 10, 2026
@JayT106 JayT106 enabled auto-merge July 10, 2026 18:11
# Conflicts:
#	CHANGELOG.md
#	app/mempool/manager.go
@JayT106 JayT106 disabled auto-merge July 10, 2026 22:30
@JayT106 JayT106 changed the base branch from main to release/v1.5.x July 10, 2026 22:31
@JayT106 JayT106 changed the base branch from release/v1.5.x to main July 10, 2026 22:31
@JayT106 JayT106 enabled auto-merge July 10, 2026 22:31
@JayT106 JayT106 disabled auto-merge July 10, 2026 23:07
@JayT106 JayT106 enabled auto-merge July 10, 2026 23:07
@JayT106 JayT106 closed this Jul 11, 2026
auto-merge was automatically disabled July 11, 2026 00:16

Pull request was closed

@JayT106 JayT106 reopened this Jul 11, 2026
@JayT106 JayT106 added this pull request to the merge queue Jul 11, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 11, 2026
@JayT106 JayT106 added this pull request to the merge queue Jul 11, 2026
Merged via the queue into main with commit eb9eeac Jul 11, 2026
76 of 79 checks passed
@JayT106 JayT106 deleted the jt/ethermint-insertTx branch July 11, 2026 01:41
github-merge-queue Bot pushed a commit that referenced this pull request Jul 11, 2026
* feat(mempool): submit EVM RPC txs via app-mempool direct insert

Under mempool.type=app, route eth_sendRawTransaction/sendTransaction/etherbase
straight into the app mempool via ethermint's MempoolTxInserter
(crypto-org-chain/ethermint#1016) instead of BroadcastTx -> CheckTx. EVM RPC
now gets a correct synchronous ABCI response and back-pressure (CodeTypeRetry
on capacity), sharing one admission path with p2p gossip.

- Manager: extract shared admit(); InsertTxHandler becomes a thin adapter;
  add Manager.InsertTx returning code+codespace+log for the RPC caller.
- App: add InsertMempoolTx + MempoolInsertEnabled. The ethermint server gates
  registration on MempoolInsertEnabled(), so the default flood mempool keeps
  the unchanged BroadcastTx submission path.
- Bump ethermint pin to the gated-interface follow-up.

Addresses PR #2091 review r3361761130 (divergent RPC vs gossip admission).

* chore(changelog): fill PR number #2119

* chore(changelog): align #2119 entry to PR title

* style(mempool): tighten InsertMempoolTx/admit comments

* fix(app): guard InsertMempoolTx against nil mempool manager

Address PR #2119 review: InsertMempoolTx relied on ethermint gating the call on
MempoolInsertEnabled(), a cross-repo contract. Add a nil guard returning
ErrNotSupported (matching the other mempoolManager call sites) so a stray call
returns a code instead of panicking. Add wrapped-capacity and flood-gate tests.

* fix(ci): regenerate gomod2nix.toml for ethermint pin + drop redundant uint32 casts

- gomod2nix.toml still pinned the pre-#1003 ethermint, so the Nix build failed
  with 'undefined: ethermintserver.MempoolTxInserter'. Regenerate to match the
  go.mod pin (#1016, b8b15b3); also pulls the new transitive deps.
- Drop unnecessary uint32(abci.CodeTypeOK) conversions flagged by unconvert.

* test(integration): pass hex block number to eth_getBlockReceipts

The ethermint bump changes GetBlockReceipts param from BlockNumber to
BlockNumberOrHash. BlockNumber accepted a plain decimal int (cast.ToUint64
fallback on missing 0x prefix); BlockNumberOrHash does not, so the raw int
arg now returns an error and the response has no 'result'. Pass hex().

* docs(mempool): tighten insert-tx comments, align changelog wording

* refactor(mempool): drop MempoolInsertEnabled, decline direct insert via nil response

InsertMempoolTx now returns (nil, nil) when mempool.type != app, so ethermint
falls back to BroadcastTx — no separate predicate gating registration. Re-pin
ethermint to the matching single-method MempoolTxInserter interface.

* remove wordy comments

* chore(deps): repin ethermint to appmempool refactor; use appmempool.Inserter

Ethermint moved the app-mempool contracts into a new appmempool package and
dropped the package-global inserter registration (stack #1016+#1019+#1011).

- Bump ethermint pin to 562fa2a2 (go.mod, go.sum, gomod2nix.toml).
- Repoint root.go interface assertion: server.MempoolTxInserter -> appmempool.Inserter.
  App.InsertMempoolTx signature is unchanged, so ethermint StartJSONRPC casts it
  automatically; no app wiring change.

* refactor(mempool): move InsertTx response build into Manager

Address review: App.InsertMempoolTx no longer constructs the sdk.TxResponse.
Manager.InsertTx now returns *sdk.TxResponse; App is a thin delegate (nil-decline
gate + forward), keeping mempool response logic in the mempool package.

* refactor(mempool): expose inserter via appmempool.InserterProvider

The InsertMempoolTx method now lives on the mempool Manager, which satisfies
ethermint's appmempool.Inserter directly. App implements the new InserterProvider
(MempoolInserter), returning the manager or nil under flood mode. This keeps all
mempool response logic in the mempool package and removes the (nil,nil) decline
sentinel from app.go.

Repin ethermint to 2ae3aaf8 (adds appmempool.InserterProvider).

* chore(deps): repin ethermint to #1016 head (1389b15f)

#2119 depends only on appmempool.Inserter/InserterProvider, which live in
ethermint #1016. Pin directly to that PR head instead of the full sig-preverifier
stack tip. Inserter API unchanged, so no cronos code change.

* test(mempool): isolate tamper-reject case; tighten inserter comments

- admission_test: tamper a fresh account so the forged-From rejection
  isn't confounded by nonce/check-state from the prior accepted tx
  (CodeRabbit r3483469252).
- app.go / root.go: trim MempoolInserter / InserterProvider comments to
  the design decision (avoid BaseApp.InsertTx clash).

* chore(deps): repin ethermint #1016; adapt to MempoolClient interface

PR #1016 replaced appmempool.Inserter/InserterProvider with
MempoolClient (InsertTx + PendingTxs) and MempoolClientProvider.

- repin ethermint to d61c063f (PR head); regen gomod2nix.toml
- Manager: InsertMempoolTx -> InsertTx; add PendingTxs (nil; app
  mempool holds generic sdk.Tx, not decoded MsgEthereumTx)
- App: MempoolInserter() -> MempoolClient() via MempoolClientProvider
  (promoted BaseApp.InsertTx still blocks direct MempoolClient impl)

* fix(lint): gci import formatting in app/app.go and app/mempool/manager.go

- Remove extra blank line in app/app.go import section (line 52)
- Reorder imports in app/mempool/manager.go to follow gci section rules:
  standard → default → cosmossdk.io → github.com/cosmos/cosmos-sdk

* chore(deps): repin ethermint #1016 head (66efb289)

Picks up main merge into the PR branch (go-metrics 0.5.4 -> 0.6.0).
appmempool.MempoolClient interface unchanged; no code change.
Regenerate gomod2nix.toml.

* refactor: move MempoolClientProvider assertion to app.go

Compile-time assert lives next to *App and its MempoolClient method;
drop the now-unused appmempool import from root.go.

* chore(deps): repin ethermint #1016 head (2f1ceeab)

MempoolClientProvider removed; pass MempoolClient explicitly. Adapt:
- Remove MempoolClientProvider compile-time assertion in app/app.go
- Manager.PendingTxs() return type: []*MsgEthereumTx → []sdk.Tx (drops evmtypes dep)

* docs(mempool): note nil-tx path is intentional when encCache disabled

BaseApp.RunTx accepts nil sdk.Tx and falls back to txBytes; cacheTx is
a no-op without encCache, so passing nil is safe.

* refactor(mempool): trim verbose comments on InsertTx/PendingTxs

* chore(deps): repin ethermint #1016 head (6f932cde)

* feat(mempool): back txpool RPC with app mempool PendingTxs

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.

* docs(changelog): add #2127 txpool RPC PendingTxs entry

* fix(mempool): address PendingTxs review nits

- 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)

* test(mempool): integration tests for txpool RPC namespace

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.

* refactor(test): simplify txpool shape tests; add inspect xfail guard

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).

* fix(lint): black format + wrap long lines in txpool tests

* fix(test): enable txpool JSON-RPC namespace for app-mempool suite

default.jsonnet's api list omits txpool, overriding ethermint's default
namespace set. mempool_app.jsonnet never restored it, so all txpool_*
RPC calls in test_app_mempool.py hit an unregistered namespace and
returned no "result" key.

* chore(deps): repin ethermint #1034 head (de2396e91b19)

github.com/crypto-org-chain/ethermint v0.22.1-0.20260707200522-de2396e91b19

* fix(test): move txpool api override to app-config in mempool_app.jsonnet

json-rpc lives under app-config in pystarport's schema, not config
(config maps to config.toml; app-config maps to app.toml). The
previous override nested json-rpc under config, so it silently
patched an unused config.toml section instead of app.toml, and the
txpool namespace was never actually enabled on the running node.

* chore(deps): repin ethermint #1051 head (ea6791fbb8f0)

Ethermint's MempoolClient interface gained CountTx() for O(1)
txpool_status. Add Manager.CountTx() to satisfy it.

* test(mempool): cover Manager.CountTx unit + integration

Add TestManagerCountTx (nil mpool -> 0, populated pool -> exact count)
and tighten test_txpool_pending_tx_visible's status assertion from a
loose >= 1 to a before/after delta, so it actually verifies CountTx()
counted the submitted tx instead of just "something is pending".

* fix(nix): bump go_1_25 overlay pin to 1.25.11

go.mod's go directive moved to 1.25.11 (ethermint #1051 repin), but the
nix overlay still pinned go1.25.9 and CI has no network access to fetch
the newer toolchain on demand. Every nix-based build/integration job
failed with "toolchain not available". Bump the overlay's version and
source hash to match.

* fix(ci): bump stale go-version 1.25.9 pins to 1.25.11

lint.yml, codeql-analysis.yml, and sims.yml each hardcode
actions/setup-go's go-version separately from the nix toolchain. go.mod
now requires go >= 1.25.11 (bumped by the ethermint #1051 repin), so
these jobs failed with GOTOOLCHAIN=local: toolchain not available.

* fix(testground): bump golang base image 1.25.9 -> 1.25.11

Same toolchain mismatch as the CI workflows: go.mod requires go
>= 1.25.11 since the ethermint #1051 repin.
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.

2 participants