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

add version command to node #524

Merged
merged 2 commits into from
Dec 12, 2017
Merged

Conversation

oxarbitrage
Copy link
Member

#521

The pull add a version argument to the witness_node executable. Output will be like this:

$ ./programs/witness_node/witness_node --version
Version: 2.0.171025-minor-fix-1-98-gee06ec1
SHA: ee06ec19935a34cb52789245b8d29918f8fbae83
Timestamp: 10 hours ago
$ 

It was made with the utilities already in the core. I didnt added it to the cli_wallet because it haves an about command already displaying the info:

new >>> about
about
{
  "client_version": "2.0.171025-minor-fix-1-98-gee06ec1",
  "graphene_revision": "ee06ec19935a34cb52789245b8d29918f8fbae83",
  "graphene_revision_age": "10 hours ago",
  "fc_revision": "7cd9f1c7a43684c79dd5b4a7cebd23154b902877",
  "fc_revision_age": "27 days ago",
  "compile_date": "compiled on Dec 11 2017 at 16:23:22",
  "boost_version": "1.57",
  "openssl_version": "OpenSSL 1.0.2g  1 Mar 2016",
  "build": "linux 64-bit"
}
new >>> 

open to suggestions.

@abitmore
Copy link
Member

Good job. I'd suggest add it to cli_wallet as well, since cli_wallet won't start if no server is accessible.

@oxarbitrage
Copy link
Member Author

alfredo@alfredo-Inspiron-5559 ~/CLionProjects/issue521/bitshares-core $ ./programs/witness_node/witness_node -v
Version: 2.0.171025-minor-fix-1-99-g282f995
SHA: 282f9955e6f59548d8e9be85828ba2718406cec5
Timestamp: 19 hours ago
alfredo@alfredo-Inspiron-5559 ~/CLionProjects/issue521/bitshares-core $ ./programs/witness_node/witness_node --version
Version: 2.0.171025-minor-fix-1-99-g282f995
SHA: 282f9955e6f59548d8e9be85828ba2718406cec5
Timestamp: 19 hours ago
alfredo@alfredo-Inspiron-5559 ~/CLionProjects/issue521/bitshares-core $ ./programs/cli_wallet/cli_wallet -v
Version: 2.0.171025-minor-fix-1-99-g282f995
SHA: 282f9955e6f59548d8e9be85828ba2718406cec5
Timestamp: 19 hours ago
alfredo@alfredo-Inspiron-5559 ~/CLionProjects/issue521/bitshares-core $ ./programs/cli_wallet/cli_wallet --version
Version: 2.0.171025-minor-fix-1-99-g282f995
SHA: 282f9955e6f59548d8e9be85828ba2718406cec5
Timestamp: 19 hours ago
alfredo@alfredo-Inspiron-5559 ~/CLionProjects/issue521/bitshares-core $

Copy link
Member

@abitmore abitmore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@oxarbitrage oxarbitrage merged commit b6d95fd into bitshares:develop Dec 12, 2017
@Zapata
Copy link
Member

Zapata commented Dec 14, 2017

I think this information is not available in the RPC API, did I miss something?
Do you think it could be added?

@oxarbitrage
Copy link
Member Author

thats interesting. in one side you have that nodes may don't want to show the version they are running, private business may even have modified private versions. in the other that client may want to know what to expect exactly from a node. it could work if we add it as optional to the config file, not sure.

lets see what some others have to say.

@Zapata
Copy link
Member

Zapata commented Dec 14, 2017

I agree it could be an information leak.
I would suggest, as you mentioned, to put it in a dedicated api, that could be optionally restricted.

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

Successfully merging this pull request may close these issues.

3 participants