[go: up one dir, main page]

Tezt/DAL/Rollup: refutation tests that cover various corner cases

This MR mainly adds 36 different variants of Tezt tests for DAL+Etherlink refutation games. They're built from the following parameters:


  (* First dimension of the tests: we vary inbox_level at which the divergence
     between the honest and loser rollups will happen. This stress-test various
     corner cases regarding the level at which the import request is sent
     w.r.t. published level.  *)
  let dimension_inbox_level_with_flip_side =
    [
      (* Test import around published_level. Nothing should be imported *)
      (published_level - 1, `None_some);
      (published_level + 0, `None_some);
      (published_level + 1, `None_some);
      (* Test import around attested_level. Nothing should be imported for the
         first level below. For the two others, the page should be imported if
         the slot is attested. *)
      (published_level + dal_lag - 1, `None_some);
      (published_level + dal_lag + 0, `Some_none);
      (published_level + dal_lag + 1, `Some_none);
      (* Test import attested_level + TLL. The slot's page should not be
         imported for the third case below, even if it is attested, because its
         TTL expired.  *)
      (published_level + dal_ttl + dal_lag - 1, `Some_none);
      (published_level + dal_ttl + dal_lag + 0, `Some_none);
      (published_level + dal_ttl + dal_lag + 1, `None_some);
    ]
  in

  (* Second dimension of the tests: Which player will start the game. This will
     have an impact on which one will provide the final proof. *)
  let dimension_player_priority = [`Priority_loser; `Priority_honest] in

  (* Third dimension of the tests: We will test both with attested an unattested
     slots. *)
  let dimension_attested = [`Attested; `Unattested] in

How to test:

To test the MR, the fixes in !19977 (merged) (WIP/Dirty) are needed. On top of the corresponding branch (iguer@dal-refutation-tests-3), one should be able to run, e.g.:

make && dune build tezt/lib_tezos && dune build tezt/tests && _build/default/tezt/tests/main.exe --file tezt/tests/sc_rollup.ml --match "dal_page_flipped_at_inbox_level_" -j 10
Edited by Mohamed IGUERNLALA

Merge request reports

Loading