Our current algorithm starts at fast gas price and increases the gas price
of the transaction by 50% every 30 seconds that the transaction hasn't
been mined up to the max gas economically viable gas price.
The new algorithm always uses the correct gas price according to our
smarter gas estimation which is based on the time it should take to mine
the transaction. This gas price is updated in short intervals and the
transaction is resubmitted if the gas price increases. The gas price is
still capped by economic viability.
This should lead to lower gas prices as we can pick a lower starting gas
price when there is still more time left to solve the batch and because
we never pick a gas price that is higher than what the gas station
predict we need to pay to get into the next block.
Our current algorithm starts at fast gas price and increases the gas price of the transaction by 50% every 30 seconds that the transaction hasn't been mined up to the max gas economically viable gas price. The new algorithm always uses the correct gas price according to our smarter gas estimation which is based on the time it should take to mine the transaction. This gas price is updated in short intervals and the transaction is resubmitted if the gas price increases. The gas price is still capped by economic viability. This should lead to lower gas prices as we can pick a lower starting gas price when there is still more time left to solve the batch and because we never pick a gas price that is higher than what the gas station predict we need to pay to get into the next block.
Test Plan
Adjusted unit tests