forked from paritytech/polkadot-sdk
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
check-weight: Disable total pov size check for mandatory extrinsics (p…
…aritytech#4571) So in some pallets we like [here](https://github.com/paritytech/polkadot-sdk/blob/5dc522d02fe0b53be1517f8b8979176e489a388b/substrate/frame/session/src/lib.rs#L556) we use `max_block` as return value for `on_initialize` (ideally we would not). This means the block is already full when we try to apply the inherents, which lead to the error seen in paritytech#4559 because we are unable to include the required inherents. This was not erroring before paritytech#4326 because we were running into this branch: https://github.com/paritytech/polkadot-sdk/blob/e4b89cc50c8d17868d6c8b122f2e156d678c7525/substrate/frame/system/src/extensions/check_weight.rs#L222-L224 The inherents are of `DispatchClass::Mandatory` and therefore have a `reserved` value of `None` in all runtimes I have inspected. So they will always pass the normal check. So in this PR I adjust the `check_combined_proof_size` to return an early `Ok(())` for mandatory extrinsics. If we agree on this PR I will backport it to the 1.12.0 branch. closes paritytech#4559 --------- Co-authored-by: command-bot <>
- Loading branch information
1 parent
f8aa0b3
commit 7a630f9
Showing
2 changed files
with
129 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Schema: Polkadot SDK PRDoc Schema (prdoc) v1.0.0 | ||
# See doc at https://raw.githubusercontent.com/paritytech/polkadot-sdk/master/prdoc/schema_user.json | ||
|
||
title: Ignore mandatory extrinsics in total PoV size check | ||
|
||
doc: | ||
- audience: Runtime Dev | ||
description: | | ||
The `CheckWeight` extension is checking that extrinsic length and used storage proof | ||
weight together do not exceed the PoV size limit. This lead to problems when | ||
the PoV size was already reached before mandatory extrinsics were applied.The `CheckWeight` | ||
extension will now allow extrinsics of `DispatchClass::Mandatory` to be applied even if | ||
the limit is reached. | ||
|
||
crates: | ||
- name: frame-system | ||
bump: minor | ||
- name: polkadot-sdk | ||
bump: minor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters