Skip to content

Conversation

@txhsl
Copy link
Contributor

@txhsl txhsl commented Apr 30, 2024

Close #187, After #166.

As mentioned in #6 (comment), our price model (fixed baseFee + minimum effectiveGasTip) will touch off RPC errors in MetaMask. Because it analyses eth_feeHistory directly and suggests a GasTipCap lower than we expected. This fallback is removed in MetaMask/core, but not yet the extension.

To prevent this kind of issues in similar tools and libraries, this PR increases suggestGasTipCap to 112.5% of the Policy limit, and sets it as the minimum return value of eth_feeHistory as well. (The corresponding multiplier of MetaMask ranges from 0.94 to 0.98, which is confusing but meanwhile the fact).

The 12.5% increase in suggestGasTipCap will allow us to perform a 12.5% increase in gas tip Policy without rejecting existing transactions in txpool. As for baseFee, a 100% increase is allowed with https://github.com/bane-labs/go-ethereum/blob/bane-main/accounts/abi/bind/base.go#L282.

I know it seems much more correct to return the minimum effectiveGasTip in eth_feeHistory instead of 112.5% of it, but MetaMask doesn't work with it. :(

@steven1227 steven1227 requested a review from roman-khimov April 30, 2024 16:40
@txhsl txhsl changed the title Update fee estimation RPCs to support EIP-1559 tools e.g. MetaMask rpc: update fee estimation RPCs to support EIP-1559 tools e.g. MetaMask May 11, 2024
@AnnaShaleva AnnaShaleva requested review from AnnaShaleva and removed request for roman-khimov May 29, 2024 16:43
@txhsl txhsl closed this May 30, 2024
@txhsl txhsl deleted the policy-eip1559 branch May 30, 2024 10:46
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.

Solve the compatibility problem between EIP-1559 and Policies

3 participants