Skip to content
Snippets Groups Projects
Unverified Commit c9e5cf1b authored by s0me0ne-unkn0wn's avatar s0me0ne-unkn0wn Committed by GitHub
Browse files

[Backport] Add feature to allow Aura collator to use full PoV size (#5393) (#5507)


This PR introduces a feature that allows to optionally enable using the
full PoV size.

Technically, we're ready to enable it by default, but as corresponding
runtime changes have not been propagated to the system parachain
runtimes yet, doing so could put them at risk. On the other hand, there
are teams that could benefit from it right now, and it makes no sense
for them to wait for the fellowship release and everything.

---------

Co-authored-by: default avatarAndrei Sandu <54316454+sandreim@users.noreply.github.com>
parent 0919abd2
Branches
No related merge requests found
......@@ -79,3 +79,7 @@ polkadot-node-subsystem.workspace = true
polkadot-node-subsystem.default-features = true
polkadot-overseer.workspace = true
polkadot-overseer.default-features = true
[features]
# Allows collator to use full PoV size for block building
full-pov-size = []
......@@ -234,6 +234,16 @@ where
.await
);
let allowed_pov_size = if cfg!(feature = "full-pov-size") {
validation_data.max_pov_size
} else {
// Set the block limit to 50% of the maximum PoV size.
//
// TODO: If we got benchmarking that includes the proof size,
// we should be able to use the maximum pov size.
validation_data.max_pov_size / 2
} as usize;
let maybe_collation = try_request!(
collator
.collate(
......@@ -242,11 +252,7 @@ where
None,
(parachain_inherent_data, other_inherent_data),
params.authoring_duration,
// Set the block limit to 50% of the maximum PoV size.
//
// TODO: If we got benchmarking that includes the proof size,
// we should be able to use the maximum pov size.
(validation_data.max_pov_size / 2) as usize,
allowed_pov_size,
)
.await
);
......
......@@ -319,6 +319,16 @@ where
)
.await;
let allowed_pov_size = if cfg!(feature = "full-pov-size") {
validation_data.max_pov_size
} else {
// Set the block limit to 50% of the maximum PoV size.
//
// TODO: If we got benchmarking that includes the proof size,
// we should be able to use the maximum pov size.
validation_data.max_pov_size / 2
} as usize;
match collator
.collate(
&parent_header,
......@@ -326,11 +336,7 @@ where
None,
(parachain_inherent_data, other_inherent_data),
params.authoring_duration,
// Set the block limit to 50% of the maximum PoV size.
//
// TODO: If we got benchmarking that includes the proof size,
// we should be able to use the maximum pov size.
(validation_data.max_pov_size / 2) as usize,
allowed_pov_size,
)
.await
{
......
......@@ -350,6 +350,16 @@ where
)
.await;
let allowed_pov_size = if cfg!(feature = "full-pov-size") {
validation_data.max_pov_size
} else {
// Set the block limit to 50% of the maximum PoV size.
//
// TODO: If we got benchmarking that includes the proof size,
// we should be able to use the maximum pov size.
validation_data.max_pov_size / 2
} as usize;
let Ok(Some(candidate)) = collator
.build_block_and_import(
&parent_header,
......@@ -357,11 +367,7 @@ where
None,
(parachain_inherent_data, other_inherent_data),
authoring_duration,
// Set the block limit to 50% of the maximum PoV size.
//
// TODO: If we got benchmarking that includes the proof size,
// we should be able to use the maximum pov size.
(validation_data.max_pov_size / 2) as usize,
allowed_pov_size,
)
.await
else {
......
# 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: Allow to enable full PoV size
doc:
- audience: Node Dev
description: |
A feature is introduced allowing a collator to enable full PoV size at compile time.
WARNING: To use this feature, security considerations must be understood and the latest
SDK version must be used.
crates:
- name: cumulus-client-consensus-aura
bump: minor
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment