From f30a6abea7dd5859a262a92a0884b011b021bbdb Mon Sep 17 00:00:00 2001 From: Arnab Ghose Date: Sat, 22 Jul 2023 11:16:08 +0530 Subject: [PATCH 1/6] added v0.1.9 upgrade handler --- app/app.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/app.go b/app/app.go index eed15f0..3cf6e34 100644 --- a/app/app.go +++ b/app/app.go @@ -311,6 +311,11 @@ func New( return fromVM, nil }) + app.UpgradeKeeper.SetUpgradeHandler("v019", func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + ctx.Logger().Info("v0.1.9 upgrade") + return fromVM, nil + }) + // register the staking hooks // NOTE: stakingKeeper above is passed by reference, so that it will contain these hooks app.StakingKeeper = *stakingKeeper.SetHooks( From 4ad1fa4f654c6511c15b047b9819f2482988ef1e Mon Sep 17 00:00:00 2001 From: Arnab Ghose Date: Thu, 3 Aug 2023 08:58:45 +0530 Subject: [PATCH 2/6] fix: modified release candidate version regex pattern to accomodate multi-digit patch numbers --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0990d97..774a209 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,7 +3,7 @@ on: push: tags: - "v[0-9]+.[0-9]+.[0-9]+" - - "v[0-9]+.[0-9]+.[0-9]-rc.[0-9]+" + - "v[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+" permissions: contents: write From 52012b4f6a0a5f497092964a9699d589e8a81d61 Mon Sep 17 00:00:00 2001 From: Arnab Ghose Date: Thu, 3 Aug 2023 17:33:54 +0530 Subject: [PATCH 3/6] added upgrade handler for v0.1.10 release --- app/app.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/app.go b/app/app.go index 3cf6e34..c036887 100644 --- a/app/app.go +++ b/app/app.go @@ -316,6 +316,11 @@ func New( return fromVM, nil }) + app.UpgradeKeeper.SetUpgradeHandler("v0110", func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { + ctx.Logger().Info("v0.1.10 upgrade") + return fromVM, nil + }) + // register the staking hooks // NOTE: stakingKeeper above is passed by reference, so that it will contain these hooks app.StakingKeeper = *stakingKeeper.SetHooks( From 21b58977ae15cd7d468ce2965fe0bfce78da4a92 Mon Sep 17 00:00:00 2001 From: Arnab Ghose Date: Mon, 7 Aug 2023 19:02:43 +0530 Subject: [PATCH 4/6] refactor: changed entrypoint.sh to accept mnemonic as an ENV variable --- Dockerfile | 5 +---- scripts/docker-node/{setup.sh => entrypoint.sh} | 9 ++++++++- 2 files changed, 9 insertions(+), 5 deletions(-) rename scripts/docker-node/{setup.sh => entrypoint.sh} (92%) mode change 100755 => 100644 diff --git a/Dockerfile b/Dockerfile index 8c8029d..6feee65 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,11 +14,8 @@ RUN apt-get update RUN apt-get install ${PACKAGES} -y RUN make install -# Setup the node -RUN bash ./scripts/docker-node/setup.sh - # Expose Ports EXPOSE 26657 1317 9090 9091 26656 # Entry for containers -ENTRYPOINT [ "hid-noded" ] \ No newline at end of file +ENTRYPOINT [ "./scripts/docker-node/setup.sh" ] diff --git a/scripts/docker-node/setup.sh b/scripts/docker-node/entrypoint.sh old mode 100755 new mode 100644 similarity index 92% rename from scripts/docker-node/setup.sh rename to scripts/docker-node/entrypoint.sh index c3f818d..bf9a1cf --- a/scripts/docker-node/setup.sh +++ b/scripts/docker-node/entrypoint.sh @@ -28,7 +28,11 @@ hid-noded init --chain-id=hidnode node1 --home=/root/.hid-node hid-noded configure min-gas-prices 0uhid # Create key for the node -hid-noded keys add node1 --keyring-backend=test --home=/root/.hid-node +if [ -n "$MNEMONIC" ]; then + echo "$MNEMONIC" | hid-noded keys add node1 --keyring-backend=test --recover --home=/root/.hid-node +else + hid-noded keys add node1 --keyring-backend=test --home=/root/.hid-node +fi # change staking denom to uhid cat /root/.hid-node/config/genesis.json | jq '.app_state["staking"]["params"]["bond_denom"]="uhid"' > /root/.hid-node/config/tmp_genesis.json && mv /root/.hid-node/config/tmp_genesis.json /root/.hid-node/config/genesis.json @@ -61,3 +65,6 @@ sed -i -E 's|tcp://127.0.0.1:26657|tcp://0.0.0.0:26657|g' /root/.hid-node/config sed -i -E 's|allow_duplicate_ip = false|allow_duplicate_ip = true|g' /root/.hid-node/config/config.toml sed -i -E 's|addr_book_strict = true|addr_book_strict = false|g' /root/.hid-node/config/config.toml sed -i -E 's|cors_allowed_origins = \[\]|cors_allowed_origins = \[\"\*\"\]|g' /root/.hid-node/config/config.toml + +# Run hid-node +hid-noded start From 27d0db1249d363487c56873458257ae975223516 Mon Sep 17 00:00:00 2001 From: Arnab Ghose Date: Mon, 7 Aug 2023 19:06:06 +0530 Subject: [PATCH 5/6] fix: fixed ENTRYPOINT script name --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 6feee65..f0c165b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,5 +17,8 @@ RUN make install # Expose Ports EXPOSE 26657 1317 9090 9091 26656 +# Provide permission to the script +RUN chmod +x ./scripts/docker-node/entrypoint.sh + # Entry for containers -ENTRYPOINT [ "./scripts/docker-node/setup.sh" ] +ENTRYPOINT [ "./scripts/docker-node/entrypoint.sh" ] From c07d3d647c58e541078e62f1e93686371fe26aed Mon Sep 17 00:00:00 2001 From: vishwas1 Date: Tue, 8 Aug 2023 14:27:52 +0530 Subject: [PATCH 6/6] updated dockerfile --- Dockerfile | 3 ++- scripts/docker-node/entrypoint.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index f0c165b..e2e742b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,4 +21,5 @@ EXPOSE 26657 1317 9090 9091 26656 RUN chmod +x ./scripts/docker-node/entrypoint.sh # Entry for containers -ENTRYPOINT [ "./scripts/docker-node/entrypoint.sh" ] +ENTRYPOINT [ "/bin/sh", "-c", "echo N | ./scripts/docker-node/entrypoint.sh" ] + diff --git a/scripts/docker-node/entrypoint.sh b/scripts/docker-node/entrypoint.sh index bf9a1cf..be87743 100644 --- a/scripts/docker-node/entrypoint.sh +++ b/scripts/docker-node/entrypoint.sh @@ -16,7 +16,7 @@ if [ ${RET_VAL} -ne 0 ]; then fi # Setting up config files -rm -rf /root/.hid-node/ +# rm -rf /root/.hid-node/ # Make directories for hid-node config mkdir /root/.hid-node