From d899f3ae971b5a802de50fea606dd5190540cdb5 Mon Sep 17 00:00:00 2001 From: Konstantin Munichev Date: Wed, 14 Jun 2023 18:56:42 +0200 Subject: [PATCH 1/7] Saga IBC transfers between SPC and chainlet --- rly/mnemo.file | 1 + rly/sevm_111-1.json | 24 ++++++++++++++++++++++++ rly/sevm_111-2.json | 24 ++++++++++++++++++++++++ rly/start-rly.sh | 38 ++++++++++++++++++++++++++++++++++++++ saga.Dockerfile | 32 ++++++++++++++++++++++++++++++++ 5 files changed, 119 insertions(+) create mode 100644 rly/mnemo.file create mode 100644 rly/sevm_111-1.json create mode 100644 rly/sevm_111-2.json create mode 100755 rly/start-rly.sh create mode 100644 saga.Dockerfile diff --git a/rly/mnemo.file b/rly/mnemo.file new file mode 100644 index 000000000..9b001b3cd --- /dev/null +++ b/rly/mnemo.file @@ -0,0 +1 @@ +solution grocery miracle sugar ankle honey kit prison build horror fiscal core twelve neither raise situate item float erode expire result snake cave review \ No newline at end of file diff --git a/rly/sevm_111-1.json b/rly/sevm_111-1.json new file mode 100644 index 000000000..ea7026385 --- /dev/null +++ b/rly/sevm_111-1.json @@ -0,0 +1,24 @@ +{ + "type": "cosmos", + "value": { + "key_algos": [ + "ethsecp256k1" + ], + "extra_codecs": [ + "ethermint" + ], + "slip44": 60, + "key": "key1", + "chain-id": "sevm_111-1", + "rpc-addr": "http://192.167.10.6:26657", + "account-prefix": "saga", + "keyring-backend": "test", + "gas-adjustment": 1.2, + "gas-prices": "1asaga", + "min-gas-amount": 1, + "debug": true, + "timeout": "20s", + "output-format": "json", + "sign-mode": "direct" + } + } \ No newline at end of file diff --git a/rly/sevm_111-2.json b/rly/sevm_111-2.json new file mode 100644 index 000000000..f5646c2e3 --- /dev/null +++ b/rly/sevm_111-2.json @@ -0,0 +1,24 @@ +{ + "type": "cosmos", + "value": { + "key_algos": [ + "ethsecp256k1" + ], + "extra_codecs": [ + "ethermint" + ], + "slip44": 60, + "key": "key2", + "chain-id": "sevm_111-2", + "rpc-addr": "http://192.167.10.7:26657", + "account-prefix": "saga", + "keyring-backend": "test", + "gas-adjustment": 1.2, + "gas-prices": "1asaga", + "min-gas-amount": 1, + "debug": true, + "timeout": "20s", + "output-format": "json", + "sign-mode": "direct" + } + } \ No newline at end of file diff --git a/rly/start-rly.sh b/rly/start-rly.sh new file mode 100755 index 000000000..1ff31e8e6 --- /dev/null +++ b/rly/start-rly.sh @@ -0,0 +1,38 @@ +#!/bin/bash + +rly config init + +echo $RELAYER_SAGAEVM_MNEMONIC > mnemo.file.sevm +echo $RELAYER_SPC_MNEMONIC > mnemo.file.spc + +mv /root/tmp/sevm_111-1.json /root/tmp/$CHAINLET_CHAIN_ID.json +mv /root/tmp/sevm_111-2.json /root/tmp/$SPC_CHAINID.json + +cat /root/tmp/$CHAINLET_CHAIN_ID.json | jq '.value."chain-id"="'$CHAINLET_CHAIN_ID'"' > /root/tmp/$CHAINLET_CHAIN_ID.json.tmp && mv /root/tmp/$CHAINLET_CHAIN_ID.json.tmp /root/tmp/$CHAINLET_CHAIN_ID.json +cat /root/tmp/$SPC_CHAINID.json | jq '.value."chain-id"="'$SPC_CHAINID'"' > /root/tmp/$SPC_CHAINID.json.tmp && mv /root/tmp/$SPC_CHAINID.json.tmp /root/tmp/$SPC_CHAINID.json + +# TODO: hardcoded port; http +cat /root/tmp/$CHAINLET_CHAIN_ID.json | jq '.value."rpc-addr"="'http://$CHAINLET_RPC_ADDRESS'"' > /root/tmp/$CHAINLET_CHAIN_ID.json.tmp && mv /root/tmp/$CHAINLET_CHAIN_ID.json.tmp /root/tmp/$CHAINLET_CHAIN_ID.json +cat /root/tmp/$SPC_CHAINID.json | jq '.value."rpc-addr"="'http://$SPC_EXTERNAL_ADDRESS_HOST:26657'"' > /root/tmp/$SPC_CHAINID.json.tmp && mv /root/tmp/$SPC_CHAINID.json.tmp /root/tmp/$SPC_CHAINID.json + +cat /root/tmp/$CHAINLET_CHAIN_ID.json | jq '.value."keyring-backend"="file"' > /root/tmp/$CHAINLET_CHAIN_ID.json.tmp && mv /root/tmp/$CHAINLET_CHAIN_ID.json.tmp /root/tmp/$CHAINLET_CHAIN_ID.json +cat /root/tmp/$SPC_CHAINID.json | jq '.value."keyring-backend"="file"' > /root/tmp/$SPC_CHAINID.json.tmp && mv /root/tmp/$SPC_CHAINID.json.tmp /root/tmp/$SPC_CHAINID.json + +cat /root/tmp/$CHAINLET_CHAIN_ID.json | jq '.value."gas-prices"="'1$CHAINLET_DENOM'"' > /root/tmp/$CHAINLET_CHAIN_ID.json.tmp && mv /root/tmp/$CHAINLET_CHAIN_ID.json.tmp /root/tmp/$CHAINLET_CHAIN_ID.json +cat /root/tmp/$SPC_CHAINID.json | jq '.value."gas-prices"="'1$SPC_DENOM'"' > /root/tmp/$SPC_CHAINID.json.tmp && mv /root/tmp/$SPC_CHAINID.json.tmp /root/tmp/$SPC_CHAINID.json + +cp /root/tmp/$CHAINLET_CHAIN_ID.json /root/.relayer/config/ +cp /root/tmp/$SPC_CHAINID.json /root/.relayer/config/ + +rly chains add $CHAINLET_CHAIN_ID --file /root/.relayer/config/$CHAINLET_CHAIN_ID.json +rly chains add $SPC_CHAINID --file /root/.relayer/config/$SPC_CHAINID.json + +yq -i '.chains."'$CHAINLET_CHAIN_ID'".value.extra-codecs |= ["ethermint"]' /root/.relayer/config/config.yaml + +rly keys restore $CHAINLET_CHAIN_ID key1 "$(cat /root/mnemo.file.sevm)" --coin-type=60 +rly keys restore $SPC_CHAINID key2 "$(cat /root/mnemo.file.spc)" + +rly paths new $CHAINLET_CHAIN_ID $SPC_CHAINID dp +rly transact link dp + +rly start dp diff --git a/saga.Dockerfile b/saga.Dockerfile new file mode 100644 index 000000000..522ed5862 --- /dev/null +++ b/saga.Dockerfile @@ -0,0 +1,32 @@ +FROM golang:1.20.4-bullseye AS build-env + +WORKDIR /root + +RUN apt-get update -y +RUN apt-get install git jq wget -y + +COPY . . + +# RUN git clone https://github.com/cosmos/relayer.git && cd relayer && git checkout v2.3.1 && make build + +RUN make build + +FROM golang:1.20.4-bullseye +RUN apt-get update -y +RUN apt-get install ca-certificates jq wget -y +RUN wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 && chmod a+x /usr/local/bin/yq + +WORKDIR /root + +COPY --from=build-env /root/build/rly /usr/bin/rly +COPY --from=build-env /root/rly/start-rly.sh /root/start-rly.sh +COPY --from=build-env /root/rly/mnemo.file /root/mnemo.file +RUN mkdir -p /root/tmp +COPY --from=build-env /root/rly/sevm_111-1.json /root/tmp/ +COPY --from=build-env /root/rly/sevm_111-2.json /root/tmp/ + +RUN chmod -R 755 /root/start-rly.sh + +EXPOSE 26656 26657 1317 9090 8545 8546 + +CMD ["bash","/root/start-rly.sh"] From 178921962058a98f0812c015ab7678afd74fc145 Mon Sep 17 00:00:00 2001 From: Konstantin Munichev Date: Thu, 22 Jun 2023 19:00:26 +0200 Subject: [PATCH 2/7] Set keystore password --- rly/start-rly.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/rly/start-rly.sh b/rly/start-rly.sh index 1ff31e8e6..b0eee2457 100755 --- a/rly/start-rly.sh +++ b/rly/start-rly.sh @@ -1,5 +1,7 @@ #!/bin/bash +KEYPASSWD=${KEYPASSWD:-DoNoTuSeInPrOd} + rly config init echo $RELAYER_SAGAEVM_MNEMONIC > mnemo.file.sevm @@ -29,10 +31,10 @@ rly chains add $SPC_CHAINID --file /root/.relayer/config/$SPC_CHAINID.json yq -i '.chains."'$CHAINLET_CHAIN_ID'".value.extra-codecs |= ["ethermint"]' /root/.relayer/config/config.yaml -rly keys restore $CHAINLET_CHAIN_ID key1 "$(cat /root/mnemo.file.sevm)" --coin-type=60 -rly keys restore $SPC_CHAINID key2 "$(cat /root/mnemo.file.spc)" +(echo $KEYPASSWD; echo $KEYPASSWD) | rly keys restore $CHAINLET_CHAIN_ID key1 "$(cat /root/mnemo.file.sevm)" --coin-type=60 +(echo $KEYPASSWD; echo $KEYPASSWD) | rly keys restore $SPC_CHAINID key2 "$(cat /root/mnemo.file.spc)" rly paths new $CHAINLET_CHAIN_ID $SPC_CHAINID dp -rly transact link dp +(echo $KEYPASSWD; sleep 1; echo $KEYPASSWD) | rly transact link dp -rly start dp +(echo $KEYPASSWD; sleep 1; echo $KEYPASSWD) | rly start dp From d078c6713f441a032356dc00f2f9be825b7b80cf Mon Sep 17 00:00:00 2001 From: Konstantin Munichev Date: Fri, 23 Jun 2023 16:59:05 +0200 Subject: [PATCH 3/7] Poll chainlet until it's up and running --- rly/start-rly.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/rly/start-rly.sh b/rly/start-rly.sh index b0eee2457..66f53411d 100755 --- a/rly/start-rly.sh +++ b/rly/start-rly.sh @@ -35,6 +35,18 @@ yq -i '.chains."'$CHAINLET_CHAIN_ID'".value.extra-codecs |= ["ethermint"]' /root (echo $KEYPASSWD; echo $KEYPASSWD) | rly keys restore $SPC_CHAINID key2 "$(cat /root/mnemo.file.spc)" rly paths new $CHAINLET_CHAIN_ID $SPC_CHAINID dp + +# we want to make sure that chainlet is up and running +while true +do + rly q node-state $CHAINLET_CHAIN_ID + RETCODE=$? + if [[ ${RETCODE} -eq 0 ]]; then + break + fi + sleep 5 +done + (echo $KEYPASSWD; sleep 1; echo $KEYPASSWD) | rly transact link dp (echo $KEYPASSWD; sleep 1; echo $KEYPASSWD) | rly start dp From 828ec9b4123f9bbdbc1b2a88a9562e7882baa846 Mon Sep 17 00:00:00 2001 From: Konstantin Munichev Date: Fri, 30 Jun 2023 21:35:59 +0200 Subject: [PATCH 4/7] Remove unused mnemonic file --- rly/mnemo.file | 1 - 1 file changed, 1 deletion(-) delete mode 100644 rly/mnemo.file diff --git a/rly/mnemo.file b/rly/mnemo.file deleted file mode 100644 index 9b001b3cd..000000000 --- a/rly/mnemo.file +++ /dev/null @@ -1 +0,0 @@ -solution grocery miracle sugar ankle honey kit prison build horror fiscal core twelve neither raise situate item float erode expire result snake cave review \ No newline at end of file From 3f1f3d08c59513d645cf027ebc8c8ddf872d2ae2 Mon Sep 17 00:00:00 2001 From: Konstantin Munichev Date: Fri, 30 Jun 2023 21:36:48 +0200 Subject: [PATCH 5/7] Rename example .json files to .json.example --- rly/{sevm_111-1.json => sevm_111-1.json.example} | 0 rly/{sevm_111-2.json => sevm_111-2.json.example} | 0 rly/start-rly.sh | 4 ++-- saga.Dockerfile | 5 ++--- 4 files changed, 4 insertions(+), 5 deletions(-) rename rly/{sevm_111-1.json => sevm_111-1.json.example} (100%) rename rly/{sevm_111-2.json => sevm_111-2.json.example} (100%) diff --git a/rly/sevm_111-1.json b/rly/sevm_111-1.json.example similarity index 100% rename from rly/sevm_111-1.json rename to rly/sevm_111-1.json.example diff --git a/rly/sevm_111-2.json b/rly/sevm_111-2.json.example similarity index 100% rename from rly/sevm_111-2.json rename to rly/sevm_111-2.json.example diff --git a/rly/start-rly.sh b/rly/start-rly.sh index 66f53411d..e5b1660a0 100755 --- a/rly/start-rly.sh +++ b/rly/start-rly.sh @@ -7,8 +7,8 @@ rly config init echo $RELAYER_SAGAEVM_MNEMONIC > mnemo.file.sevm echo $RELAYER_SPC_MNEMONIC > mnemo.file.spc -mv /root/tmp/sevm_111-1.json /root/tmp/$CHAINLET_CHAIN_ID.json -mv /root/tmp/sevm_111-2.json /root/tmp/$SPC_CHAINID.json +mv /root/tmp/sevm_111-1.json.example /root/tmp/$CHAINLET_CHAIN_ID.json +mv /root/tmp/sevm_111-2.json.example /root/tmp/$SPC_CHAINID.json cat /root/tmp/$CHAINLET_CHAIN_ID.json | jq '.value."chain-id"="'$CHAINLET_CHAIN_ID'"' > /root/tmp/$CHAINLET_CHAIN_ID.json.tmp && mv /root/tmp/$CHAINLET_CHAIN_ID.json.tmp /root/tmp/$CHAINLET_CHAIN_ID.json cat /root/tmp/$SPC_CHAINID.json | jq '.value."chain-id"="'$SPC_CHAINID'"' > /root/tmp/$SPC_CHAINID.json.tmp && mv /root/tmp/$SPC_CHAINID.json.tmp /root/tmp/$SPC_CHAINID.json diff --git a/saga.Dockerfile b/saga.Dockerfile index 522ed5862..f779b9743 100644 --- a/saga.Dockerfile +++ b/saga.Dockerfile @@ -20,10 +20,9 @@ WORKDIR /root COPY --from=build-env /root/build/rly /usr/bin/rly COPY --from=build-env /root/rly/start-rly.sh /root/start-rly.sh -COPY --from=build-env /root/rly/mnemo.file /root/mnemo.file RUN mkdir -p /root/tmp -COPY --from=build-env /root/rly/sevm_111-1.json /root/tmp/ -COPY --from=build-env /root/rly/sevm_111-2.json /root/tmp/ +COPY --from=build-env /root/rly/sevm_111-1.json.example /root/tmp/ +COPY --from=build-env /root/rly/sevm_111-2.json.example /root/tmp/ RUN chmod -R 755 /root/start-rly.sh From a90757fcd838d96de382f22f9d352a10128400ec Mon Sep 17 00:00:00 2001 From: Konstantin Munichev Date: Mon, 3 Jul 2023 19:41:13 +0200 Subject: [PATCH 6/7] Env vars renaming --- rly/start-rly.sh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/rly/start-rly.sh b/rly/start-rly.sh index e5b1660a0..4a3f54488 100755 --- a/rly/start-rly.sh +++ b/rly/start-rly.sh @@ -4,37 +4,37 @@ KEYPASSWD=${KEYPASSWD:-DoNoTuSeInPrOd} rly config init -echo $RELAYER_SAGAEVM_MNEMONIC > mnemo.file.sevm +echo $RELAYER_CHAINLET_MNEMONIC > mnemo.file.sevm echo $RELAYER_SPC_MNEMONIC > mnemo.file.spc mv /root/tmp/sevm_111-1.json.example /root/tmp/$CHAINLET_CHAIN_ID.json -mv /root/tmp/sevm_111-2.json.example /root/tmp/$SPC_CHAINID.json +mv /root/tmp/sevm_111-2.json.example /root/tmp/$SPC_CHAIN_ID.json cat /root/tmp/$CHAINLET_CHAIN_ID.json | jq '.value."chain-id"="'$CHAINLET_CHAIN_ID'"' > /root/tmp/$CHAINLET_CHAIN_ID.json.tmp && mv /root/tmp/$CHAINLET_CHAIN_ID.json.tmp /root/tmp/$CHAINLET_CHAIN_ID.json -cat /root/tmp/$SPC_CHAINID.json | jq '.value."chain-id"="'$SPC_CHAINID'"' > /root/tmp/$SPC_CHAINID.json.tmp && mv /root/tmp/$SPC_CHAINID.json.tmp /root/tmp/$SPC_CHAINID.json +cat /root/tmp/$SPC_CHAIN_ID.json | jq '.value."chain-id"="'$SPC_CHAIN_ID'"' > /root/tmp/$SPC_CHAIN_ID.json.tmp && mv /root/tmp/$SPC_CHAIN_ID.json.tmp /root/tmp/$SPC_CHAIN_ID.json # TODO: hardcoded port; http -cat /root/tmp/$CHAINLET_CHAIN_ID.json | jq '.value."rpc-addr"="'http://$CHAINLET_RPC_ADDRESS'"' > /root/tmp/$CHAINLET_CHAIN_ID.json.tmp && mv /root/tmp/$CHAINLET_CHAIN_ID.json.tmp /root/tmp/$CHAINLET_CHAIN_ID.json -cat /root/tmp/$SPC_CHAINID.json | jq '.value."rpc-addr"="'http://$SPC_EXTERNAL_ADDRESS_HOST:26657'"' > /root/tmp/$SPC_CHAINID.json.tmp && mv /root/tmp/$SPC_CHAINID.json.tmp /root/tmp/$SPC_CHAINID.json +cat /root/tmp/$CHAINLET_CHAIN_ID.json | jq '.value."rpc-addr"="'$CHAINLET_RPC_ADDRESS'"' > /root/tmp/$CHAINLET_CHAIN_ID.json.tmp && mv /root/tmp/$CHAINLET_CHAIN_ID.json.tmp /root/tmp/$CHAINLET_CHAIN_ID.json +cat /root/tmp/$SPC_CHAIN_ID.json | jq '.value."rpc-addr"="'$SPC_EXTERNAL_ADDRESS'"' > /root/tmp/$SPC_CHAIN_ID.json.tmp && mv /root/tmp/$SPC_CHAIN_ID.json.tmp /root/tmp/$SPC_CHAIN_ID.json cat /root/tmp/$CHAINLET_CHAIN_ID.json | jq '.value."keyring-backend"="file"' > /root/tmp/$CHAINLET_CHAIN_ID.json.tmp && mv /root/tmp/$CHAINLET_CHAIN_ID.json.tmp /root/tmp/$CHAINLET_CHAIN_ID.json -cat /root/tmp/$SPC_CHAINID.json | jq '.value."keyring-backend"="file"' > /root/tmp/$SPC_CHAINID.json.tmp && mv /root/tmp/$SPC_CHAINID.json.tmp /root/tmp/$SPC_CHAINID.json +cat /root/tmp/$SPC_CHAIN_ID.json | jq '.value."keyring-backend"="file"' > /root/tmp/$SPC_CHAIN_ID.json.tmp && mv /root/tmp/$SPC_CHAIN_ID.json.tmp /root/tmp/$SPC_CHAIN_ID.json cat /root/tmp/$CHAINLET_CHAIN_ID.json | jq '.value."gas-prices"="'1$CHAINLET_DENOM'"' > /root/tmp/$CHAINLET_CHAIN_ID.json.tmp && mv /root/tmp/$CHAINLET_CHAIN_ID.json.tmp /root/tmp/$CHAINLET_CHAIN_ID.json -cat /root/tmp/$SPC_CHAINID.json | jq '.value."gas-prices"="'1$SPC_DENOM'"' > /root/tmp/$SPC_CHAINID.json.tmp && mv /root/tmp/$SPC_CHAINID.json.tmp /root/tmp/$SPC_CHAINID.json +cat /root/tmp/$SPC_CHAIN_ID.json | jq '.value."gas-prices"="'1$SPC_DENOM'"' > /root/tmp/$SPC_CHAIN_ID.json.tmp && mv /root/tmp/$SPC_CHAIN_ID.json.tmp /root/tmp/$SPC_CHAIN_ID.json cp /root/tmp/$CHAINLET_CHAIN_ID.json /root/.relayer/config/ -cp /root/tmp/$SPC_CHAINID.json /root/.relayer/config/ +cp /root/tmp/$SPC_CHAIN_ID.json /root/.relayer/config/ rly chains add $CHAINLET_CHAIN_ID --file /root/.relayer/config/$CHAINLET_CHAIN_ID.json -rly chains add $SPC_CHAINID --file /root/.relayer/config/$SPC_CHAINID.json +rly chains add $SPC_CHAIN_ID --file /root/.relayer/config/$SPC_CHAIN_ID.json yq -i '.chains."'$CHAINLET_CHAIN_ID'".value.extra-codecs |= ["ethermint"]' /root/.relayer/config/config.yaml (echo $KEYPASSWD; echo $KEYPASSWD) | rly keys restore $CHAINLET_CHAIN_ID key1 "$(cat /root/mnemo.file.sevm)" --coin-type=60 -(echo $KEYPASSWD; echo $KEYPASSWD) | rly keys restore $SPC_CHAINID key2 "$(cat /root/mnemo.file.spc)" +(echo $KEYPASSWD; echo $KEYPASSWD) | rly keys restore $SPC_CHAIN_ID key2 "$(cat /root/mnemo.file.spc)" -rly paths new $CHAINLET_CHAIN_ID $SPC_CHAINID dp +rly paths new $CHAINLET_CHAIN_ID $SPC_CHAIN_ID dp # we want to make sure that chainlet is up and running while true From 94b08d8175ea2ac1c14012a3ec2053f8341e2902 Mon Sep 17 00:00:00 2001 From: Konstantin Munichev Date: Mon, 3 Jul 2023 21:15:47 +0200 Subject: [PATCH 7/7] Rename SPC_EXTERNAL_ADDRESS -> SPC_RPC_EXTERNAL_ADDRESS --- rly/start-rly.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rly/start-rly.sh b/rly/start-rly.sh index 4a3f54488..6cbe3673d 100755 --- a/rly/start-rly.sh +++ b/rly/start-rly.sh @@ -15,7 +15,7 @@ cat /root/tmp/$SPC_CHAIN_ID.json | jq '.value."chain-id"="'$SPC_CHAIN_ID'"' > /r # TODO: hardcoded port; http cat /root/tmp/$CHAINLET_CHAIN_ID.json | jq '.value."rpc-addr"="'$CHAINLET_RPC_ADDRESS'"' > /root/tmp/$CHAINLET_CHAIN_ID.json.tmp && mv /root/tmp/$CHAINLET_CHAIN_ID.json.tmp /root/tmp/$CHAINLET_CHAIN_ID.json -cat /root/tmp/$SPC_CHAIN_ID.json | jq '.value."rpc-addr"="'$SPC_EXTERNAL_ADDRESS'"' > /root/tmp/$SPC_CHAIN_ID.json.tmp && mv /root/tmp/$SPC_CHAIN_ID.json.tmp /root/tmp/$SPC_CHAIN_ID.json +cat /root/tmp/$SPC_CHAIN_ID.json | jq '.value."rpc-addr"="'$SPC_RPC_EXTERNAL_ADDRESS'"' > /root/tmp/$SPC_CHAIN_ID.json.tmp && mv /root/tmp/$SPC_CHAIN_ID.json.tmp /root/tmp/$SPC_CHAIN_ID.json cat /root/tmp/$CHAINLET_CHAIN_ID.json | jq '.value."keyring-backend"="file"' > /root/tmp/$CHAINLET_CHAIN_ID.json.tmp && mv /root/tmp/$CHAINLET_CHAIN_ID.json.tmp /root/tmp/$CHAINLET_CHAIN_ID.json cat /root/tmp/$SPC_CHAIN_ID.json | jq '.value."keyring-backend"="file"' > /root/tmp/$SPC_CHAIN_ID.json.tmp && mv /root/tmp/$SPC_CHAIN_ID.json.tmp /root/tmp/$SPC_CHAIN_ID.json