Skip to content

feat(config): app-side mempool max-txs parity + migration repair#172

Merged
akobrin1 merged 6 commits into
masterfrom
devnet-mainnet-mempool-parity
Jun 20, 2026
Merged

feat(config): app-side mempool max-txs parity + migration repair#172
akobrin1 merged 6 commits into
masterfrom
devnet-mainnet-mempool-parity

Conversation

@akobrin1

Copy link
Copy Markdown
Contributor

Summary

Aligns the app-side EVM mempool capacity across environments and makes the v1.20.0 config migration repair it on upgraded nodes, so an upgraded mainnet node can't silently keep the app-side mempool disabled (which would bypass EVM mempool admission, including the evmigration zero-signer path).

Changes

Default capacity

  • mempool.max-txs default raised 5000 → 10000 for fresh configs (cmd/lumera/cmd/config.go). Mainnet runs the higher cap; devnet keeps 5000.

Config migration (cmd/lumera/cmd/config_migrate.go)

  • mempool.max-txs is now a force-set EVM-migrated key.
  • A disabled/legacy value (< 0 — e.g. an upgraded pre-EVM home where the app-side mempool was off) is repaired to migratedMempoolMaxTxs(chain-id): 5000 for devnet (lcfg.IsDevnetChainID), 10000 otherwise.

Tests

  • config_migrate_test.go / config_test.go: new default, disabled-value repair, devnet vs mainnet selection.
  • New real-node integration test TestEVMigrationZeroSignerTxBroadcastSyncAfterLegacyMainnetConfigMigration: starts from a legacy pre-EVM app.toml (max-txs = -1), asserts migration writes max-txs = 10000 + EVM mempool defaults, then broadcasts a zero-signer migration tx successfully.
  • Added evmtest.WriteLegacyPreEVMAppToml helper; updated the genesis-defaults assertion (5000 → 10000).

Docs

node-evm-config-guide, app-changes, roadmap, integration-mempool, unit-app-wiring, evmigration devnet-tests, devnet upgrade-testing, and CHANGELOG updated for the new defaults and migration behavior.

Verification

  • go test ./cmd/lumera/cmd/ — pass
  • go build ./..., golangci-lint run ./cmd/lumera/... — 0 issues
  • go vet -tags='integration test' on the mempool + evmtest packages — clean

Note

This branch has master merged in (it includes the just-merged Hardhat 3 work from #166). It also carries one incidental docs commit — a Node ≥ 20 prerequisite note on the precompiles/solidity README, follow-up to the #166 HH3 migration.

🤖 Generated with Claude Code

akobrin1 and others added 3 commits June 19, 2026 12:22
PR #166 migrated precompiles/solidity to Hardhat 3, which requires Node.js >= 20
(engines.node in package.json) and switches the package to ESM. The README
Quick Start stated no Node requirement, so a developer on Node 18 would hit a
hard failure at npm install / hardhat run. Add an explicit prerequisite note.

The npm scripts (compile/deploy:devnet/interact:devnet) kept their names across
the migration, so the rest of the README's commands remain accurate.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Aligns the app-side EVM mempool capacity across environments and makes the
v1.20.0 config migration repair it on upgraded nodes:

- Default `mempool.max-txs` raised 5000 -> 10000 for fresh configs
  (cmd/lumera/cmd/config.go). Mainnet runs the higher cap; devnet keeps 5000.
- config migration (cmd/lumera/cmd/config_migrate.go): `mempool.max-txs` is now
  a force-set EVM-migrated key, and a disabled/legacy value (< 0, e.g. an
  upgraded pre-EVM home where the app-side mempool was off) is repaired to
  `migratedMempoolMaxTxs(chain-id)` — 5000 for devnet (lcfg.IsDevnetChainID),
  10000 otherwise. This prevents an upgraded mainnet node from silently keeping
  the app-side mempool disabled (which would bypass EVM mempool admission,
  including the evmigration zero-signer path).

Tests:
- config_migrate_test.go / config_test.go: cover the new default, the
  disabled-value repair, and devnet vs mainnet selection.
- New real-node integration test
  TestEVMigrationZeroSignerTxBroadcastSyncAfterLegacyMainnetConfigMigration:
  starts from a legacy pre-EVM app.toml (max-txs = -1), asserts migration writes
  max-txs = 10000 + EVM mempool defaults, then broadcasts a zero-signer
  migration tx successfully. Added evmtest.WriteLegacyPreEVMAppToml helper and
  updated the genesis-defaults assertion (5000 -> 10000).

Docs: node-evm-config-guide, app-changes, roadmap, integration-mempool,
unit-app-wiring, evmigration devnet-tests, devnet upgrade-testing, CHANGELOG
updated for the new defaults and migration behavior.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0115952322

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread cmd/lumera/cmd/config_migrate.go
Comment thread cmd/lumera/cmd/config_migrate.go Outdated
@akobrin1 akobrin1 merged commit 49ec43d into master Jun 20, 2026
24 checks passed
@akobrin1 akobrin1 deleted the devnet-mainnet-mempool-parity branch June 20, 2026 16:41
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