Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression rc2 -> rc3: simapp is missing the Tendermint version in RPC API #7963

Closed
webmaster128 opened this issue Nov 17, 2020 · 7 comments · Fixed by #8689
Closed

Regression rc2 -> rc3: simapp is missing the Tendermint version in RPC API #7963

webmaster128 opened this issue Nov 17, 2020 · 7 comments · Fixed by #8689
Labels

Comments

@webmaster128
Copy link
Member

After migrating from simapp v0.40.0-rc2 to v0.40.0-rc3, the Tendermint version field is empty.

interchainio/simapp:v0.40.0-rc2:

curl -sS http://localhost:26657/status | jq .result.node_info.version
"0.34.0"

interchainio/simapp:v0.40.0-rc3:

$ curl -sS http://localhost:26657/status | jq .result.node_info.version
""

When doing the same against a tendermint/tendermint:v0.34.0-rc6 backend, we at least get the commit hash:

curl -sS http://localhost:11134/status | jq .result.node_info.version
"ca2c9df"

Tendermint images returned a version number up to approximately v0.34.0-rc5. I don't know why and how this change to a commit hash. This is not convenient to work with from a client, but at least we can work around this by mapping commit hashes to versions.

@tac0turtle
Copy link
Member

tendermint migrated to getting the version from git describe at build time. I believe this will need to be added to the sdk as well:

VERSION := $(shell git describe --always)
LD_FLAGS = -X github.com/tendermint/tendermint/version.TMCoreSemVer=$(VERSION)

@webmaster128
Copy link
Member Author

@marbar3778 Thanks for looking into this.

But woudn't VERSION := $(shell git describe --always) in this repo assign a Cosmos SDK version, not the Tendermint version?

@tac0turtle
Copy link
Member

oh sorry I just copied from the Tendermint makefile. The app can set a string there as well.

@webmaster128
Copy link
Member Author

The calling app should set the version string for a dependency? How can this be maintainable? Shouldn't the dependendency expose this information?

@tac0turtle
Copy link
Member

VERSION := $(shell go list -m github.com/tendermint/tendermint | sed  's/ /\@/g')
LD_FLAGS = -X github.com/tendermint/tendermint/version.TMCoreSemVer=$(VERSION)

This is one way but agree it's a bit cumbersome.

@webmaster128
Copy link
Member Author

I see. Every other project depending on Tendermint has this problem then.

I assume the original motivation was to move the version out of the Tendermint source code into a meta space, right? Typical problem of libs. No idea how to best achieve this in Go.

@tac0turtle
Copy link
Member

This has been added to gaia. Documentation on doing is located here https://docs.tendermint.com/master/tendermint-core/rpc.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants