[go: up one dir, main page]

Etherlink/Kernel/Stage 2: promote_block gets the block to promote

Checklist

  • Provide automatic testing.
  • Add an item in the changelog

What

Stacked on !16684 (merged).

This MR propagates the block being finalized in compute_bip to the promote_block function.

Why

This gives access to all the fields of the block without having to re-read them from the storage. In particular the block number (similarly to !16661 (merged)), the block hash, and the timestamp (which will be useful in a later MR).

How

  • In the first commit, we extend the result type of compute_bip with a Box<L2Block>. This requires to distinguish it from the result type of compute which is renamed BlockInProgressComputationResult.
  • In the second commit, the extra argument is propagated and used to avoid reading the storage.

Manually testing the MR

Edited by Raphaël Cauderlier

Merge request reports

Loading