Skip to content
Unverified Commit 6d3a6d85 authored by Sebastian Kunert's avatar Sebastian Kunert Committed by GitHub
Browse files

`CheckWeight` SE: Check for extrinsic length + proof size combined (#4326)

Currently the `CheckWeight` `SignedExtension` was tracking the size of
the proof and the extrinsic length separately. But in reality we need
one more check that ensures we don't hit the PoV limit with both
combined.

The rest of the logic remains unchanged. One scenario where the changes
make a difference is when we enter this branch:

https://github.com/paritytech/polkadot-sdk/blob/f34d8e3c

/substrate/frame/system/src/extensions/check_weight.rs#L185-L198

This was previously allowing to some extrinsics that is exceeding the
block limit but are withing the reserved area of `BlockWeights`. This
will now be caught by the later check I introduced. I think the new
behaviour makes sense, since the proof size dimension is designed for
parachains and they don't want to go over the limit and get rejected.


In the long run we should maybe get rid of `RuntimeBlockLength`
alltogether, however that would require a deprecation process and can
come at a later point.

---------

Co-authored-by: default avatarAdrian Catangiu <[email protected]>
parent f4b73bd1
Pipeline #474341 waiting for manual action with stages
in 1 hour, 33 minutes, and 53 seconds