Skip to content

Commit

Permalink
working ics-provider <-> consumer
Browse files Browse the repository at this point in the history
  • Loading branch information
Reecepbcups committed Feb 23, 2024
1 parent 9812790 commit ff134e5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 24 deletions.
24 changes: 4 additions & 20 deletions local-interchain/chains/interchainsecurity.json
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -23,15 +22,15 @@
"modify": [
{
"key": "app_state.gov.params.voting_period",
"value": "10s"
"value": "3s"
},
{
"key": "app_state.gov.params.max_deposit_period",
"value": "15s"
},
{
"key": "app_state.gov.params.min_deposit.0.denom",
"value": "uatom"
"value": "stake"
}
],
"accounts": [
Expand All @@ -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"
Expand All @@ -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",
Expand Down
7 changes: 3 additions & 4 deletions local-interchain/interchain/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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

Expand All @@ -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,
Expand Down

0 comments on commit ff134e5

Please sign in to comment.