fix(fees): set tip on Celo from eth_maxPriorityFeePerGas
#4444
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.
Description
We initially got the recommendation to only set
maxFeePerGas
to the result ofeth_gasPrice
and that the difference between it and the base fee would be the tip distributed to the validator.However after testing, we noticed that if we leave
maxPriorityFeePerGas
toundefined
(or if we don't specify it), the final serialized tx has is set to0
.Resulting to
0
tip being effectively distributed to the validator. Which doesn't look right for validators 😄So here we bring back the original implementation I was originally proposing where we set it to the result of
eth_maxPriorityFeePerGas
. Similar to what viem does on Ethereum.Note: we'll wait for the confirmation from cLabs before merging this though.
Test plan
Related issues
Backwards compatibility
Yes