Skip to main content

🏊 Mempool_validation.v

Proofs

See code, Gitlab , OCaml

@TODO 17.11.22 [Proofs.Validate.v] required in proofs, but blacklisted.
(* Require TezosOfOCaml.Proto_alpha.Proofs.Validate. *)
(* Require TezosOfOCaml.Proto_alpha.Proofs.Validate_errors. *)

Module Valid.
  Import Mempool_validation.t.

The validity predicate for the type [Mempool_validation.t].
  Record t (x : Mempool_validation.t) : Prop := {
    predecessor_hash : (* S.HASH.Valid.t x.(predecessor_hash); *) True;
    operation_state : (* Validate.operation_conflict_state.Valid.t  *)
      (* x.(operation_state); *) True;
  }.
End Valid.

The encoding [encoding] is valid.
Lemma encoding_is_valid :
  Data_encoding.Valid.t (fun _True) encoding.
Proof.
  Data_encoding.Valid.data_encoding_auto.
@TODO 16.11.22 [Proofs.Validate.v] is blacklisted.
Admitted.
#[global] Hint Resolve encoding_is_valid : Data_encoding_db.

The function [init_value] is valid
@TODO 16.11.22 Validity predicate is not ready.
Admitted.

The function [remove_operation] is valid
@TODO 16.11.22 Validity predicate is not ready.
Admitted.

The function [add_operation] is valid
@TODO 16.11.22 Validity predicate is not ready.
Admitted.

The function [merge] is valid
Lemma merge_is_valid conflict_handler existing_mempool new_mempool :
  match merge conflict_handler existing_mempool new_mempool with
  | Pervasives.Ok t_resValid.t t_res
  | _True
  end.
Proof.
@TODO 16.11.22 Validity predicate is not ready.
Admitted.