Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a way to scan config chains and show all the active channels between them #4087

Open
5 tasks
freak12techno opened this issue Jul 12, 2024 · 0 comments
Open
5 tasks

Comments

@freak12techno
Copy link
Contributor

Summary

Would be nice to have a way (a command maybe) that will scan all chains from config and will show the channels that could be relayed.

Problem Definition

So, as per docs, there are two ways to specify channels to relay between:

  1. scan all chains and their connections on startup, which would use all possible
    channels that could be relayed. This would run on every Hermes startup and might be extremely slow on big chains like Osmosis.
  2. use allow policy filter whitelist. This would be faster and would only fetch the chains specified in chain config.

Issue with the approach 2 is the following: imagine I (as a relayer operator) somehow craft a whitelist of channels to relay between as a list of all open channels I can relay between. Then some new channel opens, which I do not know about, and I won't ever know it exists unless I check for it manually (and it might be tedious if I'd relay a lot of channels) or I'd see some messages on that on Discord or so. And currently as far as I know there's no way, other than manually checking all the connections, to check if there's any channel between all the chains I've specified in the config that I have no allow policy whitelist entry for.

So as a relayer operator I'd want to have a way (probably as a command?) that I can execute on my relayer that would fetch all of the possible connections between all the possible chains and output something I can use to update my allow policy whitelist. Ideally it should report something like this:

Chain 1:

  • channel-0 -> chain 2 (Hermes with my config would relay it)
  • channel-1 -> chain 3 (it's not whitelisted in my allow policy so this channel won't be relayed)

So I'd look at it and be like "okay, I have a channel that I am not relaying but I can relay" and can put it into my allow policy.

As an option, this command might also update my allow policy to add these channels there automatically so I won't even need to update my config.

Does this sound achievable (likely yes) and is it generally a nice idea? As for me, I'd highly likely benefit from it, as I just found out there are around 40 channels between my nodes I can relay and I only relay like 7. (I could've fixed it by commenting out the allow policy on all chains, and in fact that's exactly what I did for now, but now I have to wait like 10 minutes before Hermes would start properly.)

Proposal

See above.

Acceptance Criteria


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate milestone (priority) applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@github-project-automation github-project-automation bot moved this to 🩹 Triage in Hermes Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🩹 Triage
Development

No branches or pull requests

1 participant