File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
cumulus/pallets/parachain-system/src Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -1118,7 +1118,11 @@ impl<T: Config> Pallet<T> {
11181118 fn messages_collection_size_limit ( ) -> usize {
11191119 let max_block_weight = <T as frame_system:: Config >:: BlockWeights :: get ( ) . max_block ;
11201120 let max_block_pov = max_block_weight. proof_size ( ) ;
1121- ( max_block_pov / 6 ) . saturated_into ( )
1121+
1122+ let remaining_proof_size =
1123+ frame_system:: Pallet :: < T > :: remaining_block_weight ( ) . remaining ( ) . proof_size ( ) ;
1124+
1125+ ( max_block_pov / 6 ) . min ( remaining_proof_size) . saturated_into ( )
11221126 }
11231127
11241128 /// Updates inherent data to only include the messages that weren't already processed
Original file line number Diff line number Diff line change 1+ title: 'parachain-system: Ensure left-over message budget fits into the PoV'
2+ doc:
3+ - audience: Runtime Dev
4+ description: Ensure we check the buget against the remaining proof size in the block.
5+ crates:
6+ - name: cumulus-pallet-parachain-system
7+ bump: patch
You can’t perform that action at this time.
0 commit comments