Compare commits
No commits in common. "1e1d2bdc8188f2ef43c51705ff969e5c2443da81" and "8d097990a7d60690916362a43257c21a9585c6bc" have entirely different histories.
1e1d2bdc81
...
8d097990a7
4
Cargo.lock
generated
4
Cargo.lock
generated
@ -3684,7 +3684,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ghost-exodus"
|
name = "ghost-exodus"
|
||||||
version = "0.0.11"
|
version = "0.0.10"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chacha20poly1305",
|
"chacha20poly1305",
|
||||||
"frame-benchmarking",
|
"frame-benchmarking",
|
||||||
@ -8553,7 +8553,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "runtime-common"
|
name = "runtime-common"
|
||||||
version = "0.4.9"
|
version = "0.4.8"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"frame-support",
|
"frame-support",
|
||||||
"frame-system",
|
"frame-system",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "ghost-exodus"
|
name = "ghost-exodus"
|
||||||
version = "0.0.11"
|
version = "0.0.10"
|
||||||
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
|
||||||
|
|||||||
@ -2417,7 +2417,6 @@ impl<T: Config> Pallet<T> {
|
|||||||
let mut number_of_leaked_keys = 0;
|
let mut number_of_leaked_keys = 0;
|
||||||
|
|
||||||
let qualified_indexes = dkg_qualification.get_indexes();
|
let qualified_indexes = dkg_qualification.get_indexes();
|
||||||
let total_authorities_len = qualified_indexes.count_ones::<usize>();
|
|
||||||
|
|
||||||
let mut failed_authorities = ParticipantsBitmap::<T>::empty_from(
|
let mut failed_authorities = ParticipantsBitmap::<T>::empty_from(
|
||||||
&qualified_indexes,
|
&qualified_indexes,
|
||||||
@ -2427,17 +2426,17 @@ impl<T: Config> Pallet<T> {
|
|||||||
&qualified_indexes,
|
&qualified_indexes,
|
||||||
);
|
);
|
||||||
|
|
||||||
let mut complaints_matrix = vec![
|
let mut complaints_matrix: BTreeMap<AuthIndex, ParticipantsBitmap<T>> =
|
||||||
ParticipantsBitmap::<T>::empty_from(&qualified_indexes);
|
BTreeMap::new();
|
||||||
total_authorities_len
|
|
||||||
];
|
|
||||||
|
|
||||||
complaints_bitmap.iter().for_each(|(&accuser_index, offenders_bitmap)| {
|
complaints_bitmap.iter().for_each(|(&accuser_index, offenders_bitmap)| {
|
||||||
offenders_bitmap.iter().for_each(|offended_index: AuthIndex| {
|
offenders_bitmap.iter().for_each(|offended_index| {
|
||||||
let idx = offended_index as usize;
|
complaints_matrix
|
||||||
if idx >= complaints_matrix.len() { return; }
|
.entry(offended_index)
|
||||||
|
.or_insert_with(|| {
|
||||||
complaints_matrix[idx].insert(accuser_index);
|
ParticipantsBitmap::<T>::empty_from(&qualified_indexes)
|
||||||
|
})
|
||||||
|
.insert(accuser_index);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -2448,17 +2447,13 @@ impl<T: Config> Pallet<T> {
|
|||||||
number_of_leaked_keys.saturating_inc();
|
number_of_leaked_keys.saturating_inc();
|
||||||
}
|
}
|
||||||
|
|
||||||
let idx = offended_index as usize;
|
if let Some(accusers_bitmap) = complaints_matrix.get(&offended_index) {
|
||||||
if idx >= complaints_matrix.len() { return; }
|
let successful_justifications = accusers_bitmap & recipients_bitmap;
|
||||||
|
let failed_to_justify = successful_justifications != *accusers_bitmap;
|
||||||
|
|
||||||
let accusers_bitmap = &complaints_matrix[idx];
|
if failed_to_justify {
|
||||||
if accusers_bitmap.is_empty() { return; }
|
failed_authorities.insert(offended_index);
|
||||||
|
}
|
||||||
let successful_justifications = accusers_bitmap & recipients_bitmap;
|
|
||||||
let failed_to_justify = successful_justifications != *accusers_bitmap;
|
|
||||||
|
|
||||||
if failed_to_justify {
|
|
||||||
failed_authorities.insert(offended_index);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "runtime-common"
|
name = "runtime-common"
|
||||||
version = "0.4.9"
|
version = "0.4.8"
|
||||||
authors.workspace = true
|
authors.workspace = true
|
||||||
edition.workspace = true
|
edition.workspace = true
|
||||||
homepage.workspace = true
|
homepage.workspace = true
|
||||||
|
|||||||
@ -30,14 +30,14 @@ pub use sp_runtime::BuildStorage;
|
|||||||
|
|
||||||
pub use impls::ToAuthor;
|
pub use impls::ToAuthor;
|
||||||
|
|
||||||
/// We assume that an on-initialize consumes 15% of the weight on average, hence
|
/// We assume that an on-initialize consumes 10% of the weight on average, hence
|
||||||
/// a single extrinsic will not be allowed to consume more than
|
/// a single extrinsic will not be allowed to consume more than
|
||||||
/// `AvailableBlockRatio - 15%`.
|
/// `AvailableBlockRatio - 10%`.
|
||||||
pub const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(15);
|
pub const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10);
|
||||||
|
|
||||||
/// We allow `Normal` extrinsics to fill up the block up to 70%, the rest can
|
/// We allow `Normal` extrinsics to fill up the block up to 75%, the rest can
|
||||||
/// be used by `Operational` extrinsics.
|
/// be used by `Operational` extrinsics.
|
||||||
pub const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(70);
|
pub const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75);
|
||||||
|
|
||||||
/// We allow for 4 seconds of compute with a 12 seconds average block time.
|
/// We allow for 4 seconds of compute with a 12 seconds average block time.
|
||||||
/// The storage proof size is not limited so far.
|
/// The storage proof size is not limited so far.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user