should only be executed when eos_evm_version == 0, otherwise the contract must assert that
inclusion_price >= min_inclusion_price.
Where inclusion_price is calculated as follows:
let inclusion_price = min(max_priority_fee_per_gas, max_fee_per_gas - base_fee_per_gas)
where base_fee_per_gas is the active gas price from the config, i.e. _config->get_gas_price().
Note that transaction pre-validation already checks that tx.max_priority_fee_per_gas <= tx.max_fee_per_gas and that base_fee_per_gas <= tx.max_fee_per_gas. After London, since base_fee_per_gas is _config->get_gas_price(), that second inequality check provides the proper enforcement of a minimum gas price that was previously provided by assert(tx.max_fee_per_gas >= _config->get_gas_price()).
Depends on https://github.com/eosnetworkfoundation/eos-evm-contract/issues/697.
Add
min_inclusion_price
parameter as a binary_extension to thepushtx
action.The contract must assert that the
min_inclusion_price
parameter can only be specified wheneos_evm_version >= 1
.In
evm_contract::process_tx
the assertsshould only be executed when
eos_evm_version == 0
, otherwise the contract must assert thatinclusion_price >= min_inclusion_price
.Where
inclusion_price
is calculated as follows:where
base_fee_per_gas
is the active gas price from the config, i.e._config->get_gas_price()
.Note that transaction pre-validation already checks that
tx.max_priority_fee_per_gas <= tx.max_fee_per_gas
and thatbase_fee_per_gas <= tx.max_fee_per_gas
. After London, sincebase_fee_per_gas
is_config->get_gas_price()
, that second inequality check provides the proper enforcement of a minimum gas price that was previously provided byassert(tx.max_fee_per_gas >= _config->get_gas_price())
.