Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Layered txpool tuning for blob transactions #6940

Merged
merged 15 commits into from
Apr 23, 2024

Conversation

fab-10
Copy link
Contributor

@fab-10 fab-10 commented Apr 12, 2024

PR description

Introduce a new configuration option, tx-pool-max-prioritized-by-type, to tune the max number of transaction of a specified type that are kept in the prioritized layer at any time.
This new option is mostly useful to tune the amount of blob txs to keep in the prioritized layer, that is the layer with the transactions that are candidate for inclusion in a potential next block. Keeping this layer sorted is costly so it makes sense to only keep there the max amount of txs that could fit in a block, plus a small buffer, there is already an option to limit the max number of txs in this layer, but since very few blob txs can be included in a block (max 6 at this time), having the possibility to tune the max number of txs by type help with keeping the prioritized layer performant.

By default tx-pool-max-prioritized-by-type=["BLOB=6"]

Fixed Issue(s)

Thanks for sending a pull request! Have you done the following?

  • Checked out our contribution guidelines?
  • Considered documentation and added the doc-change-required label to this PR if updates are required.
  • Considered the changelog and included an update if required.
  • For database changes (e.g. KeyValueSegmentIdentifier) considered compatibility and performed forwards and backwards compatibility tests

Locally, you can run these tests to catch failures early:

  • unit tests: ./gradlew build
  • acceptance tests: ./gradlew acceptanceTest
  • integration tests: ./gradlew integrationTest
  • reference tests: ./gradlew ethereum:referenceTests:referenceTests

@fab-10 fab-10 force-pushed the layered-txpool-blob-tuning branch from 31b21b0 to 95167f2 Compare April 12, 2024 16:26
@fab-10 fab-10 marked this pull request as ready for review April 15, 2024 09:09
@fab-10 fab-10 added the doc-change-required Indicates an issue or PR that requires doc to be updated label Apr 15, 2024
@fab-10 fab-10 changed the title Layered txpool blob tuning Layered txpool tuning for blob transactions Apr 15, 2024
# Conflicts:
#	CHANGELOG.md
#	ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/transactions/layered/BaseFeePrioritizedTransactionsTest.java
#	ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/transactions/layered/LayersTest.java
@fab-10 fab-10 requested a review from macfarla April 22, 2024 10:28
Copy link
Contributor

@macfarla macfarla left a comment

Choose a reason for hiding this comment

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

LGTM

@fab-10 fab-10 enabled auto-merge (squash) April 23, 2024 07:20
@fab-10 fab-10 merged commit 3d5f45c into hyperledger:main Apr 23, 2024
42 checks passed
@fab-10 fab-10 deleted the layered-txpool-blob-tuning branch April 23, 2024 07:54
@alexandratran alexandratran removed the doc-change-required Indicates an issue or PR that requires doc to be updated label May 1, 2024
jflo pushed a commit to jflo/besu that referenced this pull request May 28, 2024
Signed-off-by: Fabio Di Fabio <[email protected]>
Signed-off-by: Justin Florentine <[email protected]>
matthew1001 pushed a commit to kaleido-io/besu that referenced this pull request Jun 7, 2024
jflo pushed a commit to jflo/besu that referenced this pull request Jun 10, 2024
Signed-off-by: Fabio Di Fabio <[email protected]>
Signed-off-by: Justin Florentine <[email protected]>
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.

3 participants