@@ -79,32 +79,25 @@ use sp_core::U256;
7979use sp_runtime:: traits:: AccountIdConversion ;
8080use sp_std:: vec;
8181
82- /// We assume that ~5% of the block weight is consumed by `on_initialize` handlers. This is
83- /// used to limit the maximal weight of a single extrinsic.
84- const AVERAGE_ON_INITIALIZE_RATIO : sp_runtime:: Perbill = sp_runtime:: Perbill :: from_percent ( 5 ) ;
8582/// We allow `Normal` extrinsics to fill up the block up to 75%, the rest can be used by
8683/// `Operational` extrinsics.
8784pub const NORMAL_DISPATCH_RATIO : sp_runtime:: Perbill = sp_runtime:: Perbill :: from_percent ( 75 ) ;
88- const WEIGHT_MILLISECS_PER_BLOCK : u64 = 2_000 ;
8985pub const MAXIMUM_BLOCK_WEIGHT : frame_support:: weights:: Weight =
9086 frame_support:: weights:: Weight :: from_parts (
9187 frame_support:: weights:: constants:: WEIGHT_REF_TIME_PER_SECOND . saturating_mul ( 2 ) ,
9288 cumulus_primitives_core:: relay_chain:: MAX_POV_SIZE as u64 ,
9389 ) ;
9490
91+ // We assume that ~5% of the block weight is consumed by `on_initialize` handlers. This is
92+ // used to limit the maximal weight of a single extrinsic.
93+ const AVERAGE_ON_INITIALIZE_RATIO : sp_runtime:: Perbill = sp_runtime:: Perbill :: from_percent ( 5 ) ;
94+ const WEIGHT_MILLISECS_PER_BLOCK : u64 = 2_000 ;
9595const BLOCK_GAS_LIMIT : u64 = 20_000_000 ;
96-
97- // TODO: remove in stable2409.
98- #[ cfg( not( feature = "runtime-benchmarks" ) ) ]
99- const EXISTENTIAL_DEPOSIT : Balance = 0 ;
100- #[ cfg( feature = "runtime-benchmarks" ) ]
101- const EXISTENTIAL_DEPOSIT : Balance = 1 ;
102- frame_support:: parameter_types! {
103- pub const ExistentialDeposit : Balance = EXISTENTIAL_DEPOSIT ;
104- }
96+ const MAX_STORAGE_GROWTH : u64 = 400 * 1024 ;
10597
10698frame_support:: parameter_types! {
10799 pub const MaxBalance : Balance = Balance :: MAX ;
100+ pub const ExistentialDeposit : Balance = 0 ;
108101
109102 // Retry a scheduled item every 10 blocks (1 minute) until the preimage exists.
110103 pub const NoPreimagePostponement : Option <u32 > = Some ( 10 ) ;
@@ -116,6 +109,8 @@ frame_support::parameter_types! {
116109 pub const ReservedXcmpWeight : frame_support:: weights:: Weight = MAXIMUM_BLOCK_WEIGHT . saturating_div( 4 ) ;
117110 pub const ReservedDmpWeight : frame_support:: weights:: Weight = MAXIMUM_BLOCK_WEIGHT . saturating_div( 4 ) ;
118111
112+ pub const GasLimitStorageGrowthRatio : u64 = BLOCK_GAS_LIMIT . saturating_div( MAX_STORAGE_GROWTH ) ;
113+
119114 pub RuntimeBlockLength : frame_system:: limits:: BlockLength =
120115 frame_system:: limits:: BlockLength :: max_with_normal_ratio( 5 * 1024 * 1024 , NORMAL_DISPATCH_RATIO ) ;
121116 pub RuntimeBlockWeights : frame_system:: limits:: BlockWeights = frame_system:: limits:: BlockWeights :: builder( )
0 commit comments