Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ethereum-ibc-relay-chain version #3

Merged
merged 1 commit into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions e2e/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
9 changes: 8 additions & 1 deletion e2e/relayer/configs/templates/ibc0.json.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 5 additions & 1 deletion e2e/relayer/configs/templates/ibc1.json.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
18 changes: 13 additions & 5 deletions e2e/relayer/scripts/gen-config
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
#!/bin/bash
set -eux
set -e

RELAYER_DIR=$(dirname $(dirname "$0"))

if [ $# -ne 2 ]; then
echo "Usage: $0 <chain-id> <ibc-address>"
if [ $# -ne 1 ]; then
echo "Usage: $0 <chain-id>" >&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
4 changes: 2 additions & 2 deletions e2e/relayer/scripts/init-rly
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
Loading