Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions cumulus/client/consensus/aura/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
16 changes: 11 additions & 5 deletions cumulus/client/consensus/aura/src/collators/basic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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
);
Expand Down
16 changes: 11 additions & 5 deletions cumulus/client/consensus/aura/src/collators/lookahead.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,18 +319,24 @@ 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,
&slot_claim,
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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -350,18 +350,24 @@ 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,
&slot_claim,
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 {
Expand Down
15 changes: 15 additions & 0 deletions prdoc/pr_5507.prdoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# 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