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

Decreased block computation capacity #510

Merged
merged 3 commits into from
Mar 28, 2024
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
2 changes: 1 addition & 1 deletion pallets/system/src/limits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ impl BlockWeights {
Some(Weight::zero())
};
WeightsPerClass {
base_extrinsic: constants::ExtrinsicBaseWeight::get(),
base_extrinsic: constants::ExtrinsicBaseWeight::get().saturating_mul(100),
max_extrinsic: None,
max_total: initial,
reserved: initial,
Expand Down
7 changes: 4 additions & 3 deletions runtime/src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,16 +131,17 @@ pub mod system {
const MAXIMUM_BLOCK_WEIGHT: Weight =
Weight::from_parts(WEIGHT_REF_TIME_PER_SECOND.saturating_mul(2), u64::MAX);

/// We allow for 5 seconds of compute with a 20 second average block time, with maximum proof size.
/// We allow for 2 (temporary) seconds of compute with a 20 second average block time, with maximum proof size.
#[cfg(not(feature = "fast-runtime"))]
const MAXIMUM_BLOCK_WEIGHT: Weight =
Weight::from_parts(WEIGHT_REF_TIME_PER_SECOND.saturating_mul(5), u64::MAX);
Weight::from_parts(WEIGHT_REF_TIME_PER_SECOND.saturating_mul(2), u64::MAX);

parameter_types! {
pub RuntimeBlockWeights: SystemBlockWeights = SystemBlockWeights::builder()
.base_block(BlockExecutionWeight::get())
.for_class(DispatchClass::all(), |weights| {
weights.base_extrinsic = ExtrinsicBaseWeight::get();
// Note: To make min tx cost at least 0.1 AVAIL, BaseWeight has been increased by 100x
weights.base_extrinsic = ExtrinsicBaseWeight::get().saturating_mul(100);
})
.for_class(DispatchClass::Normal, |weights| {
weights.max_total = Some(NORMAL_DISPATCH_RATIO * MAXIMUM_BLOCK_WEIGHT);
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
// Per convention: if the runtime behavior changes, increment spec_version
// and set impl_version to 0. This paramenter is typically incremented when
// there's an update to the transaction_version.
spec_version: 25,
spec_version: 26,
// The version of the implementation of the specification. Nodes can ignore this. It is only
// used to indicate that the code is different. As long as the authoring_version and the
// spec_version are the same, the code itself might have changed, but the native and Wasm
Expand Down
Loading