diff --git a/Makefile b/Makefile index 55a192aa5..dd8e2b51a 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,14 @@ PACKAGES=$(shell go list ./...) BUILDDIR ?= $(CURDIR)/build BUILD_TAGS?=tendermint -VERSION := $(shell git describe --always) + +# If building a release, please checkout the version tag to get the correct version setting +ifneq ($(shell git branch --show-current),) +VERSION := unreleased-$(shell git branch --show-current)-$(shell git rev-parse HEAD) +else +VERSION := $(shell git describe) +endif + LD_FLAGS = -X github.com/tendermint/tendermint/version.TMCoreSemVer=$(VERSION) BUILD_FLAGS = -mod=readonly -ldflags "$(LD_FLAGS)" HTTPS_GIT := https://github.com/tendermint/tendermint.git diff --git a/docs/tendermint-core/running-in-production.md b/docs/tendermint-core/running-in-production.md index 41f40641e..833ad77e5 100644 --- a/docs/tendermint-core/running-in-production.md +++ b/docs/tendermint-core/running-in-production.md @@ -4,6 +4,8 @@ order: 4 # Running in production +If you are building Tendermint from source for use in production, make sure to check out an appropriate Git tag instead of a branch. + ## Database By default, Tendermint uses the `syndtr/goleveldb` package for its in-process @@ -220,8 +222,8 @@ Recovering from data corruption can be hard and time-consuming. Here are two app ./scripts/wal2json/wal2json "$TMHOME/data/cs.wal/wal" > /tmp/corrupted_wal ``` -3) Search for a "CORRUPTED MESSAGE" line. -4) By looking at the previous message and the message after the corrupted one +3) Search for a "CORRUPTED MESSAGE" line. +4) By looking at the previous message and the message after the corrupted one and looking at the logs, try to rebuild the message. If the consequent messages are marked as corrupted too (this may happen if length header got corrupted or some writes did not make it to the WAL ~ truncation), @@ -232,7 +234,7 @@ Recovering from data corruption can be hard and time-consuming. Here are two app $EDITOR /tmp/corrupted_wal ``` -5) After editing, convert this file back into binary form by running: +5) After editing, convert this file back into binary form by running: ```sh ./scripts/json2wal/json2wal /tmp/corrupted_wal $TMHOME/data/cs.wal/wal