Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Advertise node software version in gossip #9981

Merged
merged 2 commits into from
May 11, 2020
Merged

Conversation

mvines
Copy link
Contributor

@mvines mvines commented May 11, 2020

With RPC disabled by default, it's too hard to monitor the software version that all validators are running.
Motivating example: do we need to start panicking because a rolling update is about to enable and less then 2/3+ of the stake has updated?

The first commit will be backported to v1.0/v1.1, the "Remove solana_clap_utils::version! macro" commit is too much churn and will only land on master.

let ip_addr = node.gossip.ip();
Some(format!(
"{:15} {:2}| {:5} | {:44} | {:5}| {:5}| {:5}| {:5}| {:5}| {:5}| {:5}| {:5}| {:5}| {:5}| {}\n",
"{:15} {:2}| {:5} | {:44} |{:^15}| {:5}| {:5}| {:5}| {:5}| {:5}| {:5}| {:5}| {:5}| {:5}| {}\n",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Display node version in solana-gossip spy...

@@ -1313,6 +1330,9 @@ impl ClusterInfo {
let mut last_contact_info_trace = timestamp();
let mut adopt_shred_version = obj.my_shred_version() == 0;
let recycler = PacketsRecycler::default();

let message = CrdsData::Version(Version::new(obj.id()));
obj.push_message(CrdsValue::new_signed(message, &obj.keypair));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Automatically push version when entering gossip

@mvines mvines requested a review from sakridge May 11, 2020 19:50
Copy link
Contributor

@sakridge sakridge left a comment

Choose a reason for hiding this comment

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

lgtm

@codecov
Copy link

codecov bot commented May 11, 2020

Codecov Report

Merging #9981 into master will decrease coverage by 0.1%.
The diff coverage is 82.4%.

@@           Coverage Diff            @@
##           master   #9981     +/-   ##
========================================
- Coverage    80.4%   80.2%   -0.2%     
========================================
  Files         284     285      +1     
  Lines       66235   66299     +64     
========================================
- Hits        53263   53231     -32     
- Misses      12972   13068     +96     

@mvines mvines merged commit 2521f75 into solana-labs:master May 11, 2020
@mvines mvines deleted the ver branch May 11, 2020 22:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants