4

Just for some analysis purpose i need to know what can be the maximum size limit of a block can have like 2MB or 5MB and is there any doc how we can customise it as per our need if its possible?

1

1 Answer 1

5

The block size is controlled in different ways. From the runtime you can set the maximum block size by setting the BlockLength. The block builder is also tracking the block size and by default aborts at around 4.5MiB, this can be changed by this function. The upper maximum is controlled by the maximum network package size, which is 16MiB.

When you are writing a parachain, the maximum block size is depending on the maximum PoV size. The maximum PoV size is controlled by the relay chain governance and thus, it is dynamic.

4
  • What is meant by the "maximum network package size"? Feb 6 at 17:08
  • There is a maximum size one network message can be, that is what I wrongly named "maximum network package size"
    – bkchr
    Feb 7 at 8:35
  • Is that a libp2p limit? Given the numbers 16 MiB I doubt you're talking about a limit of the underlying protocols (http/tcp/ip) Feb 7 at 13:36
  • That is the limit for the block response protocol and is set in Substrate.
    – bkchr
    Feb 7 at 22:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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