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

Remove tx from pool when its score is lower than a configured value #7576

Merged
merged 6 commits into from
Sep 5, 2024

Conversation

fab-10
Copy link
Contributor

@fab-10 fab-10 commented Sep 4, 2024

PR description

Introduce a new option --tx-pool-min-score, that takes values between -128 and 127, that instruct the txpool to remove pending txs when their score is below the option value.

By default the value is -128, that is also the lowest score a pending tx can have, and basically means that the pending tx will not be removed and will stay in the pool with the lowest score, so it will be selected after all the other pending txs

Fixed Issue(s)

fixes #7572

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 remove-tx-below-configurable-score branch from 6d188eb to f7108ff Compare September 5, 2024 07:57
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
@fab-10 fab-10 force-pushed the remove-tx-below-configurable-score branch from f7108ff to 82f81f0 Compare September 5, 2024 09:51
@fab-10 fab-10 marked this pull request as ready for review September 5, 2024 09:51
Copy link
Contributor

@pinges pinges left a comment

Choose a reason for hiding this comment

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

One proposal, otherwise LGTM

fab-10 and others added 2 commits September 5, 2024 16:17
# Conflicts:
#	CHANGELOG.md
#	ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/transactions/layered/AbstractTransactionsLayer.java
#	ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/transactions/layered/LayeredPendingTransactions.java
#	ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/transactions/layered/TransactionsLayer.java
…nPoolOptions.java

Co-authored-by: Stefan Pingel <16143240+pinges@users.noreply.github.com>
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
@fab-10 fab-10 added the doc-change-required Indicates an issue or PR that requires doc to be updated label Sep 5, 2024
@fab-10 fab-10 enabled auto-merge (squash) September 5, 2024 14:47
@fab-10 fab-10 merged commit f0d2a66 into hyperledger:main Sep 5, 2024
40 checks passed
@m4sterbunny m4sterbunny removed the doc-change-required Indicates an issue or PR that requires doc to be updated label Sep 23, 2024
@alexandratran alexandratran self-assigned this Oct 2, 2024
@alexandratran alexandratran removed their assignment Oct 18, 2024
@fab-10 fab-10 deleted the remove-tx-below-configurable-score branch November 8, 2024 16:36
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.

Remove a tx from the txpool when its score is below a configurable value
4 participants