From 1ad9d9bbbe8941605fb491c85ef4ff5bf6d257fa Mon Sep 17 00:00:00 2001 From: Jun Kimura Date: Mon, 22 Jan 2024 19:45:12 +0900 Subject: [PATCH] update ethereum-ibc-relay-chain to v0.2.13 Signed-off-by: Jun Kimura --- e2e/package-lock.json | 32 ++++++++++----------- e2e/package.json | 2 +- e2e/relayer/configs/templates/ibc0.json.tpl | 9 +++++- e2e/relayer/configs/templates/ibc1.json.tpl | 6 +++- e2e/relayer/scripts/gen-config | 18 ++++++++---- e2e/relayer/scripts/init-rly | 4 +-- go.mod | 2 +- go.sum | 4 +-- 8 files changed, 48 insertions(+), 29 deletions(-) diff --git a/e2e/package-lock.json b/e2e/package-lock.json index 023cbf4..76cc6f1 100644 --- a/e2e/package-lock.json +++ b/e2e/package-lock.json @@ -9,7 +9,7 @@ "version": "0.1.0", "license": "Apache-2.0", "devDependencies": { - "@hyperledger-labs/yui-ibc-solidity": "git+https://github.com/hyperledger-labs/yui-ibc-solidity.git#v0.3.22", + "@hyperledger-labs/yui-ibc-solidity": "git+https://github.com/hyperledger-labs/yui-ibc-solidity.git#v0.3.23", "@nomicfoundation/hardhat-toolbox": "^4.0.0", "chai": "^4.3.10", "hardhat": "^2.19.1" @@ -868,7 +868,7 @@ "node_modules/@hyperledger-labs/yui-ibc-solidity": { "name": "ibc-solidity", "version": "0.1.0", - "resolved": "git+ssh://git@github.com/hyperledger-labs/yui-ibc-solidity.git#53e6d75f07106dfed5a30fad4370dfb54d21d887", + "resolved": "git+ssh://git@github.com/hyperledger-labs/yui-ibc-solidity.git#7e108d9d4830bae46f2a219b52b83569ec3c8750", "dev": true, "license": "Apache-2.0", "dependencies": { @@ -2021,9 +2021,9 @@ "peer": true }, "node_modules/abstract-level": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/abstract-level/-/abstract-level-1.0.3.tgz", - "integrity": "sha512-t6jv+xHy+VYwc4xqZMn2Pa9DjcdzvzZmQGRjTFc8spIbRGHgBrEKbPq+rYXc7CCo0lxgYvSgKVg9qZAhpVQSjA==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/abstract-level/-/abstract-level-1.0.4.tgz", + "integrity": "sha512-eUP/6pbXBkMbXFdx4IH2fVgvB7M0JvR7/lIL33zcs0IBcwjdzSSl31TOJsaCzmKSSDF9h8QYSOJux4Nd4YJqFg==", "dev": true, "dependencies": { "buffer": "^6.0.3", @@ -2682,9 +2682,9 @@ } }, "node_modules/classic-level": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/classic-level/-/classic-level-1.3.0.tgz", - "integrity": "sha512-iwFAJQYtqRTRM0F6L8h4JCt00ZSGdOyqh7yVrhhjrOpFhmBjNlRUey64MCiyo6UmQHMJ+No3c81nujPv+n9yrg==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/classic-level/-/classic-level-1.4.1.tgz", + "integrity": "sha512-qGx/KJl3bvtOHrGau2WklEZuXhS3zme+jf+fsu6Ej7W7IP/C49v7KNlWIsT1jZu0YnfzSIYDGcEWpCa1wKGWXQ==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -8010,9 +8010,9 @@ "dev": true }, "@hyperledger-labs/yui-ibc-solidity": { - "version": "git+ssh://git@github.com/hyperledger-labs/yui-ibc-solidity.git#53e6d75f07106dfed5a30fad4370dfb54d21d887", + "version": "git+ssh://git@github.com/hyperledger-labs/yui-ibc-solidity.git#7e108d9d4830bae46f2a219b52b83569ec3c8750", "dev": true, - "from": "@hyperledger-labs/yui-ibc-solidity@git+https://github.com/hyperledger-labs/yui-ibc-solidity.git#v0.3.22", + "from": "@hyperledger-labs/yui-ibc-solidity@git+https://github.com/hyperledger-labs/yui-ibc-solidity.git#v0.3.23", "requires": { "@openzeppelin/contracts": "^4.8.3", "solidity-mpt": "^0.1.0", @@ -8930,9 +8930,9 @@ "peer": true }, "abstract-level": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/abstract-level/-/abstract-level-1.0.3.tgz", - "integrity": "sha512-t6jv+xHy+VYwc4xqZMn2Pa9DjcdzvzZmQGRjTFc8spIbRGHgBrEKbPq+rYXc7CCo0lxgYvSgKVg9qZAhpVQSjA==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/abstract-level/-/abstract-level-1.0.4.tgz", + "integrity": "sha512-eUP/6pbXBkMbXFdx4IH2fVgvB7M0JvR7/lIL33zcs0IBcwjdzSSl31TOJsaCzmKSSDF9h8QYSOJux4Nd4YJqFg==", "dev": true, "requires": { "buffer": "^6.0.3", @@ -9440,9 +9440,9 @@ } }, "classic-level": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/classic-level/-/classic-level-1.3.0.tgz", - "integrity": "sha512-iwFAJQYtqRTRM0F6L8h4JCt00ZSGdOyqh7yVrhhjrOpFhmBjNlRUey64MCiyo6UmQHMJ+No3c81nujPv+n9yrg==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/classic-level/-/classic-level-1.4.1.tgz", + "integrity": "sha512-qGx/KJl3bvtOHrGau2WklEZuXhS3zme+jf+fsu6Ej7W7IP/C49v7KNlWIsT1jZu0YnfzSIYDGcEWpCa1wKGWXQ==", "dev": true, "requires": { "abstract-level": "^1.0.2", diff --git a/e2e/package.json b/e2e/package.json index 950d09f..acbf4ca 100644 --- a/e2e/package.json +++ b/e2e/package.json @@ -3,7 +3,7 @@ "version": "0.1.0", "description": "A hardhat example project with ibc-solidity", "devDependencies": { - "@hyperledger-labs/yui-ibc-solidity": "git+https://github.com/hyperledger-labs/yui-ibc-solidity.git#v0.3.22", + "@hyperledger-labs/yui-ibc-solidity": "git+https://github.com/hyperledger-labs/yui-ibc-solidity.git#v0.3.23", "@nomicfoundation/hardhat-toolbox": "^4.0.0", "chai": "^4.3.10", "hardhat": "^2.19.1" diff --git a/e2e/relayer/configs/templates/ibc0.json.tpl b/e2e/relayer/configs/templates/ibc0.json.tpl index e4c2b08..4b4aef3 100644 --- a/e2e/relayer/configs/templates/ibc0.json.tpl +++ b/e2e/relayer/configs/templates/ibc0.json.tpl @@ -14,7 +14,14 @@ "initial_recv_checkpoint": 1, "enable_debug_trace": false, "average_block_time_msec": 1000, - "max_retry_for_inclusion": 5 + "max_retry_for_inclusion": 5, + "allow_lc_functions": { + "lc_address": "$IBFT2_CLIENT_ADDRESS", + "allow_all": false, + "selectors": [ + "0xa4f1ec28" + ] + } }, "prover": { "@type": "/relayer.provers.ibft2.config.ProverConfig", diff --git a/e2e/relayer/configs/templates/ibc1.json.tpl b/e2e/relayer/configs/templates/ibc1.json.tpl index f09236c..5a20ef7 100644 --- a/e2e/relayer/configs/templates/ibc1.json.tpl +++ b/e2e/relayer/configs/templates/ibc1.json.tpl @@ -14,7 +14,11 @@ "initial_recv_checkpoint": 1, "enable_debug_trace": false, "average_block_time_msec": 1000, - "max_retry_for_inclusion": 5 + "max_retry_for_inclusion": 5, + "allow_lc_functions": { + "lc_address": "$IBFT2_CLIENT_ADDRESS", + "allow_all": true + } }, "prover": { "@type": "/relayer.provers.ibft2.config.ProverConfig", diff --git a/e2e/relayer/scripts/gen-config b/e2e/relayer/scripts/gen-config index 8382fe3..2a8535a 100755 --- a/e2e/relayer/scripts/gen-config +++ b/e2e/relayer/scripts/gen-config @@ -1,16 +1,24 @@ #!/bin/bash -set -eux +set -e RELAYER_DIR=$(dirname $(dirname "$0")) -if [ $# -ne 2 ]; then - echo "Usage: $0 " +if [ $# -ne 1 ]; then + echo "Usage: $0 " >&2 exit 1 fi +if [ -z "${IBC_HANDLER}" ]; then + echo "Error: env var 'IBC_HANDLER' is not set." >&2 + exit 1 +fi +if [ -z "${IBFT2_CLIENT}" ]; then + echo "Error: env var 'IBFT2_CLIENT' is not set." >&2 + exit 1 +fi + CHAINID=$1 -IBC_ADDRESS=$2 TEMPLATE_DIR=${RELAYER_DIR}/configs/templates CONFIG_DIR=${RELAYER_DIR}/configs/demo mkdir -p $CONFIG_DIR -jq --arg IBC_ADDRESS ${IBC_ADDRESS} -r '.chain.ibc_address = $IBC_ADDRESS' ${TEMPLATE_DIR}/${CHAINID}.json.tpl > ${CONFIG_DIR}/${CHAINID}.json +jq '.chain.ibc_address = env.IBC_HANDLER | .chain.allow_lc_functions.lc_address = env.IBFT2_CLIENT' ${TEMPLATE_DIR}/${CHAINID}.json.tpl > ${CONFIG_DIR}/${CHAINID}.json diff --git a/e2e/relayer/scripts/init-rly b/e2e/relayer/scripts/init-rly index c925598..f76976f 100755 --- a/e2e/relayer/scripts/init-rly +++ b/e2e/relayer/scripts/init-rly @@ -20,8 +20,8 @@ fi rm -rf ${RLY_HOME} &> /dev/null -source ./chain0.env.sh && ${SCRIPT_DIR}/gen-config ibc0 ${IBC_HANDLER} -source ./chain1.env.sh && ${SCRIPT_DIR}/gen-config ibc1 ${IBC_HANDLER} +source ./chain0.env.sh && ${SCRIPT_DIR}/gen-config ibc0 +source ./chain1.env.sh && ${SCRIPT_DIR}/gen-config ibc1 ${RLY} config init ${RLY} chains add-dir ${RELAYER_DIR}/configs/demo/ # add a path between chain0 and chain1 diff --git a/go.mod b/go.mod index 2a45f17..afad520 100644 --- a/go.mod +++ b/go.mod @@ -6,7 +6,7 @@ require ( github.com/cosmos/cosmos-sdk v0.47.3 github.com/cosmos/gogoproto v1.4.10 github.com/cosmos/ibc-go/v7 v7.2.0 - github.com/datachainlab/ethereum-ibc-relay-chain v0.2.11 + github.com/datachainlab/ethereum-ibc-relay-chain v0.2.13 github.com/ethereum/go-ethereum v1.12.0 github.com/hyperledger-labs/yui-relayer v0.4.22 github.com/spf13/cobra v1.7.0 diff --git a/go.sum b/go.sum index 656b381..a9be116 100644 --- a/go.sum +++ b/go.sum @@ -399,8 +399,8 @@ github.com/cucumber/common/gherkin/go/v22 v22.0.0 h1:4K8NqptbvdOrjL9DEea6HFjSpbd github.com/cucumber/common/messages/go/v17 v17.1.1 h1:RNqopvIFyLWnKv0LfATh34SWBhXeoFTJnSrgm9cT/Ts= github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= -github.com/datachainlab/ethereum-ibc-relay-chain v0.2.11 h1:Gt6hPFdZ8NnaqpqnlfFqTc5vubqa4wqi0z+ublHkvFA= -github.com/datachainlab/ethereum-ibc-relay-chain v0.2.11/go.mod h1:FDKiZNh2r8kz/KAXBG9tNDcoT6jyiUR1EfiE9W7Xjbc= +github.com/datachainlab/ethereum-ibc-relay-chain v0.2.13 h1:FNyFLkvDwz6vEVVb+1lERbGNBLzh14S0Gv5YnfPj6AY= +github.com/datachainlab/ethereum-ibc-relay-chain v0.2.13/go.mod h1:FDKiZNh2r8kz/KAXBG9tNDcoT6jyiUR1EfiE9W7Xjbc= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=