Skip to content

Commit

Permalink
Merge pull request #5161 from ignazio-bovo/fix/higher-funding-proposa…
Browse files Browse the repository at this point in the history
…l-cap

Adjust funding proposal parameters
  • Loading branch information
kdembler committed Jun 4, 2024
2 parents 03c80bb + 8ebb196 commit f46aead
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1682,7 +1682,7 @@ parameter_types! {
// Make sure to stay below MAX_BLOCK_SIZE of substrate consensus of ~4MB
// The new compressed wasm format is much smaller in size ~ 1MB
pub const RuntimeUpgradeWasmProposalMaxLength: u32 = DispatchableCallCodeMaxLen::get();
pub const FundingRequestProposalMaxTotalAmount: Balance = dollars!(10_000);
pub const FundingRequestProposalMaxTotalAmount: Balance = joy!(1_000_000);
pub const FundingRequestProposalMaxAccounts: u32 = 20;
pub const SetMaxValidatorCountProposalMaxValidators: u32 = 100;
}
Expand Down
4 changes: 2 additions & 2 deletions runtime/src/proposals_configuration/defaults.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! This module contains default "production" parameters configuration for the runtime codex proposals.

use crate::{
currency, days, dollars, hours, Balance, BlockNumber, CouncilSize, ExpectedBlockTime,
currency, days, dollars, hours, joy, Balance, BlockNumber, CouncilSize, ExpectedBlockTime,
ProposalParameters,
};
use static_assertions::const_assert;
Expand Down Expand Up @@ -65,7 +65,7 @@ pub(crate) fn funding_request_proposal() -> ProposalParameters<BlockNumber, Bala
approval_threshold_percentage: TWO_OUT_OF_THREE,
slashing_quorum_percentage: ALL,
slashing_threshold_percentage: ALL,
required_stake: Some(dollars!(10)),
required_stake: Some(joy!(3500)),
constitutionality: 1,
}
}
Expand Down
7 changes: 7 additions & 0 deletions runtime/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,3 +192,10 @@ macro_rules! monthly_dollars_to_per_block {
dollars!($a).saturating_div(Balance::from(days!(30)))
}};
}

#[macro_export]
macro_rules! joy {
($a: expr) => {
currency::BASE_UNIT_PER_JOY.saturating_mul($a).into()
};
}

0 comments on commit f46aead

Please sign in to comment.