cosmos / interchain-security

Interchain Security is an open sourced IBC application which allows cosmos blockchains to lease their proof-of-stake security to one another.
https://cosmos.github.io/interchain-security/
Other
156 stars 126 forks source link

Create example of app.go for users, test in real configuration, fix IBC-Go test suite to handle it #58

Closed mpoke closed 2 years ago

mpoke commented 2 years ago
jtremback commented 2 years ago

In the short term, there will be 3 different users of our app.go example.

I think it will be important have separate app.go files for provider and consumer chains. This is because the functioning of the consumer chain depends on certain modules being disabled. Even if we fixed this somehow, we would still want separate app.gos because the Hub will not want to pull in the consumer module and increase the attack surface.

For this to happen some changes will need to be made to the IBC-Go test suite to allow it to test two chains with separate app.gos.

As I just discussed with @danwt I think the time has come for us to fork the IBC-Go test framework into it's own repo. Dealing with a test framework that needs frequent modifications but also is bundled with one of our core dependencies is a pain.

Alternately, we could just keep modifying the IBC-Go test framework in our forked IBC-Go repo, but I'm not sure that has a lot of benefits.

danwt commented 2 years ago

fork the IBC-Go test framework into it's own repo.

I think it's a good idea. The ultimate goal would be to have a general tool for testing ibc apps across heterogeneous chains so the name could be something like 'ibc-tester'. It must be built for our needs first though, without premature generalization.

danwt commented 2 years ago

This issue is relevant for understanding current ibc-go testing limitations

danwt commented 2 years ago

From speaking with @jtremback we decided this has high priority. I will tackle this first.

danwt commented 2 years ago

With some small slightly hacky changes (1,2) the ibc-go testing can support multiple app.go's.

~Now I'm wondering if I need to create completely separate /app packages or I can somehow share the contents of /app between an app_parent.go and an app_child.go~

Figured it out

danwt commented 2 years ago

This issue is quite related to

danwt commented 2 years ago

Two PRs solve the basics of this issue

Now there are two copies of the app.go that contains both provider and consumer logic so I should additionally strip the provider-only logic from the consumer and the consumer-only logic from the provider. That might fall better under either of

Additionally I need to make sure the docker integration tests work with the new apps

danwt commented 2 years ago

Hi @alexanderbez. We spoke on slack. Here's my understanding

The ultimate goal is to have two separate app's that people can use as a basis. The provider can be like gaia and the consumer should be minimal but with democracy and/or cosmwasm. As I understand democracy is needed to enable cosmwasm in practice. Ethernal are working on cosmwasm and they are having problems with conflicting sdk versions ect. There is some uncertainty about the best way to structure the repo(s) to make all this possible.

The PR https://github.com/cosmos/interchain-security/pull/84 doesn't do much. It simply splits the apps and updates the tests (in-memory and integration) to use two different apps.

danwt commented 2 years ago

Can we close this?