|
@@ -1,4 +1,4 @@
|
|
|
-use crate::{get_required_stake_by_fraction, BalanceOf, Module, ProposalParameters};
|
|
|
+use crate::{BalanceOf, Module, ProposalParameters};
|
|
|
|
|
|
// Proposal parameters for the 'Set validator count' proposal
|
|
|
pub(crate) fn set_validator_count_proposal<T: crate::Trait>(
|
|
@@ -10,7 +10,7 @@ pub(crate) fn set_validator_count_proposal<T: crate::Trait>(
|
|
|
approval_threshold_percentage: 80,
|
|
|
slashing_quorum_percentage: 60,
|
|
|
slashing_threshold_percentage: 80,
|
|
|
- required_stake: Some(get_required_stake_by_fraction::<T>(25, 10000)),
|
|
|
+ required_stake: Some(<BalanceOf<T>>::from(100_000_u32)),
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -24,7 +24,7 @@ pub(crate) fn runtime_upgrade_proposal<T: crate::Trait>(
|
|
|
approval_threshold_percentage: 100,
|
|
|
slashing_quorum_percentage: 60,
|
|
|
slashing_threshold_percentage: 80,
|
|
|
- required_stake: Some(get_required_stake_by_fraction::<T>(1, 100)),
|
|
|
+ required_stake: Some(<BalanceOf<T>>::from(1_000_000_u32)),
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -33,11 +33,11 @@ pub(crate) fn text_proposal<T: crate::Trait>() -> ProposalParameters<T::BlockNum
|
|
|
ProposalParameters {
|
|
|
voting_period: <Module<T>>::text_proposal_voting_period(),
|
|
|
grace_period: <Module<T>>::text_proposal_grace_period(),
|
|
|
- approval_quorum_percentage: 66,
|
|
|
+ approval_quorum_percentage: 60,
|
|
|
approval_threshold_percentage: 80,
|
|
|
slashing_quorum_percentage: 60,
|
|
|
slashing_threshold_percentage: 80,
|
|
|
- required_stake: Some(get_required_stake_by_fraction::<T>(25, 10000)),
|
|
|
+ required_stake: Some(<BalanceOf<T>>::from(25000u32)),
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -51,7 +51,7 @@ pub(crate) fn set_election_parameters_proposal<T: crate::Trait>(
|
|
|
approval_threshold_percentage: 80,
|
|
|
slashing_quorum_percentage: 60,
|
|
|
slashing_threshold_percentage: 80,
|
|
|
- required_stake: Some(get_required_stake_by_fraction::<T>(75, 10000)),
|
|
|
+ required_stake: Some(<BalanceOf<T>>::from(200_000_u32)),
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -62,11 +62,11 @@ pub(crate) fn set_content_working_group_mint_capacity_proposal<T: crate::Trait>(
|
|
|
voting_period: <Module<T>>::set_content_working_group_mint_capacity_proposal_voting_period(
|
|
|
),
|
|
|
grace_period: <Module<T>>::set_content_working_group_mint_capacity_proposal_grace_period(),
|
|
|
- approval_quorum_percentage: 50,
|
|
|
+ approval_quorum_percentage: 60,
|
|
|
approval_threshold_percentage: 75,
|
|
|
slashing_quorum_percentage: 60,
|
|
|
slashing_threshold_percentage: 80,
|
|
|
- required_stake: Some(get_required_stake_by_fraction::<T>(25, 10000)),
|
|
|
+ required_stake: Some(<BalanceOf<T>>::from(50000u32)),
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -76,11 +76,11 @@ pub(crate) fn spending_proposal<T: crate::Trait>(
|
|
|
ProposalParameters {
|
|
|
voting_period: <Module<T>>::spending_proposal_voting_period(),
|
|
|
grace_period: <Module<T>>::spending_proposal_grace_period(),
|
|
|
- approval_quorum_percentage: 66,
|
|
|
+ approval_quorum_percentage: 60,
|
|
|
approval_threshold_percentage: 80,
|
|
|
slashing_quorum_percentage: 60,
|
|
|
slashing_threshold_percentage: 80,
|
|
|
- required_stake: Some(get_required_stake_by_fraction::<T>(25, 10000)),
|
|
|
+ required_stake: Some(<BalanceOf<T>>::from(25000u32)),
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -90,11 +90,11 @@ pub(crate) fn set_lead_proposal<T: crate::Trait>(
|
|
|
ProposalParameters {
|
|
|
voting_period: <Module<T>>::set_lead_proposal_voting_period(),
|
|
|
grace_period: <Module<T>>::set_lead_proposal_grace_period(),
|
|
|
- approval_quorum_percentage: 66,
|
|
|
- approval_threshold_percentage: 80,
|
|
|
+ approval_quorum_percentage: 60,
|
|
|
+ approval_threshold_percentage: 75,
|
|
|
slashing_quorum_percentage: 60,
|
|
|
slashing_threshold_percentage: 80,
|
|
|
- required_stake: Some(get_required_stake_by_fraction::<T>(25, 10000)),
|
|
|
+ required_stake: Some(<BalanceOf<T>>::from(50000u32)),
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -108,7 +108,7 @@ pub(crate) fn evict_storage_provider_proposal<T: crate::Trait>(
|
|
|
approval_threshold_percentage: 75,
|
|
|
slashing_quorum_percentage: 60,
|
|
|
slashing_threshold_percentage: 80,
|
|
|
- required_stake: Some(get_required_stake_by_fraction::<T>(1, 1000)),
|
|
|
+ required_stake: Some(<BalanceOf<T>>::from(25000u32)),
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -118,17 +118,17 @@ pub(crate) fn set_storage_role_parameters_proposal<T: crate::Trait>(
|
|
|
ProposalParameters {
|
|
|
voting_period: <Module<T>>::set_storage_role_parameters_proposal_voting_period(),
|
|
|
grace_period: <Module<T>>::set_storage_role_parameters_proposal_grace_period(),
|
|
|
- approval_quorum_percentage: 75,
|
|
|
+ approval_quorum_percentage: 66,
|
|
|
approval_threshold_percentage: 80,
|
|
|
slashing_quorum_percentage: 60,
|
|
|
slashing_threshold_percentage: 80,
|
|
|
- required_stake: Some(get_required_stake_by_fraction::<T>(25, 10000)),
|
|
|
+ required_stake: Some(<BalanceOf<T>>::from(100_000_u32)),
|
|
|
}
|
|
|
}
|
|
|
|
|
|
#[cfg(test)]
|
|
|
mod test {
|
|
|
- use crate::proposal_types::parameters::get_required_stake_by_fraction;
|
|
|
+ use crate::get_required_stake_by_fraction;
|
|
|
use crate::tests::{increase_total_balance_issuance, initial_test_ext, Test};
|
|
|
|
|
|
pub use sr_primitives::Perbill;
|