Skip to content
Prev Previous commit
Next Next commit
chore: set max proof size
Signed-off-by: Gregory Hill <[email protected]>
  • Loading branch information
gregdhill committed Nov 14, 2022
commit f07bb812053ea1fada7eb546d728fad9ee504f3e
4 changes: 3 additions & 1 deletion parachain/runtime/interlay/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,9 @@ const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10);
/// by Operational extrinsics.
const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75);
/// We allow for 2 seconds of compute with a 12 second average block time.
const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND.saturating_mul(2 as u64);
pub const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND
.saturating_div(2)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We only allow 0.5 sec of block production?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.set_proof_size(cumulus_primitives_core::relay_chain::v2::MAX_POV_SIZE as u64);

parameter_types! {
pub const BlockHashCount: BlockNumber = 250;
Expand Down
4 changes: 3 additions & 1 deletion parachain/runtime/kintsugi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,9 @@ const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10);
/// by Operational extrinsics.
const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75);
/// We allow for 2 seconds of compute with a 12 second average block time.
const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND.saturating_mul(2 as u64);
pub const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND
.saturating_div(2)
.set_proof_size(cumulus_primitives_core::relay_chain::v2::MAX_POV_SIZE as u64);

parameter_types! {
pub const BlockHashCount: BlockNumber = 250;
Expand Down
4 changes: 3 additions & 1 deletion parachain/runtime/testnet-interlay/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10);
/// by Operational extrinsics.
const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75);
/// We allow for 2 seconds of compute with a 12 second average block time.
const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND.saturating_mul(2 as u64);
pub const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND
.saturating_div(2)
.set_proof_size(cumulus_primitives_core::relay_chain::v2::MAX_POV_SIZE as u64);

parameter_types! {
pub const BlockHashCount: BlockNumber = 250;
Expand Down
4 changes: 3 additions & 1 deletion parachain/runtime/testnet-kintsugi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10);
/// by Operational extrinsics.
const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75);
/// We allow for 2 seconds of compute with a 12 second average block time.
const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND.saturating_mul(2 as u64);
pub const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND
.saturating_div(2)
.set_proof_size(cumulus_primitives_core::relay_chain::v2::MAX_POV_SIZE as u64);

parameter_types! {
pub const BlockHashCount: BlockNumber = 250;
Expand Down
4 changes: 2 additions & 2 deletions standalone/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,10 @@ const AVERAGE_ON_INITIALIZE_RATIO: Perbill = Perbill::from_percent(10);
/// by Operational extrinsics.
const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75);
/// We allow for 2 seconds of compute with a 6 second average block time.
const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND.saturating_mul(2 as u64);
pub const MAXIMUM_BLOCK_WEIGHT: Weight = WEIGHT_PER_SECOND.saturating_div(2).set_proof_size(u64::MAX);

parameter_types! {
pub const BlockHashCount: BlockNumber = 250;
pub const BlockHashCount: BlockNumber = 4096;
pub const Version: RuntimeVersion = VERSION;
pub RuntimeBlockLength: BlockLength =
BlockLength::max_with_normal_ratio(5 * 1024 * 1024, NORMAL_DISPATCH_RATIO);
Expand Down