Introduce a "dynamic" block size limit for proposing (#8588)
* Introduce a "dynamic" block size limit for proposing This adds support for using a dynamic block size limit per call to `propose`. This is required for Cumulus/Parachains to always use stay in the limits of the maximum allowed PoV size. As described in the docs, the block limit is only checked in the process of pushing transactions. As we normally do some other operations in `on_finalize`, it can happen that the block size still grows when there is some proof being collected (as we do for parachains). This means, that the given block limit needs to be rather conservative on the actual value and should not be the upper limit. * Update client/basic-authorship/src/basic_authorship.rs Co-authored-by:Andronik Ordian <write@reusable.software> * More future proof encoded size updating * Use `ProofRecorderInner` * Update client/basic-authorship/src/basic_authorship.rs Co-authored-by:
André Silva <123550+andresilva@users.noreply.github.com> * Update client/basic-authorship/src/basic_authorship.rs Co-authored-by:
André Silva <123550+andresilva@users.noreply.github.com> * Update client/basic-authorship/src/basic_authorship.rs Co-authored-by:
André Silva <123550+andresilva@users.noreply.github.com> * Update client/consensus/slots/src/lib.rs Co-authored-by:
André Silva <123550+andresilva@users.noreply.github.com> * Update client/consensus/slots/src/slots.rs Co-authored-by:
André Silva <123550+andresilva@users.noreply.github.com> * Update client/basic-authorship/src/basic_authorship.rs Co-authored-by:
André Silva <123550+andresilva@users.noreply.github.com> * Update client/basic-authorship/src/basic_authorship.rs Co-authored-by:
André Silva <123550+andresilva@users.noreply.github.com> * Update client/basic-authorship/src/basic_authorship.rs Co-authored-by:
André Silva <123550+andresilva@users.noreply.github.com> Co-authored-by:
Andronik Ordian <write@reusable.software> Co-authored-by:
André Silva <123550+andresilva@users.noreply.github.com>
Showing
- substrate/bin/node/bench/src/construct.rs 1 addition, 0 deletionssubstrate/bin/node/bench/src/construct.rs
- substrate/bin/node/cli/src/service.rs 1 addition, 0 deletionssubstrate/bin/node/cli/src/service.rs
- substrate/client/basic-authorship/src/basic_authorship.rs 159 additions, 22 deletionssubstrate/client/basic-authorship/src/basic_authorship.rs
- substrate/client/basic-authorship/src/lib.rs 2 additions, 1 deletionsubstrate/client/basic-authorship/src/lib.rs
- substrate/client/block-builder/src/lib.rs 19 additions, 0 deletionssubstrate/client/block-builder/src/lib.rs
- substrate/client/consensus/aura/src/lib.rs 2 additions, 0 deletionssubstrate/client/consensus/aura/src/lib.rs
- substrate/client/consensus/babe/src/tests.rs 1 addition, 0 deletionssubstrate/client/consensus/babe/src/tests.rs
- substrate/client/consensus/manual-seal/src/seal_block.rs 1 addition, 0 deletionssubstrate/client/consensus/manual-seal/src/seal_block.rs
- substrate/client/consensus/pow/src/lib.rs 1 addition, 0 deletionssubstrate/client/consensus/pow/src/lib.rs
- substrate/client/consensus/slots/src/lib.rs 3 additions, 1 deletionsubstrate/client/consensus/slots/src/lib.rs
- substrate/client/consensus/slots/src/slots.rs 7 additions, 0 deletionssubstrate/client/consensus/slots/src/slots.rs
- substrate/client/db/src/bench.rs 10 additions, 19 deletionssubstrate/client/db/src/bench.rs
- substrate/primitives/api/proc-macro/src/impl_runtime_apis.rs 5 additions, 7 deletionssubstrate/primitives/api/proc-macro/src/impl_runtime_apis.rs
- substrate/primitives/api/proc-macro/src/mock_impl_runtime_apis.rs 4 additions, 0 deletions...e/primitives/api/proc-macro/src/mock_impl_runtime_apis.rs
- substrate/primitives/api/src/lib.rs 4 additions, 1 deletionsubstrate/primitives/api/src/lib.rs
- substrate/primitives/consensus/common/src/evaluation.rs 0 additions, 8 deletionssubstrate/primitives/consensus/common/src/evaluation.rs
- substrate/primitives/consensus/common/src/lib.rs 8 additions, 0 deletionssubstrate/primitives/consensus/common/src/lib.rs
- substrate/primitives/state-machine/src/proving_backend.rs 107 additions, 20 deletionssubstrate/primitives/state-machine/src/proving_backend.rs
- substrate/test-utils/runtime/src/lib.rs 1 addition, 1 deletionsubstrate/test-utils/runtime/src/lib.rs
Please register or sign in to comment