[evm] Prevent Bifrost from Lowering Outbound Gas Rate
Resolves #1803 (closed). Posting for consideration, but leaving in draft for now. I also tried to simplify the complicated gas selection logic a bit and this needs to be considered with some thoughtfulness.
The fix for unstuck transactions being dropped after 125 changes is also in flight, but beyond that we should aim to avoid stuck transaction in the first place. The main concern is that currently Bifrost will adjust the rate down to respect max gas - IMO the rate should be respected and either allow Bifrost to go over the max within some threshold, or simply abort and let Thornode reschedule with sufficient max gas. This PR does the former.
@Multipartite raises valid point in #1803 (comment 1705988699) that it feels wrong to disregard the max gas. A middle ground may be just removing the factor config from this change and dropping the transaction to be rescheduled if the max gas is insufficient. In parallel (to give chains with spikier gas more headroom) adding one of either:
- Per-chain mimirs to apply to the max gas in
thornode
- A factor in Bifrost config to apply to the reported network fee