feat(sequencer)!: add limit to total amount of transactions in parked #1638
Merged
lobstergrindset merged 10 commits intomainfrom Oct 8, 2024
Merged
feat(sequencer)!: add limit to total amount of transactions in parked #1638lobstergrindset merged 10 commits intomainfrom
lobstergrindset merged 10 commits intomainfrom
Conversation
Fraser999
approved these changes
Oct 8, 2024
quasystaty1
pushed a commit
that referenced
this pull request
Oct 8, 2024
…#1638) Adds a limit to the total amount of transactions in the 'parked' mempool structure. We made it configurable as it should change if the CometBFT consensus mempool parameters are modified. Sane values would limit the max to less than half of the space in the CometBFT mempool. For example, the CometBFT mempool has the following parameters: ``` # Maximum number of transactions in the mempool size: 2000 # Maximum size of a single transaction in the mempool maxTxBytes: 250000 # Maximum size of all transactions in the mempool maxTxsBytes: 100000000 cacheSize: 10000 ``` It would make sense to set the max pending size to a value like 200 transactions. The max size the 200 transactions could take is 50000000 bytes (200 txs * 250000 max bytes per tx), which is half of the available space in the mempool. We want to ensure that there is always space in the mempool for pending transactions so the chain can make progress. - Added a limit to the number of transactions able to be placed in the parked transaction container structure. Unit tests and ran locally. - Added `TRANSACTIONS_IN_MEMPOOL_PARKED` which gets triggered after successful adds to the parked queue. - A new config variable was added to the sequencer's config file: `ASTRIA_SEQUENCER_MEMPOOL_PARKED_MAX_TX_COUNT` - A new ABCI error code was added: `PARKED_FULL`. --------- Co-authored-by: Fraser Hutchison <fraser@astria.org>
steezeburger
added a commit
that referenced
this pull request
Oct 11, 2024
* main: feat(sequencer)!: enforce block ordering by transaction group (#1618) fix(cli): ensure checkTx passes before waiting for inclusion (#1636) chore(sequencer)!: update storage keys locations and values (ENG-898) (#1616) chore: cargo audit warning (#1644) chore(proto, core)!: remove action suffix from all action types (#1630) feat(sequencer)!: add limit to total amount of transactions in parked (#1638)
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.
Summary
Adds a limit to the total amount of transactions in the 'parked' mempool structure. We made it configurable as it should change if the CometBFT consensus mempool parameters are modified.
Sane values would limit the max to less than half of the space in the CometBFT mempool. For example, the CometBFT mempool has the following parameters:
It would make sense to set the max pending size to a value like 200 transactions. The max size the 200 transactions could take is 50000000 bytes (200 txs * 250000 max bytes per tx), which is half of the available space in the mempool.
Background
We want to ensure that there is always space in the mempool for pending transactions so the chain can make progress.
Changes
Testing
Unit tests and ran locally.
Metrics
TRANSACTIONS_IN_MEMPOOL_PARKEDwhich gets triggered after successful adds to the parked queue.Breaking Changelist
ASTRIA_SEQUENCER_MEMPOOL_PARKED_MAX_TX_COUNTPARKED_FULL.