Provide support for a gas profile to override gas settings
Summary
In current hermes configuration, there is a static gas configuration defined for a given chain. We are requesting support for adding an override at the channel level to define a gas_profile that will override default gas settings. This will allow relayers to adjust default_gas, max_gas, gas_price and gas_multiplier based on relayer competitiveness on a given channel.
Problem Definition
For chains with high cost of relaying, relayer fees add up quickly. Having a fixed gas and price settings sometimes forces relayer operator to pay more fees. Essentially these settings are required to be setup for the most competitive chain and forces same gas prices to be paid across all chains even though it might be possible to relay on other channels at lower cost.
Proposal
Provide support for a gas_profile override at the port/channel level to override gas settings. This will be an optional param and if not present, default gas settings mentioned in the chain will be used. Below is the sample proposed config for hermes:
[[chains]] id = 'juno-1' ......... ......... default_gas = 500000 max_gas = 800000 gas_price = { price = 0.003, denom = 'ujuno' } gas_multiplier = 1.1 ......... ......... list = [ ['transfer', 'channel-0','gas_profile=alt_gas_profile'], #alt_gas_profile will be used to relay with channel 0 ['transfer', 'channel-1'], #default gas setting from chain will be used to relay with channel 1 ]
[[gas_profile]] id = 'alt_gas_profile' default_gas = 250000 max_gas = 700000 gas_price = { price = 0.001, denom = 'ujuno' } gas_multiplier = 1.1
Use cases are listed below: -If no override gas_profile is provided in port/channel list, default_gas, max_gas, gas_price and gas_multiplier provided in chain will be used -If gas_profile is provided in port/channel list, gas settings referenced using param "gas_profile=alt_gas_profile" will be used -gas_profile is an optional param -Multiple gas_profile settings can be created and assigned to different channels
Acceptance Criteria
For Admin Use
- [ ] Not duplicate issue
- [ ] Appropriate labels applied
- [ ] Appropriate milestone (priority) applied
- [ ] Appropriate contributors tagged
- [ ] Contributor assigned/self-assigned