Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for eth_maxPriorityFeeperGas #607

Merged

Conversation

tgmichel
Copy link
Contributor

This is a geth-specific and simplified fee oracle introduced as part of EIP-1559 support.

Unlike eth_feeHistory, which requires the user to provide the effective reward percentiles as part of the request, eth_maxPriorityFeeperGas takes no arguments and suggests a fee / tip based on the minimum percentile 60 of the last 20 blocks.

The motivation to include this in Frontier is mainly because this Rpc method is used by geth contract bindings' tip estimation here. In our case the implementation is simple, just leverages the already existing cache built for eth_feeHistory.

Geth impl details can be found in:

https://github.com/ethereum/go-ethereum/blob/870b4505a05cd8b3604078ed4afcd3012bf72a47/ethclient/ethclient.go#L493
https://github.com/ethereum/go-ethereum/blob/master/eth/ethconfig/config.go#L44-L51
https://github.com/ethereum/go-ethereum/blob/master/eth/gasprice/gasprice.go#L149

@tgmichel tgmichel requested a review from sorpaas as a code owner March 17, 2022 11:15
@sorpaas sorpaas merged commit 55c0c80 into polkadot-evm:master Mar 17, 2022
jordy25519 pushed a commit to cennznet/frontier that referenced this pull request Apr 6, 2022
* Add `max_priority_fee_per_gas` rpc method

* Remove unused arg

* Add ts tests

* Simple transfer instead contract create

* editorconfig
boundless-forest pushed a commit to darwinia-network/frontier that referenced this pull request May 11, 2022
* Add `max_priority_fee_per_gas` rpc method

* Remove unused arg

* Add ts tests

* Simple transfer instead contract create

* editorconfig
intendednull pushed a commit to humanode-network/frontier that referenced this pull request Jun 21, 2022
* First sketch of claim

* Fmt and leftovers

* Catching up on tests

* First tests working

* Crowdloan precompiles start working

* New reward info precompile

* std in vec

* workspace fixing and lint

* More fmt

* Add to all runtimes

* Only moonbase tests working

* Forgot ignore in moonriver

* Undoing the ignore for moonriver

* add tracing subscriber to display logs

* precompile add to test

* Revert "add tracing subscriber to display logs"

This reverts commit 9a3ce4613d736987b448669483068af4621355aa.

* Check for target gas when reading storage

* Add common package for precompile utils

* Update toml file

* Add update_reward_address precompile

* Add update_reward_address with ignore to rest of the runtimes

* fmt

* fmt plus other review comments

* Better solidity writing

* Input bounds

* Remove trace log from common function

* Clean parachain-staking-precompile traces

* Revert introduced error

* utils

* Revert "Clean parachain-staking-precompile traces"

This reverts commit b8867379952baf64a9d25aa1d9ee5641b495f9fc.

* Clean parachain-staking

* Remove leftovers from previous utils

* fmt

Co-authored-by: nanocryk <6422796+nanocryk@users.noreply.github.com>
@tgmichel tgmichel deleted the tgm-eth-maxpriorityfeepergas branch June 24, 2022 07:39
abhijeetbhagat pushed a commit to web3labs/frontier that referenced this pull request Jan 11, 2023
* Add `max_priority_fee_per_gas` rpc method

* Remove unused arg

* Add ts tests

* Simple transfer instead contract create

* editorconfig
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.

None yet

2 participants