Skip to content

testing framework: cleanup tezos_state.ml (PART I)

Rémi requested to merge testing/internal-doc-refacto into dev

some doc + cleanup.

the context type threaded through the interpreter has been structured a little bit more:

(*
  The threaded context has three parts:
  - Raw: Tezos state as represented in the tezos code-base (same types)
  - Transduced: data extracted from the raw context and transduced to a more suitable form
    after each baking operation
  - Interpreter internal state: data that can't be extracted from the raw context but still needed by LIGO testing framework
*)
type context = {
  raw : raw ;
  transduced : transduced ;
  internals : internals ;
}
and raw = block
and transduced = {
  last_originations : last_originations ; (* newly orginated contracts caused by the last baking operation *)
  bigmaps : bigmaps ; (* context bigmaps state as ligo values *)
}
and internals = {
  baker : Memory_proto_alpha.Protocol.Alpha_context.Contract.t ; (* baker to be used for the next transfer/origination *)
  source : Memory_proto_alpha.Protocol.Alpha_context.Contract.t ; (* source to be used for the next transfer/origination *)
  next_bootstrapped_contracts : bootstrap_contract list ; (* next contracts to be injected as boostrap accounts in the next state reset *)
  bootstrapped : Memory_proto_alpha.Protocol.Alpha_context.Contract.t list ; (* addresses of boostrapped contracts *)
  storage_tys : storage_tys ; (* contract storage ligo types of all originated contracts *)
  parameter_tys : parameter_tys ; (* contract parameter ligo types of bootstrapped contracts *)
}
  • has a changelog entry
Edited by Rémi

Merge request reports