Scoru: avoid unfinished inbox during the snapshot

Valentin Chaboche requested to merge vch9@scoru@avoid-current-inbox-level into master

Context

Closes #3369 (closed)

See the linked issue for more details.

tl;dr: If you start a refutation game in the middle of a tezos block, you will end up taking a snapshot of a mid-level inbox. Thus, the players would need reconstruct this unfinished inbox to play (i.e. to produce valid inbox inclusion proofs). As it is a nightmare, we simply ignore the "work in progress" inbox from the snapshot, and the game will be played on the inbox before the current block. It does not cause any problems as you can not anyway refute messages from the current inbox, the refuted messages must be older.

Manually testing the MR

  • Check that the take_snapshot's result has not changed when the inbox.level is older to the current level.
  • Check that the take_snapshot's result changed when there is messages in the current level.

Checklist

  • n/a Document the interface of any function added or modified (see the coding guidelines)
  • n/a Document any change to the user interface, including configuration parameters (see node configuration)
  • Provide automatic testing (see the testing guide).
  • n/a 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 Valentin Chaboche

Merge request reports