Attempt genesis block creation as soon as possible
Cf: https://github.com/MinaProtocol/mina/pull/16181
Genesis block creation is now attempted as soon as possible after the network starts. Formerly, it would be delayed to the last possible moment in the block production iteration. In addition, to reduce duplication frontier reading has also been moved out of the block production function itself and into the top-level block production iteration.
This PR follows https://github.com/MinaProtocol/mina/pull/16728 in a series of PRs that refactor various parts of block production. It currently contains a couple of initial commits from #16728 that will become unnecessary once that PR is merged. This PR introduces the same changes that were in https://github.com/MinaProtocol/mina/pull/16225, except split into several commits and based on a more recent compatible.
Attn @georgeee
Sorry, pushed to the wrong branch. Will fix.
Fixed. The latest force-push just incorporates the changes from https://github.com/MinaProtocol/mina/pull/16728 and shouldn't have changed anything beyond that.
Added a changelog entry, because this PR does actually change block producer behaviour (reducing first block production time), unlike the first two in the series.
There's a merge conflict, maybe you need to fix it?
I kindly suggest we add documentations in module Block_producer, it' hard to review as there's nothing.
The name need improvement if possible as well. For example the name of top level function iteration is really not intuitive.
It would be best if we could also have a interface written so to show reviewer what is exposed to external modules and what is not.
I did reviewed this a while ago but I forgot most of the context now.
This needs to be redo I think.
Oh, I remember the reason we abort this effort is there's bug introduced when trying to refactor interruptible away.