Proto: SCORU: add storage layer and layer-1 operations for refutation
Context
This MR adds functions to manage the storage of refutation game data in the context (in Sc_rollup_storage), as well as two new layer one operations: Sc_rollup_refute and Sc_rollup_timeout.
Sc_rollup_refute plays a single step in a refutation game. If necessary, it creates a new game (the very first play doesn't look too different from any other play).
Sc_rollup_timeout checks that the staker whose turn it is to move is past the time limit for playing a move in the game, and if so causes them to forfeit the game. This operation can be created by anyone because the rollup node may need to clean up games left behind if both players have disappeared.
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.rstfor the protocol and the environment,CHANGES.rstat the root of the repository for everything else). -
Select suitable reviewers using the Reviewersfield below. -
Select as Assigneethe next person who should take action on that MR
Edited by Thomas Athorne