diff --git a/CHANGELOG_PENDING.md b/CHANGELOG_PENDING.md index 7d699e63a..3c1aa8213 100644 --- a/CHANGELOG_PENDING.md +++ b/CHANGELOG_PENDING.md @@ -25,6 +25,8 @@ Friendly reminder: We have a [bug bounty program](https://hackerone.com/tendermi - [ABCI] \#5447 Remove `SetOption` method from `ABCI.Client` interface - [ABCI] \#5447 Reset `Oneof` indexes for `Request` and `Response`. - [ABCI] \#5818 Use protoio for msg length delimitation. Migrates from int64 to uint64 length delimiters. + - [Version] \#6494 `TMCoreSemVer` has been renamed to `TMVersion`. + - It is not required any longer to set ldflags to set version strings - P2P Protocol diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b7223d5f3..a8bc8aa8f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -245,6 +245,7 @@ If there were no release candidates, and you'd like to cut a major release direc all PRs - Ensure that UPGRADING.md is up-to-date and includes notes on any breaking changes or other upgrading flows. + - Bump TMVersionDefault version in `version.go` - Bump P2P and block protocol versions in `version.go`, if necessary - Bump ABCI protocol version in `version.go`, if necessary - Add any release notes you would like to be added to the body of the release to `release_notes.md`. @@ -272,6 +273,7 @@ If there were no release candidates, and you'd like to cut a major release direc release, and add the github aliases of external contributors to the top of the changelog. To lookup an alias from an email, try `bash ./scripts/authors.sh ` - Reset the `CHANGELOG_PENDING.md` + - Bump TMVersionDefault version in `version.go` - Bump P2P and block protocol versions in `version.go`, if necessary - Bump ABCI protocol version in `version.go`, if necessary - Make sure all significant breaking changes are covered in `UPGRADING.md` diff --git a/Makefile b/Makefile index 66d11dd6a..be5972397 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ else VERSION := $(shell git describe) endif -LD_FLAGS = -X github.com/tendermint/tendermint/version.TMCoreSemVer=$(VERSION) +LD_FLAGS = -X github.com/tendermint/tendermint/version.TMVersion=$(VERSION) BUILD_FLAGS = -mod=readonly -ldflags "$(LD_FLAGS)" HTTPS_GIT := https://github.com/tendermint/tendermint.git DOCKER_BUF := docker run -v $(shell pwd):/workspace --workdir /workspace bufbuild/buf diff --git a/cmd/tendermint/commands/version.go b/cmd/tendermint/commands/version.go index d1a7fba58..c23fd74c3 100644 --- a/cmd/tendermint/commands/version.go +++ b/cmd/tendermint/commands/version.go @@ -13,6 +13,6 @@ var VersionCmd = &cobra.Command{ Use: "version", Short: "Show version info", Run: func(cmd *cobra.Command, args []string) { - fmt.Println(version.TMCoreSemVer) + fmt.Println(version.TMVersion) }, } diff --git a/node/setup.go b/node/setup.go index 45ca5e01e..0d21b9171 100644 --- a/node/setup.go +++ b/node/setup.go @@ -152,7 +152,7 @@ func doHandshake( func logNodeStartupInfo(state sm.State, pubKey crypto.PubKey, logger, consensusLogger log.Logger, mode string) { // Log the version info. logger.Info("Version info", - "software", version.TMCoreSemVer, + "tmVersion", version.TMVersion, "block", version.BlockProtocol, "p2p", version.P2PProtocol, "mode", mode, @@ -704,7 +704,7 @@ func makeNodeInfo( ), NodeID: nodeKey.ID, Network: genDoc.ChainID, - Version: version.TMCoreSemVer, + Version: version.TMVersion, Channels: []byte{ bcChannel, byte(cs.StateChannel), @@ -753,7 +753,7 @@ func makeSeedNodeInfo( ), NodeID: nodeKey.ID, Network: genDoc.ChainID, - Version: version.TMCoreSemVer, + Version: version.TMVersion, Channels: []byte{}, Moniker: config.Moniker, Other: p2p.NodeInfoOther{ diff --git a/proxy/version.go b/proxy/version.go index 110757028..6d70c3a72 100644 --- a/proxy/version.go +++ b/proxy/version.go @@ -9,7 +9,7 @@ import ( // the abci.RequestInfo message during handshake with the app. // It contains only compile-time version information. var RequestInfo = abci.RequestInfo{ - Version: version.TMCoreSemVer, + Version: version.TMVersion, BlockVersion: version.BlockProtocol, P2PVersion: version.P2PProtocol, AbciVersion: version.ABCIVersion, diff --git a/state/state.go b/state/state.go index 9f5f02c7a..d5362fc40 100644 --- a/state/state.go +++ b/state/state.go @@ -32,7 +32,7 @@ var InitStateVersion = Version{ Block: version.BlockProtocol, App: 0, }, - Software: version.TMCoreSemVer, + Software: version.TMVersion, } func (v *Version) ToProto() tmstate.Version { diff --git a/statesync/syncer_test.go b/statesync/syncer_test.go index ad8100123..42f4156f3 100644 --- a/statesync/syncer_test.go +++ b/statesync/syncer_test.go @@ -33,7 +33,7 @@ func TestSyncer_SyncAny(t *testing.T) { Block: version.BlockProtocol, App: 0, }, - Software: version.TMCoreSemVer, + Software: version.TMVersion, }, LastBlockHeight: 1, diff --git a/tools/tm-signer-harness/main.go b/tools/tm-signer-harness/main.go index 65cba32ed..af730666c 100644 --- a/tools/tm-signer-harness/main.go +++ b/tools/tm-signer-harness/main.go @@ -185,7 +185,7 @@ func main() { } extractKey(flagTMHome, flagKeyOutputPath) case "version": - fmt.Println(version.TMCoreSemVer) + fmt.Println(version.TMVersion) default: fmt.Printf("Unrecognized command: %s\n", flag.Arg(0)) os.Exit(1) diff --git a/version/version.go b/version/version.go index 74c6df2c1..9774de653 100644 --- a/version/version.go +++ b/version/version.go @@ -3,12 +3,14 @@ package version import tmversion "github.com/tendermint/tendermint/proto/tendermint/version" var ( - // TMCoreSemVer is the current version of Tendermint Core. - // It's the Semantic Version of the software. - TMCoreSemVer string + TMVersion = TMVersionDefault ) const ( + + // TMVersionDefault is the used as the fallback version of Tendermint Core + // when not using git describe. It is formatted with semantic versioning. + TMVersionDefault = "0.34.10" // ABCISemVer is the semantic version of the ABCI library ABCISemVer = "0.17.0"