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

feat: Add missing NodeOperator node feature and update offboarding for sygnum zh5 #1166

Merged
merged 2 commits into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cordoned_features.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ features:
- feature: data_center
value: ty2
explanation: "offboarding TY2 DC after 48 months; https://forum.dfinity.org/t/proposal-update-interim-gen-1-node-provider-remuneration-after-48-months/35001/32 and https://forum.dfinity.org/t/proposal-update-interim-gen-1-node-provider-remuneration-after-48-months/35001/42"
- feature: data_center
value: zh5
explanation: "offboarding ZH5 DC after 48 months; https://forum.dfinity.org/t/proposal-update-interim-gen-1-node-provider-remuneration-after-48-months/35001/27"
- feature: node_operator
value: 4ohfd-bdyeu-5djlz-rf3lc-bqca2-h22rg-t5ipt-cjhl2-r5dbf-tk3fv-hae
explanation: "offboarding Sygnum ZH5 DC after 48 months; https://forum.dfinity.org/t/proposal-update-interim-gen-1-node-provider-remuneration-after-48-months/35001/27"
- feature: data_center
value: ch2
explanation: "offboarding CH2 DC after 48 months; https://forum.dfinity.org/t/proposal-update-interim-gen-1-node-provider-remuneration-after-48-months/35001/40"
Expand Down
2 changes: 2 additions & 0 deletions rs/cli/src/cordoned_feature_fetcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,8 @@ features:
value: mu1
- feature: node_provider
value: some-np
- feature: node_operator
value: some-node-operator
- feature: data_center_owner
value: some-dco
- feature: area
Expand Down
6 changes: 4 additions & 2 deletions rs/decentralization/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,18 @@ impl SubnetChangeResponse {
change.old_nodes.iter().fold(
NodeFeature::variants()
.into_iter()
.filter(|f| f != &NodeFeature::NodeOperator)
.map(|f| (f, FeatureDiff::new()))
.collect::<IndexMap<NodeFeature, FeatureDiff>>(),
|mut acc, n| {
for f in NodeFeature::variants() {
for f in NodeFeature::variants().into_iter().filter(|f| f != &NodeFeature::NodeOperator) {
acc.get_mut(&f).unwrap().entry(n.get_feature(&f).unwrap_or_default()).or_insert((0, 0)).0 += 1;
}
acc
},
),
|mut acc, n| {
for f in NodeFeature::variants() {
for f in NodeFeature::variants().into_iter().filter(|f| f != &NodeFeature::NodeOperator) {
acc.get_mut(&f).unwrap().entry(n.get_feature(&f).unwrap_or_default()).or_insert((0, 0)).1 += 1;
}
acc
Expand Down Expand Up @@ -96,6 +97,7 @@ impl Display for SubnetChangeResponse {
.scores_individual()
.keys()
.sorted()
.filter(|f| *f != &NodeFeature::NodeOperator)
.map(|k| {
let before = before_individual.get(k).unwrap();
let after = after_individual.get(k).unwrap();
Expand Down
1 change: 1 addition & 0 deletions rs/ic-management-types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,7 @@ impl Eq for Node {}
#[serde(rename_all = "snake_case")]
pub enum NodeFeature {
NodeProvider,
NodeOperator,
DataCenter,
DataCenterOwner,
Area, // Represents smaller geographic entities like cities and states
Expand Down
Loading