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

Add feature to allow Aura collator to use full PoV size (#5393)


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 7a2c5375
No related merge requests found
Pipeline #493309 waiting for manual action with stages
in 1 hour, 18 minutes, and 36 seconds
......@@ -54,3 +54,7 @@ polkadot-primitives = { workspace = true, default-features = true }
polkadot-node-primitives = { workspace = true, default-features = true }
polkadot-node-subsystem = { workspace = true, default-features = true }
polkadot-overseer = { workspace = true, default-features = true }
[features]
# Allows collator to use full PoV size for block building
full-pov-size = []
......@@ -237,6 +237,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(
......@@ -245,11 +255,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
);
......
......@@ -412,6 +412,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,
......@@ -419,11 +429,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