package tezos-protocol-015-PtLimaPt

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Checks that the tick count chosen by the current move is one of the ones in the current dissection. Returns a tuple containing the current dissection interval (including the two states) between this tick and the next.

val check_dissection : default_number_of_sections:int -> start_chunk:dissection_chunk -> stop_chunk:dissection_chunk -> dissection_chunk list -> (unit, reason) Tezos_protocol_environment_015_PtLimaPt.Pervasives.result Tezos_protocol_environment_015_PtLimaPt.Lwt.t

We check firstly that dissection is the correct length. It must be default_number_of_sections values long, unless the distance between start_tick and stop_tick is too small to make this possible, in which case it should be as long as possible. (If the distance is one we fail immediately as there is no possible legal dissection).

Then we check that dissection starts at the correct tick and state, and that it ends at the correct tick and with a different state to the current dissection.

Finally, we check that dissection is well formed: it has correctly ordered the ticks, and it begins with a real hash of the form Some s not a None state. Note that we have to allow the possibility of multiple None states because the restrictions on dissection shape (which are necessary to prevent a 'linear-time game' attack) will mean that sometimes the honest play is a dissection with multiple None states.

OCaml

Innovation. Community. Security.