feat(mempool): raise MaxUntrustedActorPendingMessages from 10 to 100 - #13636
Merged
rvagg merged 1 commit intoMay 27, 2026
Merged
Conversation
beck-8
force-pushed
the
feat/mpool-bump-untrusted-pending
branch
from
May 25, 2026 23:04
ebf2fe7 to
bf3f5ed
Compare
Contributor
Author
|
The problem I actually encountered was: I often encountered |
The per-actor cap on the untrusted push path (lotus-gateway / public RPC) has been 10 since the untrusted path was introduced in 2020 (3c72461). In practice 10 is too tight for normal usage: a sender pushing at modest cadence can easily have more than 10 messages in flight when basefee spikes briefly or block inclusion stalls, after which every subsequent send is rejected with ErrTooManyPendingMessages. 100 is still an order of magnitude below the trusted-path cap (1000), and the nonce-gap-zero rule for untrusted messages is unchanged, so spam/DoS protection for gateway operators is preserved. TestMemPoolPushSingleNode and TestContractInvocationMultiple previously hard-coded the cap at 10; pin the package var in each test so they keep exercising a small, bounded scenario regardless of the package default.
beck-8
force-pushed
the
feat/mpool-bump-untrusted-pending
branch
from
May 25, 2026 23:25
bf3f5ed to
cf9a8c2
Compare
rvagg
approved these changes
May 26, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the mempool’s untrusted message push limits (used by lotus-gateway / public RPC paths) to reduce unnecessary ErrTooManyPendingMessages failures for normal senders when inclusion temporarily stalls.
Changes:
- Increase
MaxUntrustedActorPendingMessagesdefault from10to100. - Update the
PushUntrustedcomment to reflect the new cap. - Pin the untrusted cap to
10in relevant integration tests to keep the scenarios bounded and independent of the package default. - Add an UNRELEASED changelog entry under 👌 Improvements.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
chain/messagepool/messagepool.go |
Raises the default per-actor untrusted pending-message cap and updates the related comment. |
itests/mempool_test.go |
Pins MaxUntrustedActorPendingMessages to 10 for the test to keep expectations stable after the default changes. |
itests/eth_transactions_test.go |
Pins MaxUntrustedActorPendingMessages to 10 for the multi-transaction untrusted-path test scenario. |
CHANGELOG.md |
Documents the behavioral change under UNRELEASED improvements. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
6 tasks
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issues
None. The current value has been unchanged since the untrusted push path was introduced in 3c72461 (2020).
Proposed Changes
MaxUntrustedActorPendingMessagesfrom10to100inchain/messagepool/messagepool.go.PushUntrusted.CHANGELOG.mdentry under## 👌 Improvements.Additional Info
The per-actor cap on the untrusted push path — used by
lotus-gatewayand therefore every public RPC relayingMpoolPushfrom external clients — has been10since this path was introduced in 2020.That value is too tight for normal usage. A sender pushing at modest cadence can easily have more than 10 messages in flight when basefee spikes briefly or block inclusion stalls, after which every subsequent send is rejected with
ErrTooManyPendingMessages. The failure surfaces as a hard error on the send path rather than backpressure.Impact
MaxActorPendingMessages = 1000), preserving the asymmetry that protects gateway operators from external spam.maxNonceGap = 0for untrusted messages is unchanged — pending messages must still form a contiguous nonce sequence from the on-chain nonce, so an attacker cannot park arbitrary future nonces.SignedMessageentries, negligible against the existing global pool bounds.Checklist
Before you mark the PR ready for review, please make sure that:
10; behavior is unchanged apart from the constant)