Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
166 commits
Select commit Hold shift + click to select a range
64e6091
WIP renaming dealings
Sawchord Nov 22, 2024
9ced08c
More renaming
Sawchord Nov 22, 2024
8a5e275
Some more renaming
Sawchord Nov 25, 2024
50b3a97
PB compatibility
Sawchord Nov 25, 2024
04d1bea
Fixes
Sawchord Nov 25, 2024
4f7b28a
Fixes
Sawchord Nov 25, 2024
5b4b664
Rename dkg::DataPayload to dkg::DkgDataPayload
Sawchord Nov 25, 2024
246ca4f
Fix
Sawchord Nov 25, 2024
f815b3e
Remove werid retry logic
Sawchord Nov 25, 2024
e30b8cf
UPdate comment
Sawchord Nov 25, 2024
db6d3c7
Add payload
Sawchord Nov 26, 2024
c3d430d
Deliver remote dkg transcripts from non-summary blocks as well
Sawchord Nov 27, 2024
d888927
Implement get_unused_dkg_dealings
Sawchord Nov 27, 2024
6d746dc
Small optimization
Sawchord Nov 27, 2024
32ba6a7
Merge branch 'master' into leon/dkg_acceleration_part3
Sawchord Nov 27, 2024
7d8edd4
Small refactoring
Sawchord Nov 27, 2024
4e6c8ef
More refactoring
Sawchord Nov 27, 2024
0b553aa
Refactor callback_id acquisition
Sawchord Nov 27, 2024
63fa101
WIP implement create_early_remote_transcripts
Sawchord Nov 27, 2024
26e0a2b
TODO
Sawchord Nov 27, 2024
07608f2
WIP implement PB
Sawchord Nov 28, 2024
4bbcb54
WIP early transcripts
Sawchord Nov 28, 2024
b4fe0ac
Improve payload builder code
Sawchord Nov 28, 2024
68fd82b
Remove some unused code
Sawchord Nov 28, 2024
5f5e8e5
Fix tests
Sawchord Nov 28, 2024
ec24eae
Revert "Small optimization"
Sawchord Nov 29, 2024
bbc49e1
Revert "Small optimization"
Sawchord Dec 2, 2024
bcdafe2
WIP implement validator
Sawchord Dec 2, 2024
d5c127e
Merge branch 'master' into leon/dkg_acceleration_part3
Sawchord Dec 3, 2024
4b08644
Merge branch 'master' into leon/dkg_acceleration_part3
Sawchord Dec 4, 2024
5ff9175
WIP testing
Sawchord Dec 5, 2024
aef6916
WIp implement early remote unit test
Sawchord Dec 5, 2024
9eb8092
WIP implementing test
Sawchord Dec 5, 2024
dde5035
Merge branch 'master' into leon/dkg_acceleration_part3
Sawchord Dec 11, 2024
1e03d03
WIP implement test
Sawchord Dec 11, 2024
7ed6d28
WIP improve test
Sawchord Dec 11, 2024
2fd1845
WIP working with tests
Sawchord Dec 11, 2024
6b857d4
init
eichhorl Jan 15, 2026
aee217a
compiling
eichhorl Jan 15, 2026
3004f2e
clippy
eichhorl Jan 15, 2026
6b501ae
clean
eichhorl Jan 15, 2026
00abdea
comment
eichhorl Jan 15, 2026
7864e1d
fix test
eichhorl Jan 15, 2026
bd97a32
fix
eichhorl Jan 15, 2026
1e126d7
clean
eichhorl Jan 16, 2026
5d1614d
Merge branch 'master' into eichhorl/early-remote-nidkg
eichhorl Jan 16, 2026
ae94556
update
eichhorl Jan 22, 2026
3c8f909
Merge branch 'master' into eichhorl/early-remote-nidkg-2
eichhorl Jan 22, 2026
e96cc22
progress
eichhorl Jan 23, 2026
b13a95e
Merge branch 'eichhorl/early-remote-nidkg-2' of github.com:dfinity/ic…
eichhorl Jan 23, 2026
a461ab6
errors
eichhorl Jan 23, 2026
b5d2d10
clean
eichhorl Jan 26, 2026
325b6b8
fix
eichhorl Jan 26, 2026
e2a4aab
Automatically updated Cargo*.lock
Jan 26, 2026
d250dbe
Automatically fixing code for linting and formatting issues
Jan 26, 2026
7e7dce4
use correct threshold
eichhorl Jan 27, 2026
35e6b00
include height
eichhorl Jan 27, 2026
ca29e9b
types
eichhorl Feb 2, 2026
e538cd0
test
eichhorl Feb 2, 2026
fdcc343
test
eichhorl Feb 2, 2026
f7c05f4
fix
eichhorl Feb 2, 2026
0e6d05e
fix tests
eichhorl Feb 2, 2026
f22f252
merge
eichhorl Feb 2, 2026
0654f21
docs
eichhorl Feb 3, 2026
3fec9d0
add vetkd test case
eichhorl Feb 3, 2026
c0bfd10
merge
eichhorl Feb 17, 2026
85ad8fd
test
eichhorl Feb 26, 2026
917d35c
test
eichhorl Feb 27, 2026
960c67a
target_ids
eichhorl Feb 27, 2026
ed0dce2
include errors
eichhorl Mar 2, 2026
cf2c455
include errors
eichhorl Mar 2, 2026
3b051ff
Revert "include errors"
eichhorl Mar 3, 2026
7a81bf3
assumption
eichhorl Mar 3, 2026
0c410fe
ignore completed test
eichhorl Mar 3, 2026
1294e62
Merge branch 'master' into eichhorl/early-remote-nidkg-2
eichhorl Mar 3, 2026
b688aea
test
eichhorl Mar 3, 2026
63ae5f1
Automatically updated Cargo*.lock
Mar 3, 2026
53e680e
prioritize remote dkg
eichhorl Mar 6, 2026
ea39195
clean up test utils
eichhorl Mar 9, 2026
c50c960
inferred return type
eichhorl Mar 9, 2026
a1e2c0d
build_target_id_callback_map docs
eichhorl Mar 9, 2026
00fb1e0
generalize comment
eichhorl Mar 9, 2026
b402350
remove number_of_contexts
eichhorl Mar 10, 2026
a9a4ad0
check against MAX_EARLY_REMOTE_TRANSCRIPTS early
eichhorl Mar 10, 2026
bfabda4
MAX_EARLY_REMOTE_TRANSCRIPTS test
eichhorl Mar 10, 2026
2697f4e
rename
eichhorl Mar 10, 2026
762f6ac
skip context with insufficient dealings test
eichhorl Mar 10, 2026
df49ee5
ensure retried transcripts are completed by the summary
eichhorl Mar 10, 2026
9bc0679
add log
eichhorl Mar 10, 2026
e8d49e5
Merge branch 'eichhorl/early-remote-nidkg-2' into eichhorl/prioritize…
eichhorl Mar 10, 2026
a66ee46
review
eichhorl Mar 10, 2026
ee78f6b
Merge branch 'eichhorl/early-remote-nidkg-2' into eichhorl/prioritize…
eichhorl Mar 10, 2026
68860fb
create configs early
eichhorl Mar 13, 2026
c5821b9
rename
eichhorl Mar 13, 2026
a149828
rm
eichhorl Mar 13, 2026
a59dd90
test
eichhorl Mar 26, 2026
3de6ab1
update
eichhorl Mar 31, 2026
1c227ad
update
eichhorl Mar 31, 2026
f6f2037
revert
eichhorl Mar 31, 2026
065c9e6
fix
eichhorl Mar 31, 2026
fcf1669
fix
eichhorl Mar 31, 2026
9f8de9d
fix
eichhorl Mar 31, 2026
8652441
Merge branch 'master' into eichhorl/early-remote-nidkg-2
eichhorl Mar 31, 2026
e618dad
Merge branch 'eichhorl/early-remote-nidkg-2' into eichhorl/prioritize…
eichhorl Mar 31, 2026
19ef286
fix
eichhorl Mar 31, 2026
f164c99
merge
eichhorl Mar 31, 2026
a9be68f
impl
eichhorl Apr 1, 2026
a1801b0
impl
eichhorl Apr 2, 2026
9281bd6
merge
eichhorl Apr 2, 2026
4713eb9
reader
eichhorl Apr 2, 2026
8d6fda2
review
eichhorl Apr 13, 2026
189ea78
clippy
eichhorl Apr 13, 2026
d365095
impl
eichhorl Apr 15, 2026
cf0fb8d
fix
eichhorl Apr 15, 2026
08d8d42
rm
eichhorl Apr 15, 2026
8296479
rm
eichhorl Apr 15, 2026
caea9fa
clean
eichhorl Apr 16, 2026
5097da3
fix
eichhorl Apr 16, 2026
3333cb9
fix
eichhorl Apr 16, 2026
306fd9a
merge
eichhorl Apr 16, 2026
899c3dc
fix
eichhorl Apr 16, 2026
2398fb8
merge
eichhorl Apr 16, 2026
11abd3d
fix
eichhorl Apr 16, 2026
ae735f1
merge
eichhorl Apr 16, 2026
d7f9dba
Automatically fixing code for linting and formatting issues
Apr 16, 2026
b40ef4d
fix tests
eichhorl Apr 16, 2026
d2067ea
Merge branch 'eichhorl/rm-summary-remote-dkg' of github.com:dfinity/i…
eichhorl Apr 16, 2026
1c886df
fmt
eichhorl Apr 16, 2026
017c4a5
clippy
eichhorl Apr 16, 2026
98b1d67
clippy
eichhorl Apr 17, 2026
85c11d4
fix
eichhorl Apr 17, 2026
7d09018
increase subnet splitting dkg interval
eichhorl Apr 17, 2026
0b55535
fix
eichhorl Apr 17, 2026
15d51fb
merge
eichhorl Apr 23, 2026
429d301
merge
eichhorl Apr 23, 2026
7074dd4
Revert "Draft: create configs early"
eichhorl Apr 23, 2026
ecd3644
Reapply "Draft: create configs early"
eichhorl Apr 23, 2026
503ae93
merge
eichhorl Apr 23, 2026
05fcb84
merge
eichhorl Apr 28, 2026
5e481ec
clean lib
eichhorl Apr 29, 2026
bbf2dc6
merge
eichhorl Apr 29, 2026
b86ed29
simplify
eichhorl Apr 29, 2026
188a358
merge
eichhorl May 4, 2026
004accc
Merge branch 'master' into eichhorl/early-dkg-configs
eichhorl May 4, 2026
4a471ba
fix
eichhorl May 4, 2026
9df06cc
fix
eichhorl May 4, 2026
aa21bbb
Merge branch 'eichhorl/early-dkg-configs' of github.com:dfinity/ic in…
eichhorl May 4, 2026
46e6b92
fix
eichhorl May 6, 2026
3bbddcf
fix
eichhorl May 7, 2026
b4127e5
fix
eichhorl May 7, 2026
a0ee0f5
fix
eichhorl May 7, 2026
1a47cf1
Merge branch 'master' into eichhorl/early-dkg-configs
eichhorl May 7, 2026
90c61ad
is_local, is_remote
eichhorl May 8, 2026
2836411
matches
eichhorl May 8, 2026
9e29073
extra asserts
eichhorl May 8, 2026
3c136fd
inline
eichhorl May 8, 2026
2c6d626
extend test
eichhorl May 8, 2026
b05ac47
subnet_id
eichhorl May 8, 2026
fb00e94
reference
eichhorl May 8, 2026
feda9aa
(None, None)
eichhorl May 8, 2026
db4284e
panic
eichhorl May 8, 2026
b686033
clippy
eichhorl May 8, 2026
764e285
count errors towards MAX_EARLY_REMOTE_TRANSCRIPTS
eichhorl May 11, 2026
6c57e9b
clarify grouping and ordering
eichhorl May 12, 2026
272d542
slice
eichhorl May 12, 2026
a4e951f
Merge branch 'master' into eichhorl/early-dkg-configs
eichhorl May 12, 2026
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
2 changes: 1 addition & 1 deletion rs/consensus/dkg/src/dkg_key_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ impl DkgKeyManager {
}
};

if id.start_block_height > last_height && id.target_subnet == NiDkgTargetSubnet::Local {
if id.start_block_height > last_height && id.target_subnet.is_local() {
info!(
every_n_seconds => 5,
self.logger,
Expand Down
1,358 changes: 636 additions & 722 deletions rs/consensus/dkg/src/lib.rs

Large diffs are not rendered by default.

995 changes: 263 additions & 732 deletions rs/consensus/dkg/src/payload_builder.rs

Large diffs are not rendered by default.

53 changes: 43 additions & 10 deletions rs/consensus/dkg/src/payload_validator.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use self::payload_builder::create_early_remote_transcripts;
use super::{crypto_validate_dealing, payload_builder, utils};
use crate::remote::{build_callback_id_config_map, merge_configs};
use ic_consensus_utils::{crypto::ConsensusCrypto, pool_reader::PoolReader};
use ic_interfaces::{
dkg::{DkgPayloadValidationError, DkgPool},
Expand All @@ -15,7 +15,10 @@ use ic_types::{
batch::ValidationContext,
consensus::{
Block, BlockPayload,
dkg::{DkgDataPayload, DkgPayloadValidationFailure, DkgSummary, InvalidDkgPayloadReason},
dkg::{
DkgDataPayload, DkgPayloadCreationError, DkgPayloadValidationFailure, DkgSummary,
InvalidDkgPayloadReason,
},
},
};
use prometheus::IntCounterVec;
Expand Down Expand Up @@ -117,6 +120,8 @@ pub fn validate_payload(
});

validate_dealings_payload(
subnet_id,
registry_client,
crypto,
pool_reader,
dkg_pool,
Expand All @@ -134,8 +139,11 @@ pub fn validate_payload(
}

// Validates the payload containing dealings.
#[allow(clippy::too_many_arguments)]
#[allow(clippy::result_large_err)]
fn validate_dealings_payload(
subnet_id: SubnetId,
registry_client: &dyn RegistryClient,
crypto: &dyn ConsensusCrypto,
pool_reader: &PoolReader<'_>,
dkg_pool: &dyn DkgPool,
Expand Down Expand Up @@ -181,6 +189,20 @@ fn validate_dealings_payload(
return Err(InvalidDkgPayloadReason::DealerAlreadyDealt(dealer_id).into());
}

let state = state_reader
.get_state_at(validation_context.certified_height)
.map_err(DkgPayloadCreationError::StateManagerError)?;

let remote_config_results = build_callback_id_config_map(
subnet_id,
registry_client,
state.get_ref(),
validation_context.registry_version,
last_summary,
log,
)?;
let configs = merge_configs(&last_summary.configs, &remote_config_results);

// Check that all messages have a valid DKG config from the summary and the
// dealer is valid, then verify each dealing.
for message in &dealings.messages {
Expand All @@ -192,7 +214,7 @@ fn validate_dealings_payload(
continue;
}

let Some(config) = last_summary.configs.get(&message.content.dkg_id) else {
let Some(config) = configs.get(&message.content.dkg_id) else {
return Err(InvalidDkgPayloadReason::MissingDkgConfigForDealing.into());
};

Expand All @@ -202,14 +224,12 @@ fn validate_dealings_payload(

// If we have early transcripts, we compare them
if !dealings.transcripts_for_remote_subnets.is_empty() {
let expected_transcripts = create_early_remote_transcripts(
let expected_transcripts = payload_builder::create_early_remote_transcripts(
pool_reader,
crypto,
parent,
last_summary,
state_reader,
validation_context,
log.clone(),
remote_config_results,
log,
)?;

if dealings.transcripts_for_remote_subnets != expected_transcripts {
Expand Down Expand Up @@ -246,11 +266,13 @@ mod tests {
dkg::ChangeAction,
p2p::consensus::{MutablePool, PoolMutationsProducer},
};
use ic_interfaces_state_manager::Labeled;
use ic_logger::no_op_logger;
use ic_metrics::MetricsRegistry;
use ic_registry_keys::make_subnet_record_key;
use ic_test_utilities_consensus::fake::FakeContentSigner;
use ic_test_utilities_registry::SubnetRecordBuilder;
use ic_test_utilities_state::get_initial_state;
use ic_test_utilities_types::ids::{
NODE_1, NODE_2, NODE_3, SUBNET_1, SUBNET_2, node_test_id, subnet_test_id,
};
Expand Down Expand Up @@ -707,6 +729,13 @@ mod tests {
.build(),
)],
);
state_manager
.get_mut()
.expect_get_latest_certified_state()
.return_const(Some(Labeled::new(
Height::new(0),
Arc::new(get_initial_state(0, 0)),
)));

// Both summary registry versions should be 1 initially
let summary_block = pool.as_cache().summary_block();
Expand Down Expand Up @@ -758,6 +787,9 @@ mod tests {
let key_manager = Arc::new(Mutex::new(key_manager));
let dkg_impl = DkgImpl::new(
node_id,
subnet_id,
registry.clone(),
state_manager.clone(),
crypto.clone(),
pool.get_cache(),
key_manager,
Expand All @@ -778,11 +810,12 @@ mod tests {
};

// It should be possible to validate the dealing
let configs = dkg_summary.configs.iter().collect();
let result = dkg_impl.validate_dealings_for_dealer(
&dkg_pool,
&dkg_summary.configs,
&configs,
start_height,
vec![dealing],
&[dealing],
);
let first = result.first().unwrap();
let ChangeAction::MoveToValidated(dealing_validated) = first else {
Expand Down
1 change: 0 additions & 1 deletion rs/consensus/dkg/src/remote.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,6 @@ mod tests {
vec![],
current_transcripts,
next_transcripts,
vec![],
RegistryVersion::from(1),
Height::from(10),
Height::from(10),
Expand Down
36 changes: 5 additions & 31 deletions rs/consensus/dkg/src/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,17 @@ pub(super) fn complement_state_manager_with_dkg_contexts(
.subnet_call_context_manager
.push_context(context);
}
let state = Arc::new(state);
let mut mock = state_manager.get_mut();
let expectation = mock
.expect_get_state_at()
.return_const(Ok(Labeled::new(Height::new(0), Arc::new(state))));
.return_const(Ok(Labeled::new(Height::new(0), state.clone())));
if let Some(times) = times {
expectation.times(times);
}

mock.expect_get_latest_certified_state()
.return_const(Some(Labeled::new(Height::new(0), state.clone())));
}

pub(super) fn complement_state_manager_with_setup_initial_dkg_request(
Expand All @@ -96,23 +100,6 @@ pub(super) fn complement_state_manager_with_setup_initial_dkg_request(
complement_state_manager_with_dkg_contexts(state_manager, contexts, times);
}

pub(super) fn complement_state_manager_with_reshare_chain_key_request(
state_manager: Arc<RefMockStateManager>,
registry_version: RegistryVersion,
key_id: VetKdKeyId,
node_ids: Vec<u64>,
times: Option<usize>,
target: Option<NiDkgTargetId>,
) {
let contexts = target
.into_iter()
.map(|t| {
make_reshare_chain_key_context(registry_version, key_id.clone(), node_ids.clone(), t)
})
.collect();
complement_state_manager_with_dkg_contexts(state_manager, contexts, times);
}

/// Extract the remote dkg transcripts from the current highest validated block
pub(super) fn extract_remote_dkgs_from_highest_block(
pool: &TestConsensusPool,
Expand Down Expand Up @@ -147,19 +134,6 @@ pub(super) fn extract_dealings_from_highest_block(pool: &TestConsensusPool) -> D
}
}

/// Extract the remote dkg IDs from the current highest validated block
pub(super) fn extract_remote_dkg_ids_from_highest_block(
pool: &TestConsensusPool,
target_id: NiDkgTargetId,
) -> Vec<NiDkgId> {
extract_dkg_configs_from_highest_block(pool)
.iter()
.filter(|(id, _)| id.target_subnet == NiDkgTargetSubnet::Remote(target_id))
.map(|(id, _)| id)
.cloned()
.collect()
}

/// Extract the DKG configs from the current highest validated block
pub(super) fn extract_dkg_configs_from_highest_block(
pool: &TestConsensusPool,
Expand Down
1 change: 0 additions & 1 deletion rs/consensus/idkg/src/payload_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,6 @@ mod tests {
vec![],
BTreeMap::new(),
BTreeMap::new(),
Vec::new(),
RegistryVersion::from(0),
Height::from(100),
Height::from(100),
Expand Down
33 changes: 32 additions & 1 deletion rs/consensus/src/consensus/batch_delivery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,16 @@ fn generate_dkg_response_payload(
(Some(Err(err_str)), _) | (_, Some(Err(err_str))) => Some(Payload::Reject(
RejectContext::new(RejectCode::CanisterReject, err_str),
)),
_ => None,
(Some(Ok(transcript)), None) | (None, Some(Ok(transcript))) => {
Some(Payload::Reject(RejectContext::new(
RejectCode::CanisterReject,
format!(
"Data payload contains only the {:?} transcript for SetupInitialDKG request",
transcript.dkg_id.dkg_tag
),
)))
}
(None, None) => None,
}
}

Expand Down Expand Up @@ -639,6 +648,28 @@ mod tests {
};
}

#[test]
fn test_generate_setup_initial_dkg_response_rejects_if_only_one_transcript_present() {
let transcripts_for_remote_subnets = [(
ni_dkg_id(NiDkgTag::LowThreshold),
CallbackId::from(1),
Ok(dummy_transcript_for_tests()),
)];

let result =
generate_responses_to_remote_dkgs(&transcripts_for_remote_subnets[..], &no_op_logger());
assert_eq!(result.len(), 1);

let Payload::Reject(reject) = &result[0].payload else {
panic!("Expected reject payload when only one SetupInitialDKG transcript exists");
};
assert_eq!(reject.code(), RejectCode::CanisterReject);
assert_eq!(
reject.message(),
"Data payload contains only the LowThreshold transcript for SetupInitialDKG request"
);
}

#[test]
fn test_generate_responses_for_early_remote_dkg_transcripts() {
let key_id: NiDkgMasterPublicKeyId = NiDkgMasterPublicKeyId::VetKd(VetKdKeyId {
Expand Down
3 changes: 3 additions & 0 deletions rs/consensus/tests/framework/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,9 @@ impl<'a> ConsensusRunner<'a> {
);
let dkg = ic_consensus_dkg::DkgImpl::new(
deps.replica_config.node_id,
deps.replica_config.subnet_id,
Arc::clone(&deps.registry_client),
deps.state_manager.clone(),
Arc::clone(&consensus_crypto),
deps.consensus_pool.read().unwrap().get_cache(),
dkg_key_manager,
Expand Down
9 changes: 9 additions & 0 deletions rs/consensus/tests/payload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ fn consensus_produces_expected_batches() {
Height::new(0),
Arc::new(get_initial_state(0, 0)),
)));
state_manager
.expect_get_latest_certified_state()
.return_const(Some(Labeled::new(
Height::new(0),
Arc::new(get_initial_state(0, 0)),
)));
state_manager
.expect_get_certified_state_snapshot()
.returning(|| None);
Expand Down Expand Up @@ -182,6 +188,9 @@ fn consensus_produces_expected_batches() {
ic_consensus::consensus::ConsensusBouncer::new(&metrics_registry, router.clone());
let dkg = ic_consensus_dkg::DkgImpl::new(
replica_config.node_id,
replica_config.subnet_id,
Arc::clone(&registry_client) as Arc<_>,
Arc::clone(&state_manager) as Arc<_>,
Arc::clone(&fake_crypto) as Arc<_>,
Arc::clone(&consensus_cache),
dkg_key_manager,
Expand Down
3 changes: 3 additions & 0 deletions rs/replica/setup_ic_network/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,9 @@ fn start_consensus(
abortable_broadcast_channels.dkg,
ic_consensus_dkg::DkgImpl::new(
node_id,
subnet_id,
Arc::clone(&registry_client),
Arc::clone(&state_manager) as Arc<_>,
Arc::clone(&consensus_crypto),
Arc::clone(&consensus_pool_cache),
dkg_key_manager,
Expand Down
1 change: 0 additions & 1 deletion rs/test_utilities/consensus/src/fake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ impl Fake for DkgSummary {
/*current_transcripts=*/
empty_ni_dkg_transcripts_with_committee(registry_version),
/*next_transcripts=*/ BTreeMap::default(),
/*transcript_for_new_subnets=*/ Vec::default(),
RegistryVersion::from(registry_version),
/*interval_length=*/ Height::new(59),
/*next_interval_length=*/ Height::new(59),
Expand Down
2 changes: 1 addition & 1 deletion rs/tests/consensus/subnet_splitting_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ use candid::Principal;
use slog::{Logger, info};
use std::{thread, time::Duration};

const DKG_INTERVAL: u64 = 9;
const DKG_INTERVAL: u64 = 29;
Comment thread
pierugo-dfinity marked this conversation as resolved.
const APP_NODES: usize = 1;

const MESSAGE_IN_THE_CANISTER_TO_BE_MIGRATED: &str =
Expand Down
3 changes: 1 addition & 2 deletions rs/tests/consensus/subnet_splitting_v2_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ use ic_system_test_driver::{
},
util::runtime_from_url,
};
use ic_types::crypto::threshold_sig::ni_dkg::NiDkgTargetSubnet;
use ic_types::{CanisterId, Height, NodeId, PrincipalId, RegistryVersion, SubnetId};
use registry_canister::mutations::do_split_subnet::SplitSubnetPayload;
use slog::info;
Expand Down Expand Up @@ -837,7 +836,7 @@ async fn wait_for_cup_with_subnet_id(
)
}
Ok(cup)
if cup.signature.signer.target_subnet == NiDkgTargetSubnet::Local
if cup.signature.signer.target_subnet.is_local()
&& cup.signature.signer.dealer_subnet == subnet_id =>
{
Ok(())
Expand Down
4 changes: 1 addition & 3 deletions rs/types/types/src/consensus/dkg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,12 +186,10 @@ pub struct DkgSummary {

impl DkgSummary {
/// Create a new Summary
#[allow(clippy::too_many_arguments)]
pub fn new(
configs: Vec<NiDkgConfig>,
current_transcripts: BTreeMap<NiDkgTag, NiDkgTranscript>,
next_transcripts: BTreeMap<NiDkgTag, NiDkgTranscript>,
transcripts_for_remote_subnets: Vec<(NiDkgId, CallbackId, Result<NiDkgTranscript, String>)>,
registry_version: RegistryVersion,
interval_length: Height,
next_interval_length: Height,
Expand All @@ -205,7 +203,7 @@ impl DkgSummary {
.collect(),
current_transcripts,
next_transcripts,
transcripts_for_remote_subnets,
transcripts_for_remote_subnets: vec![],
Comment thread
pierugo-dfinity marked this conversation as resolved.
registry_version,
interval_length,
next_interval_length,
Expand Down
Loading
Loading