Uncle Stretch 2026-10-09 19:34:10 +03:00
parent 74d74f4037
commit d488bf9a43
Signed by: str3tch
GPG Key ID: 84F3190747EE79AA
2 changed files with 6 additions and 3 deletions

View File

@ -1,6 +1,6 @@
[package] [package]
name = "ghost-exodus" name = "ghost-exodus"
version = "0.0.23" version = "0.0.24"
description = "Threshold signature generation with DKG included" description = "Threshold signature generation with DKG included"
license.workspace = true license.workspace = true
authors.workspace = true authors.workspace = true

View File

@ -1894,7 +1894,7 @@ pub mod pallet {
DkgPhase::Round2 => DkgRemovalResult::new(|| Self::prepare_round3_storage(network_curve, &mut dkg_qualification, maybe_cursor)), DkgPhase::Round2 => DkgRemovalResult::new(|| Self::prepare_round3_storage(network_curve, &mut dkg_qualification, maybe_cursor)),
DkgPhase::Round3 => DkgRemovalResult::new(|| Self::prepare_round4_storage(network_curve, min_threshold, &mut dkg_qualification, maybe_cursor)), DkgPhase::Round3 => DkgRemovalResult::new(|| Self::prepare_round4_storage(network_curve, min_threshold, &mut dkg_qualification, maybe_cursor)),
DkgPhase::Round4 => DkgRemovalResult::new(|| Self::prepare_round5_storage(network_curve, min_threshold, &mut dkg_qualification, maybe_cursor)), DkgPhase::Round4 => DkgRemovalResult::new(|| Self::prepare_round5_storage(network_curve, min_threshold, &mut dkg_qualification, maybe_cursor)),
DkgPhase::Round5 => DkgRemovalResult::new(|| Self::prepare_round6_storage(network_curve, &mut dkg_qualification, maybe_cursor)), DkgPhase::Round5 => DkgRemovalResult::new(|| Self::prepare_round6_storage(network_curve, min_threshold, &mut dkg_qualification, maybe_cursor)),
DkgPhase::Round6 => DkgRemovalResult::new(|| Self::prepare_round7_storage(network_curve, min_threshold, &mut dkg_qualification, maybe_cursor)), DkgPhase::Round6 => DkgRemovalResult::new(|| Self::prepare_round7_storage(network_curve, min_threshold, &mut dkg_qualification, maybe_cursor)),
DkgPhase::Round7 => DkgRemovalResult::new(|| Self::prepare_finalization_storage(network_curve, &mut dkg_qualification, maybe_cursor)), DkgPhase::Round7 => DkgRemovalResult::new(|| Self::prepare_finalization_storage(network_curve, &mut dkg_qualification, maybe_cursor)),
DkgPhase::Finalized => return weight, DkgPhase::Finalized => return weight,
@ -2485,6 +2485,7 @@ impl<T: Config> Pallet<T> {
fn prepare_round6_storage( fn prepare_round6_storage(
network_curve: NetworkCurve, network_curve: NetworkCurve,
min_threshold: AuthIndex,
dkg_qualification: &mut QualifyingState<T>, dkg_qualification: &mut QualifyingState<T>,
maybe_cursor: Option<BoundedVec<u8, T::MaxCursorLen>>, maybe_cursor: Option<BoundedVec<u8, T::MaxCursorLen>>,
) -> (Weight, bool) { ) -> (Weight, bool) {
@ -2514,7 +2515,9 @@ impl<T: Config> Pallet<T> {
weight.saturating_accrue(T::DbWeight::get().reads(1)); weight.saturating_accrue(T::DbWeight::get().reads(1));
let state = VerifyingKeyConsensus::<T>::get(&network_curve, &dkg_index); let state = VerifyingKeyConsensus::<T>::get(&network_curve, &dkg_index);
dkg_qualification.intersect_indexes(&state.participants); if state.participants.count_ones::<AuthIndex>() < min_threshold {
dkg_qualification.nullify_indexes();
}
}) })
} }