[go: up one dir, main page]

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_block and Preconfirm_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

  1. Produce_genesis request => does the equivalent of previous ad-hoc logic of sequencer.ml, but using Evm_context functions implemented for the matter
  2. Request takes care of computing the next block timestamp, from its provided protocol time => this is fine because it essentially corresponds to Now outside of test scenarios
  3. Validation state becomes an option => set to None when clear (instead of init before), initialized on the first preconfirmation of every block
Edited by plissi

Merge request reports

Loading