L2 Node: Produce genesis block request
What
Block producer worker request to produce the genesis block.
Also contains a minor rework of our validation state handling.
Why
Genesis block is currently created with ad-hoc logic in sequencer.ml, was not a problem before but the instant confirmation system requires information about the next block to function. We want to:
- Centralize block production in the worker designed for it
- Initialize next block information required by
Produce_blockandPreconfirm_transactions
As for the validation state, because we don't init the first block context before starting the worker anymore, we can't do this inside the on_launch as it accesses durable storage values.
How
-
Produce_genesisrequest => does the equivalent of previous ad-hoc logic ofsequencer.ml, but usingEvm_contextfunctions implemented for the matter - Request takes care of computing the next block timestamp, from its provided protocol time => this is fine because it essentially corresponds to
Nowoutside of test scenarios - Validation state becomes an option => set to
Nonewhen clear (instead of init before), initialized on the first preconfirmation of every block
Edited by plissi