Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
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 rs/cup_explorer/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ fn get_subnet_id(cup: &CatchUpPackage) -> Result<SubnetId, String> {
// 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())
}
Expand Down
2 changes: 1 addition & 1 deletion rs/orchestrator/src/catch_up_package_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
//
Expand Down
2 changes: 1 addition & 1 deletion rs/orchestrator/src/registry_helper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
9 changes: 5 additions & 4 deletions rs/orchestrator/src/upgrade.rs
Original file line number Diff line number Diff line change
Expand Up @@ -804,10 +804,11 @@ fn get_subnet_id(registry: &RegistryHelper, cup: &CatchUpPackage) -> Result<Subn
// the subnet id from the registry.
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, 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()
Expand Down
3 changes: 2 additions & 1 deletion rs/protobuf/def/registry/subnet/v1/subnet.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion rs/protobuf/src/gen/registry/registry.subnet.v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion rs/protobuf/src/gen/state/registry.subnet.v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion rs/protobuf/src/gen/types/registry.subnet.v1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions rs/registry/helpers/src/subnet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ pub trait SubnetRegistry {
version: RegistryVersion,
) -> RegistryClientResult<Vec<(SubnetId, SubnetRecord)>>;

/// 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,
Expand Down
Loading