We recently ran into an issue with release v1.1.4: when the current base fee exceed the configured maxGasPrice, the maxPricePerGas is set to maxGasPrice + 1, and the maxPriorityFee is set to 1 wei. We observed a span of several hours where the baseFee dropped below our maxGasPrice, but these transactions were not picked up by miners. We think this is because the priority fee was set so low.
Expected Behavior
1559-style transactions should not be set with an exceedingly low maxPriorityFee.
Current Behavior
1559-style transactions are broadcast with a maxPriorityFee of 1 wei when the network is congested and prices surge above the maxGasPrice.
Possible Solution
Because a transaction will never be priced higher than maxFeePerGas regardless of maxPriorityFee, we think that maxPriorityFee should always be set based on market conditions, rather than being set to a very low value when the base fee surges.
Steps to Reproduce (for bugs)
Configure a maxGasPrice that is likely to be too low for part of the day (for us, this is currently 70 gwei on Ethereum Mainnet)
Observe transactions broadcast with a maxPriorityFee of 1 wei when base fees are high
As quick fix we increased maxPriorityFee to 1Gwei in cases when BaseFee is higher than configured MaxGasPrice.
We realize the problem with current Fee calculations, and are working on more stable solution
We recently ran into an issue with release v1.1.4: when the current base fee exceed the configured
maxGasPrice
, themaxPricePerGas
is set tomaxGasPrice + 1
, and themaxPriorityFee
is set to 1 wei. We observed a span of several hours where the baseFee dropped below ourmaxGasPrice
, but these transactions were not picked up by miners. We think this is because the priority fee was set so low.Expected Behavior
1559-style transactions should not be set with an exceedingly low
maxPriorityFee
.Current Behavior
1559-style transactions are broadcast with a
maxPriorityFee
of 1 wei when the network is congested and prices surge above themaxGasPrice
.Possible Solution
Because a transaction will never be priced higher than
maxFeePerGas
regardless ofmaxPriorityFee
, we think thatmaxPriorityFee
should always be set based on market conditions, rather than being set to a very low value when the base fee surges.Steps to Reproduce (for bugs)
maxGasPrice
that is likely to be too low for part of the day (for us, this is currently 70 gwei on Ethereum Mainnet)maxPriorityFee
of 1 wei when base fees are highVersions
ChainBridge commit (or docker tag): v1.1.4 chainbridge-solidity version: chainbridge-substrate version: Go version: