0

From my survey of a few parachains, the definition I find for MAXIMUM_BLOCK_WEIGHT is often 0.5 seconds of compute :

/// Maximum weight per block
pub const MAXIMUM_BLOCK_WEIGHT: Weight = Weight::from_ref_time(WEIGHT_REF_TIME_PER_SECOND)
    .saturating_div(2)
    .set_proof_size(cumulus_primitives_core::relay_chain::v2::MAX_POV_SIZE as u64);

While for relay chains like Polkadot & Kusama, it seems to be 2 seconds :

//  file : runtime/common/src/lib.rs
/// We allow for 2 seconds of compute with a 6 second average block time.
/// The storage proof size is not limited so far.
pub const MAXIMUM_BLOCK_WEIGHT: Weight =
    Weight::from_parts(WEIGHT_REF_TIME_PER_SECOND.saturating_mul(2), u64::MAX);

Is there a reason it is so?

2
  • I read through that answer yet it makes little sense to me. It states that the block time is 500 ms to ensure that a PoV is built, validated and that it would be able to be increased in the future with asyn backing but it doesn't say why specifically 500ms. Is it based on some calculation? Is it done to ensure consitent throughput? I am looking for a why 500ms rather than a statement.
    – b0zero
    Mar 24, 2023 at 7:29

1 Answer 1

0

From summarizing the two SE posts in the comments:

The (parachain) interval in which;

  1. The block can take to import on your reference hardware (= block time, aka MAXIMUM_BLOCK_WEIGHT)
  2. The PoV is built
  3. The block is sent to the relay chain
  4. The block is validated on the relay chain:
  • Backing
  • Availability
  • Approval

, is 12 seconds (ref). The hard cap of 0.5 seconds block time is determined based on calculations / measurements to ensure that within these 12 seconds everything has happened. This can be done by testing and benchmarking the network (ref), which is probably easier said that done.

In addition, and this is perhaps the answer you were looking for, the interval of 12 sec has to be inline with the 6 sec interval of the relay chain (a multiple of 6 seconds).

Not the answer you're looking for? Browse other questions tagged or ask your own question.