Skip to content

Dal/Scoru: fix the way `ancestor_hash` works around origination_level

Mohamed IGUERNLALA requested to merge functori@fix-dal-scoru-startup into master

Context

The function should not return None for blocks/DAL slots published before a scoru's origination level. Otherwise, some invariants about how Dal skip list is initialized in the node's store is broken.

In fact, if slots_info returns None for slots published before origination_level, Confirmed_slots_history.update will not be called and Confirmed_slots_history table will not be (correctly) initialized. This results in an error:

"The confirmed DAL slots history for block hash %a (level = %a) is missing."

When processing the block of the next level.

Manually testing the MR

Checklist

  • Document the interface of any function added or modified (see the coding guidelines)
  • Document any change to the user interface, including configuration parameters (see node configuration)
  • Provide automatic testing (see the testing guide).
  • For new features and bug fixes, add an item in the appropriate changelog (docs/protocols/alpha.rst for the protocol and the environment, CHANGES.rst at the root of the repository for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR
Edited by Mohamed IGUERNLALA

Merge request reports