feat: added client-id information on getClusterNodes #47
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
We need the Client-ID to use on validators.app
Summary of Changes
I made a simple modification where I'm using the Debug version output of Version, because it exposes the Client ID;
I didn't wanted to add a new parameter to the client-id because it would change the API for the getClusterNodes, so what you will receive now instead of the version is:
2.2.15 (src:00000000; feat:798020478, client:Agave)
instead of
2.2.15
It's easy to parse this, if you want to get the version just split based on the "(" and get the first part, then to get the version do the same but for "client:" and get second part.
here's what you going to see (I prettified the json, just to make easy to visualize.)
RESPONSE:
{ "jsonrpc": "2.0", "result": [ { "featureSet": 798020478, "gossip": "127.0.0.1:1024", "pubkey": "CEucL8UAsFZur9Ce57F7jM5hr7RVMY1KYwgbL5nQrbFE", "pubsub": "127.0.0.1:8900", "rpc": "127.0.0.1:8899", "serveRepair": "127.0.0.1:1036", "shredVersion": 46683, "tpu": "127.0.0.1:1027", "tpuForwards": "127.0.0.1:1028", "tpuForwardsQuic": "127.0.0.1:1034", "tpuQuic": "127.0.0.1:1033", "tpuVote": "127.0.0.1:1029", "tvu": "127.0.0.1:1025", "version": "2.2.15 (src:00000000; feat:798020478, client:Agave)" } ], "id": 1 }