Skip to content

fix(cli): reject flashblock consumers with local transaction retention - #266

Merged
adam-xu-mantle merged 1 commit into
dev/mantle-v1.7.0from
fix/flashblocks-consumer-local-txpool-conflict
Nov 20, 2026
Merged

adam-xu-mantle merged 1 commit into
dev/mantle-v1.7.0from
fix/flashblocks-consumer-local-txpool-conflict

Conversation

@adam-xu-mantle

Copy link
Copy Markdown

Summary

A forwarding RPC node can retain submitted transactions in its local pool while a flashblock consumer supplies the pending state. Transactions present only in the local pool can then produce misleading pending responses alongside the consumed flashblocks.

Reject --rollup.retain-forwarded-txs together with either consumer during MantleArgs::into_configs, before services and the node are started:

  • Mantle: --flashblocks.websocket-url, including --subblocks.websocket-url.
  • Upstream: --flashblocks-url, including --websocket-url.

The startup error names the conflicting parameters, explains the pending-state mismatch, and directs operators to disable local retention. Reject the combination even when --rollup.sequencer is currently absent, so the configuration remains unambiguous. Each feature remains valid when configured alone.

Deployments using a consumer must omit --rollup.retain-forwarded-txs before upgrading. This PR is independent of the slice-maintenance changes in #265.

Test plan

  • New conflict regression fails against the original code, which accepts the conflicting configuration.
  • All 37 CLI argument tests pass after the change.
  • Cover all four consumer parameter names, with and without a sequencer (eight rejected combinations), plus consumer-only and retention-only configurations.
  • just pr passed locally: fmt, clippy, workspace tests, version checks, 380 node integration tests, sparse-trie integration tests, and default/all-feature doctests. Three node integration tests were skipped; nextest marked four passing tests as LEAK.

@adam-xu-mantle
adam-xu-mantle merged commit 123355d into dev/mantle-v1.7.0 Nov 20, 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