From 17a3905951a8f343ae871b6ac102c1c32001fdf8 Mon Sep 17 00:00:00 2001 From: Abhishek Harde <47945971+abhiyana@users.noreply.github.com> Date: Thu, 28 Sep 2023 15:40:27 +0530 Subject: [PATCH] feat: implement icon to neutron ibc relay setup (#183) * feat: implement kurtosis package to run icon-neutron ibc relay * refactor: refactor code in run_cosmos_ibc_setup function main.star * refactor: refactor code in main.star * refactor: add comments inside code * feat: implement ibc relay between already running icon and neutron/archway nodes * refactor: change remote path to relative path in import_module inside kurtosis packages * refactor: remove sevice.json and remove comment in ibc.go --- cli/commands/bridge/relays/ibc.go | 2 +- cli/commands/chain/types/neutron.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/commands/bridge/relays/ibc.go b/cli/commands/bridge/relays/ibc.go index 4a39d406..0c2afe06 100644 --- a/cli/commands/bridge/relays/ibc.go +++ b/cli/commands/bridge/relays/ibc.go @@ -99,7 +99,7 @@ func startCosmosChainsAndSetupIbcRelay(diveContext *common.DiveContext, enclaveC func setupIbcRelayforAlreadyRunningCosmosChain(diveContext *common.DiveContext, enclaveCtx *enclaves.EnclaveContext, chainA, chainB, chainAServiceResponse, chainBServiceResponse string) (string, error) { - params := fmt.Sprintf(`{"links":{"src":"%s","dst":"%s"},"src_config":%s,"dst_config":%s}`, chainA, chainB, chainAServiceResponse, chainBServiceResponse) + params := fmt.Sprintf(`{"src_chain_config":%s,"dst_chain_config":%s, "args":{"links": {"src": "%s", "dst": "%s"}, "src_config":{"data":{}}, "dst_config":{"data":{}}}}`, chainAServiceResponse, chainBServiceResponse, chainA, chainB) executionResult, err := runStarlarkPackage(diveContext, enclaveCtx, params, "run_cosmos_ibc_relay_for_already_running_chains") diff --git a/cli/commands/chain/types/neutron.go b/cli/commands/chain/types/neutron.go index 0c8af0b5..6e0d69bb 100644 --- a/cli/commands/chain/types/neutron.go +++ b/cli/commands/chain/types/neutron.go @@ -120,7 +120,7 @@ func RunNeutronNode(diveContext *common.DiveContext) *common.DiveserviceResponse // RunNeutronWithServiceConfig runs the Neutron service with the provided configuration data. func RunNeutronWithServiceConfig(diveContext *common.DiveContext, enclaveContext *enclaves.EnclaveContext, data string) (string, error) { params := fmt.Sprintf(`{"args":{"data":%s}}`, data) - nodeServiceResponse, _, err := enclaveContext.RunStarlarkPackage(diveContext.Ctx, common.DiveRemotePackagePath, common.DiveNeutronDefaultNodeScript, runNeutronNodeWithDefaultConfigFunctionName, params, common.DiveDryRun, common.DiveDefaultParallelism, []kurtosis_core_rpc_api_bindings.KurtosisFeatureFlag{}) + nodeServiceResponse, _, err := enclaveContext.RunStarlarkRemotePackage(diveContext.Ctx, common.DiveRemotePackagePath, common.DiveNeutronDefaultNodeScript, runNeutronNodeWithDefaultConfigFunctionName, params, common.DiveDryRun, common.DiveDefaultParallelism, []kurtosis_core_rpc_api_bindings.KurtosisFeatureFlag{}) if err != nil { return "", err }