Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not enforce PoV size hard limit in config #5887

Merged
merged 7 commits into from
Oct 2, 2024
Merged
Changes from 3 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
6 changes: 5 additions & 1 deletion polkadot/runtime/parachains/src/configuration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
use polkadot_primitives::{
ApprovalVotingParams, AsyncBackingParams, Balance, ExecutorParamError, ExecutorParams,
NodeFeatures, SessionIndex, LEGACY_MIN_BACKING_VOTES, MAX_CODE_SIZE, MAX_HEAD_DATA_SIZE,
MAX_POV_SIZE, ON_DEMAND_MAX_QUEUE_MAX_SIZE,

Check failure on line 32 in polkadot/runtime/parachains/src/configuration.rs

View workflow job for this annotation

GitHub Actions / cargo-check-all-crate-macos

unused import: `MAX_POV_SIZE`
};
use sp_runtime::{traits::Zero, Perbill, Percent};

Expand All @@ -46,6 +46,10 @@

const LOG_TARGET: &str = "runtime::configuration";

// This value is derived from network layer limits. See `sc_network::MAX_RESPONSE_SIZE` and
// `polkadot_node_network_protocol::POV_RESPONSE_SIZE`.
const POV_SIZE_HARD_LIMIT: u32 = 16 * 1024 * 1024;

/// All configuration of the runtime with respect to paras.
#[derive(
Clone,
Expand Down Expand Up @@ -377,7 +381,7 @@
})
}

if self.max_pov_size > MAX_POV_SIZE {
s0me0ne-unkn0wn marked this conversation as resolved.
Show resolved Hide resolved
if self.max_pov_size > POV_SIZE_HARD_LIMIT {
return Err(MaxPovSizeExceedHardLimit { max_pov_size: self.max_pov_size })
}

Expand Down
Loading