Transaction order in block #171
-
Did you check the documentation?
Did you read the specs?
Did you check for duplicate questions?
Issue DescriptionIt is not clear to me how the sequencer orders transactions within a block.
however, I have seen competing transactions (calls the same function) have a higher position in block with a higher max priority fee but lower max base fee. This suggests that the ordering does not just depend on the max priority fee but also max base fee. What is the a calculation that determines the order? Additional InformationNo response FeedbackNo response |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Transactions are ordered based on the payment to the block builder. For 1559 transactions, that's the
|
Beta Was this translation helpful? Give feedback.
-
Hey @grantweii, We hope your recent question was resolved to your satisfaction. Your feedback is invaluable and helps us improve our support services. Could you spare a moment to fill out a short feedback survey. Thank you for helping us improve our developer community. |
Beta Was this translation helpful? Give feedback.
Yeah I think you may be right about that except that it's
min(GasTipCap, GasFeeCap - BaseFee)
. The code is attempting to handle the legacy transaction case where the miner is paid theGasPrice - BaseFee
but it winds up applying the same logic to 1559 transactions and may prioritise a transaction that has a highMaxFeeCap
but lowMaxTipCap
which is sub-optimal. That code comes straight for upstream geth I believe and potentially reduces the value of blocks geth produces on L1 so probably should be fixed there.