The question can seem weird but here is the geist of it :
In a custom chain with 20 sec block time, we have a different format of header that includes more information. At the end of the block, we extended the
system::finalize() to generate a "commitment". This process takes roughly between 2 and 8 seconds depending on the size of the block.
Now the issue is that when multiple blocks are full, all blocks take 28 seconds instead of 20 seconds. It's kinda working correctly, the timestamp are ok (since generated before) but I would like to know if there was a way to make this process happen in the 20 seconds.
Of course at the moment this process start, no more transactions can be included in the said block.
How it works currently it theoritically what we want but we would like more consistency.
Tl;dr: How could we allocate ≃25% of our block time to do custom process (just after processing extrinsic but before