Skip to main content

🍲 Dal_errors_repr.v

Translated OCaml

Gitlab , OCaml

File generated by coq-of-ocaml
Require Import CoqOfOCaml.CoqOfOCaml.
Require Import CoqOfOCaml.Settings.

Require Import TezosOfOCaml.Environment.V8.
Require TezosOfOCaml.Proto_alpha.Dal_slot_repr.
Require TezosOfOCaml.Proto_alpha.Level_repr.
Require TezosOfOCaml.Proto_alpha.Raw_level_repr.
Require TezosOfOCaml.Proto_alpha.Tez_repr.

Module Dal_attestation_unexpected_size.
  Record record : Set := Build {
    expected : int;
    got : int;
  }.
  Definition with_expected expected (r : record) :=
    Build expected r.(got).
  Definition with_got got (r : record) :=
    Build r.(expected) got.
End Dal_attestation_unexpected_size.
Definition Dal_attestation_unexpected_size :=
  Dal_attestation_unexpected_size.record.

Module Dal_publish_slot_header_future_level.
  Record record : Set := Build {
    provided : Raw_level_repr.t;
    expected : Raw_level_repr.t;
  }.
  Definition with_provided provided (r : record) :=
    Build provided r.(expected).
  Definition with_expected expected (r : record) :=
    Build r.(provided) expected.
End Dal_publish_slot_header_future_level.
Definition Dal_publish_slot_header_future_level :=
  Dal_publish_slot_header_future_level.record.

Module Dal_publish_slot_header_past_level.
  Record record : Set := Build {
    provided : Raw_level_repr.t;
    expected : Raw_level_repr.t;
  }.
  Definition with_provided provided (r : record) :=
    Build provided r.(expected).
  Definition with_expected expected (r : record) :=
    Build r.(provided) expected.
End Dal_publish_slot_header_past_level.
Definition Dal_publish_slot_header_past_level :=
  Dal_publish_slot_header_past_level.record.

Module Dal_publish_slot_header_invalid_index.
  Record record : Set := Build {
    given : Dal_slot_repr.Index.t;
    maximum : Dal_slot_repr.Index.t;
  }.
  Definition with_given given (r : record) :=
    Build given r.(maximum).
  Definition with_maximum maximum (r : record) :=
    Build r.(given) maximum.
End Dal_publish_slot_header_invalid_index.
Definition Dal_publish_slot_header_invalid_index :=
  Dal_publish_slot_header_invalid_index.record.

Module Dal_publish_slot_header_candidate_with_low_fees.
  Record record : Set := Build {
    proposed_fees : Tez_repr.t;
  }.
  Definition with_proposed_fees proposed_fees (r : record) :=
    Build proposed_fees.
End Dal_publish_slot_header_candidate_with_low_fees.
Definition Dal_publish_slot_header_candidate_with_low_fees :=
  Dal_publish_slot_header_candidate_with_low_fees.record.

Module Dal_attestation_size_limit_exceeded.
  Record record : Set := Build {
    maximum_size : int;
    got : int;
  }.
  Definition with_maximum_size maximum_size (r : record) :=
    Build maximum_size r.(got).
  Definition with_got got (r : record) :=
    Build r.(maximum_size) got.
End Dal_attestation_size_limit_exceeded.
Definition Dal_attestation_size_limit_exceeded :=
  Dal_attestation_size_limit_exceeded.record.

Module Dal_publish_slot_header_duplicate.
  Record record : Set := Build {
    slot_header : Dal_slot_repr.Header.t;
  }.
  Definition with_slot_header slot_header (r : record) :=
    Build slot_header.
End Dal_publish_slot_header_duplicate.
Definition Dal_publish_slot_header_duplicate :=
  Dal_publish_slot_header_duplicate.record.

Module Dal_data_availibility_attestor_not_in_committee.
  Record record : Set := Build {
    attestor : Signature.public_key_hash;
    level : Level_repr.t;
  }.
  Definition with_attestor attestor (r : record) :=
    Build attestor r.(level).
  Definition with_level level (r : record) :=
    Build r.(attestor) level.
End Dal_data_availibility_attestor_not_in_committee.
Definition Dal_data_availibility_attestor_not_in_committee :=
  Dal_data_availibility_attestor_not_in_committee.record.

Module Dal_operation_for_old_level.
  Record record : Set := Build {
    current : Raw_level_repr.t;
    given : Raw_level_repr.t;
  }.
  Definition with_current current (r : record) :=
    Build current r.(given).
  Definition with_given given (r : record) :=
    Build r.(current) given.
End Dal_operation_for_old_level.
Definition Dal_operation_for_old_level := Dal_operation_for_old_level.record.

Module Dal_operation_for_future_level.
  Record record : Set := Build {
    current : Raw_level_repr.t;
    given : Raw_level_repr.t;
  }.
  Definition with_current current (r : record) :=
    Build current r.(given).
  Definition with_given given (r : record) :=
    Build r.(current) given.
End Dal_operation_for_future_level.
Definition Dal_operation_for_future_level :=
  Dal_operation_for_future_level.record.

Init function; without side-effects in Coq
Definition init_module_repr : unit :=
  let description :=
    "Data-availability layer will be enabled in a future proposal." in
  let '_ :=
    Error_monad.register_error_kind Error_monad.Permanent
      "operation.dal_disabled" "DAL is disabled" description
      (Some
        (fun (ppf : Format.formatter) ⇒
          fun (function_parameter : unit) ⇒
            let '_ := function_parameter in
            Format.fprintf ppf
              (CamlinternalFormatBasics.Format
                (CamlinternalFormatBasics.String
                  CamlinternalFormatBasics.No_padding
                  CamlinternalFormatBasics.End_of_format) "%s") description))
      Data_encoding.unit_value
      (fun (function_parameter : Error_monad._error) ⇒
        match function_parameter with
        | Build_extensible tag _ payload
          if String.eqb tag "Dal_feature_disabled" then
            Some tt
          else None
        end)
      (fun (function_parameter : unit) ⇒
        let '_ := function_parameter in
        Build_extensible "Dal_feature_disabled" unit tt) in
  let description :=
    "The attestation for data availability has a different size" in
  let '_ :=
    Error_monad.register_error_kind Error_monad.Permanent
      "dal_attestation_unexpected_size" "DAL attestation unexpected size"
      description
      (Some
        (fun (ppf : Format.formatter) ⇒
          fun (function_parameter : int × int) ⇒
            let '(expected, got) := function_parameter in
            Format.fprintf ppf
              (CamlinternalFormatBasics.Format
                (CamlinternalFormatBasics.String
                  CamlinternalFormatBasics.No_padding
                  (CamlinternalFormatBasics.String_literal ": Expected "
                    (CamlinternalFormatBasics.Int CamlinternalFormatBasics.Int_d
                      CamlinternalFormatBasics.No_padding
                      CamlinternalFormatBasics.No_precision
                      (CamlinternalFormatBasics.String_literal ". Got "
                        (CamlinternalFormatBasics.Int
                          CamlinternalFormatBasics.Int_d
                          CamlinternalFormatBasics.No_padding
                          CamlinternalFormatBasics.No_precision
                          (CamlinternalFormatBasics.Char_literal "." % char
                            CamlinternalFormatBasics.End_of_format))))))
                "%s: Expected %d. Got %d.") description expected got))
      (Data_encoding.obj2
        (Data_encoding.req None None "expected_size" Data_encoding.int31)
        (Data_encoding.req None None "got" Data_encoding.int31))
      (fun (function_parameter : Error_monad._error) ⇒
        match function_parameter with
        | Build_extensible tag _ payload
          if String.eqb tag "Dal_attestation_unexpected_size" then
            let '{|
              Dal_attestation_unexpected_size.expected := expected;
                Dal_attestation_unexpected_size.got := got
                |} := cast Dal_attestation_unexpected_size payload in
            Some (expected, got)
          else None
        end)
      (fun (function_parameter : int × int) ⇒
        let '(expected, got) := function_parameter in
        Build_extensible "Dal_attestation_unexpected_size"
          Dal_attestation_unexpected_size
          {| Dal_attestation_unexpected_size.expected := expected;
            Dal_attestation_unexpected_size.got := got; |}) in
  let description := "Slot index above hard limit" in
  let '_ :=
    Error_monad.register_error_kind Error_monad.Permanent
      "dal_slot_index_negative_orabove_hard_limit"
      "DAL slot index negative or above hard limit" description
      (Some
        (fun (ppf : Format.formatter) ⇒
          fun (function_parameter : unit) ⇒
            let '_ := function_parameter in
            Format.fprintf ppf
              (CamlinternalFormatBasics.Format
                (CamlinternalFormatBasics.String
                  CamlinternalFormatBasics.No_padding
                  (CamlinternalFormatBasics.String_literal ": Maximum allowed "
                    (CamlinternalFormatBasics.Alpha
                      (CamlinternalFormatBasics.Char_literal "." % char
                        CamlinternalFormatBasics.End_of_format))))
                "%s: Maximum allowed %a.") description Dal_slot_repr.Index.pp
              Dal_slot_repr.Index.max_value)) Data_encoding.unit_value
      (fun (function_parameter : Error_monad._error) ⇒
        match function_parameter with
        | Build_extensible tag _ payload
          if String.eqb tag "Dal_slot_index_above_hard_limit" then
            Some tt
          else None
        end)
      (fun (function_parameter : unit) ⇒
        let '_ := function_parameter in
        Build_extensible "Dal_slot_index_above_hard_limit" unit tt) in
  let description := "Unexpected level in the future in slot header" in
  let '_ :=
    Error_monad.register_error_kind Error_monad.Temporary
      "dal_publish_slot_header_future_level" "DAL slot header future level"
      description
      (Some
        (fun (ppf : Format.formatter) ⇒
          fun (function_parameter :
            Raw_level_repr.raw_level × Raw_level_repr.raw_level) ⇒
            let '(provided, expected) := function_parameter in
            Format.fprintf ppf
              (CamlinternalFormatBasics.Format
                (CamlinternalFormatBasics.String
                  CamlinternalFormatBasics.No_padding
                  (CamlinternalFormatBasics.String_literal ": Provided "
                    (CamlinternalFormatBasics.Alpha
                      (CamlinternalFormatBasics.String_literal ". Expected "
                        (CamlinternalFormatBasics.Alpha
                          (CamlinternalFormatBasics.Char_literal "." % char
                            CamlinternalFormatBasics.End_of_format))))))
                "%s: Provided %a. Expected %a.") description Raw_level_repr.pp
              provided Raw_level_repr.pp expected))
      (Data_encoding.obj2
        (Data_encoding.req None None "provided" Raw_level_repr.encoding)
        (Data_encoding.req None None "got" Raw_level_repr.encoding))
      (fun (function_parameter : Error_monad._error) ⇒
        match function_parameter with
        | Build_extensible tag _ payload
          if String.eqb tag "Dal_publish_slot_header_future_level" then
            let '{|
              Dal_publish_slot_header_future_level.provided := provided;
                Dal_publish_slot_header_future_level.expected := expected
                |} := cast Dal_publish_slot_header_future_level payload in
            Some (provided, expected)
          else None
        end)
      (fun (function_parameter :
        Raw_level_repr.raw_level × Raw_level_repr.raw_level) ⇒
        let '(provided, expected) := function_parameter in
        Build_extensible "Dal_publish_slot_header_future_level"
          Dal_publish_slot_header_future_level
          {| Dal_publish_slot_header_future_level.provided := provided;
            Dal_publish_slot_header_future_level.expected := expected; |}) in
  let description := "Unexpected level in the past in slot header" in
  let '_ :=
    Error_monad.register_error_kind Error_monad.Branch
      "dal_publish_slot_header_past_level" "DAL slot header past level"
      description
      (Some
        (fun (ppf : Format.formatter) ⇒
          fun (function_parameter :
            Raw_level_repr.raw_level × Raw_level_repr.raw_level) ⇒
            let '(provided, expected) := function_parameter in
            Format.fprintf ppf
              (CamlinternalFormatBasics.Format
                (CamlinternalFormatBasics.String
                  CamlinternalFormatBasics.No_padding
                  (CamlinternalFormatBasics.String_literal ": Provided "
                    (CamlinternalFormatBasics.Alpha
                      (CamlinternalFormatBasics.String_literal ". Expected "
                        (CamlinternalFormatBasics.Alpha
                          (CamlinternalFormatBasics.Char_literal "." % char
                            CamlinternalFormatBasics.End_of_format))))))
                "%s: Provided %a. Expected %a.") description Raw_level_repr.pp
              provided Raw_level_repr.pp expected))
      (Data_encoding.obj2
        (Data_encoding.req None None "provided" Raw_level_repr.encoding)
        (Data_encoding.req None None "got" Raw_level_repr.encoding))
      (fun (function_parameter : Error_monad._error) ⇒
        match function_parameter with
        | Build_extensible tag _ payload
          if String.eqb tag "Dal_publish_slot_header_past_level" then
            let '{|
              Dal_publish_slot_header_past_level.provided := provided;
                Dal_publish_slot_header_past_level.expected := expected
                |} := cast Dal_publish_slot_header_past_level payload in
            Some (provided, expected)
          else None
        end)
      (fun (function_parameter :
        Raw_level_repr.raw_level × Raw_level_repr.raw_level) ⇒
        let '(provided, expected) := function_parameter in
        Build_extensible "Dal_publish_slot_header_past_level"
          Dal_publish_slot_header_past_level
          {| Dal_publish_slot_header_past_level.provided := provided;
            Dal_publish_slot_header_past_level.expected := expected; |}) in
  let description := "Bad index for slot header" in
  let '_ :=
    Error_monad.register_error_kind Error_monad.Permanent
      "dal_publish_slot_header_invalid_index" "DAL slot header invalid index"
      description
      (Some
        (fun (ppf : Format.formatter) ⇒
          fun (function_parameter :
            Dal_slot_repr.Index.t × Dal_slot_repr.Index.t) ⇒
            let '(given, maximum) := function_parameter in
            Format.fprintf ppf
              (CamlinternalFormatBasics.Format
                (CamlinternalFormatBasics.String
                  CamlinternalFormatBasics.No_padding
                  (CamlinternalFormatBasics.String_literal ": Given "
                    (CamlinternalFormatBasics.Alpha
                      (CamlinternalFormatBasics.String_literal ". Maximum "
                        (CamlinternalFormatBasics.Alpha
                          (CamlinternalFormatBasics.Char_literal "." % char
                            CamlinternalFormatBasics.End_of_format))))))
                "%s: Given %a. Maximum %a.") description Dal_slot_repr.Index.pp
              given Dal_slot_repr.Index.pp maximum))
      (Data_encoding.obj2
        (Data_encoding.req None None "given" Dal_slot_repr.Index.encoding)
        (Data_encoding.req None None "got" Dal_slot_repr.Index.encoding))
      (fun (function_parameter : Error_monad._error) ⇒
        match function_parameter with
        | Build_extensible tag _ payload
          if String.eqb tag "Dal_publish_slot_header_invalid_index" then
            let '{|
              Dal_publish_slot_header_invalid_index.given := given;
                Dal_publish_slot_header_invalid_index.maximum := maximum
                |} := cast Dal_publish_slot_header_invalid_index payload in
            Some (given, maximum)
          else None
        end)
      (fun (function_parameter : Dal_slot_repr.Index.t × Dal_slot_repr.Index.t)
        ⇒
        let '(given, maximum) := function_parameter in
        Build_extensible "Dal_publish_slot_header_invalid_index"
          Dal_publish_slot_header_invalid_index
          {| Dal_publish_slot_header_invalid_index.given := given;
            Dal_publish_slot_header_invalid_index.maximum := maximum; |}) in
  let description := "Slot header with too low fees" in
  let '_ :=
    Error_monad.register_error_kind Error_monad.Permanent
      "dal_publish_slot_header_with_low_fees" "DAL slot header with low fees"
      description
      (Some
        (fun (ppf : Format.formatter) ⇒
          fun (proposed : Tez_repr.t) ⇒
            Format.fprintf ppf
              (CamlinternalFormatBasics.Format
                (CamlinternalFormatBasics.String
                  CamlinternalFormatBasics.No_padding
                  (CamlinternalFormatBasics.String_literal ": Proposed fees "
                    (CamlinternalFormatBasics.Alpha
                      (CamlinternalFormatBasics.Char_literal "." % char
                        CamlinternalFormatBasics.End_of_format))))
                "%s: Proposed fees %a.") description Tez_repr.pp proposed))
      (Data_encoding.obj1
        (Data_encoding.req None None "proposed" Tez_repr.encoding))
      (fun (function_parameter : Error_monad._error) ⇒
        match function_parameter with
        | Build_extensible tag _ payload
          if String.eqb tag "Dal_publish_slot_header_candidate_with_low_fees"
            then
            let '{|
              Dal_publish_slot_header_candidate_with_low_fees.proposed_fees := proposed_fees
                |} :=
              cast Dal_publish_slot_header_candidate_with_low_fees payload in
            Some proposed_fees
          else None
        end)
      (fun (proposed_fees : Tez_repr.t) ⇒
        Build_extensible "Dal_publish_slot_header_candidate_with_low_fees"
          Dal_publish_slot_header_candidate_with_low_fees
          {|
            Dal_publish_slot_header_candidate_with_low_fees.proposed_fees :=
              proposed_fees; |}) in
  let description := "The attestation for data availability is a too big" in
  let '_ :=
    Error_monad.register_error_kind Error_monad.Permanent
      "dal_attestation_size_limit_exceeded" "DAL attestation exceeded the limit"
      description
      (Some
        (fun (ppf : Format.formatter) ⇒
          fun (function_parameter : int × int) ⇒
            let '(maximum_size, got) := function_parameter in
            Format.fprintf ppf
              (CamlinternalFormatBasics.Format
                (CamlinternalFormatBasics.String
                  CamlinternalFormatBasics.No_padding
                  (CamlinternalFormatBasics.String_literal ": Maximum is "
                    (CamlinternalFormatBasics.Int CamlinternalFormatBasics.Int_d
                      CamlinternalFormatBasics.No_padding
                      CamlinternalFormatBasics.No_precision
                      (CamlinternalFormatBasics.String_literal ". Got "
                        (CamlinternalFormatBasics.Int
                          CamlinternalFormatBasics.Int_d
                          CamlinternalFormatBasics.No_padding
                          CamlinternalFormatBasics.No_precision
                          (CamlinternalFormatBasics.Char_literal "." % char
                            CamlinternalFormatBasics.End_of_format))))))
                "%s: Maximum is %d. Got %d.") description maximum_size got))
      (Data_encoding.obj2
        (Data_encoding.req None None "maximum_size" Data_encoding.int31)
        (Data_encoding.req None None "got" Data_encoding.int31))
      (fun (function_parameter : Error_monad._error) ⇒
        match function_parameter with
        | Build_extensible tag _ payload
          if String.eqb tag "Dal_attestation_size_limit_exceeded" then
            let '{|
              Dal_attestation_size_limit_exceeded.maximum_size := maximum_size;
                Dal_attestation_size_limit_exceeded.got := got
                |} := cast Dal_attestation_size_limit_exceeded payload in
            Some (maximum_size, got)
          else None
        end)
      (fun (function_parameter : int × int) ⇒
        let '(maximum_size, got) := function_parameter in
        Build_extensible "Dal_attestation_size_limit_exceeded"
          Dal_attestation_size_limit_exceeded
          {| Dal_attestation_size_limit_exceeded.maximum_size := maximum_size;
            Dal_attestation_size_limit_exceeded.got := got; |}) in
  let description := "A slot header for this slot was already proposed" in
  let '_ :=
    Error_monad.register_error_kind Error_monad.Permanent
      "dal_publish_slot_heade_duplicate" "DAL publish slot header duplicate"
      description
      (Some
        (fun (ppf : Format.formatter) ⇒
          fun (_proposed : Dal_slot_repr.Header.t) ⇒
            Format.fprintf ppf
              (CamlinternalFormatBasics.Format
                (CamlinternalFormatBasics.String
                  CamlinternalFormatBasics.No_padding
                  CamlinternalFormatBasics.End_of_format) "%s") description))
      (Data_encoding.obj1
        (Data_encoding.req None None "proposed" Dal_slot_repr.Header.encoding))
      (fun (function_parameter : Error_monad._error) ⇒
        match function_parameter with
        | Build_extensible tag _ payload
          if String.eqb tag "Dal_publish_slot_header_duplicate" then
            let '{|
              Dal_publish_slot_header_duplicate.slot_header := slot_header
                |} := cast Dal_publish_slot_header_duplicate payload in
            Some slot_header
          else None
        end)
      (fun (slot_header : Dal_slot_repr.Header.t) ⇒
        Build_extensible "Dal_publish_slot_header_duplicate"
          Dal_publish_slot_header_duplicate
          {| Dal_publish_slot_header_duplicate.slot_header := slot_header; |})
    in
  let '_ :=
    Error_monad.register_error_kind Error_monad.Outdated
      "Dal_operation_for_old_level" "Dal operation for an old level"
      "The Dal operation targets an old level"
      (Some
        (fun (ppf : Format.formatter) ⇒
          fun (function_parameter :
            Raw_level_repr.raw_level × Raw_level_repr.raw_level) ⇒
            let '(current_lvl, given_lvl) := function_parameter in
            Format.fprintf ppf
              (CamlinternalFormatBasics.Format
                (CamlinternalFormatBasics.String_literal
                  "Dal operation targets an old level "
                  (CamlinternalFormatBasics.Alpha
                    (CamlinternalFormatBasics.String_literal
                      ". Current level is "
                      (CamlinternalFormatBasics.Alpha
                        (CamlinternalFormatBasics.Char_literal "." % char
                          CamlinternalFormatBasics.End_of_format)))))
                "Dal operation targets an old level %a. Current level is %a.")
              Raw_level_repr.pp given_lvl Raw_level_repr.pp current_lvl))
      (Data_encoding.obj2
        (Data_encoding.req None None "current_level" Raw_level_repr.encoding)
        (Data_encoding.req None None "given_level" Raw_level_repr.encoding))
      (fun (function_parameter : Error_monad._error) ⇒
        match function_parameter with
        | Build_extensible tag _ payload
          if String.eqb tag "Dal_operation_for_old_level" then
            let '{|
              Dal_operation_for_old_level.current := current;
                Dal_operation_for_old_level.given := given
                |} := cast Dal_operation_for_old_level payload in
            Some (current, given)
          else None
        end)
      (fun (function_parameter :
        Raw_level_repr.raw_level × Raw_level_repr.raw_level) ⇒
        let '(current, given) := function_parameter in
        Build_extensible "Dal_operation_for_old_level"
          Dal_operation_for_old_level
          {| Dal_operation_for_old_level.current := current;
            Dal_operation_for_old_level.given := given; |}) in
  let '_ :=
    Error_monad.register_error_kind Error_monad.Temporary
      "Dal_operation_for_future_level" "Dal operation for a future level"
      "The Dal operation target a future level"
      (Some
        (fun (ppf : Format.formatter) ⇒
          fun (function_parameter :
            Raw_level_repr.raw_level × Raw_level_repr.raw_level) ⇒
            let '(current_lvl, given_lvl) := function_parameter in
            Format.fprintf ppf
              (CamlinternalFormatBasics.Format
                (CamlinternalFormatBasics.String_literal
                  "Dal operation targets a future level "
                  (CamlinternalFormatBasics.Alpha
                    (CamlinternalFormatBasics.String_literal
                      ". Current level is "
                      (CamlinternalFormatBasics.Alpha
                        (CamlinternalFormatBasics.Char_literal "." % char
                          CamlinternalFormatBasics.End_of_format)))))
                "Dal operation targets a future level %a. Current level is %a.")
              Raw_level_repr.pp given_lvl Raw_level_repr.pp current_lvl))
      (Data_encoding.obj2
        (Data_encoding.req None None "current_level" Raw_level_repr.encoding)
        (Data_encoding.req None None "given_level" Raw_level_repr.encoding))
      (fun (function_parameter : Error_monad._error) ⇒
        match function_parameter with
        | Build_extensible tag _ payload
          if String.eqb tag "Dal_operation_for_future_level" then
            let '{|
              Dal_operation_for_future_level.current := current;
                Dal_operation_for_future_level.given := given
                |} := cast Dal_operation_for_future_level payload in
            Some (current, given)
          else None
        end)
      (fun (function_parameter :
        Raw_level_repr.raw_level × Raw_level_repr.raw_level) ⇒
        let '(current, given) := function_parameter in
        Build_extensible "Dal_operation_for_future_level"
          Dal_operation_for_future_level
          {| Dal_operation_for_future_level.current := current;
            Dal_operation_for_future_level.given := given; |}) in
  Error_monad.register_error_kind Error_monad.Permanent
    "Dal_data_availibility_attestor_not_in_committee"
    "The attestor is not part of the DAL committee for this level"
    "The attestor is not part of the DAL committee for this level"
    (Some
      (fun (ppf : Format.formatter) ⇒
        fun (function_parameter : Signature.public_key_hash × Level_repr.level)
          ⇒
          let '(attestor, level) := function_parameter in
          Format.fprintf ppf
            (CamlinternalFormatBasics.Format
              (CamlinternalFormatBasics.String_literal "The attestor "
                (CamlinternalFormatBasics.Alpha
                  (CamlinternalFormatBasics.String_literal
                    " is not part of the DAL committee for the level "
                    (CamlinternalFormatBasics.Alpha
                      CamlinternalFormatBasics.End_of_format))))
              "The attestor %a is not part of the DAL committee for the level %a")
            Signature.Public_key_hash.(S.SIGNATURE_PUBLIC_KEY_HASH.pp) attestor
            Level_repr.pp level))
    (Data_encoding.obj2
      (Data_encoding.req None None "attestor"
        Signature.Public_key_hash.(S.SIGNATURE_PUBLIC_KEY_HASH.encoding))
      (Data_encoding.req None None "level" Level_repr.encoding))
    (fun (function_parameter : Error_monad._error) ⇒
      match function_parameter with
      | Build_extensible tag _ payload
        if String.eqb tag "Dal_data_availibility_attestor_not_in_committee" then
          let '{|
            Dal_data_availibility_attestor_not_in_committee.attestor := attestor;
              Dal_data_availibility_attestor_not_in_committee.level := level
              |} :=
            cast Dal_data_availibility_attestor_not_in_committee payload in
          Some (attestor, level)
        else None
      end)
    (fun (function_parameter : Signature.public_key_hash × Level_repr.level) ⇒
      let '(attestor, level) := function_parameter in
      Build_extensible "Dal_data_availibility_attestor_not_in_committee"
        Dal_data_availibility_attestor_not_in_committee
        {| Dal_data_availibility_attestor_not_in_committee.attestor := attestor;
          Dal_data_availibility_attestor_not_in_committee.level := level; |}).