From ff134e51bb8a72939eb45dfcafe20cc5edc15281 Mon Sep 17 00:00:00 2001 From: Reece Williams Date: Fri, 23 Feb 2024 11:32:54 -0600 Subject: [PATCH] working ics-provider <-> consumer --- .../chains/interchainsecurity.json | 24 ++++--------------- local-interchain/interchain/start.go | 7 +++--- 2 files changed, 7 insertions(+), 24 deletions(-) diff --git a/local-interchain/chains/interchainsecurity.json b/local-interchain/chains/interchainsecurity.json index a20bdcdf6..0f5c0a332 100644 --- a/local-interchain/chains/interchainsecurity.json +++ b/local-interchain/chains/interchainsecurity.json @@ -1,11 +1,10 @@ { "chains": [ { - "ibc_paths": ["ics-1"], "name": "ics-provider", "binary": "interchain-security-pd", "chain_id": "localcosmos-1", - "denom": "uatom", + "denom": "stake", "bech32_prefix": "cosmos", "docker_image": { "version": "v3.1.0" @@ -23,7 +22,7 @@ "modify": [ { "key": "app_state.gov.params.voting_period", - "value": "10s" + "value": "3s" }, { "key": "app_state.gov.params.max_deposit_period", @@ -31,7 +30,7 @@ }, { "key": "app_state.gov.params.min_deposit.0.denom", - "value": "uatom" + "value": "stake" } ], "accounts": [ @@ -46,11 +45,10 @@ }, { "ics_consumer_link": "localcosmos-1", - "ibc_paths": ["ics-1"], "name": "ics-consumer", "chain_id": "localconsumer-1", "binary": "interchain-security-cd", - "denom": "untrn", + "denom": "stake", "bech32_prefix": "cosmos", "docker_image": { "version": "v3.1.0" @@ -65,20 +63,6 @@ "debugging": true, "block_time": "500ms", "genesis": { - "modify": [ - { - "key": "app_state.gov.params.voting_period", - "value": "10s" - }, - { - "key": "app_state.gov.params.max_deposit_period", - "value": "15s" - }, - { - "key": "app_state.gov.params.min_deposit.0.denom", - "value": "untrn" - } - ], "accounts": [ { "name": "acc0", diff --git a/local-interchain/interchain/start.go b/local-interchain/interchain/start.go index 4777c6afd..6d71f1e25 100644 --- a/local-interchain/interchain/start.go +++ b/local-interchain/interchain/start.go @@ -121,7 +121,7 @@ func StartChain(installDir, chainCfgFile string, ac *AppConfig) { client, network := interchaintest.DockerSetup(fakeT) // setup a relayer if we have IBC paths to use. - if len(ibcpaths) > 0 { + if len(ibcpaths) > 0 || len(icsPair) > 0 { rlyCfg := config.Relayer relayerType, relayerName := ibc.CosmosRly, "relay" @@ -150,9 +150,6 @@ func StartChain(installDir, chainCfgFile string, ac *AppConfig) { // iterate icsPair for provider, consumers := range icsPair { - fmt.Println("provider", provider) - fmt.Println("consumers", consumers) - var p ibc.Chain var c ibc.Chain @@ -170,6 +167,8 @@ func StartChain(installDir, chainCfgFile string, ac *AppConfig) { pathName := fmt.Sprintf("%s-%s", p.Config().ChainID, c.Config().ChainID) + logger.Info("Adding ICS pair", zap.String("provider", p.Config().ChainID), zap.String("consumer", c.Config().ChainID), zap.String("path", pathName)) + ic = ic.AddProviderConsumerLink(interchaintest.ProviderConsumerLink{ Provider: p, Consumer: c,