cosmos / relayer

An IBC relayer for ibc-go
Apache License 2.0
390 stars 1.71k forks source link

Question about custom Stride Docker image #1432

Closed rootulp closed 7 months ago

rootulp commented 8 months ago

Context

https://github.com/cosmos/relayer/blob/b110a7af44821e7c1870f4b200f54f5029691c6f/interchaintest/stride/stride_icq_test.go#L55

Question

Why do these tests rely on a custom version of the Stride docker image? Is there anything in that Docker image that hasn't been upstreamed to the default image (e.g. v19.0.0)?

cc: @agouin

rootulp commented 8 months ago

In a draft PR, I was able to start a Stride chain successfully using andrew-test_admin_v5.1.1 but it failed to start with v19.0.0:

: "TestICA", "command": "strided collect-gentxs --home /var/cosmos-chain/stride", "hostname": "TestICA-hmgjtk", "container": "TestICA-hmgjtk"}
    ica_test.go:58:
            Error Trace:    /Users/rootulp/git/rootulp/celestiaorg/celestia-app/interchaintest/ica_test.go:58
            Error:          Received unexpected error:
                            failed to start chains: failed to start chain stride: failed to set voting period in genesis json: expected map or slice node, got: <nil> (path element idx: 3)
            Test:           TestICA
    setup.go:148: Container logs - {/TestICA-fotkdo}

This error message is misleading because it can originate from:

  1. https://github.com/cosmos/relayer/blob/b110a7af44821e7c1870f4b200f54f5029691c6f/interchaintest/stride/setup_test.go#L152
  2. https://github.com/cosmos/relayer/blob/b110a7af44821e7c1870f4b200f54f5029691c6f/interchaintest/stride/setup_test.go#L155 <- bug because that should say max deposit period instead.
agouin commented 7 months ago

The only change from v5.1.1 of stride is changing the admin account for the stakeibc module to be one that can controlled by the test https://github.com/cosmos/relayer/blob/b110a7af44821e7c1870f4b200f54f5029691c6f/interchaintest/stride/setup_test.go#L16 At the time of writing this test it was a hardcoded variable. Upon a quick skim, it does not look like there is an admin account anymore in the stakeibc module so that should no longer be necessary.

The issue you are seeing is a different one. The genesis file format has changed. I grabbed the default genesis.json generated by stride init local to compare. e.g. "app_state", "gov", "voting_params", "voting_period" is now "app_message", "gov", "params", voting_period" and "app_state", "gov", "deposit_params", "max_deposit_period" is now "app_message", "gov", "params", max_deposit_period". The rest of the keys in ModifyGenesisStride need to be updated too, mainly app_state -> app_message

rootulp commented 7 months ago

Thanks for your help. I just tried to create a new stride genesis.json but couldn't find the app_message field you're referring to. I'm not convinced that I need the genesis modifications to perform the test I care about so I opted to drop them entirely which enabled me to get past the error in this post so can close. Created https://github.com/strangelove-ventures/interchaintest/issues/1056 for the next issue.