hermes icon indicating copy to clipboard operation
hermes copied to clipboard

Provide support to use different wallets for relayer fees for a single chain

Open social244305-Architect opened this issue 2 years ago • 0 comments

Summary

In current Hermes setup, a single relayer wallet can be assigned in chain config to pay for relayer fees for all txns relayed. This single wallet is used to pay for fees for all counter party chains relayed.

Problem Definition

Using a single wallet to pay for relayer fees with multiple chains with high volume channels causes account sequence mismatch errors mostly due to inflight txs. Problem is more evident on high volume channels where packets are relayed to multiple chains. Hermes tries to retry tx with latest account sequence but it typically adds to the latency causing other relayers to pick packets.

Proposal

Provide ability to use multiple wallets for a single chain by allowing overrides at the counterparty Port/Channel config to include an override_key_name to be used for that specific channel. This will be an optional param. Below is the sample proposed config for hermes:

[[chains]] id = 'juno-1' ......... ......... key_name = 'test_relayer_acct' ......... ......... list = [ ['transfer', 'channel-0','override_key_name=alt_test_relayer_acct'], #alt_test_relayer_acct will be used to relay with channel 0 ['transfer', 'channel-1'], #test_relayer_acct will be used to relay with channel 1 ]

Use cases are listed below: -If no override key is provided in port/channel list, key defined in param "key_name" will be used -If override_key_name is provided in port/channel list, key defined in param "override_key_name" will be used -override_key_name is an optional param

I would also consider using key/value pairs to extend definition of chain at the port/channel level so more overrides can be added in future eliminating need for fixed structure.

Acceptance Criteria


For Admin Use

  • [ ] Not duplicate issue
  • [ ] Appropriate labels applied
  • [ ] Appropriate milestone (priority) applied
  • [ ] Appropriate contributors tagged
  • [ ] Contributor assigned/self-assigned

social244305-Architect avatar Mar 07 '23 17:03 social244305-Architect