From 38ab73296df3f0a8ed597ec6bddc4a17366847ad Mon Sep 17 00:00:00 2001 From: Pierugo Pace Date: Thu, 20 Aug 2026 09:20:42 +0000 Subject: [PATCH] docs: mention splitting in registry CUPs --- rs/cup_explorer/src/lib.rs | 6 +++--- rs/orchestrator/src/catch_up_package_provider.rs | 2 +- rs/orchestrator/src/registry_helper.rs | 2 +- rs/orchestrator/src/upgrade.rs | 9 +++++---- rs/protobuf/def/registry/subnet/v1/subnet.proto | 3 ++- rs/protobuf/src/gen/registry/registry.subnet.v1.rs | 3 ++- rs/protobuf/src/gen/state/registry.subnet.v1.rs | 3 ++- rs/protobuf/src/gen/types/registry.subnet.v1.rs | 3 ++- rs/registry/helpers/src/subnet.rs | 4 ++-- 9 files changed, 20 insertions(+), 15 deletions(-) diff --git a/rs/cup_explorer/src/lib.rs b/rs/cup_explorer/src/lib.rs index 295e5c133dee..c046063401c2 100644 --- a/rs/cup_explorer/src/lib.rs +++ b/rs/cup_explorer/src/lib.rs @@ -60,9 +60,9 @@ fn get_subnet_id(cup: &CatchUpPackage) -> Result { // If the DKG key material was signed by the subnet itself — use it. match dkg_id.target_subnet { NiDkgTargetSubnet::Local => Ok(dkg_id.dealer_subnet), - // If we hit this case, then the local CUP is a genesis or recovery CUP of an application - // subnet or of the NNS subnet recovered on failover nodes. We cannot derive the subnet id - // from it. + // If we hit this case, then the local CUP is a genesis, recovery or post-split CUP of an + // application subnet or of the NNS subnet recovered on failover nodes. We cannot derive + // the subnet id from it. NiDkgTargetSubnet::Remote(_) => { Err("Registry CUPs cannot be verified with this tool".into()) } diff --git a/rs/orchestrator/src/catch_up_package_provider.rs b/rs/orchestrator/src/catch_up_package_provider.rs index 8cd0b31b034a..874110af3fc3 100644 --- a/rs/orchestrator/src/catch_up_package_provider.rs +++ b/rs/orchestrator/src/catch_up_package_provider.rs @@ -573,7 +573,7 @@ impl CatchUpPackageProvider { // version A creates a local unsigned CUP from the registry contents, persists it, then // detects a new replica version B, upgrades to it and starts the replica on the previously // created CUP. Now since such a case might happen on a new subnet creation or during a - // subnet recover with failover nodes, all nodes before upgrading to B might have been on + // subnet recovery with failover nodes, all nodes before upgrading to B might have been on // different versions and hence might have created different CUPs, which are then consumed // by the same replica version B, which is not guaranteed to be deterministic. // diff --git a/rs/orchestrator/src/registry_helper.rs b/rs/orchestrator/src/registry_helper.rs index b6479feea806..a685887d15d3 100644 --- a/rs/orchestrator/src/registry_helper.rs +++ b/rs/orchestrator/src/registry_helper.rs @@ -157,7 +157,7 @@ impl RegistryHelper { )) } - /// Return the genesis cup at the given registry version for this node + /// Return the genesis/recovery CUP at the given registry version for this node pub(crate) fn get_registry_cup( &self, version: RegistryVersion, diff --git a/rs/orchestrator/src/upgrade.rs b/rs/orchestrator/src/upgrade.rs index f0a0111713b7..7ffb4549e46e 100644 --- a/rs/orchestrator/src/upgrade.rs +++ b/rs/orchestrator/src/upgrade.rs @@ -804,10 +804,11 @@ fn get_subnet_id(registry: &RegistryHelper, cup: &CatchUpPackage) -> Result Ok(dkg_id.dealer_subnet), - // If we hit this case, then the local CUP is a genesis or recovery CUP of an application - // subnet or of the NNS subnet recovered on failover nodes. We cannot derive the subnet id - // from it, so we use the registry version of that CUP and the node id of one of the - // high-threshold committee members, to find out to which subnet this node belongs to. + // If we hit this case, then the local CUP is a genesis, recovery or post-split CUP of an + // application subnet or of the NNS subnet recovered on failover nodes. We cannot derive + // the subnet id from it, so we use the registry version of that CUP and the node id of one + // of the high-threshold committee members, to find out to which subnet this node belongs + // to. NiDkgTargetSubnet::Remote(_) => { let node_id = dkg_summary .current_transcripts() diff --git a/rs/protobuf/def/registry/subnet/v1/subnet.proto b/rs/protobuf/def/registry/subnet/v1/subnet.proto index 89741f58c62d..29239c3e254a 100644 --- a/rs/protobuf/def/registry/subnet/v1/subnet.proto +++ b/rs/protobuf/def/registry/subnet/v1/subnet.proto @@ -147,7 +147,8 @@ message ChainKeyInitialization { // Contains the initial DKG transcripts for the subnet and materials to construct a base CUP (i.e. // a CUP with no dependencies on previous CUPs or blocks). Such CUP materials can be used to -// construct the genesis CUP or a recovery CUP in the event of a subnet stall. +// construct the genesis CUP, a recovery CUP in the event of a subnet stall, or a post-split CUP +// when the subnet is split in two. message CatchUpPackageContents { // Initial non-interactive low-threshold DKG transcript InitialNiDkgTranscriptRecord initial_ni_dkg_transcript_low_threshold = 1; diff --git a/rs/protobuf/src/gen/registry/registry.subnet.v1.rs b/rs/protobuf/src/gen/registry/registry.subnet.v1.rs index b7765731abde..fe5bafd981fb 100644 --- a/rs/protobuf/src/gen/registry/registry.subnet.v1.rs +++ b/rs/protobuf/src/gen/registry/registry.subnet.v1.rs @@ -144,7 +144,8 @@ pub mod chain_key_initialization { } /// Contains the initial DKG transcripts for the subnet and materials to construct a base CUP (i.e. /// a CUP with no dependencies on previous CUPs or blocks). Such CUP materials can be used to -/// construct the genesis CUP or a recovery CUP in the event of a subnet stall. +/// construct the genesis CUP, a recovery CUP in the event of a subnet stall, or a post-split CUP +/// when the subnet is split in two. #[derive(serde::Serialize, serde::Deserialize, Clone, PartialEq, ::prost::Message)] pub struct CatchUpPackageContents { /// Initial non-interactive low-threshold DKG transcript diff --git a/rs/protobuf/src/gen/state/registry.subnet.v1.rs b/rs/protobuf/src/gen/state/registry.subnet.v1.rs index e04fdeb01f64..415eb29e00e8 100644 --- a/rs/protobuf/src/gen/state/registry.subnet.v1.rs +++ b/rs/protobuf/src/gen/state/registry.subnet.v1.rs @@ -144,7 +144,8 @@ pub mod chain_key_initialization { } /// Contains the initial DKG transcripts for the subnet and materials to construct a base CUP (i.e. /// a CUP with no dependencies on previous CUPs or blocks). Such CUP materials can be used to -/// construct the genesis CUP or a recovery CUP in the event of a subnet stall. +/// construct the genesis CUP, a recovery CUP in the event of a subnet stall, or a post-split CUP +/// when the subnet is split in two. #[derive(Clone, PartialEq, ::prost::Message)] pub struct CatchUpPackageContents { /// Initial non-interactive low-threshold DKG transcript diff --git a/rs/protobuf/src/gen/types/registry.subnet.v1.rs b/rs/protobuf/src/gen/types/registry.subnet.v1.rs index e04fdeb01f64..415eb29e00e8 100644 --- a/rs/protobuf/src/gen/types/registry.subnet.v1.rs +++ b/rs/protobuf/src/gen/types/registry.subnet.v1.rs @@ -144,7 +144,8 @@ pub mod chain_key_initialization { } /// Contains the initial DKG transcripts for the subnet and materials to construct a base CUP (i.e. /// a CUP with no dependencies on previous CUPs or blocks). Such CUP materials can be used to -/// construct the genesis CUP or a recovery CUP in the event of a subnet stall. +/// construct the genesis CUP, a recovery CUP in the event of a subnet stall, or a post-split CUP +/// when the subnet is split in two. #[derive(Clone, PartialEq, ::prost::Message)] pub struct CatchUpPackageContents { /// Initial non-interactive low-threshold DKG transcript diff --git a/rs/registry/helpers/src/subnet.rs b/rs/registry/helpers/src/subnet.rs index 5d375b95198f..3e70efdb7cd5 100644 --- a/rs/registry/helpers/src/subnet.rs +++ b/rs/registry/helpers/src/subnet.rs @@ -223,8 +223,8 @@ pub trait SubnetRegistry { version: RegistryVersion, ) -> RegistryClientResult>; - /// Get the necessary material to construct a genesis/recovery CUP for the - /// given subnet + /// Get the necessary material to construct a genesis/recovery/post-split CUP + /// for the given subnet fn get_cup_contents( &self, subnet_id: SubnetId,