solana
solana copied to clipboard
`validator-new.version` does not update when the identity is changed
Problem
After updating the validator identity using solana-validator set-identity
, the validator-new.version
is not sent for the new identity.
Proposed Solution
Send it.
Hi, I would like to give a try for this issue. First, if I understood correctly, I should send the validator-new.version
metric to the be saved in a InfluxDB. Is this correct?
I've tried to do this by placing the following line of code:
solana_metrics::datapoint_info!(
"validator-new",
("version", solana_version::version!(), String),
);
here: https://github.com/solana-labs/solana/blob/e858a5a7c08482a836391067afbc843cf6e6b6d4/validator/src/main.rs#L760
However, when I check the logs, this metric does not seem to appear by searching validator-new
.
The script I did run for testing the change is multinode-demo/bootstrap-validator.sh, and I added the following
line:
$program --ledger "$ledger_dir" set-identity "$identity"
here, inside the loop: https://github.com/solana-labs/solana/blob/6f0133bd432a3b7945c4805d4344bf4522044dab/multinode-demo/bootstrap-validator.sh#L189 I'm not sure if I'm on the right track and if I'm mistaken something in the configuration of the scripts/code.
Hi, thank you for diving into this issue!
I've tried to do this by...
Yes, that's correct, but make sure to check how it's sent in Validator::new(). You can find it by searching for "validator-new" in the entire codebase; it's the only instance.
here:
I think it would be better to place it in the AdminRpc implementation rather than in the CLI wrapper. Just follow the code you've tagged downwards, and you'll find the place where the key pair is updated for gossip. I was thinking that we could put our update there, right after the gossip update.
Feel free to ask me if you need further clarification or assistance!
I think it would be better to place it in the AdminRpc implementation rather than in the CLI wrapper.
Indeed, it makes sense. Putting the datapoint_info! statement inside the AdminRpc implementation now produces the metric:
but make sure to check how it's sent in Validator::new()
Yes, that's what I've done in the first place. I just copied that statement and left only the "version" attribute as requested by the issue. Thank you for the hints!
@diman-io I saw your conversation with @steviez in an attached PR, seems the status or description of the issue should be updated.