[go: up one dir, main page]

Rollup node: fix publisher computing wrong commitment after protocol upgrade with constants changes

What

This MR fixes an issue with the rollup node which would compute wrong commitments for blocks of the new protocol after an upgrade in which constants change.

Why

  1. The rollup node changes information about its current protocol in place in its "Node context" when there is a protocol upgrade. However, the publisher uses a read-only version of the node context which is a copy where the current protocol reference was not shared. This means the publisher would not see the new constants after a protocol change.
  2. The constants are cached per protocol, but there was a mismatch (off by one) between the level -> protocol association and the level for which we need to retrieve the constants on L1.

How

  1. We use an additional indirection in the form of a reference for current protocol.
  2. Use correct level to get protocol information.

Manually testing the MR

dune exec tezt/tests/main.exe -- -f sc_rollup_migration.ml -t 'Oxford->Paris: wasm_2_0_0 - node can commit after migration' -v
Edited by Alain Mebsout

Merge request reports

Loading