2

We currently have the expected block time to MILLISECS_PER_BLOCK = 12000.

We also set the MAXIMUM_BLOCK_WEIGHT = WEIGHT_PER_SECOND.saturating_div(2) // 500_000_000_000.

This seems low, given that we have 12 seconds to produce a block.

How to determine how much computing time to allocate per block?

How do I decide how to set MILLISECS_PER_BLOCK and MAXIMUM_BLOCK_WEIGHT?

Given that we are launching a parachain, what impact does the relay chain have in determining how we should set these variables?

1 Answer 1

3

This is entirely controlled by the relay chain right now, as the limits enforced on your chain must be less than the limits enforced by the relay chain validators whom will validate your blocks.

This seems low, given that we have 12 seconds to produce a block.

Indeed it is, and getting these numbers to a better spot is the primary focus of the parachain team. To learn more about that, you should look at the work they are doing on asynchronous backing.

Asynchronous Backing is the first set of major optimizations to Polkadot’s parachain consensus protocol since its launch on Polkadot in December 2021. Scalability is a huge topic in the blockchain ecosystem, and the goal of Parity and the Web3 Foundation as protocol designers is to meet the demand of parachains by providing each parachain with a large increase in block capacity. If Asynchronous Backing is enabled by the network, the block time of 12 seconds for parachains will be shortened to 6 seconds, which will mean lower latency and faster finality for transactions executed on parachains. Furthermore, the parachain blocks themselves will be allocated more time for execution, meaning that they get even more throughput.

Asynchronous Backing is a large upgrade spanning the runtime, the networking protocol, and the logic of collators which is designed to do 3 things: decrease the parachain block time to 6 seconds, increase the amount of block space available to each block by a factor of 5-10, and allow parachain blocks to be ‘reused’ when they don’t make it onto the relay chain in the first attempt. This is a major scalability improvement which will both increase the amount of work every parachain can do and will optimize network performance to allow for more parachains to be registered. We estimate that this update will bring the TPS capacity of the network in aggregate to between 100,000 and 1,000,000, without affecting the security guarantees made by the network.

We estimate that Asynchronous Backing will be ready for deployment on Kusama by EOY 2022 and then on Polkadot, pending the results of audits and testing.

At the moment, Polkadot relay chain is configured to produce new parachain blocks every 12 seconds, and each block has a maximum weight of .5 seconds computation, and 5 MB proof size.

Your Answer

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

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