-
Notifications
You must be signed in to change notification settings - Fork 700
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
check-weight: Disable total pov size check for mandatory extrinsics #4571
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One nitpick, otherwise it looks good.
bot fmt |
@svyatonik https://gitlab.parity.io/parity/mirrors/polkadot-sdk/-/jobs/6305487 was started for your command Comment |
@svyatonik Command |
…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 <>
…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 <>
…tory extrinsics (paritytech#4592) Backport of paritytech#4571 --------- Co-authored-by: command-bot <>
So in some pallets we like here we use
max_block
as return value foron_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 #4559 because we are unable to include the required inherents. This was not erroring before #4326 because we were running into this branch:
polkadot-sdk/substrate/frame/system/src/extensions/check_weight.rs
Lines 222 to 224 in e4b89cc
The inherents are of
DispatchClass::Mandatory
and therefore have areserved
value ofNone
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 earlyOk(())
for mandatory extrinsics.If we agree on this PR I will backport it to the 1.12.0 branch.
closes #4559