Proto/SCORU: test staker's injectivity in refutation games
Context
Closes #2452 (closed).
One of the properties to maintain during refutation games is the fact that a staker can be part of at most one game at a time (see Sc_rollup_refutation_storage
).
This merge request adds tests to check that this invariant holds.
This is a low-level, unit test based on Sc_rollup_refutation_storage.game_move
because this is the function called to initialize or make a move in the game. Also, only the defender is checked not to play two games at once, but we can add more tests focused on the refuters if needed.
Manually testing the MR
The tests (and others in the same file) can be run with:
dune exec src/proto_alpha/lib_protocol/test/unit/main.exe -- test "^\[Unit\] sc rollup game$"
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 Nicolas Ayache