diff --git a/.github/workflows/e2e-conformance.yml b/.github/workflows/e2e-conformance.yml new file mode 100644 index 000000000..24e2c0235 --- /dev/null +++ b/.github/workflows/e2e-conformance.yml @@ -0,0 +1,32 @@ +name: Conformance End-To-End Tests + +on: + pull_request: + +# Ensures that only a single workflow per PR will run at a time. Cancels in-progress jobs if new commit is pushed. +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + test-conformance: + name: test-conformance + runs-on: ubuntu-latest + steps: + # Install and setup go + - name: Set up Go 1.22 + uses: actions/setup-go@v5 + with: + go-version: '1.22' + + - name: checkout interchaintest + uses: actions/checkout@v4 + + # cleanup environment on self-hosted test runner + - name: clean + run: |- + rm -rf ~/.interchaintest + + # run tests + - name: run conformance tests + run: (go test -race -timeout 30m -failfast -v -p 2 ./cmd/interchaintest) || (echo "\n\n*****CHAIN and RELAYER LOGS*****" && cat "$HOME/.interchaintest/logs/interchaintest.log" && exit 1) diff --git a/.github/workflows/e2e-cosmos.yml b/.github/workflows/e2e-cosmos.yml new file mode 100644 index 000000000..7d9d409bd --- /dev/null +++ b/.github/workflows/e2e-cosmos.yml @@ -0,0 +1,33 @@ +name: Conformance End-To-End Tests + +on: + pull_request: + +# Ensures that only a single workflow per PR will run at a time. Cancels in-progress jobs if new commit is pushed. +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + test-cosmos-examples: + name: test-cosmos-examples + runs-on: ubuntu-latest + steps: + # Install and setup go + - name: Set up Go 1.22 + uses: actions/setup-go@v5 + with: + go-version: '1.22' + cache: false + + - name: checkout interchaintest + uses: actions/checkout@v4 + + # cleanup environment on self-hosted test runner + - name: clean + run: |- + rm -rf ~/.interchaintest + + # run tests + - name: run example cosmos tests + run: go test -race -failfast -timeout 30m -v -p 2 ./examples/cosmos diff --git a/.github/workflows/e2e-ibc.yml b/.github/workflows/e2e-ibc.yml new file mode 100644 index 000000000..7538da63e --- /dev/null +++ b/.github/workflows/e2e-ibc.yml @@ -0,0 +1,33 @@ +name: IBC End-To-End Tests + +on: + pull_request: + +# Ensures that only a single workflow per PR will run at a time. Cancels in-progress jobs if new commit is pushed. +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + test-ibc-examples: + name: test-ibc-examples + runs-on: ubuntu-latest + steps: + # Install and setup go + - name: Set up Go 1.22 + uses: actions/setup-go@v5 + with: + go-version: '1.22' + cache: false + + - name: checkout interchaintest + uses: actions/checkout@v4 + + # cleanup environment on self-hosted test runner + - name: clean + run: |- + rm -rf ~/.interchaintest + + # run tests + - name: run example ibc tests + run: go test -race -timeout 30m -failfast -v -p 2 ./examples/ibc diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml deleted file mode 100644 index 54f8a71a3..000000000 --- a/.github/workflows/e2e-tests.yml +++ /dev/null @@ -1,76 +0,0 @@ -name: Run End-To-End Tests - -on: - pull_request: - -# Ensures that only a single workflow per PR will run at a time. Cancels in-progress jobs if new commit is pushed. -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - test-conformance: - name: test-conformance - runs-on: ubuntu-latest - steps: - # Install and setup go - - name: Set up Go 1.22 - uses: actions/setup-go@v5 - with: - go-version: '1.22' - - - name: checkout interchaintest - uses: actions/checkout@v4 - - # cleanup environment on self-hosted test runner - - name: clean - run: |- - rm -rf ~/.interchaintest - - # run tests - - name: run conformance tests - run: (go test -race -timeout 30m -failfast -v -p 2 ./cmd/interchaintest) || (echo "\n\n*****CHAIN and RELAYER LOGS*****" && cat "$HOME/.interchaintest/logs/interchaintest.log" && exit 1) - test-ibc-examples: - name: test-ibc-examples - runs-on: ubuntu-latest - steps: - # Install and setup go - - name: Set up Go 1.22 - uses: actions/setup-go@v5 - with: - go-version: '1.22' - cache: false - - - name: checkout interchaintest - uses: actions/checkout@v4 - - # cleanup environment on self-hosted test runner - - name: clean - run: |- - rm -rf ~/.interchaintest - - # run tests - - name: run example ibc tests - run: go test -race -timeout 30m -failfast -v -p 2 ./examples/ibc - test-cosmos-examples: - name: test-cosmos-examples - runs-on: ubuntu-latest - steps: - # Install and setup go - - name: Set up Go 1.22 - uses: actions/setup-go@v5 - with: - go-version: '1.22' - cache: false - - - name: checkout interchaintest - uses: actions/checkout@v4 - - # cleanup environment on self-hosted test runner - - name: clean - run: |- - rm -rf ~/.interchaintest - - # run tests - - name: run example cosmos tests - run: go test -race -failfast -timeout 30m -v -p 2 ./examples/cosmos diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 40440e00e..c0691dfb1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,7 +5,7 @@ on: types: [created] env: - GO_VERSION: 1.21 + GO_VERSION: 1.22 jobs: release-static-binary: @@ -31,4 +31,4 @@ jobs: with: token: ${{ github.token }} files: | - local-ic \ No newline at end of file + local-ic diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 33c0c91c3..0323f8c95 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -58,7 +58,7 @@ Before you start contributing, make sure you have the following prerequisites in - [Go](https://golang.org/dl/) - [Docker](https://www.docker.com/get-started) -- [VSCode (recommended editor)](https://code.visualstudio.com/) +- [VSCode (recommended editor)](https://code.visualstudio.com/) To get started, follow these steps: @@ -76,7 +76,7 @@ To get started, follow these steps: git checkout -b name/broad-description-of-feature ``` -4. Make your changes and commit them with descriptive commit messages. +4. Make your changes and commit them with descriptive commit messages. 5. Test your changes locally with `go test ./...`, or by running the specific test affecting your feature or fix. @@ -86,4 +86,4 @@ To get started, follow these steps: git push origin name/broad-description-of-feature ``` -7. Create a pull request (PR) against the main branch of the interchaintest repository. If the PR is still a work-in-progress, please mark the PR as draft. \ No newline at end of file +7. Create a pull request (PR) against the main branch of the interchaintest repository. If the PR is still a work-in-progress, please mark the PR as draft. diff --git a/chain/cosmos/broadcaster.go b/chain/cosmos/broadcaster.go index b51ba1801..43afde424 100644 --- a/chain/cosmos/broadcaster.go +++ b/chain/cosmos/broadcaster.go @@ -103,7 +103,7 @@ func (b *Broadcaster) GetFactory(ctx context.Context, user User) (tx.Factory, er // client.Context. func (b *Broadcaster) GetClientContext(ctx context.Context, user User) (client.Context, error) { chain := b.chain - cn := chain.getFullNode() + cn := chain.GetFullNode() _, ok := b.keyrings[user] if !ok { @@ -160,7 +160,7 @@ func (b *Broadcaster) defaultClientContext(fromUser User, sdkAdd sdk.AccAddress) // initialize a clean buffer each time b.buf.Reset() kr := b.keyrings[fromUser] - cn := b.chain.getFullNode() + cn := b.chain.GetFullNode() return cn.CliContext(). WithOutput(b.buf). WithFrom(fromUser.FormattedAddress()). diff --git a/chain/cosmos/cosmos_chain.go b/chain/cosmos/cosmos_chain.go index 1096d4b54..e69472341 100644 --- a/chain/cosmos/cosmos_chain.go +++ b/chain/cosmos/cosmos_chain.go @@ -30,7 +30,7 @@ import ( cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" "github.com/cosmos/cosmos-sdk/crypto/hd" "github.com/cosmos/cosmos-sdk/crypto/keyring" - "github.com/cosmos/cosmos-sdk/types" + sdk "github.com/cosmos/cosmos-sdk/types" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" paramsutils "github.com/cosmos/cosmos-sdk/x/params/client/utils" @@ -155,7 +155,7 @@ func (c *CosmosChain) AddFullNodes(ctx context.Context, configFileOverrides map[ prevCount := c.numFullNodes c.numFullNodes += inc - if err := c.initializeChainNodes(ctx, c.testName, c.getFullNode().DockerClient, c.getFullNode().NetworkID); err != nil { + if err := c.initializeChainNodes(ctx, c.testName, c.GetFullNode().DockerClient, c.GetFullNode().NetworkID); err != nil { return err } @@ -211,7 +211,7 @@ func (c *CosmosChain) Initialize(ctx context.Context, testName string, cli *clie return c.initializeChainNodes(ctx, testName, cli, networkID) } -func (c *CosmosChain) getFullNode() *ChainNode { +func (c *CosmosChain) GetFullNode() *ChainNode { return c.GetNode() } @@ -221,75 +221,75 @@ func (c *CosmosChain) GetNode() *ChainNode { // Exec implements ibc.Chain. func (c *CosmosChain) Exec(ctx context.Context, cmd []string, env []string) (stdout, stderr []byte, err error) { - return c.getFullNode().Exec(ctx, cmd, env) + return c.GetFullNode().Exec(ctx, cmd, env) } // Implements Chain interface. func (c *CosmosChain) GetRPCAddress() string { if c.Config().UsesCometMock() { - return fmt.Sprintf("http://%s:22331", c.getFullNode().HostnameCometMock()) + return fmt.Sprintf("http://%s:22331", c.GetFullNode().HostnameCometMock()) } - return fmt.Sprintf("http://%s:26657", c.getFullNode().HostName()) + return fmt.Sprintf("http://%s:26657", c.GetFullNode().HostName()) } // Implements Chain interface. func (c *CosmosChain) GetAPIAddress() string { - return fmt.Sprintf("http://%s:1317", c.getFullNode().HostName()) + return fmt.Sprintf("http://%s:1317", c.GetFullNode().HostName()) } // Implements Chain interface. func (c *CosmosChain) GetGRPCAddress() string { - return fmt.Sprintf("%s:9090", c.getFullNode().HostName()) + return fmt.Sprintf("%s:9090", c.GetFullNode().HostName()) } // GetHostRPCAddress returns the address of the RPC server accessible by the host. // This will not return a valid address until the chain has been started. func (c *CosmosChain) GetHostRPCAddress() string { - return "http://" + c.getFullNode().hostRPCPort + return "http://" + c.GetFullNode().hostRPCPort } // GetHostAPIAddress returns the address of the REST API server accessible by the host. // This will not return a valid address until the chain has been started. func (c *CosmosChain) GetHostAPIAddress() string { - return "http://" + c.getFullNode().hostAPIPort + return "http://" + c.GetFullNode().hostAPIPort } // GetHostGRPCAddress returns the address of the gRPC server accessible by the host. // This will not return a valid address until the chain has been started. func (c *CosmosChain) GetHostGRPCAddress() string { - return c.getFullNode().hostGRPCPort + return c.GetFullNode().hostGRPCPort } // GetHostP2PAddress returns the address of the P2P server accessible by the host. // This will not return a valid address until the chain has been started. func (c *CosmosChain) GetHostPeerAddress() string { - return c.getFullNode().hostP2PPort + return c.GetFullNode().hostP2PPort } // HomeDir implements ibc.Chain. func (c *CosmosChain) HomeDir() string { - return c.getFullNode().HomeDir() + return c.GetFullNode().HomeDir() } // Implements Chain interface. func (c *CosmosChain) CreateKey(ctx context.Context, keyName string) error { - return c.getFullNode().CreateKey(ctx, keyName) + return c.GetFullNode().CreateKey(ctx, keyName) } // Implements Chain interface. func (c *CosmosChain) RecoverKey(ctx context.Context, keyName, mnemonic string) error { - return c.getFullNode().RecoverKey(ctx, keyName, mnemonic) + return c.GetFullNode().RecoverKey(ctx, keyName, mnemonic) } // Implements Chain interface. func (c *CosmosChain) GetAddress(ctx context.Context, keyName string) ([]byte, error) { - b32Addr, err := c.getFullNode().AccountKeyBech32(ctx, keyName) + b32Addr, err := c.GetFullNode().AccountKeyBech32(ctx, keyName) if err != nil { return nil, err } - return types.GetFromBech32(b32Addr, c.Config().Bech32Prefix) + return sdk.GetFromBech32(b32Addr, c.Config().Bech32Prefix) } // BuildWallet will return a Cosmos wallet @@ -344,12 +344,12 @@ func (c *CosmosChain) BuildRelayerWallet(ctx context.Context, keyName string) (i // Implements Chain interface. func (c *CosmosChain) SendFunds(ctx context.Context, keyName string, amount ibc.WalletAmount) error { - return c.getFullNode().BankSend(ctx, keyName, amount) + return c.GetFullNode().BankSend(ctx, keyName, amount) } // Implements Chain interface. func (c *CosmosChain) SendFundsWithNote(ctx context.Context, keyName string, amount ibc.WalletAmount, note string) (string, error) { - return c.getFullNode().BankSendWithNote(ctx, keyName, amount, note) + return c.GetFullNode().BankSendWithNote(ctx, keyName, amount, note) } // Implements Chain interface. @@ -360,7 +360,7 @@ func (c *CosmosChain) SendIBCTransfer( amount ibc.WalletAmount, options ibc.TransferOptions, ) (tx ibc.Tx, _ error) { - txHash, err := c.getFullNode().SendIBCTransfer(ctx, channelID, keyName, amount, options) + txHash, err := c.GetFullNode().SendIBCTransfer(ctx, channelID, keyName, amount, options) if err != nil { return tx, fmt.Errorf("send ibc transfer: %w", err) } @@ -418,18 +418,18 @@ func (c *CosmosChain) SendIBCTransfer( // RegisterICA will attempt to register an interchain account on the given counterparty chain. func (c *CosmosChain) RegisterICA(ctx context.Context, keyName string, connectionID string) (string, error) { - return c.getFullNode().RegisterICA(ctx, keyName, connectionID) + return c.GetFullNode().RegisterICA(ctx, keyName, connectionID) } // QueryICA will query for an interchain account controlled by the given address on the counterparty chain. func (c *CosmosChain) QueryICAAddress(ctx context.Context, connectionID, address string) (string, error) { - return c.getFullNode().QueryICA(ctx, connectionID, address) + return c.GetFullNode().QueryICA(ctx, connectionID, address) } // SendICATx sends an interchain account transaction for a specified address and sends it to the respective // interchain account on the counterparty chain. -func (c *CosmosChain) SendICATx(ctx context.Context, keyName, connectionID string, msgs []types.Msg, icaTxMemo string) (string, error) { - node := c.getFullNode() +func (c *CosmosChain) SendICATx(ctx context.Context, keyName, connectionID string, msgs []sdk.Msg, icaTxMemo string) (string, error) { + node := c.GetFullNode() registry := node.Chain.Config().EncodingConfig.InterfaceRegistry encoding := "proto3" return node.SendICATx(ctx, keyName, connectionID, registry, msgs, icaTxMemo, encoding) @@ -449,7 +449,7 @@ func (c *CosmosChain) PushNewWasmClientProposal(ctx context.Context, keyName str return tx, "", err } message := wasmtypes.MsgStoreCode{ - Signer: types.MustBech32ifyAddressBytes(c.cfg.Bech32Prefix, authtypes.NewModuleAddress(govtypes.ModuleName)), + Signer: sdk.MustBech32ifyAddressBytes(c.cfg.Bech32Prefix, authtypes.NewModuleAddress(govtypes.ModuleName)), WasmByteCode: content, } msg, err := c.cfg.EncodingConfig.Codec.MarshalInterfaceJSON(&message) @@ -457,7 +457,7 @@ func (c *CosmosChain) PushNewWasmClientProposal(ctx context.Context, keyName str return tx, "", err } prop.Messages = append(prop.Messages, msg) - txHash, err := c.getFullNode().SubmitProposal(ctx, keyName, prop) + txHash, err := c.GetFullNode().SubmitProposal(ctx, keyName, prop) if err != nil { return tx, "", fmt.Errorf("failed to submit wasm client proposal: %w", err) } @@ -467,7 +467,7 @@ func (c *CosmosChain) PushNewWasmClientProposal(ctx context.Context, keyName str // UpgradeProposal submits a software-upgrade governance proposal to the chain. func (c *CosmosChain) UpgradeProposal(ctx context.Context, keyName string, prop SoftwareUpgradeProposal) (tx TxProposal, _ error) { - txHash, err := c.getFullNode().UpgradeProposal(ctx, keyName, prop) + txHash, err := c.GetFullNode().UpgradeProposal(ctx, keyName, prop) if err != nil { return tx, fmt.Errorf("failed to submit upgrade proposal: %w", err) } @@ -476,7 +476,7 @@ func (c *CosmosChain) UpgradeProposal(ctx context.Context, keyName string, prop // SubmitProposal submits a gov v1 proposal to the chain. func (c *CosmosChain) SubmitProposal(ctx context.Context, keyName string, prop TxProposalv1) (tx TxProposal, _ error) { - txHash, err := c.getFullNode().SubmitProposal(ctx, keyName, prop) + txHash, err := c.GetFullNode().SubmitProposal(ctx, keyName, prop) if err != nil { return tx, fmt.Errorf("failed to submit gov v1 proposal: %w", err) } @@ -485,7 +485,7 @@ func (c *CosmosChain) SubmitProposal(ctx context.Context, keyName string, prop T // TextProposal submits a text governance proposal to the chain. func (c *CosmosChain) TextProposal(ctx context.Context, keyName string, prop TextProposal) (tx TxProposal, _ error) { - txHash, err := c.getFullNode().TextProposal(ctx, keyName, prop) + txHash, err := c.GetFullNode().TextProposal(ctx, keyName, prop) if err != nil { return tx, fmt.Errorf("failed to submit upgrade proposal: %w", err) } @@ -494,7 +494,7 @@ func (c *CosmosChain) TextProposal(ctx context.Context, keyName string, prop Tex // ParamChangeProposal submits a param change proposal to the chain, signed by keyName. func (c *CosmosChain) ParamChangeProposal(ctx context.Context, keyName string, prop *paramsutils.ParamChangeProposalJSON) (tx TxProposal, _ error) { - txHash, err := c.getFullNode().ParamChangeProposal(ctx, keyName, prop) + txHash, err := c.GetFullNode().ParamChangeProposal(ctx, keyName, prop) if err != nil { return tx, fmt.Errorf("failed to submit param change proposal: %w", err) } @@ -504,17 +504,17 @@ func (c *CosmosChain) ParamChangeProposal(ctx context.Context, keyName string, p // QueryParam returns the param state of a given key. func (c *CosmosChain) QueryParam(ctx context.Context, subspace, key string) (*ParamChange, error) { - return c.getFullNode().QueryParam(ctx, subspace, key) + return c.GetFullNode().QueryParam(ctx, subspace, key) } // QueryBankMetadata returns the metadata of a given token denomination. func (c *CosmosChain) QueryBankMetadata(ctx context.Context, denom string) (*BankMetaData, error) { - return c.getFullNode().QueryBankMetadata(ctx, denom) + return c.GetFullNode().QueryBankMetadata(ctx, denom) } // ConsumerAdditionProposal submits a legacy governance proposal to add a consumer to the chain. func (c *CosmosChain) ConsumerAdditionProposal(ctx context.Context, keyName string, prop ccvclient.ConsumerAdditionProposalJSON) (tx TxProposal, _ error) { - txHash, err := c.getFullNode().ConsumerAdditionProposal(ctx, keyName, prop) + txHash, err := c.GetFullNode().ConsumerAdditionProposal(ctx, keyName, prop) if err != nil { return tx, fmt.Errorf("failed to submit consumer addition proposal: %w", err) } @@ -543,57 +543,57 @@ func (c *CosmosChain) txProposal(txHash string) (tx TxProposal, _ error) { // StoreContract takes a file path to smart contract and stores it on-chain. Returns the contracts code id. func (c *CosmosChain) StoreContract(ctx context.Context, keyName string, fileName string, extraExecTxArgs ...string) (string, error) { - return c.getFullNode().StoreContract(ctx, keyName, fileName, extraExecTxArgs...) + return c.GetFullNode().StoreContract(ctx, keyName, fileName, extraExecTxArgs...) } // InstantiateContract takes a code id for a smart contract and initialization message and returns the instantiated contract address. func (c *CosmosChain) InstantiateContract(ctx context.Context, keyName string, codeID string, initMessage string, needsNoAdminFlag bool, extraExecTxArgs ...string) (string, error) { - return c.getFullNode().InstantiateContract(ctx, keyName, codeID, initMessage, needsNoAdminFlag, extraExecTxArgs...) + return c.GetFullNode().InstantiateContract(ctx, keyName, codeID, initMessage, needsNoAdminFlag, extraExecTxArgs...) } // ExecuteContract executes a contract transaction with a message using it's address. -func (c *CosmosChain) ExecuteContract(ctx context.Context, keyName string, contractAddress string, message string, extraExecTxArgs ...string) (res *types.TxResponse, err error) { - return c.getFullNode().ExecuteContract(ctx, keyName, contractAddress, message, extraExecTxArgs...) +func (c *CosmosChain) ExecuteContract(ctx context.Context, keyName string, contractAddress string, message string, extraExecTxArgs ...string) (res *sdk.TxResponse, err error) { + return c.GetFullNode().ExecuteContract(ctx, keyName, contractAddress, message, extraExecTxArgs...) } // MigrateContract performs contract migration. -func (c *CosmosChain) MigrateContract(ctx context.Context, keyName string, contractAddress string, codeID string, message string, extraExecTxArgs ...string) (res *types.TxResponse, err error) { - return c.getFullNode().MigrateContract(ctx, keyName, contractAddress, codeID, message, extraExecTxArgs...) +func (c *CosmosChain) MigrateContract(ctx context.Context, keyName string, contractAddress string, codeID string, message string, extraExecTxArgs ...string) (res *sdk.TxResponse, err error) { + return c.GetFullNode().MigrateContract(ctx, keyName, contractAddress, codeID, message, extraExecTxArgs...) } // QueryContract performs a smart query, taking in a query struct and returning a error with the response struct populated. func (c *CosmosChain) QueryContract(ctx context.Context, contractAddress string, query any, response any) error { - return c.getFullNode().QueryContract(ctx, contractAddress, query, response) + return c.GetFullNode().QueryContract(ctx, contractAddress, query, response) } // DumpContractState dumps the state of a contract at a block height. func (c *CosmosChain) DumpContractState(ctx context.Context, contractAddress string, height int64) (*DumpContractStateResponse, error) { - return c.getFullNode().DumpContractState(ctx, contractAddress, height) + return c.GetFullNode().DumpContractState(ctx, contractAddress, height) } // StoreClientContract takes a file path to a client smart contract and stores it on-chain. Returns the contracts code id. func (c *CosmosChain) StoreClientContract(ctx context.Context, keyName string, fileName string, extraExecTxArgs ...string) (string, error) { - return c.getFullNode().StoreClientContract(ctx, keyName, fileName, extraExecTxArgs...) + return c.GetFullNode().StoreClientContract(ctx, keyName, fileName, extraExecTxArgs...) } // QueryClientContractCode performs a query with the contract codeHash as the input and code as the output. func (c *CosmosChain) QueryClientContractCode(ctx context.Context, codeHash string, response any) error { - return c.getFullNode().QueryClientContractCode(ctx, codeHash, response) + return c.GetFullNode().QueryClientContractCode(ctx, codeHash, response) } // ExportState exports the chain state at specific height. // Implements Chain interface. func (c *CosmosChain) ExportState(ctx context.Context, height int64) (string, error) { - return c.getFullNode().ExportState(ctx, height) + return c.GetFullNode().ExportState(ctx, height) } // QueryContractInfo queries the chain for the contract metadata. func (c *CosmosChain) QueryContractInfo(ctx context.Context, contractAddress string) (*ContractInfoResponse, error) { - return c.getFullNode().QueryContractInfo(ctx, contractAddress) + return c.GetFullNode().QueryContractInfo(ctx, contractAddress) } -func (c *CosmosChain) GetTransaction(txhash string) (*types.TxResponse, error) { - fn := c.getFullNode() +func (c *CosmosChain) GetTransaction(txhash string) (*sdk.TxResponse, error) { + fn := c.GetFullNode() return fn.GetTransaction(fn.CliContext(), txhash) } @@ -844,15 +844,15 @@ func (c *CosmosChain) Start(testName string, ctx context.Context, additionalGene decimalPow := int64(math.Pow10(int(*chainCfg.CoinDecimals))) - genesisAmounts := make([][]types.Coin, len(c.Validators)) - genesisSelfDelegation := make([]types.Coin, len(c.Validators)) + genesisAmounts := make([][]sdk.Coin, len(c.Validators)) + genesisSelfDelegation := make([]sdk.Coin, len(c.Validators)) for i := range c.Validators { - genesisAmounts[i] = []types.Coin{{Amount: sdkmath.NewInt(10_000_000).MulRaw(decimalPow), Denom: chainCfg.Denom}} - genesisSelfDelegation[i] = types.Coin{Amount: sdkmath.NewInt(5_000_000).MulRaw(decimalPow), Denom: chainCfg.Denom} + genesisAmounts[i] = []sdk.Coin{{Amount: sdkmath.NewInt(10_000_000).MulRaw(decimalPow), Denom: chainCfg.Denom}} + genesisSelfDelegation[i] = sdk.Coin{Amount: sdkmath.NewInt(5_000_000).MulRaw(decimalPow), Denom: chainCfg.Denom} if chainCfg.ModifyGenesisAmounts != nil { amount, selfDelegation := chainCfg.ModifyGenesisAmounts(i) - genesisAmounts[i] = []types.Coin{amount} + genesisAmounts[i] = []sdk.Coin{amount} genesisSelfDelegation[i] = selfDelegation } } @@ -958,7 +958,7 @@ func (c *CosmosChain) Start(testName string, ctx context.Context, additionalGene } for _, wallet := range additionalGenesisWallets { - if err := validator0.AddGenesisAccount(ctx, wallet.Address, []types.Coin{{Denom: wallet.Denom, Amount: wallet.Amount}}); err != nil { + if err := validator0.AddGenesisAccount(ctx, wallet.Address, []sdk.Coin{{Denom: wallet.Denom, Amount: wallet.Amount}}); err != nil { return err } } @@ -1055,18 +1055,18 @@ func (c *CosmosChain) Start(testName string, ctx context.Context, additionalGene } // Wait for blocks before considering the chains "started" - return testutil.WaitForBlocks(ctx, 2, c.getFullNode()) + return testutil.WaitForBlocks(ctx, 2, c.GetFullNode()) } // Height implements ibc.Chain. func (c *CosmosChain) Height(ctx context.Context) (int64, error) { - return c.getFullNode().Height(ctx) + return c.GetFullNode().Height(ctx) } // Acknowledgements implements ibc.Chain, returning all acknowledgments in block at height. func (c *CosmosChain) Acknowledgements(ctx context.Context, height int64) ([]ibc.PacketAcknowledgement, error) { var acks []*chanTypes.MsgAcknowledgement - err := RangeBlockMessages(ctx, c.cfg.EncodingConfig.InterfaceRegistry, c.getFullNode().Client, height, func(msg types.Msg) bool { + err := RangeBlockMessages(ctx, c.cfg.EncodingConfig.InterfaceRegistry, c.GetFullNode().Client, height, func(msg sdk.Msg) bool { found, ok := msg.(*chanTypes.MsgAcknowledgement) if ok { acks = append(acks, found) @@ -1098,7 +1098,7 @@ func (c *CosmosChain) Acknowledgements(ctx context.Context, height int64) ([]ibc // Timeouts implements ibc.Chain, returning all timeouts in block at height. func (c *CosmosChain) Timeouts(ctx context.Context, height int64) ([]ibc.PacketTimeout, error) { var timeouts []*chanTypes.MsgTimeout - err := RangeBlockMessages(ctx, c.cfg.EncodingConfig.InterfaceRegistry, c.getFullNode().Client, height, func(msg types.Msg) bool { + err := RangeBlockMessages(ctx, c.cfg.EncodingConfig.InterfaceRegistry, c.GetFullNode().Client, height, func(msg sdk.Msg) bool { found, ok := msg.(*chanTypes.MsgTimeout) if ok { timeouts = append(timeouts, found) @@ -1128,7 +1128,7 @@ func (c *CosmosChain) Timeouts(ctx context.Context, height int64) ([]ibc.PacketT // FindTxs implements blockdb.BlockSaver. func (c *CosmosChain) FindTxs(ctx context.Context, height int64) ([]blockdb.Tx, error) { - fn := c.getFullNode() + fn := c.GetFullNode() c.findTxMu.Lock() defer c.findTxMu.Unlock() return fn.FindTxs(ctx, height) diff --git a/chain/cosmos/ics.go b/chain/cosmos/ics.go index 892da244c..7a731031b 100644 --- a/chain/cosmos/ics.go +++ b/chain/cosmos/ics.go @@ -130,7 +130,7 @@ func (c *CosmosChain) StartProvider(testName string, ctx context.Context, additi return fmt.Errorf("failed to add proposer key: %s", err) } - proposerAddr, err := c.getFullNode().AccountKeyBech32(ctx, proposerKeyName) + proposerAddr, err := c.GetFullNode().AccountKeyBech32(ctx, proposerKeyName) if err != nil { return fmt.Errorf("failed to get proposer key: %s", err) } @@ -404,7 +404,7 @@ func (c *CosmosChain) StartConsumer(testName string, ctx context.Context, additi } // Wait for 5 blocks before considering the chains "started" - return testutil.WaitForBlocks(ctx, 5, c.getFullNode()) + return testutil.WaitForBlocks(ctx, 5, c.GetFullNode()) } func (c *CosmosChain) transformCCVState(ctx context.Context, ccvState []byte, consumerVersion, providerVersion string, icsCfg ibc.ICSConfig) ([]byte, error) { diff --git a/chain/cosmos/module_tokenfactory.go b/chain/cosmos/module_tokenfactory.go index 76f16a7bd..ae35f66d0 100644 --- a/chain/cosmos/module_tokenfactory.go +++ b/chain/cosmos/module_tokenfactory.go @@ -87,7 +87,7 @@ func (tn *ChainNode) TokenFactoryMetadata(ctx context.Context, keyName, fullDeno // TokenFactoryQueryAdmin returns the admin of a tokenfactory token. func (c *CosmosChain) TokenFactoryQueryAdmin(ctx context.Context, fullDenom string) (*QueryDenomAuthorityMetadataResponse, error) { res := &QueryDenomAuthorityMetadataResponse{} - stdout, stderr, err := c.getFullNode().ExecQuery(ctx, "tokenfactory", "denom-authority-metadata", fullDenom) + stdout, stderr, err := c.GetFullNode().ExecQuery(ctx, "tokenfactory", "denom-authority-metadata", fullDenom) if err != nil { return nil, fmt.Errorf("failed to query tokenfactory denom-authority-metadata: %w\nstdout: %s\nstderr: %s", err, stdout, stderr) } diff --git a/chain/cosmos/osmosis.go b/chain/cosmos/osmosis.go index c6ecbb77f..f850d0a4c 100644 --- a/chain/cosmos/osmosis.go +++ b/chain/cosmos/osmosis.go @@ -20,7 +20,7 @@ type OsmosisPoolParams struct { } func OsmosisCreatePool(c *CosmosChain, ctx context.Context, keyName string, params OsmosisPoolParams) (string, error) { - tn := c.getFullNode() + tn := c.GetFullNode() poolbz, err := json.Marshal(params) if err != nil { return "", err @@ -57,7 +57,7 @@ func OsmosisCreatePool(c *CosmosChain, ctx context.Context, keyName string, para } func OsmosisSwapExactAmountIn(c *CosmosChain, ctx context.Context, keyName string, coinIn string, minAmountOut string, poolIDs []string, swapDenoms []string) (string, error) { - return c.getFullNode().ExecTx(ctx, keyName, + return c.GetFullNode().ExecTx(ctx, keyName, "gamm", "swap-exact-amount-in", coinIn, minAmountOut, "--swap-route-pool-ids", strings.Join(poolIDs, ","), diff --git a/chain/cosmos/poll.go b/chain/cosmos/poll.go index 72ccffeb8..0d6fa8908 100644 --- a/chain/cosmos/poll.go +++ b/chain/cosmos/poll.go @@ -58,7 +58,7 @@ func PollForMessage[T any](ctx context.Context, chain *CosmosChain, registry cod } doPoll := func(ctx context.Context, height int64) (T, error) { h := height - block, err := chain.getFullNode().Client.Block(ctx, &h) + block, err := chain.GetFullNode().Client.Block(ctx, &h) if err != nil { return zero, err } diff --git a/cmd/interchaintest/interchaintest_test.go b/cmd/interchaintest/interchaintest_test.go index 32320fc7a..e70d4f153 100644 --- a/cmd/interchaintest/interchaintest_test.go +++ b/cmd/interchaintest/interchaintest_test.go @@ -101,11 +101,14 @@ func setUpTestMatrix() error { if extraFlags.MatrixFile == "" { fmt.Fprintln(os.Stderr, "No matrix file provided, falling back to rly with gaia and osmosis") + numValsOne := 1 + numFullNodesZero := 0 + testMatrix.Relayers = []string{"rly", "hermes"} testMatrix.ChainSets = [][]*interchaintest.ChainSpec{ { - {Name: "gaia", Version: "v7.0.1"}, - {Name: "osmosis", Version: "v7.2.0"}, + {Name: "gaia", Version: "v7.0.1", NumValidators: &numValsOne, NumFullNodes: &numFullNodesZero}, + {Name: "osmosis", Version: "v7.2.0", NumValidators: &numValsOne, NumFullNodes: &numFullNodesZero}, }, } diff --git a/examples/cosmos/bad_genesis_params_test.go b/examples/cosmos/bad_genesis_params_test.go index f39e83542..abbc59453 100644 --- a/examples/cosmos/bad_genesis_params_test.go +++ b/examples/cosmos/bad_genesis_params_test.go @@ -16,6 +16,10 @@ var badGenesis = []cosmos.GenesisKV{ } func TestBadInputParams(t *testing.T) { + if testing.Short() { + t.Skip("skipping in short mode") + } + cf := interchaintest.NewBuiltinChainFactory(zaptest.NewLogger(t), []*interchaintest.ChainSpec{ { Name: "juno", diff --git a/blockdb/messages_view_test.go b/examples/cosmos/blockdb_messages_view_test.go similarity index 97% rename from blockdb/messages_view_test.go rename to examples/cosmos/blockdb_messages_view_test.go index ae4e0c0ee..e3d5b3d0b 100644 --- a/blockdb/messages_view_test.go +++ b/examples/cosmos/blockdb_messages_view_test.go @@ -1,7 +1,4 @@ -package blockdb_test - -// This test is in a separate file, so it can be in the blockdb_test package, -// so it can import interchaintest without creating an import cycle. +package cosmos_test import ( "context" @@ -23,7 +20,7 @@ import ( "github.com/strangelove-ventures/interchaintest/v8/testutil" ) -func TestMessagesView(t *testing.T) { +func TestBlockDBMessagesView(t *testing.T) { if testing.Short() { t.Skip("skipping in short mode") } @@ -35,8 +32,8 @@ func TestMessagesView(t *testing.T) { const gaia0ChainID = "g0" const gaia1ChainID = "g1" cf := interchaintest.NewBuiltinChainFactory(zaptest.NewLogger(t), []*interchaintest.ChainSpec{ - {Name: "gaia", Version: "v7.0.1", ChainConfig: ibc.ChainConfig{ChainID: gaia0ChainID}}, - {Name: "gaia", Version: "v7.0.1", ChainConfig: ibc.ChainConfig{ChainID: gaia1ChainID}}, + {Name: "gaia", Version: "v7.0.1", ChainConfig: ibc.ChainConfig{ChainID: gaia0ChainID}, NumValidators: &numVals, NumFullNodes: &numFullNodes}, + {Name: "gaia", Version: "v7.0.1", ChainConfig: ibc.ChainConfig{ChainID: gaia1ChainID}, NumValidators: &numVals, NumFullNodes: &numFullNodes}, }) chains, err := cf.Chains(t.Name()) diff --git a/examples/cosmos/chain_genesis_stake_test.go b/examples/cosmos/chain_genesis_stake_test.go index 962213845..8f0c39bda 100644 --- a/examples/cosmos/chain_genesis_stake_test.go +++ b/examples/cosmos/chain_genesis_stake_test.go @@ -34,6 +34,7 @@ func TestChainGenesisUnequalStake(t *testing.T) { ChainName: "gaia", Version: "v15.1.0", NumValidators: &validators, + NumFullNodes: &numFullNodesZero, ChainConfig: ibc.ChainConfig{ Denom: denom, ModifyGenesisAmounts: func(i int) (sdk.Coin, sdk.Coin) { diff --git a/examples/cosmos/chain_param_change_test.go b/examples/cosmos/chain_param_change_test.go index 74851e8dc..881239520 100644 --- a/examples/cosmos/chain_param_change_test.go +++ b/examples/cosmos/chain_param_change_test.go @@ -26,9 +26,6 @@ func CosmosChainParamChangeTest(t *testing.T, name, version string) { t.Parallel() - numVals := 1 - numFullNodes := 1 - // SDK v45 params for Juno genesis shortVoteGenesis := []cosmos.GenesisKV{ cosmos.NewGenesisKV("app_state.gov.voting_params.voting_period", votingPeriod), @@ -41,7 +38,7 @@ func CosmosChainParamChangeTest(t *testing.T, name, version string) { ModifyGenesis: cosmos.ModifyGenesis(shortVoteGenesis), } - chains := interchaintest.CreateChainWithConfig(t, numVals, numFullNodes, name, version, cfg) + chains := interchaintest.CreateChainWithConfig(t, numVals, numFullNodesZero, name, version, cfg) chain := chains[0].(*cosmos.CosmosChain) enableBlockDB := false diff --git a/examples/cosmos/code_coverage_test.go b/examples/cosmos/code_coverage_test.go index 0a1181782..9ca4d0a3c 100644 --- a/examples/cosmos/code_coverage_test.go +++ b/examples/cosmos/code_coverage_test.go @@ -16,14 +16,16 @@ import ( ) func TestCodeCoverage(t *testing.T) { + if testing.Short() { + t.Skip("skipping in short mode") + } + t.Parallel() var ( ctx = context.Background() ExternalGoCoverDir = "/tmp/interchaintest-app-coverage" Denom = "umfx" - vals = 1 - fullNodes = 0 ) cfgA := ibc.ChainConfig{ @@ -53,8 +55,8 @@ func TestCodeCoverage(t *testing.T) { Name: "manifest", Version: cfgA.Images[0].Version, ChainName: cfgA.Name, - NumValidators: &vals, - NumFullNodes: &fullNodes, + NumValidators: &numVals, + NumFullNodes: &numFullNodesZero, ChainConfig: cfgA, }, }) diff --git a/examples/cosmos/cometmock_test.go b/examples/cosmos/cometmock_test.go index 157f5918b..1bdc4995a 100644 --- a/examples/cosmos/cometmock_test.go +++ b/examples/cosmos/cometmock_test.go @@ -24,6 +24,10 @@ var ( ) func TestCometMock(t *testing.T) { + if testing.Short() { + t.Skip("skipping in short mode") + } + cf := interchaintest.NewBuiltinChainFactory(zaptest.NewLogger(t), []*interchaintest.ChainSpec{ { Name: "juno", diff --git a/examples/cosmos/ethermint_test.go b/examples/cosmos/ethermint_test.go index 2010c58d5..c822c0d31 100644 --- a/examples/cosmos/ethermint_test.go +++ b/examples/cosmos/ethermint_test.go @@ -111,6 +111,8 @@ func TestEthermintChain(t *testing.T) { ExposeAdditionalPorts: []string{"8545/tcp"}, ConfigFileOverrides: map[string]any{"config/app.toml": appTomlOverrides}, }, + NumValidators: &numValsOne, + NumFullNodes: &numFullNodesZero, }, }) @@ -143,7 +145,7 @@ func TestEthermintChain(t *testing.T) { require.Equal(t, "10000000000", balance.String()) // verify access to port exposed via ExposeAdditionalPorts - evmJsonRpcUrl, err := chain.FullNodes[0].GetHostAddress(ctx, "8545/tcp") + evmJsonRpcUrl, err := chain.GetNode().GetHostAddress(ctx, "8545/tcp") require.NoError(t, err) data := []byte(`{"jsonrpc":"2.0","id":1,"method":"eth_getBlockByNumber","params":["0x1", null]}`) diff --git a/examples/cosmos/sdk_boundary_test.go b/examples/cosmos/sdk_boundary_test.go index 1d28bea8b..d12610551 100644 --- a/examples/cosmos/sdk_boundary_test.go +++ b/examples/cosmos/sdk_boundary_test.go @@ -33,10 +33,12 @@ func TestSDKBoundaries(t *testing.T) { name: "sdk 45 <-> 50", chainSpecs: []*interchaintest.ChainSpec{ { - Name: "gaia", ChainName: "gaia", Version: "v7.0.3", // sdk 0.45.6 + Name: "gaia", ChainName: "gaia", Version: "v7.0.3", //sdk 0.45.6 + NumValidators: &numValsOne, NumFullNodes: &numFullNodesZero, }, { - Name: "ibc-go-simd", ChainName: "simd-50", Version: "feat-upgrade-sdk-v0.50", // sdk 0.50 alpha + Name: "ibc-go-simd", ChainName: "simd-50", Version: "feat-upgrade-sdk-v0.50", //sdk 0.50 alpha + NumValidators: &numValsOne, NumFullNodes: &numFullNodesZero, }, }, relayerVersion: "colin-event-fix", @@ -45,10 +47,12 @@ func TestSDKBoundaries(t *testing.T) { name: "sdk 47 <-> 50", chainSpecs: []*interchaintest.ChainSpec{ { - Name: "ibc-go-simd", ChainName: "simd-47", Version: "v7.2.0", // sdk 0.47.3 + Name: "ibc-go-simd", ChainName: "simd-47", Version: "v7.2.0", //sdk 0.47.3 + NumValidators: &numValsOne, NumFullNodes: &numFullNodesZero, }, { - Name: "ibc-go-simd", ChainName: "simd-50", Version: "feat-upgrade-sdk-v0.50", // sdk 0.50 alpha + Name: "ibc-go-simd", ChainName: "simd-50", Version: "feat-upgrade-sdk-v0.50", //sdk 0.50 alpha + NumValidators: &numValsOne, NumFullNodes: &numFullNodesZero, }, }, relayerVersion: "colin-event-fix", diff --git a/examples/ibc/ics_test.go b/examples/ibc/ics_test.go index 104f6c387..ca9d59ad5 100644 --- a/examples/ibc/ics_test.go +++ b/examples/ibc/ics_test.go @@ -20,8 +20,6 @@ import ( var ( icsVersions = []string{"v3.1.0", "v3.3.0", "v4.0.0"} - vals = 2 - fNodes = 0 providerChainID = "provider-1" ) @@ -34,13 +32,11 @@ func TestICS(t *testing.T) { icsVersions = []string{ver} } - relayers := []struct { + type relayerTypes struct { rly ibc.RelayerImplementation name string - }{ - {rly: ibc.Hermes, name: "hermes"}, - {rly: ibc.CosmosRly, name: "rly"}, } + relayers := []relayerTypes{{rly: ibc.CosmosRly, name: "rly"}} for _, version := range icsVersions { version := version @@ -63,15 +59,17 @@ func icsTest(t *testing.T, version string, rly ibc.RelayerImplementation) { consumerBechPrefix = "consumer" } + validators := 2 + cf := interchaintest.NewBuiltinChainFactory(zaptest.NewLogger(t), []*interchaintest.ChainSpec{ { Name: "ics-provider", Version: version, - NumValidators: &vals, NumFullNodes: &fNodes, + NumValidators: &validators, NumFullNodes: &numFullNodes, ChainConfig: ibc.ChainConfig{GasAdjustment: 1.5, ChainID: providerChainID, TrustingPeriod: "336h"}, }, { Name: "ics-consumer", Version: version, - NumValidators: &vals, NumFullNodes: &fNodes, + NumValidators: &validators, NumFullNodes: &numFullNodes, ChainConfig: ibc.ChainConfig{GasAdjustment: 1.5, ChainID: "consumer-1", Bech32Prefix: consumerBechPrefix, InterchainSecurityConfig: ibc.ICSConfig{ ConsumerCopyProviderKey: func(i int) bool { return i == 0 @@ -120,6 +118,8 @@ func icsTest(t *testing.T, version string, rly ibc.RelayerImplementation) { // ------------------ ICS Setup ------------------ + require.GreaterOrEqual(t, len(provider.Validators), 2) + // Finish the ICS provider chain initialization. // - Restarts the relayer to connect ics20-1 transfer channel // - Delegates tokens to the provider to update consensus value diff --git a/interchain_test.go b/interchain_test.go index 923ec8b64..1f105c32a 100644 --- a/interchain_test.go +++ b/interchain_test.go @@ -30,6 +30,11 @@ import ( "github.com/strangelove-ventures/interchaintest/v8/testutil" ) +var ( + numVals = 1 + numFullNodesZero = 0 +) + func TestInterchain_DuplicateChain_CosmosRly(t *testing.T) { duplicateChainTest(t, ibc.CosmosRly) } @@ -51,8 +56,8 @@ func duplicateChainTest(t *testing.T, relayerImpl ibc.RelayerImplementation) { cf := interchaintest.NewBuiltinChainFactory(zaptest.NewLogger(t), []*interchaintest.ChainSpec{ // Two otherwise identical chains that only differ by ChainID. - {Name: "gaia", ChainName: "g1", Version: "v7.0.1"}, - {Name: "gaia", ChainName: "g2", Version: "v7.0.1"}, + {Name: "gaia", ChainName: "g1", Version: "v7.0.1", NumValidators: &numVals, NumFullNodes: &numFullNodesZero}, + {Name: "gaia", ChainName: "g2", Version: "v7.0.1", NumValidators: &numVals, NumFullNodes: &numFullNodesZero}, }) chains, err := cf.Chains(t.Name()) @@ -109,8 +114,8 @@ func getRelayerWalletsTest(t *testing.T, relayerImpl ibc.RelayerImplementation) cf := interchaintest.NewBuiltinChainFactory(zaptest.NewLogger(t), []*interchaintest.ChainSpec{ // Two otherwise identical chains that only differ by ChainID. - {Name: "gaia", ChainName: "g1", Version: "v7.0.1", ChainConfig: ibc.ChainConfig{ChainID: "cosmoshub-0"}}, - {Name: "gaia", ChainName: "g2", Version: "v7.0.1", ChainConfig: ibc.ChainConfig{ChainID: "cosmoshub-1"}}, + {Name: "gaia", ChainName: "g1", Version: "v7.0.1", ChainConfig: ibc.ChainConfig{ChainID: "cosmoshub-0"}, NumValidators: &numVals, NumFullNodes: &numFullNodesZero}, + {Name: "gaia", ChainName: "g2", Version: "v7.0.1", ChainConfig: ibc.ChainConfig{ChainID: "cosmoshub-1"}, NumValidators: &numVals, NumFullNodes: &numFullNodesZero}, }) chains, err := cf.Chains(t.Name()) @@ -188,7 +193,7 @@ func TestInterchain_CreateUser(t *testing.T) { cf := interchaintest.NewBuiltinChainFactory(zaptest.NewLogger(t), []*interchaintest.ChainSpec{ // Two otherwise identical chains that only differ by ChainID. - {Name: "gaia", ChainName: "g1", Version: "v7.0.1", ChainConfig: ibc.ChainConfig{ChainID: "cosmoshub-0"}}, + {Name: "gaia", ChainName: "g1", Version: "v7.0.1", ChainConfig: ibc.ChainConfig{ChainID: "cosmoshub-0"}, NumValidators: &numVals, NumFullNodes: &numFullNodesZero}, }) chains, err := cf.Chains(t.Name()) @@ -365,8 +370,8 @@ func broadcastTxCosmosChainTest(t *testing.T, relayerImpl ibc.RelayerImplementat cf := interchaintest.NewBuiltinChainFactory(zaptest.NewLogger(t), []*interchaintest.ChainSpec{ // Two otherwise identical chains that only differ by ChainID. - {Name: "gaia", ChainName: "g1", Version: "v7.0.1", ChainConfig: ibc.ChainConfig{ChainID: "cosmoshub-0"}}, - {Name: "gaia", ChainName: "g2", Version: "v7.0.1", ChainConfig: ibc.ChainConfig{ChainID: "cosmoshub-1"}}, + {Name: "gaia", ChainName: "g1", Version: "v7.0.1", ChainConfig: ibc.ChainConfig{ChainID: "cosmoshub-0"}, NumValidators: &numVals, NumFullNodes: &numFullNodesZero}, + {Name: "gaia", ChainName: "g2", Version: "v7.0.1", ChainConfig: ibc.ChainConfig{ChainID: "cosmoshub-1"}, NumValidators: &numVals, NumFullNodes: &numFullNodesZero}, }) chains, err := cf.Chains(t.Name()) @@ -452,7 +457,7 @@ func TestInterchain_OmitGitSHA(t *testing.T) { client, network := interchaintest.DockerSetup(t) cf := interchaintest.NewBuiltinChainFactory(zaptest.NewLogger(t), []*interchaintest.ChainSpec{ - {Name: "gaia", Version: "v7.0.1"}, + {Name: "gaia", Version: "v7.0.1", NumValidators: &numVals, NumFullNodes: &numFullNodesZero}, }) chains, err := cf.Chains(t.Name())