Skip to main content

🐆 Tx_rollup_l2_verifier.v

Proofs

See code, Gitlab , OCaml

The function [verify_proof_model] is valid.
The function [consume_verify_proof_cost] is valid.
The function [hash_message_result] is valid.
Lemma hash_message_result_is_valid
  ctxt after withdraw :
  Raw_context.Valid.t ctxt
  letP? '(ctxt,_) :=
    Tx_rollup_l2_verifier.hash_message_result ctxt after withdraw in
  Raw_context.Valid.t ctxt.
Proof.
  apply Tx_rollup_hash_builder.message_result_is_valid.
Qed.
(*
Definition after_hash_when_proof_failed
  (ctxt : Alpha_context.context) (before : Context_hash.t)
  : M? (Alpha_context.context * Alpha_context.Tx_rollup_message_result_hash.t) :=
  hash_message_result ctxt before
*)


The function [after_has_when_proof_failed] is valid.
The function [compute_proof_after_hash] is valid.
Lemma compute_proof_after_hash_is_valid
  max_proof_size s_z ctxt parameters agreed proof message :
  Raw_context.Valid.t ctxt
  letP? '(ctxt,_) :=
    Tx_rollup_l2_verifier.compute_proof_after_hash
      max_proof_size
      s_z
      ctxt
      parameters
      agreed
      proof
      message
    in
  Raw_context.Valid.t ctxt.
Proof.
  (* TODO: [compute_proof_after_hash] is an axiom *)
Admitted.

The function [verify_proof] is valid. Perhaps a pre-condition on [max_proof_size] could be added.