From 4c619575a025987ead72893915877774cea77358 Mon Sep 17 00:00:00 2001 From: Grant Zukel Date: Wed, 13 Mar 2024 13:04:15 -0600 Subject: [PATCH 1/3] fix: docker entrypoint, start.sh --- Dockerfile | 2 +- contrib/athens3/zetacored/docker-compose.yml | 6 +++--- contrib/docker-scripts/start.sh | 6 +++--- contrib/mainnet/zetacored/docker-compose.yml | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 11635f3d82..b43c2ca501 100644 --- a/Dockerfile +++ b/Dockerfile @@ -59,4 +59,4 @@ EXPOSE 8545 EXPOSE 8546 EXPOSE 9090 EXPOSE 26657 -EXPOSE 9091 +EXPOSE 9091 \ No newline at end of file diff --git a/contrib/athens3/zetacored/docker-compose.yml b/contrib/athens3/zetacored/docker-compose.yml index f215b92239..ef58400e9a 100644 --- a/contrib/athens3/zetacored/docker-compose.yml +++ b/contrib/athens3/zetacored/docker-compose.yml @@ -35,8 +35,8 @@ services: - "9090:9090" - "9091:9091" volumes: - - zetacored_data:/root/.zetacored/ - entrypoint: bash /scripts/start-zetae2e.sh + - zetacored_data_athens3:/root/.zetacored/ + entrypoint: bash /scripts/start.sh volumes: - zetacored_data: + zetacored_data_athens3: diff --git a/contrib/docker-scripts/start.sh b/contrib/docker-scripts/start.sh index b9ea1b482b..3713b6758e 100644 --- a/contrib/docker-scripts/start.sh +++ b/contrib/docker-scripts/start.sh @@ -193,6 +193,7 @@ function move_zetacored_binaries { } function start_network { + ${VISOR_NAME} version ${VISOR_NAME} run start --home ${DAEMON_HOME} \ --log_level info \ --moniker ${MONIKER} \ @@ -232,7 +233,7 @@ function load_defaults { export GENESIS_FILE_ATHENS3=${GENESIS_FILE_ATHENS3:=https://raw.githubusercontent.com/zeta-chain/network-config/main/athens3/genesis.json} #MAINNET - export BINARY_LIST_MAINNET=${BINARY_LIST_ATHENS3:=https://raw.githubusercontent.com/zeta-chain/network-config/main/mainnet/binary_list.json} + export BINARY_LIST_MAINNET=${BINARY_LIST_MAINNET:=https://raw.githubusercontent.com/zeta-chain/network-config/main/mainnet/binary_list.json} export STATE_SYNC_RPC_NODE_FILE_MAINNET=${STATE_SYNC_RPC_NODE_FILE_MAINNET:=https://raw.githubusercontent.com/zeta-chain/network-config/main/mainnet/state_sync_node} export RPC_STATE_SYNC_RPC_LIST_FILE_MAINNET=${RPC_STATE_SYNC_RPC_LIST_FILE_MAINNET:=https://raw.githubusercontent.com/zeta-chain/network-config/main/mainnet/rpc_state_sync_nodes} export APP_TOML_FILE_MAINNET=${APP_TOML_FILE_MAINNET:=https://raw.githubusercontent.com/zeta-chain/network-config/main/mainnet/app.toml} @@ -296,5 +297,4 @@ else logt "Start Network" start_network -fi - +fi \ No newline at end of file diff --git a/contrib/mainnet/zetacored/docker-compose.yml b/contrib/mainnet/zetacored/docker-compose.yml index 2f550825cd..9837f3240c 100644 --- a/contrib/mainnet/zetacored/docker-compose.yml +++ b/contrib/mainnet/zetacored/docker-compose.yml @@ -36,10 +36,10 @@ services: - "9090:9090" - "9091:9091" volumes: - - zetacored_data:/root/.zetacored/ - entrypoint: bash /scripts/start-zetae2e.sh + - zetacored_data_mainnet:/root/.zetacored/ + entrypoint: bash /scripts/start.sh #for debugging #entrypoint: ["/bin/sh", "-c"] #command: ["while true; do sleep 86400; done"] volumes: - zetacored_data: + zetacored_data_mainnet: From d59e4e82c85c412f779a853039813a2a52d7b149 Mon Sep 17 00:00:00 2001 From: Grant Zukel Date: Wed, 13 Mar 2024 13:06:23 -0600 Subject: [PATCH 2/3] updated change log and default docker tag version --- changelog.md | 1 + contrib/athens3/zetacored/docker-compose.yml | 2 +- contrib/mainnet/zetacored/docker-compose.yml | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/changelog.md b/changelog.md index f7e2e22679..2c048a6249 100644 --- a/changelog.md +++ b/changelog.md @@ -48,6 +48,7 @@ ### CI * [1867](https://github.com/zeta-chain/node/pull/1867) - default restore_type for full node docker-compose to snapshot instead of statesync for reliability. +* fix typo that was introduced to docker-compose and a typo in start.sh for the docker start script for full nodes. ## Version: v14 diff --git a/contrib/athens3/zetacored/docker-compose.yml b/contrib/athens3/zetacored/docker-compose.yml index ef58400e9a..8401d34e4e 100644 --- a/contrib/athens3/zetacored/docker-compose.yml +++ b/contrib/athens3/zetacored/docker-compose.yml @@ -6,7 +6,7 @@ services: # build: # context: ../../.. # dockerfile: Dockerfile - image: zetachain/zetacored:${DOCKER_TAG:-ubuntu-v14} + image: zetachain/zetacored:${DOCKER_TAG:-v14.0.1} environment: DAEMON_HOME: "/root/.zetacored" NETWORK: athens3 diff --git a/contrib/mainnet/zetacored/docker-compose.yml b/contrib/mainnet/zetacored/docker-compose.yml index 9837f3240c..7ad875b043 100644 --- a/contrib/mainnet/zetacored/docker-compose.yml +++ b/contrib/mainnet/zetacored/docker-compose.yml @@ -6,7 +6,7 @@ services: # build: # context: ../../.. # dockerfile: Dockerfile - image: zetachain/zetacored:${DOCKER_TAG:-ubuntu-v14} + image: zetachain/zetacored:${DOCKER_TAG:-v14.0.1} container_name: zetachain_mainnet_rpc environment: DAEMON_HOME: "/root/.zetacored" From 5287269815f5f9242f7389ae42c7e4fdcd9257ef Mon Sep 17 00:00:00 2001 From: Grant Zukel Date: Wed, 13 Mar 2024 13:44:30 -0600 Subject: [PATCH 3/3] fix comments --- changelog.md | 2 +- contrib/docker-scripts/start.sh | 85 +++++++++++++++++---------------- 2 files changed, 44 insertions(+), 43 deletions(-) diff --git a/changelog.md b/changelog.md index 2c048a6249..bd557c549a 100644 --- a/changelog.md +++ b/changelog.md @@ -48,7 +48,7 @@ ### CI * [1867](https://github.com/zeta-chain/node/pull/1867) - default restore_type for full node docker-compose to snapshot instead of statesync for reliability. -* fix typo that was introduced to docker-compose and a typo in start.sh for the docker start script for full nodes. +* [1891](https://github.com/zeta-chain/node/pull/1891) - fix typo that was introduced to docker-compose and a typo in start.sh for the docker start script for full nodes. ## Version: v14 diff --git a/contrib/docker-scripts/start.sh b/contrib/docker-scripts/start.sh index 3713b6758e..a05298fc92 100644 --- a/contrib/docker-scripts/start.sh +++ b/contrib/docker-scripts/start.sh @@ -4,6 +4,49 @@ logt() { echo "$(date '+%Y-%m-%d %H:%M:%S') $1" } + +function load_defaults { + #DEFAULT: Mainnet Statesync. + export DAEMON_HOME=${DAEMON_HOME:=/root/.zetacored} + export NETWORK=${NETWORK:=mainnet} + export RESTORE_TYPE=${RESTORE_TYPE:=statesync} + export SNAPSHOT_API=${SNAPSHOT_API:=https://snapshots.zetachain.com} + export TRUST_HEIGHT_DIFFERENCE_STATE_SYNC=${TRUST_HEIGHT_DIFFERENCE_STATE_SYNC:=40000} + export COSMOVISOR_VERSION=${COSMOVISOR_VERSION:=v1.5.0} + export CHAIN_ID=${CHAIN_ID:=zetachain_7000-1} + export COSMOVISOR_CHECKSUM=${COSMOVISOR_CHECKSUM:=626dfc58c266b85f84a7ed8e2fe0e2346c15be98cfb9f9b88576ba899ed78cdc} + export VISOR_NAME=${VISOR_NAME:=cosmovisor} + export DAEMON_NAME=${DAEMON_NAME:=zetacored} + export DAEMON_ALLOW_DOWNLOAD_BINARIES=${DAEMON_ALLOW_DOWNLOAD_BINARIES:=false} + export DAEMON_RESTART_AFTER_UPGRADE=${DAEMON_RESTART_AFTER_UPGRADE:=true} + export UNSAFE_SKIP_BACKUP=${UNSAFE_SKIP_BACKUP:=true} + export CLIENT_DAEMON_NAME=${CLIENT_DAEMON_NAME:=zetaclientd} + export CLIENT_DAEMON_ARGS=${CLIENT_DAEMON_ARGS:""} + export CLIENT_SKIP_UPGRADE=${CLIENT_SKIP_UPGRADE:=true} + export CLIENT_START_PROCESS=${CLIENT_START_PROCESS:=false} + export MONIKER=${MONIKER:=local-test} + export RE_DO_START_SEQUENCE=${RE_DO_START_SEQUENCE:=false} + + #ATHENS3 + export BINARY_LIST_ATHENS3=${BINARY_LIST_ATHENS3:=https://raw.githubusercontent.com/zeta-chain/network-config/main/athens3/binary_list.json} + export STATE_SYNC_RPC_NODE_FILE_ATHENS3=${STATE_SYNC_RPC_NODE_FILE_ATHENS3:=https://raw.githubusercontent.com/zeta-chain/network-config/main/athens3/state_sync_node} + export RPC_STATE_SYNC_RPC_LIST_FILE_ATHENS3=${RPC_STATE_SYNC_RPC_LIST_FILE_ATHENS3:=https://raw.githubusercontent.com/zeta-chain/network-config/main/athens3/rpc_state_sync_nodes} + export APP_TOML_FILE_ATHENS3=${APP_TOML_FILE_ATHENS3:=https://raw.githubusercontent.com/zeta-chain/network-config/main/athens3/app.toml} + export CONFIG_TOML_FILE_ATHENS3=${CONFIG_TOML_FILE_ATHENS3:=https://raw.githubusercontent.com/zeta-chain/network-config/main/athens3/config.toml} + export CLIENT_TOML_FILE_ATHENS3=${CLIENT_TOML_FILE_ATHENS3:=https://raw.githubusercontent.com/zeta-chain/network-config/main/athens3/client.toml} + export GENESIS_FILE_ATHENS3=${GENESIS_FILE_ATHENS3:=https://raw.githubusercontent.com/zeta-chain/network-config/main/athens3/genesis.json} + + #MAINNET + export BINARY_LIST_MAINNET=${BINARY_LIST_MAINNET:=https://raw.githubusercontent.com/zeta-chain/network-config/main/mainnet/binary_list.json} + export STATE_SYNC_RPC_NODE_FILE_MAINNET=${STATE_SYNC_RPC_NODE_FILE_MAINNET:=https://raw.githubusercontent.com/zeta-chain/network-config/main/mainnet/state_sync_node} + export RPC_STATE_SYNC_RPC_LIST_FILE_MAINNET=${RPC_STATE_SYNC_RPC_LIST_FILE_MAINNET:=https://raw.githubusercontent.com/zeta-chain/network-config/main/mainnet/rpc_state_sync_nodes} + export APP_TOML_FILE_MAINNET=${APP_TOML_FILE_MAINNET:=https://raw.githubusercontent.com/zeta-chain/network-config/main/mainnet/app.toml} + export CONFIG_TOML_FILE_MAINNET=${CONFIG_TOML_FILE_MAINNET:=https://raw.githubusercontent.com/zeta-chain/network-config/main/mainnet/config.toml} + export CLIENT_TOML_FILE_MAINNET=${CLIENT_TOML_FILE_MAINNET:=https://raw.githubusercontent.com/zeta-chain/network-config/main/mainnet/client.toml} + export GENESIS_FILE_MAINNET=${GENESIS_FILE_MAINNET:=https://raw.githubusercontent.com/zeta-chain/network-config/main/mainnet/genesis.json} + +} + function init_chain { if [ -d "${DAEMON_HOME}/config" ]; then logt "${DAEMON_NAME} home directory already initialized." @@ -201,48 +244,6 @@ function start_network { --minimum-gas-prices 1.0azeta "--grpc.enable=true" } -function load_defaults { - #DEFAULT: Mainnet Statesync. - export DAEMON_HOME=${DAEMON_HOME:=/root/.zetacored} - export NETWORK=${NETWORK:=mainnet} - export RESTORE_TYPE=${RESTORE_TYPE:=statesync} - export SNAPSHOT_API=${SNAPSHOT_API:=https://snapshots.zetachain.com} - export TRUST_HEIGHT_DIFFERENCE_STATE_SYNC=${TRUST_HEIGHT_DIFFERENCE_STATE_SYNC:=40000} - export COSMOVISOR_VERSION=${COSMOVISOR_VERSION:=v1.5.0} - export CHAIN_ID=${CHAIN_ID:=zetachain_7000-1} - export COSMOVISOR_CHECKSUM=${COSMOVISOR_CHECKSUM:=626dfc58c266b85f84a7ed8e2fe0e2346c15be98cfb9f9b88576ba899ed78cdc} - export VISOR_NAME=${VISOR_NAME:=cosmovisor} - export DAEMON_NAME=${DAEMON_NAME:=zetacored} - export DAEMON_ALLOW_DOWNLOAD_BINARIES=${DAEMON_ALLOW_DOWNLOAD_BINARIES:=false} - export DAEMON_RESTART_AFTER_UPGRADE=${DAEMON_RESTART_AFTER_UPGRADE:=true} - export UNSAFE_SKIP_BACKUP=${UNSAFE_SKIP_BACKUP:=true} - export CLIENT_DAEMON_NAME=${CLIENT_DAEMON_NAME:=zetaclientd} - export CLIENT_DAEMON_ARGS=${CLIENT_DAEMON_ARGS:""} - export CLIENT_SKIP_UPGRADE=${CLIENT_SKIP_UPGRADE:=true} - export CLIENT_START_PROCESS=${CLIENT_START_PROCESS:=false} - export MONIKER=${MONIKER:=local-test} - export RE_DO_START_SEQUENCE=${RE_DO_START_SEQUENCE:=false} - - #ATHENS3 - export BINARY_LIST_ATHENS3=${BINARY_LIST_ATHENS3:=https://raw.githubusercontent.com/zeta-chain/network-config/main/athens3/binary_list.json} - export STATE_SYNC_RPC_NODE_FILE_ATHENS3=${STATE_SYNC_RPC_NODE_FILE_ATHENS3:=https://raw.githubusercontent.com/zeta-chain/network-config/main/athens3/state_sync_node} - export RPC_STATE_SYNC_RPC_LIST_FILE_ATHENS3=${RPC_STATE_SYNC_RPC_LIST_FILE_ATHENS3:=https://raw.githubusercontent.com/zeta-chain/network-config/main/athens3/rpc_state_sync_nodes} - export APP_TOML_FILE_ATHENS3=${APP_TOML_FILE_ATHENS3:=https://raw.githubusercontent.com/zeta-chain/network-config/main/athens3/app.toml} - export CONFIG_TOML_FILE_ATHENS3=${CONFIG_TOML_FILE_ATHENS3:=https://raw.githubusercontent.com/zeta-chain/network-config/main/athens3/config.toml} - export CLIENT_TOML_FILE_ATHENS3=${CLIENT_TOML_FILE_ATHENS3:=https://raw.githubusercontent.com/zeta-chain/network-config/main/athens3/client.toml} - export GENESIS_FILE_ATHENS3=${GENESIS_FILE_ATHENS3:=https://raw.githubusercontent.com/zeta-chain/network-config/main/athens3/genesis.json} - - #MAINNET - export BINARY_LIST_MAINNET=${BINARY_LIST_MAINNET:=https://raw.githubusercontent.com/zeta-chain/network-config/main/mainnet/binary_list.json} - export STATE_SYNC_RPC_NODE_FILE_MAINNET=${STATE_SYNC_RPC_NODE_FILE_MAINNET:=https://raw.githubusercontent.com/zeta-chain/network-config/main/mainnet/state_sync_node} - export RPC_STATE_SYNC_RPC_LIST_FILE_MAINNET=${RPC_STATE_SYNC_RPC_LIST_FILE_MAINNET:=https://raw.githubusercontent.com/zeta-chain/network-config/main/mainnet/rpc_state_sync_nodes} - export APP_TOML_FILE_MAINNET=${APP_TOML_FILE_MAINNET:=https://raw.githubusercontent.com/zeta-chain/network-config/main/mainnet/app.toml} - export CONFIG_TOML_FILE_MAINNET=${CONFIG_TOML_FILE_MAINNET:=https://raw.githubusercontent.com/zeta-chain/network-config/main/mainnet/config.toml} - export CLIENT_TOML_FILE_MAINNET=${CLIENT_TOML_FILE_MAINNET:=https://raw.githubusercontent.com/zeta-chain/network-config/main/mainnet/client.toml} - export GENESIS_FILE_MAINNET=${GENESIS_FILE_MAINNET:=https://raw.githubusercontent.com/zeta-chain/network-config/main/mainnet/genesis.json} - -} - logt "Load Default Values for ENV Vars if not set." load_defaults