This determines the relative scale of our gas price and gas estimates.
By default, the gas price (in wei) is FeeInfo::next_fee_multiplier() multiplied by
NativeToEthRatio. GasScale allows to scale this value: the actual gas price is the
default gas price multiplied by GasScale.
As a consequence, gas cost (gas estimates and actual gas usage during transaction) is
scaled down by the same factor. Thus, the total transaction cost is not affected by
GasScale – apart from rounding differences: the transaction cost is always a multiple
of the gas price and is derived by rounded up, so that with higher GasScales this can
lead to higher gas cost as the rounding difference would be larger.
The main purpose of changing the GasScale is to tune the gas cost so that it is closer
to standard EVM gas cost and contracts will not run out of gas when tools or code
assume hard coded gas limits.
This determines the relative scale of our gas price and gas estimates.
By default, the gas price (in wei) is
FeeInfo::next_fee_multiplier()multiplied byNativeToEthRatio.GasScaleallows to scale this value: the actual gas price is the default gas price multiplied byGasScale.As a consequence, gas cost (gas estimates and actual gas usage during transaction) is scaled down by the same factor. Thus, the total transaction cost is not affected by
GasScale– apart from rounding differences: the transaction cost is always a multiple of the gas price and is derived by rounded up, so that with higherGasScalesthis can lead to higher gas cost as the rounding difference would be larger.The main purpose of changing the
GasScaleis to tune the gas cost so that it is closer to standard EVM gas cost and contracts will not run out of gas when tools or code assume hard coded gas limits.Requirement:
GasScalemust not be 0