Maximum value for MultiplierUpdate (#6021)

* update multiplier

* fix

* update lockfile for {"substrate"}

* fmt

* fix typo

Co-authored-by: parity-processbot <>
This commit is contained in:
Sergej Sakac
2022-10-06 19:20:58 +02:00
committed by GitHub
parent 8d1c16dc0d
commit c8151aed3c
2 changed files with 188 additions and 180 deletions
+178 -178
View File
File diff suppressed because it is too large Load Diff
+10 -2
View File
@@ -52,6 +52,7 @@ pub use pallet_balances::Call as BalancesCall;
pub use pallet_staking::StakerStatus;
pub use pallet_timestamp::Call as TimestampCall;
use pallet_transaction_payment::{Multiplier, TargetedFeeAdjustment};
pub use sp_runtime::traits::Bounded;
#[cfg(any(feature = "std", test))]
pub use sp_runtime::BuildStorage;
@@ -87,6 +88,8 @@ parameter_types! {
/// that combined with `AdjustmentVariable`, we can recover from the minimum.
/// See `multiplier_can_grow_from_zero`.
pub MinimumMultiplier: Multiplier = Multiplier::saturating_from_rational(1, 10u128);
/// The maximum amount of the multiplier.
pub MaximumMultiplier: Multiplier = Bounded::max_value();
/// Maximum length of block. Up to 5MB.
pub BlockLength: limits::BlockLength =
limits::BlockLength::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO);
@@ -94,8 +97,13 @@ parameter_types! {
/// Parameterized slow adjusting fee updated based on
/// https://research.web3.foundation/en/latest/polkadot/overview/2-token-economics.html#-2.-slow-adjusting-mechanism
pub type SlowAdjustingFeeUpdate<R> =
TargetedFeeAdjustment<R, TargetBlockFullness, AdjustmentVariable, MinimumMultiplier>;
pub type SlowAdjustingFeeUpdate<R> = TargetedFeeAdjustment<
R,
TargetBlockFullness,
AdjustmentVariable,
MinimumMultiplier,
MaximumMultiplier,
>;
/// Implements the weight types for a runtime.
/// It expects the passed runtime constants to contain a `weights` module.