Browse Source

update production proposal params

Mokhtar Naamani 3 years ago
parent
commit
2cf05f2e93
2 changed files with 41 additions and 41 deletions
  1. 1 1
      devops/git-hooks/pre-push
  2. 40 40
      runtime/src/proposals_configuration/defaults.rs

+ 1 - 1
devops/git-hooks/pre-push

@@ -19,4 +19,4 @@ echo 'running clippy (rust linter)'
 BUILD_DUMMY_WASM_BINARY=1 cargo +nightly-2021-02-20 clippy --release --all -- -D warnings
 
 echo 'running cargo unit tests'
-cargo +nightly-2021-02-20 test --release --all --features ${FEATURES}
+cargo +nightly-2021-02-20 test --release --all --features "${FEATURES}"

+ 40 - 40
runtime/src/proposals_configuration/defaults.rs

@@ -5,7 +5,7 @@ use crate::{Balance, BlockNumber, ProposalParameters};
 // Proposal parameters for the 'Set Max Validator Count' proposal
 pub(crate) fn set_max_validator_count_proposal() -> ProposalParameters<BlockNumber, Balance> {
     ProposalParameters {
-        voting_period: 200,
+        voting_period: 43200,
         grace_period: 0,
         approval_quorum_percentage: 66,
         approval_threshold_percentage: 80,
@@ -19,13 +19,13 @@ pub(crate) fn set_max_validator_count_proposal() -> ProposalParameters<BlockNumb
 // Proposal parameters for the 'Runtime Upgrade' proposal
 pub(crate) fn runtime_upgrade_proposal() -> ProposalParameters<BlockNumber, Balance> {
     ProposalParameters {
-        voting_period: 200,
-        grace_period: 200,
+        voting_period: 28800,
+        grace_period: 14400,
         approval_quorum_percentage: 80,
         approval_threshold_percentage: 100,
         slashing_quorum_percentage: 60,
         slashing_threshold_percentage: 80,
-        required_stake: Some(1_000_000),
+        required_stake: Some(10_000_000),
         constitutionality: 1,
     }
 }
@@ -33,7 +33,7 @@ pub(crate) fn runtime_upgrade_proposal() -> ProposalParameters<BlockNumber, Bala
 // Proposal parameters for the 'Signal' proposal
 pub(crate) fn signal_proposal() -> ProposalParameters<BlockNumber, Balance> {
     ProposalParameters {
-        voting_period: 200,
+        voting_period: 72000,
         grace_period: 0,
         approval_quorum_percentage: 60,
         approval_threshold_percentage: 80,
@@ -47,8 +47,8 @@ pub(crate) fn signal_proposal() -> ProposalParameters<BlockNumber, Balance> {
 // Proposal parameters for the 'Funding Request' proposal
 pub(crate) fn funding_request_proposal() -> ProposalParameters<BlockNumber, Balance> {
     ProposalParameters {
-        voting_period: 200,
-        grace_period: 100,
+        voting_period: 72000,
+        grace_period: 0,
         approval_quorum_percentage: 60,
         approval_threshold_percentage: 80,
         slashing_quorum_percentage: 60,
@@ -61,7 +61,7 @@ pub(crate) fn funding_request_proposal() -> ProposalParameters<BlockNumber, Bala
 pub(crate) fn create_working_group_lead_opening_proposal(
 ) -> ProposalParameters<BlockNumber, Balance> {
     ProposalParameters {
-        voting_period: 200,
+        voting_period: 72000,
         grace_period: 0,
         approval_quorum_percentage: 60,
         approval_threshold_percentage: 80,
@@ -76,7 +76,7 @@ pub(crate) fn create_working_group_lead_opening_proposal(
 pub(crate) fn fill_working_group_lead_opening_proposal() -> ProposalParameters<BlockNumber, Balance>
 {
     ProposalParameters {
-        voting_period: 200,
+        voting_period: 43200,
         grace_period: 0,
         approval_quorum_percentage: 60,
         approval_threshold_percentage: 75,
@@ -90,7 +90,7 @@ pub(crate) fn fill_working_group_lead_opening_proposal() -> ProposalParameters<B
 // Proposal parameters for the 'Update Working Group Budget' proposal
 pub(crate) fn update_working_group_budget_proposal() -> ProposalParameters<BlockNumber, Balance> {
     ProposalParameters {
-        voting_period: 200,
+        voting_period: 43200,
         grace_period: 0,
         approval_quorum_percentage: 60,
         approval_threshold_percentage: 75,
@@ -105,7 +105,7 @@ pub(crate) fn update_working_group_budget_proposal() -> ProposalParameters<Block
 pub(crate) fn decrease_working_group_lead_stake_proposal(
 ) -> ProposalParameters<BlockNumber, Balance> {
     ProposalParameters {
-        voting_period: 200,
+        voting_period: 43200,
         grace_period: 0,
         approval_quorum_percentage: 60,
         approval_threshold_percentage: 75,
@@ -119,7 +119,7 @@ pub(crate) fn decrease_working_group_lead_stake_proposal(
 // Proposal parameters for the 'Slash Working Group Lead' proposal
 pub fn slash_working_group_lead_proposal() -> ProposalParameters<BlockNumber, Balance> {
     ProposalParameters {
-        voting_period: 200,
+        voting_period: 43200,
         grace_period: 0,
         approval_quorum_percentage: 60,
         approval_threshold_percentage: 75,
@@ -133,7 +133,7 @@ pub fn slash_working_group_lead_proposal() -> ProposalParameters<BlockNumber, Ba
 // Proposal parameters for the 'Set Working Group Lead Reward' proposal
 pub(crate) fn set_working_group_lead_reward_proposal() -> ProposalParameters<BlockNumber, Balance> {
     ProposalParameters {
-        voting_period: 200,
+        voting_period: 43200,
         grace_period: 0,
         approval_quorum_percentage: 60,
         approval_threshold_percentage: 75,
@@ -147,7 +147,7 @@ pub(crate) fn set_working_group_lead_reward_proposal() -> ProposalParameters<Blo
 // Proposal parameters for the 'Terminate Working Group Lead' proposal
 pub(crate) fn terminate_working_group_lead_proposal() -> ProposalParameters<BlockNumber, Balance> {
     ProposalParameters {
-        voting_period: 200,
+        voting_period: 72200,
         grace_period: 0,
         approval_quorum_percentage: 66,
         approval_threshold_percentage: 80,
@@ -161,8 +161,8 @@ pub(crate) fn terminate_working_group_lead_proposal() -> ProposalParameters<Bloc
 // Proposal parameters for the 'Amend Constitution' proposal
 pub(crate) fn amend_constitution_proposal() -> ProposalParameters<BlockNumber, Balance> {
     ProposalParameters {
-        voting_period: 200,
-        grace_period: 100,
+        voting_period: 72200,
+        grace_period: 14400,
         approval_quorum_percentage: 80,
         approval_threshold_percentage: 100,
         slashing_quorum_percentage: 60,
@@ -176,7 +176,7 @@ pub(crate) fn amend_constitution_proposal() -> ProposalParameters<BlockNumber, B
 pub(crate) fn cancel_working_group_lead_opening_proposal(
 ) -> ProposalParameters<BlockNumber, Balance> {
     ProposalParameters {
-        voting_period: 200,
+        voting_period: 43200,
         grace_period: 0,
         approval_quorum_percentage: 60,
         approval_threshold_percentage: 75,
@@ -190,8 +190,8 @@ pub(crate) fn cancel_working_group_lead_opening_proposal(
 // Proposal parameters for the 'Set Membership Price' proposal
 pub(crate) fn set_membership_price_proposal() -> ProposalParameters<BlockNumber, Balance> {
     ProposalParameters {
-        voting_period: 200,
-        grace_period: 100,
+        voting_period: 43200,
+        grace_period: 0,
         approval_quorum_percentage: 60,
         approval_threshold_percentage: 75,
         slashing_quorum_percentage: 60,
@@ -204,8 +204,8 @@ pub(crate) fn set_membership_price_proposal() -> ProposalParameters<BlockNumber,
 // Proposal parameters for the 'Set Council Budget Increment' proposal
 pub(crate) fn set_council_budget_increment_proposal() -> ProposalParameters<BlockNumber, Balance> {
     ProposalParameters {
-        voting_period: 200,
-        grace_period: 100,
+        voting_period: 72000,
+        grace_period: 100800,
         approval_quorum_percentage: 66,
         approval_threshold_percentage: 80,
         slashing_quorum_percentage: 60,
@@ -218,8 +218,8 @@ pub(crate) fn set_council_budget_increment_proposal() -> ProposalParameters<Bloc
 // Proposal parameters for the 'Set Councilor Reward' proposal
 pub(crate) fn set_councilor_reward_proposal() -> ProposalParameters<BlockNumber, Balance> {
     ProposalParameters {
-        voting_period: 200,
-        grace_period: 100, // A council term
+        voting_period: 72000,
+        grace_period: 100800,
         approval_quorum_percentage: 66,
         approval_threshold_percentage: 80,
         slashing_quorum_percentage: 60,
@@ -233,8 +233,8 @@ pub(crate) fn set_councilor_reward_proposal() -> ProposalParameters<BlockNumber,
 pub(crate) fn set_initial_invitation_balance_proposal() -> ProposalParameters<BlockNumber, Balance>
 {
     ProposalParameters {
-        voting_period: 200,
-        grace_period: 100,
+        voting_period: 72000,
+        grace_period: 0,
         approval_quorum_percentage: 60,
         approval_threshold_percentage: 75,
         slashing_quorum_percentage: 60,
@@ -249,8 +249,8 @@ pub(crate) fn set_initial_invitation_balance_proposal() -> ProposalParameters<Bl
 pub(crate) fn set_membership_lead_invitation_quota_proposal(
 ) -> ProposalParameters<BlockNumber, Balance> {
     ProposalParameters {
-        voting_period: 200,
-        grace_period: 100,
+        voting_period: 72000,
+        grace_period: 0,
         approval_quorum_percentage: 60,
         approval_threshold_percentage: 75,
         slashing_quorum_percentage: 60,
@@ -263,8 +263,8 @@ pub(crate) fn set_membership_lead_invitation_quota_proposal(
 // Proposal parameters for the 'Set Referral Cut' proposal
 pub(crate) fn set_referral_cut_proposal() -> ProposalParameters<BlockNumber, Balance> {
     ProposalParameters {
-        voting_period: 200,
-        grace_period: 100,
+        voting_period: 43200,
+        grace_period: 0,
         approval_quorum_percentage: 60,
         approval_threshold_percentage: 75,
         slashing_quorum_percentage: 60,
@@ -277,8 +277,8 @@ pub(crate) fn set_referral_cut_proposal() -> ProposalParameters<BlockNumber, Bal
 // Proposal parameters for the 'Set Initial Invitation Count' proposal
 pub(crate) fn set_invitation_count_proposal() -> ProposalParameters<BlockNumber, Balance> {
     ProposalParameters {
-        voting_period: 200,
-        grace_period: 100,
+        voting_period: 72000,
+        grace_period: 0,
         approval_quorum_percentage: 60,
         approval_threshold_percentage: 75,
         slashing_quorum_percentage: 60,
@@ -291,8 +291,8 @@ pub(crate) fn set_invitation_count_proposal() -> ProposalParameters<BlockNumber,
 // Proposal parameters for the 'Create Blog Post' proposal
 pub(crate) fn create_blog_post_proposal() -> ProposalParameters<BlockNumber, Balance> {
     ProposalParameters {
-        voting_period: 200,
-        grace_period: 100,
+        voting_period: 72000,
+        grace_period: 0,
         approval_quorum_percentage: 60,
         approval_threshold_percentage: 80,
         slashing_quorum_percentage: 60,
@@ -305,8 +305,8 @@ pub(crate) fn create_blog_post_proposal() -> ProposalParameters<BlockNumber, Bal
 // Proposal parameters for the 'Edit Blog Post' proposal
 pub(crate) fn edit_blog_post_proposal() -> ProposalParameters<BlockNumber, Balance> {
     ProposalParameters {
-        voting_period: 200,
-        grace_period: 100,
+        voting_period: 72000,
+        grace_period: 0,
         approval_quorum_percentage: 60,
         approval_threshold_percentage: 80,
         slashing_quorum_percentage: 60,
@@ -319,8 +319,8 @@ pub(crate) fn edit_blog_post_proposal() -> ProposalParameters<BlockNumber, Balan
 // Proposal parameters for the 'Lock Blog Post' proposal
 pub(crate) fn lock_blog_post_proposal() -> ProposalParameters<BlockNumber, Balance> {
     ProposalParameters {
-        voting_period: 200,
-        grace_period: 100,
+        voting_period: 72000,
+        grace_period: 0,
         approval_quorum_percentage: 60,
         approval_threshold_percentage: 80,
         slashing_quorum_percentage: 60,
@@ -333,8 +333,8 @@ pub(crate) fn lock_blog_post_proposal() -> ProposalParameters<BlockNumber, Balan
 // Proposal parameters for the 'Unlock Blog Post' proposal
 pub(crate) fn unlock_blog_post_proposal() -> ProposalParameters<BlockNumber, Balance> {
     ProposalParameters {
-        voting_period: 200,
-        grace_period: 100,
+        voting_period: 72000,
+        grace_period: 0,
         approval_quorum_percentage: 60,
         approval_threshold_percentage: 80,
         slashing_quorum_percentage: 60,
@@ -348,7 +348,7 @@ pub(crate) fn unlock_blog_post_proposal() -> ProposalParameters<BlockNumber, Bal
 pub(crate) fn veto_proposal_proposal() -> ProposalParameters<BlockNumber, Balance> {
     ProposalParameters {
         // Doesn't make sense to be longer than longest grace period of all other proposals?
-        voting_period: 200,
+        voting_period: 100800,
         grace_period: 0,
         approval_quorum_percentage: 75,
         approval_threshold_percentage: 80,