Skip to content

Rollup node: use context from head block to fetch constants

Alain Mebsout requested to merge alain@functori@fix-constants-migration into master

What

This MR fixes a bug with the protocol migration code of the rollup node. It would fetch constants from the previous protocol using a potentially too old block reference.

Why

Using the first block of the protocol to fetch constants is a bad idea because this block might be gone from the context of the L1 node.

This could happen in the rollup node is stopped before processing a protocol migration. On restart, it would need to catch up on this migration and would need the constants from the previous protocol.

How

Instead, we use the constants from the context of the block we're interested in (if we don't know them already).

Merge request reports