-
Notifications
You must be signed in to change notification settings - Fork 834
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
Make layered txpool aware of minGasPrice and minPriorityFeePerGas dynamic options #6611
Make layered txpool aware of minGasPrice and minPriorityFeePerGas dynamic options #6611
Conversation
Signed-off-by: Fabio Di Fabio <[email protected]> # Conflicts: # besu/src/main/java/org/hyperledger/besu/controller/BesuControllerBuilder.java # besu/src/test/java/org/hyperledger/besu/services/BesuEventsImplTest.java # ethereum/blockcreation/src/main/java/org/hyperledger/besu/ethereum/blockcreation/BlockMiner.java # ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/transactions/TransactionPoolFactory.java # ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/manager/EthProtocolManagerTest.java # ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/manager/ethtaskutils/AbstractMessageTaskTest.java # ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/transactions/TestNode.java # ethereum/eth/src/test/java/org/hyperledger/besu/ethereum/eth/transactions/TransactionPoolFactoryTest.java # ethereum/retesteth/src/main/java/org/hyperledger/besu/ethereum/retesteth/RetestethContext.java
Signed-off-by: Fabio Di Fabio <[email protected]>
Signed-off-by: Fabio Di Fabio <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, minor comments
...a/org/hyperledger/besu/ethereum/eth/transactions/layered/BaseFeePrioritizedTransactions.java
Outdated
Show resolved
Hide resolved
} | ||
|
||
// check if enough priority fee is paid | ||
if (!miningParameters.getMinPriorityFeePerGas().equals(Wei.ZERO)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why might we promote the tx when the min priority fee is 0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is just an optimization, since by default minPriorityFeePerGas
is 0, then if the default is not changed we can just skip the check
…ransactions/layered/BaseFeePrioritizedTransactions.java Co-authored-by: Simon Dudley <[email protected]> Signed-off-by: Fabio Di Fabio <[email protected]>
…amic options (hyperledger#6611) Signed-off-by: Fabio Di Fabio <[email protected]> Co-authored-by: Simon Dudley <[email protected]>
…amic options (hyperledger#6611) Signed-off-by: Fabio Di Fabio <[email protected]> Co-authored-by: Simon Dudley <[email protected]> Signed-off-by: amsmota <[email protected]>
…amic options (hyperledger#6611) Signed-off-by: Fabio Di Fabio <[email protected]> Co-authored-by: Simon Dudley <[email protected]> Signed-off-by: amsmota <[email protected]>
…amic options (hyperledger#6611) Signed-off-by: Fabio Di Fabio <[email protected]> Co-authored-by: Simon Dudley <[email protected]>
Thanks for sending a pull request! Have you done the following?
doc-change-required
label to this PR if updates are required.Most advanced CI tests are deferred until PR approval, but you could:
./gradlew build
./gradlew acceptanceTest
./gradlew integrationTest
./gradlew ethereum:referenceTests:referenceTests
PR description
This PR improved the quality of the txs that are kept in the prioritized layer of the layered txpool, taking in account also the dynamic value of the
minGasPrice
andminPriorityFeePerGas
options.So if a tx effective gas price is below the current value of
minGasPrice
or its effective priority fee is below theminPriorityFeePerGas
it is not kept, or promoted, in the prioritized layer, since it will not be selected during block creation.Fixed Issue(s)