SCORU: Add refutation games

Merged corneliuhoffman requested to merge scoru@add-refutation-game into master

Owner: @yrg


This introduces a refutation game on the SCORU project. It is based on the PVM specs in # !4343 .

It is in fact a functor that takes a PVM and produce a game. The game state at a certain point is

 type t = {
    turn : player;
    start_state : P.state;
    start_at : Tick_repr.t;
    player_stop_state : P.state;
    opponent_stop_state : P.state;
    stop_at : Tick_repr.t;
    current_dissection : Section_repr.dissection option;
  • The output of a game is {winner : player option; reason : reason}
  • A client is a pair of an initial move and a next_move strategy.
  • The game is run with a function that takes a starting tick, a starting state and a committer and a refuter client and produces an output.
  val run :
    start_at: Tick_repr.t ->
    start_state:P.state ->
    committer:('a * P.state, commit) client ->
    refuter:(P.state * commit, refutation) client ->

Manually testing the MR

dune exec  src/proto_alpha/lib_protocol/test/pbt/refutation_game_pbt.exe

It is still in draft because I want to write another set of tests.


  • Document the interface of any function added or modified (see the coding guidelines)
  • Provide automatic testing (see the testing guide).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR
Edited by Yann Regis-Gianas