Merge pull request #1376 from cosmos/tendermint-0.37

Add a Tendermint 0.37 client
This commit is contained in:
Simon Warta
2023-03-06 11:57:25 +01:00
committed by GitHub
31 changed files with 444 additions and 210 deletions
+14 -7
View File
@@ -2,18 +2,25 @@
set -o errexit -o nounset -o pipefail
command -v shellcheck >/dev/null && shellcheck "$0"
# Find latest patch releases at https://hub.docker.com/r/tendermint/tendermint/tags/
declare -a TM_VERSIONS
TM_VERSIONS[34]=v0.34.19
TM_VERSIONS[35]=v0.35.6
# Find latest patch releases at
# - https://hub.docker.com/r/tendermint/tendermint/tags/
# - https://hub.docker.com/r/cometbft/cometbft/tags/
declare -a TM_IMAGES
TM_IMAGES[34]="tendermint/tendermint:v0.34.19"
TM_IMAGES[37]="cometbft/cometbft:v0.37.0-rc3"
declare -a TM_ROOTS
TM_ROOTS[34]="/tendermint"
TM_ROOTS[37]="/cometbft"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
for KEY in "${!TM_VERSIONS[@]}"; do
export TENDERMINT_VERSION="${TM_VERSIONS[$KEY]}"
for KEY in "${!TM_IMAGES[@]}"; do
export TENDERMINT_IMAGE="${TM_IMAGES[$KEY]}"
export TENDERMINT_ROOT="${TM_ROOTS[$KEY]}"
export TENDERMINT_PORT="111$KEY"
export TENDERMINT_NAME="tendermint-$KEY"
echo "Starting $TENDERMINT_NAME ($TENDERMINT_VERSION) on port $TENDERMINT_PORT ..."
echo "Starting $TENDERMINT_NAME ($TENDERMINT_IMAGE) on port $TENDERMINT_PORT ..."
"$SCRIPT_DIR/start.sh"
done
+1 -5
View File
@@ -2,13 +2,9 @@
set -o errexit -o nounset -o pipefail
command -v shellcheck >/dev/null && shellcheck "$0"
declare -a TM_VERSIONS
TM_VERSIONS[34]=v0.34.19
TM_VERSIONS[35]=v0.35.6
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
for KEY in "${!TM_VERSIONS[@]}"; do
for KEY in 34 37; do
export TENDERMINT_NAME="tendermint-$KEY"
echo "Stopping $TENDERMINT_NAME ..."
+5 -5
View File
@@ -6,7 +6,7 @@ gnused="$(command -v gsed || echo sed)"
# Tendermint settings must be specified
# Choose version from https://hub.docker.com/r/tendermint/tendermint/tags/
for SETTING in "TENDERMINT_VERSION" "TENDERMINT_PORT" "TENDERMINT_NAME"; do
for SETTING in "TENDERMINT_IMAGE" "TENDERMINT_PORT" "TENDERMINT_NAME"; do
if test -z "$(eval echo "\$$SETTING")"; then
echo "\$$SETTING must be set when running this script"
exit 1
@@ -20,8 +20,8 @@ LOGFILE="$TMP_DIR/tendermint.log"
docker run --rm \
--user="$UID" \
-v "${TMP_DIR}:/tendermint" \
"tendermint/tendermint:${TENDERMINT_VERSION}" \
-v "${TMP_DIR}:${TENDERMINT_ROOT}" \
"${TENDERMINT_IMAGE}" \
init validator
# make sure we allow cors origins, only possible by modifying the config file
@@ -36,11 +36,11 @@ docker run --rm \
docker run --rm \
--user="$UID" \
--name "$TENDERMINT_NAME" \
-p "${TENDERMINT_PORT}:26657" -v "${TMP_DIR}:/tendermint" \
-p "${TENDERMINT_PORT}:26657" -v "${TMP_DIR}:${TENDERMINT_ROOT}" \
-e "TM_TX_INDEX_INDEX_ALL_KEYS=true" \
-e "PROXY_APP=kvstore" \
-e "LOG_LEVEL=state:info,rpc:info,*:error" \
"tendermint/tendermint:${TENDERMINT_VERSION}" node \
"${TENDERMINT_IMAGE}" node \
--rpc.laddr=tcp://0.0.0.0:26657 \
>"$LOGFILE" 2>&1 &