Skip to content

Conversation

@zsfelfoldi
Copy link
Contributor

This pull request implements EIP-1559 compatible transaction pool with dual heap eviction ordering.
It is based on #22791
The eviction ordering scheme and the reasoning behind it is described here: https://gist.github.com/zsfelfoldi/9607ad248707a925b701f49787904fd6

@zsfelfoldi zsfelfoldi changed the title EIP-1559 tx pool support EIP-1559 tx pool support (WIP) May 18, 2021
@zsfelfoldi zsfelfoldi force-pushed the eip1559-mempool branch 2 times, most recently from 5cb5e6c to c604a47 Compare May 20, 2021 01:32
@zsfelfoldi zsfelfoldi changed the title EIP-1559 tx pool support (WIP) EIP-1559 tx pool support May 20, 2021
core/tx_list.go Outdated
Copy link
Member

@rjl493456442 rjl493456442 May 21, 2021

Choose a reason for hiding this comment

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

In this strategy, we can only replace the transaction with 10% feeCap bump and 10% tip bump. It might hurt the UX to some extent.

For example, if the user already specify a high enough feeCap but a barely enough tip. And he wants to speed up the inclusion, he has to bump the feeCap as well. If the basefee raises up, then the maximum possible payment is increased.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This has been discussed at the 1559 dev channel, right now this replacement condition seems to be the best choice.

@holiman holiman force-pushed the eip1559-mempool branch from b37dce5 to 77a3288 Compare May 21, 2021 08:51
@holiman
Copy link
Contributor

holiman commented May 21, 2021

Rebased + fixed rebase problems

@holiman
Copy link
Contributor

holiman commented May 21, 2021

GasPriceCmp is now unused, and should be removed. GasPriceIntCmp is used by the GPO, but I guess the GPO should use something else, and we should remove that method too.

@holiman
Copy link
Contributor

holiman commented May 25, 2021

This is now running on bootnode-aws-eu-central-1-001

* replace GasPriceCmp and GasPriceIntCmp with FeeCapCmp, FeeCapIntCmp, TipCmp, TipIntCmp (and update all usages)
* update Cost to use FeeCap instead of GasPrice
* add eip1559 status indicator
* add DynamicFeeTx to transaction type check
* remove underpriced transactions on minimum miner tip increases
* require both a fee cap and tip bump for transaction replacement
* use tip as secondary comparison criterion for priceHeap sorting
gzliudan added a commit to gzliudan/XDPoSChain that referenced this pull request Nov 1, 2024
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.

8 participants