Implement price bump mechanism for transaction pool replacement. #928
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.
PR description
We should implement a new transaction replacement mechanism, similar to other client implementations.
Currently a new transaction (same user and same nonce) replaces an old one if the new gas price is higher than the old one. Other client implementations require the delta to be higher than a minimum percentage.
For instance this option is called
pricebump
in Geth implementation, configurable using--txpool.pricebump
. This command line option is described as Price bump percentage to replace an already existing transaction and is defaulted to10%
.The current PR introduces the price bump without making this option configurable. A follow up PR will then come after to expose this parameter to the
CLI
interface.Fixed Issue(s)
Signed-off-by: Abdelhamid Bakhta [email protected]