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

Support addition of relayers to existing chain pair outside of interchain.Build #1153

Open
chatton opened this issue Jun 24, 2024 · 0 comments

Comments

@chatton
Copy link
Contributor

chatton commented Jun 24, 2024

in the ibc-go E2Es, we are working on a refactor with a goal of reducing the number of runners we use in our CI, by re-using a pair of chains across an entire test suite.

We are effictively doing

  1. in SetupSuite we create the interchain calling ic.Build() (with SkipPathCreation set to true)
  2. In SetupTest we establish a client/connection/channel etc for the test to act on.
  3. Each test has a relayer to act on only the created channel for that test to avoid relayers relaying packets for other tests.

We are having an issue with part 3.

Due to the nature of how we construct interchain instances, we need to provide the relayers/links before chain creation. I.e. know details of test execution before the test is running. We would like to be able to lazily create a new relayer instance and wire it up (fund wallet accounts, add chains to config files etc ) in the SetupTest phase of each test.

Looking at some of the code, it looks like the AddChainConfiguration and RestoreKey functions may be what we need, and are already public, but it seems that there are some unexported types being leveraged here.

I think we would also need access to this functionality, however this is at genesis and of course could not be executed after the fact, we would need to be able to create and fund relayer accounts separately. Something similar to GetAndFundTestUsers but for relayers basically.

A temporary fix that I am experimenting is just pre-loading a bunch of relayers and then fetching one of these for a test. It's not great since it adds a bunch of time to start up, and you will likely create more than you need.

Please let me know if this is already a possibility, or there is some workaround to lazily create relayers and wire them up to an interchain that is already built!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants