fix(sequencer): increase mempool removal cache size #1969
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.
Summary
This changes the hard-coded value of the mempool removal cache size to be greater than the default CometBFT mempool size.
Background
The removal cache is the means by which CometBFT becomes aware that a failed tx should be removed from its own mempool (via a CheckTx call). If the removal cache reaches the limit of entries, new ones will replace the oldest ones before CometBFT is able to call CheckTx for them.
Note that the removal cache entries are fairly small - a couple of hashes and a small "removal reason" object each, so increasing this limit significantly should have no meaningful effect on the sequencer's memory usage or performance.
Changes
REMOVAL_CACHE_SIZE
from 4096 to 50,000.Testing
No new tests added.
Changelogs
Changelogs updated.
Related Issues
Closes #1968.