Skip to content

[evm] Prevent Bifrost from Lowering Outbound Gas Rate

Ursa (9R) requested to merge ursa/evm-prevent-lower-gas-rate into develop

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:

  1. Per-chain mimirs to apply to the max gas in thornode
  2. A factor in Bifrost config to apply to the reported network fee
Edited by Ursa (9R)

Merge request reports