Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Problem: eth_gasPrice/eth_maxPriorityFeePerGas shouldn't return a price bigger than needed #816

Closed
yihuang opened this issue Dec 9, 2021 · 4 comments

Comments

@yihuang
Copy link
Contributor

yihuang commented Dec 9, 2021

Proposal: eth_gasPrice should count in the minimal-gas-prices

Current behavior:

Currently eth_gasPrice returns base_fee + min_gas_price, but in reality, the ante handler check eip-1559 fee and minimal-gas-prices separately, so it should return max(minimal-gas-price, base-fee).
And eth_maxPriorityFeePerGas should return eth_gasPrice - base-fee.

Desired behavior: return max(minimal-gas-price, base-fee)

Use case: To keep the returned gas price reasonable.

@yihuang yihuang changed the title Problem: eth_gasPrice should count in the minimal-gas-prices Problem: eth_gasPrice shouldn't return a price bigger than needed Jan 17, 2022
@yihuang yihuang changed the title Problem: eth_gasPrice shouldn't return a price bigger than needed Problem: eth_gasPrice/eth_maxPriorityFeePerGas shouldn't return a price bigger than needed Jan 17, 2022
@thomas-nguy
Copy link
Contributor

thomas-nguy commented Jan 23, 2022

This fix would fix non-EIP 1559 tx when baseFee < minimal-gas-price

But there is another issue with our current design, which is that if baseFee < minimal-gas-price, then EIP1559 tx that don't set the tip parameter will get rejected.

Would it be better to return max(minimal-gas-price, computed-base-fee) for baseFee in block (ie introducing a minimum value) and returning 0 for eth_maxPriorityFeePerGas?

Another suggestion is the one proposed in the telegram channel, ie not check the minimal-gas-price for ethereum transaction

@yihuang
Copy link
Contributor Author

yihuang commented Jan 24, 2022

Would it be better to return max(minimal-gas-price, computed-base-fee) for baseFee in block (ie introducing a minimum value) and returning 0 for eth_maxPriorityFeePerGas?

The problem is minimal-gas-price is configured per-validator, but the basdFee field in the block should be consistent?

@thomas-nguy
Copy link
Contributor

Yes..

So I guess the better option is not check the minimal-gas-price for ethereum transaction but the basefee instead

@yihuang
Copy link
Contributor Author

yihuang commented Feb 19, 2022

fixed by #916

@yihuang yihuang closed this as completed Feb 19, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants