diff --git a/contrib/kaitai-struct-files/files/alpha__operation.ksy b/contrib/kaitai-struct-files/files/alpha__operation.ksy index 098b5e56fe1c73b1cce6334a050bc31ceb819c23..98b02ee05b8f8e4c42d76601c2a42953729e3660 100644 --- a/contrib/kaitai-struct-files/files/alpha__operation.ksy +++ b/contrib/kaitai-struct-files/files/alpha__operation.ksy @@ -151,9 +151,6 @@ types: - id: double_attestation_evidence type: double_attestation_evidence if: (alpha__operation__alpha__contents_or_signature_prefix_tag == alpha__operation__alpha__contents_or_signature_prefix_tag::double_attestation_evidence) - - id: dal_attestation - type: dal_attestation - if: (alpha__operation__alpha__contents_or_signature_prefix_tag == alpha__operation__alpha__contents_or_signature_prefix_tag::dal_attestation) - id: seed_nonce_revelation type: seed_nonce_revelation if: (alpha__operation__alpha__contents_or_signature_prefix_tag == alpha__operation__alpha__contents_or_signature_prefix_tag::seed_nonce_revelation) @@ -387,16 +384,6 @@ types: type: dal_page_id - id: dal_proof type: bytes_dyn_uint30 - dal_attestation: - seq: - - id: attestation - type: z - - id: level - type: s4 - - id: round - type: s4 - - id: slot - type: u2 dal_page_id: seq: - id: published_level @@ -1908,7 +1895,6 @@ enums: 17: failing_noop 20: preattestation 21: attestation - 22: dal_attestation 23: attestation_with_dal 107: reveal 108: transaction diff --git a/contrib/kaitai-struct-files/files/alpha__operation__contents.ksy b/contrib/kaitai-struct-files/files/alpha__operation__contents.ksy index 668be9e9288003daffb1c70fe4cdbecc36ecdb8e..4ec29818b5cfcb454e13b5a0a2d2d3d0b282a76e 100644 --- a/contrib/kaitai-struct-files/files/alpha__operation__contents.ksy +++ b/contrib/kaitai-struct-files/files/alpha__operation__contents.ksy @@ -140,9 +140,6 @@ types: - id: double_attestation_evidence type: double_attestation_evidence if: (alpha__operation__alpha__contents_tag == alpha__operation__alpha__contents_tag::double_attestation_evidence) - - id: dal_attestation - type: dal_attestation - if: (alpha__operation__alpha__contents_tag == alpha__operation__alpha__contents_tag::dal_attestation) - id: seed_nonce_revelation type: seed_nonce_revelation if: (alpha__operation__alpha__contents_tag == alpha__operation__alpha__contents_tag::seed_nonce_revelation) @@ -364,16 +361,6 @@ types: type: dal_page_id - id: dal_proof type: bytes_dyn_uint30 - dal_attestation: - seq: - - id: attestation - type: z - - id: level - type: s4 - - id: round - type: s4 - - id: slot - type: u2 dal_page_id: seq: - id: published_level @@ -1885,7 +1872,6 @@ enums: 17: failing_noop 20: preattestation 21: attestation - 22: dal_attestation 23: attestation_with_dal 107: reveal 108: transaction diff --git a/contrib/kaitai-struct-files/files/alpha__operation__contents_list.ksy b/contrib/kaitai-struct-files/files/alpha__operation__contents_list.ksy index 33084870dcd612dd7e57643172a747fa1ce9d65b..d9d22fda292152202a8eb068b1766d361263e066 100644 --- a/contrib/kaitai-struct-files/files/alpha__operation__contents_list.ksy +++ b/contrib/kaitai-struct-files/files/alpha__operation__contents_list.ksy @@ -140,9 +140,6 @@ types: - id: double_attestation_evidence type: double_attestation_evidence if: (alpha__operation__alpha__contents_tag == alpha__operation__alpha__contents_tag::double_attestation_evidence) - - id: dal_attestation - type: dal_attestation - if: (alpha__operation__alpha__contents_tag == alpha__operation__alpha__contents_tag::dal_attestation) - id: seed_nonce_revelation type: seed_nonce_revelation if: (alpha__operation__alpha__contents_tag == alpha__operation__alpha__contents_tag::seed_nonce_revelation) @@ -368,16 +365,6 @@ types: type: dal_page_id - id: dal_proof type: bytes_dyn_uint30 - dal_attestation: - seq: - - id: attestation - type: z - - id: level - type: s4 - - id: round - type: s4 - - id: slot - type: u2 dal_page_id: seq: - id: published_level @@ -1889,7 +1876,6 @@ enums: 17: failing_noop 20: preattestation 21: attestation - 22: dal_attestation 23: attestation_with_dal 107: reveal 108: transaction diff --git a/contrib/kaitai-struct-files/files/alpha__operation__protocol_data.ksy b/contrib/kaitai-struct-files/files/alpha__operation__protocol_data.ksy index 79037ed3545e4dc2ae539b73488dc8d41968bb9b..1da822d685360126ba3ade4b070043923c8cf20a 100644 --- a/contrib/kaitai-struct-files/files/alpha__operation__protocol_data.ksy +++ b/contrib/kaitai-struct-files/files/alpha__operation__protocol_data.ksy @@ -151,9 +151,6 @@ types: - id: double_attestation_evidence type: double_attestation_evidence if: (alpha__operation__alpha__contents_or_signature_prefix_tag == alpha__operation__alpha__contents_or_signature_prefix_tag::double_attestation_evidence) - - id: dal_attestation - type: dal_attestation - if: (alpha__operation__alpha__contents_or_signature_prefix_tag == alpha__operation__alpha__contents_or_signature_prefix_tag::dal_attestation) - id: seed_nonce_revelation type: seed_nonce_revelation if: (alpha__operation__alpha__contents_or_signature_prefix_tag == alpha__operation__alpha__contents_or_signature_prefix_tag::seed_nonce_revelation) @@ -387,16 +384,6 @@ types: type: dal_page_id - id: dal_proof type: bytes_dyn_uint30 - dal_attestation: - seq: - - id: attestation - type: z - - id: level - type: s4 - - id: round - type: s4 - - id: slot - type: u2 dal_page_id: seq: - id: published_level @@ -1908,7 +1895,6 @@ enums: 17: failing_noop 20: preattestation 21: attestation - 22: dal_attestation 23: attestation_with_dal 107: reveal 108: transaction diff --git a/contrib/kaitai-struct-files/files/alpha__operation__unsigned.ksy b/contrib/kaitai-struct-files/files/alpha__operation__unsigned.ksy index 421c674fd2a2171dc98a61cb9d983e95b8abbfc1..81e453cdce6b9e662a88548b400c2d9c4a7ab2bb 100644 --- a/contrib/kaitai-struct-files/files/alpha__operation__unsigned.ksy +++ b/contrib/kaitai-struct-files/files/alpha__operation__unsigned.ksy @@ -140,9 +140,6 @@ types: - id: double_attestation_evidence type: double_attestation_evidence if: (alpha__operation__alpha__contents_tag == alpha__operation__alpha__contents_tag::double_attestation_evidence) - - id: dal_attestation - type: dal_attestation - if: (alpha__operation__alpha__contents_tag == alpha__operation__alpha__contents_tag::dal_attestation) - id: seed_nonce_revelation type: seed_nonce_revelation if: (alpha__operation__alpha__contents_tag == alpha__operation__alpha__contents_tag::seed_nonce_revelation) @@ -375,16 +372,6 @@ types: type: dal_page_id - id: dal_proof type: bytes_dyn_uint30 - dal_attestation: - seq: - - id: attestation - type: z - - id: level - type: s4 - - id: round - type: s4 - - id: slot - type: u2 dal_page_id: seq: - id: published_level @@ -1896,7 +1883,6 @@ enums: 17: failing_noop 20: preattestation 21: attestation - 22: dal_attestation 23: attestation_with_dal 107: reveal 108: transaction diff --git a/contrib/kaitai-struct-files/files/alpha__operation_with_legacy_attestation_name.ksy b/contrib/kaitai-struct-files/files/alpha__operation_with_legacy_attestation_name.ksy index 1f2f7285ed68743de2c166430724c4953e5b3353..a0db9e8288dec075c89a7d9d17fc493c0d8f58c1 100644 --- a/contrib/kaitai-struct-files/files/alpha__operation_with_legacy_attestation_name.ksy +++ b/contrib/kaitai-struct-files/files/alpha__operation_with_legacy_attestation_name.ksy @@ -144,9 +144,6 @@ types: - id: double_attestation_evidence type: double_attestation_evidence if: (alpha__operation__alpha__contents_or_signature_prefix_tag == alpha__operation__alpha__contents_or_signature_prefix_tag::double_attestation_evidence) - - id: dal_attestation - type: dal_attestation - if: (alpha__operation__alpha__contents_or_signature_prefix_tag == alpha__operation__alpha__contents_or_signature_prefix_tag::dal_attestation) - id: seed_nonce_revelation type: seed_nonce_revelation if: (alpha__operation__alpha__contents_or_signature_prefix_tag == alpha__operation__alpha__contents_or_signature_prefix_tag::seed_nonce_revelation) @@ -387,16 +384,6 @@ types: type: dal_page_id - id: dal_proof type: bytes_dyn_uint30 - dal_attestation: - seq: - - id: attestation - type: z - - id: level - type: s4 - - id: round - type: s4 - - id: slot - type: u2 dal_page_id: seq: - id: published_level @@ -1908,7 +1895,6 @@ enums: 17: failing_noop 20: preattestation 21: attestation - 22: dal_attestation 23: attestation_with_dal 107: reveal 108: transaction diff --git a/contrib/kaitai-struct-files/files/alpha__operation_with_legacy_attestation_name__unsigned.ksy b/contrib/kaitai-struct-files/files/alpha__operation_with_legacy_attestation_name__unsigned.ksy index 65325b13e8454843e6d22dc30ad4158e2307dd7d..b05e2b2b15838b8eebde29be8d09a790b7941ea6 100644 --- a/contrib/kaitai-struct-files/files/alpha__operation_with_legacy_attestation_name__unsigned.ksy +++ b/contrib/kaitai-struct-files/files/alpha__operation_with_legacy_attestation_name__unsigned.ksy @@ -140,9 +140,6 @@ types: - id: double_endorsement_evidence type: double_endorsement_evidence if: (alpha__operation_with_legacy_attestation_name__alpha__contents_tag == alpha__operation_with_legacy_attestation_name__alpha__contents_tag::double_endorsement_evidence) - - id: dal_attestation - type: dal_attestation - if: (alpha__operation_with_legacy_attestation_name__alpha__contents_tag == alpha__operation_with_legacy_attestation_name__alpha__contents_tag::dal_attestation) - id: seed_nonce_revelation type: seed_nonce_revelation if: (alpha__operation_with_legacy_attestation_name__alpha__contents_tag == alpha__operation_with_legacy_attestation_name__alpha__contents_tag::seed_nonce_revelation) @@ -353,16 +350,6 @@ types: type: dal_page_id - id: dal_proof type: bytes_dyn_uint30 - dal_attestation: - seq: - - id: attestation - type: z - - id: level - type: s4 - - id: round - type: s4 - - id: slot - type: u2 dal_page_id: seq: - id: published_level @@ -1896,7 +1883,6 @@ enums: 17: failing_noop 20: preendorsement 21: endorsement - 22: dal_attestation 23: endorsement_with_dal 107: reveal 108: transaction diff --git a/src/proto_alpha/lib_client/operation_result.ml b/src/proto_alpha/lib_client/operation_result.ml index 9c7f0ad278ba17316efd95135de1d29ba9620790..b99ac7ca776ac51c230abb4f2f802f2c6e3ab667 100644 --- a/src/proto_alpha/lib_client/operation_result.ml +++ b/src/proto_alpha/lib_client/operation_result.ml @@ -1021,12 +1021,6 @@ let pp_contents_and_result : Consensus_key.pp {delegate; consensus_pkh = consensus_key} consensus_power - | Dal_attestation _, Dal_attestation_result {delegate} -> - Format.fprintf - ppf - "@[Slot attestation:@,Delegate: %a@]" - Signature.Public_key_hash.pp - delegate | ( Double_attestation_evidence {op1; op2}, Double_attestation_evidence_result {forbidden_delegate; balance_updates} ) -> diff --git a/src/proto_alpha/lib_injector/injector_plugin.ml b/src/proto_alpha/lib_injector/injector_plugin.ml index 33b9d8111a4c748376528af87357664fa1cca99c..6c02ee34ba4f2fced8ac76eedc8c6f93beac9cdc 100644 --- a/src/proto_alpha/lib_injector/injector_plugin.ml +++ b/src/proto_alpha/lib_injector/injector_plugin.ml @@ -154,7 +154,6 @@ module Proto_client = struct match op_result with | Preattestation_result _ -> Successful | Attestation_result _ -> Successful - | Dal_attestation_result _ -> Successful | Seed_nonce_revelation_result _ -> Successful | Vdf_revelation_result _ -> Successful | Double_attestation_evidence_result _ -> Successful diff --git a/src/proto_alpha/lib_plugin/RPC.ml b/src/proto_alpha/lib_plugin/RPC.ml index 339eaec8cf302e7655a3bc3b91191f6d5984e544..4ba31406427528a059dbb2b556bae8b8fd1d190b 100644 --- a/src/proto_alpha/lib_plugin/RPC.ml +++ b/src/proto_alpha/lib_plugin/RPC.ml @@ -1143,8 +1143,7 @@ module Scripts = struct let*? () = match packed_operation.protocol_data with | Operation_data {contents = Single (Preattestation _); _} - | Operation_data {contents = Single (Attestation _); _} - | Operation_data {contents = Single (Dal_attestation _); _} -> + | Operation_data {contents = Single (Attestation _); _} -> Environment.Error_monad.Result_syntax.tzfail Run_operation_does_not_support_consensus_operations | _ -> Result_syntax.return_unit diff --git a/src/proto_alpha/lib_plugin/mempool.ml b/src/proto_alpha/lib_plugin/mempool.ml index 69361cf3b9d411bab1d7b418069484f685c3ee71..59db951878d897351c2e25202d9d6fb11d5376fc 100644 --- a/src/proto_alpha/lib_plugin/mempool.ml +++ b/src/proto_alpha/lib_plugin/mempool.ml @@ -552,9 +552,6 @@ let pre_filter info config {level = consensus_content.level; round = consensus_content.round} in prefilter_consensus_operation info config level_and_round - | Single (Dal_attestation {level; round; _}) -> - let level_and_round : level_and_round = {level; round} in - prefilter_consensus_operation info config level_and_round | Single (Seed_nonce_revelation _) | Single (Double_preattestation_evidence _) | Single (Double_attestation_evidence _) @@ -692,11 +689,10 @@ let find_manager {shell = _; protocol_data = Operation_data {contents; _}} = | Single (Manager_operation {source; _}) -> Some source | Cons (Manager_operation {source; _}, _) -> Some source | Single - ( Preattestation _ | Attestation _ | Dal_attestation _ | Proposals _ - | Ballot _ | Seed_nonce_revelation _ | Vdf_revelation _ - | Double_baking_evidence _ | Double_preattestation_evidence _ - | Double_attestation_evidence _ | Activate_account _ | Drain_delegate _ - | Failing_noop _ ) -> + ( Preattestation _ | Attestation _ | Proposals _ | Ballot _ + | Seed_nonce_revelation _ | Vdf_revelation _ | Double_baking_evidence _ + | Double_preattestation_evidence _ | Double_attestation_evidence _ + | Activate_account _ | Drain_delegate _ | Failing_noop _ ) -> None (* The purpose of this module is to offer a version of diff --git a/src/proto_alpha/lib_protocol/alpha_context.mli b/src/proto_alpha/lib_protocol/alpha_context.mli index 21b7618f36cbd477f2ede0c7ce3b8b58cb7df918..270b6beedec7b7d0d78240468e670b0984dfbfe8 100644 --- a/src/proto_alpha/lib_protocol/alpha_context.mli +++ b/src/proto_alpha/lib_protocol/alpha_context.mli @@ -2724,13 +2724,6 @@ module Dal : sig module Attestation : sig type t = private Bitset.t - type operation = { - attestation : t; - level : Raw_level.t; - round : Round.t; - slot : Slot.t; - } - type shard_index = int module Shard_map : Map.S with type key = shard_index @@ -2916,7 +2909,6 @@ module Dal_errors : sig type error += | Dal_feature_disabled | Dal_slot_index_above_hard_limit of {given : int; limit : int} - | Dal_attestation_unexpected_size of {expected : int; got : int} | Dal_publish_slot_header_invalid_index of { given : Dal.Slot_index.t; maximum : Dal.Slot_index.t; @@ -2932,17 +2924,7 @@ module Dal_errors : sig attester : Signature.Public_key_hash.t; level : Raw_level.t; } - | Dal_operation_for_old_level of { - expected : Raw_level.t; - given : Raw_level.t; - } - | Dal_operation_for_future_level of { - expected : Raw_level.t; - given : Raw_level.t; - } - | Dal_attestation_for_wrong_round of {expected : Round.t; given : Round.t} | Dal_cryptobox_error of {explanation : string} - | Dal_unexpected_attestation_at_root_level end (** This module re-exports definitions from {!Sc_rollup_storage} and @@ -4352,8 +4334,6 @@ module Kind : sig type attestation = attestation_consensus_kind consensus - type dal_attestation = Dal_attestation_kind - type seed_nonce_revelation = Seed_nonce_revelation_kind type vdf_revelation = Vdf_revelation_kind @@ -4495,7 +4475,6 @@ and _ contents = dal_content : dal_content option; } -> Kind.attestation contents - | Dal_attestation : Dal.Attestation.operation -> Kind.dal_attestation contents | Seed_nonce_revelation : { level : Raw_level.t; nonce : Nonce.t; @@ -4694,7 +4673,6 @@ module Operation : sig type consensus_watermark = | Attestation of Chain_id.t | Preattestation of Chain_id.t - | Dal_attestation of Chain_id.t val to_watermark : consensus_watermark -> Signature.watermark @@ -4786,8 +4764,6 @@ module Operation : sig val attestation_with_dal_case : Kind.attestation case - val dal_attestation_case : Kind.dal_attestation case - val seed_nonce_revelation_case : Kind.seed_nonce_revelation case val vdf_revelation_case : Kind.vdf_revelation case diff --git a/src/proto_alpha/lib_protocol/apply.ml b/src/proto_alpha/lib_protocol/apply.ml index 3f1e7f279653b2f3eb48e724ffe4cc40ebf35e70..ec626989545506b805194b0247cb96cc7e97593b 100644 --- a/src/proto_alpha/lib_protocol/apply.ml +++ b/src/proto_alpha/lib_protocol/apply.ml @@ -2220,7 +2220,6 @@ let record_operation (type kind) ctxt hash (operation : kind operation) : match operation.protocol_data.contents with | Single (Preattestation _) -> ctxt | Single (Attestation _) -> ctxt - | Single (Dal_attestation _) -> ctxt | Single ( Failing_noop _ | Proposals _ | Ballot _ | Seed_nonce_revelation _ | Vdf_revelation _ | Double_attestation_evidence _ @@ -2474,34 +2473,6 @@ let apply_contents_list (type kind) ctxt chain_id (mode : mode) record_preattestation ctxt mode consensus_content | Single (Attestation {consensus_content; dal_content}) -> record_attestation ctxt mode consensus_content dal_content - | Single (Dal_attestation {level; attestation; slot; _}) -> - (* DAL/FIXME https://gitlab.com/tezos/tezos/-/issues/3115 - - This is a temporary operation. This is done in order to avoid modifying - the attestation encoding and to use a committee that changes less - often. However, once the DAL will be ready, this operation should be - merged with an attestation or at least refined. *) - let* ctxt, consensus_key = - match mode with - | Application _ | Full_construction _ -> - let*? consensus_key, _power = - find_in_slot_map slot (Consensus.allowed_attestations ctxt) - in - let*? ctxt = - Dal_apply.apply_attestation ctxt consensus_key level attestation - in - return (ctxt, consensus_key) - | Partial_construction _ -> - (* We do not record the DAL attestation for the same reason, we do - not record the consensus attestation; see reasoning in - {record_attestation}. *) - let level = Level.from_raw ctxt level in - Stake_distribution.slot_owner ctxt level slot - in - return - ( ctxt, - Single_result - (Dal_attestation_result {delegate = consensus_key.delegate}) ) | Single (Seed_nonce_revelation {level; nonce}) -> let level = Level.from_raw ctxt level in let* ctxt = Nonce.reveal ctxt level nonce in diff --git a/src/proto_alpha/lib_protocol/apply_results.ml b/src/proto_alpha/lib_protocol/apply_results.ml index 06bc0928ba318636a84f640e544a10adf7f94754..34e89d9c1a538d5b81c47b0bda1c55f8d08506fd 100644 --- a/src/proto_alpha/lib_protocol/apply_results.ml +++ b/src/proto_alpha/lib_protocol/apply_results.ml @@ -890,10 +890,6 @@ type 'kind contents_result = consensus_power : int; } -> Kind.attestation contents_result - | Dal_attestation_result : { - delegate : Signature.Public_key_hash.t; - } - -> Kind.dal_attestation contents_result | Seed_nonce_revelation_result : Receipt.balance_updates -> Kind.seed_nonce_revelation contents_result @@ -1202,24 +1198,6 @@ module Encoding = struct {balance_updates; delegate; consensus_key; consensus_power}); } - let dal_attestation_case = - Case - { - op_case = Operation.Encoding.dal_attestation_case; - encoding = obj1 (req "delegate" Signature.Public_key_hash.encoding); - select = - (function - | Contents_result (Dal_attestation_result _ as op) -> Some op - | _ -> None); - mselect = - (function - | Contents_and_result ((Dal_attestation _ as op), res) -> - Some (op, res) - | _ -> None); - proj = (function Dal_attestation_result {delegate} -> delegate); - inj = (fun delegate -> Dal_attestation_result {delegate}); - } - let seed_nonce_revelation_case = Case { @@ -1531,7 +1509,6 @@ module Encoding = struct {op with operation_result = Failed (kind, errs)})) | Contents_result (Preattestation_result _) -> None | Contents_result (Attestation_result _) -> None - | Contents_result (Dal_attestation_result _) -> None | Contents_result Ballot_result -> None | Contents_result (Seed_nonce_revelation_result _) -> None | Contents_result (Vdf_revelation_result _) -> None @@ -1796,7 +1773,6 @@ let common_cases = [ seed_nonce_revelation_case; vdf_revelation_case; - dal_attestation_case; double_baking_evidence_case; activate_account_case; proposals_case; @@ -2041,8 +2017,6 @@ let kind_equal : | Attestation _, _ -> None | Preattestation _, Preattestation_result _ -> Some Eq | Preattestation _, _ -> None - | Dal_attestation _, Dal_attestation_result _ -> Some Eq - | Dal_attestation _, _ -> None | Seed_nonce_revelation _, Seed_nonce_revelation_result _ -> Some Eq | Seed_nonce_revelation _, _ -> None | Vdf_revelation _, Vdf_revelation_result _ -> Some Eq diff --git a/src/proto_alpha/lib_protocol/apply_results.mli b/src/proto_alpha/lib_protocol/apply_results.mli index d62d61fcf29a7585e7921d7bb1c2c0b861ca23a1..09b89117532adee8157b63f380d3073053e6ef1a 100644 --- a/src/proto_alpha/lib_protocol/apply_results.mli +++ b/src/proto_alpha/lib_protocol/apply_results.mli @@ -72,10 +72,6 @@ and 'kind contents_result = consensus_power : int; } -> Kind.attestation contents_result - | Dal_attestation_result : { - delegate : Signature.Public_key_hash.t; - } - -> Kind.dal_attestation contents_result | Seed_nonce_revelation_result : Receipt.balance_updates -> Kind.seed_nonce_revelation contents_result diff --git a/src/proto_alpha/lib_protocol/dal_apply.ml b/src/proto_alpha/lib_protocol/dal_apply.ml index 08113b8437aa2fa47c6093ad4ed792d5ffa97bbc..bacc79553074b0f7822c4bc8945d53a7be02041d 100644 --- a/src/proto_alpha/lib_protocol/dal_apply.ml +++ b/src/proto_alpha/lib_protocol/dal_apply.ml @@ -81,56 +81,6 @@ let validate_mempool_attestation ctxt attestation = Compare.Int.(size <= maximum_size) (Dal_attestation_size_limit_exceeded {maximum_size; got = size}) -let validate_dal_attestation ctxt get_consensus_key_and_round_opt op = - let open Lwt_result_syntax in - let*? () = assert_dal_feature_enabled ctxt in - (* DAL/TODO: https://gitlab.com/tezos/tezos/-/issues/4462 - Reconsider the ordering of checks. *) - let Dal.Attestation.{attestation; level = given; round; slot = _} = op in - let number_of_slots = Dal.number_of_slots ctxt in - let*? max_index = number_of_slots - 1 |> slot_of_int_e ~number_of_slots in - let maximum_size = Dal.Attestation.expected_size_in_bits ~max_index in - let size = Dal.Attestation.occupied_size_in_bits attestation in - let*? () = - error_unless - Compare.Int.(size <= maximum_size) - (Dal_attestation_size_limit_exceeded {maximum_size; got = size}) - in - let current = Level.(current ctxt).level in - let*? expected = - match Raw_level.pred current with - | None -> error Dal_unexpected_attestation_at_root_level - | Some level -> Result_syntax.return level - in - let delta_levels = Raw_level.diff expected given in - let*? () = - error_when - Compare.Int32.(delta_levels > 0l) - (Dal_operation_for_old_level {expected; given}) - in - let*? () = - error_when - Compare.Int32.(delta_levels < 0l) - (Dal_operation_for_future_level {expected; given}) - in - let* consensus_key, round_opt = get_consensus_key_and_round_opt () in - let* () = - match round_opt with - | Some expected -> - fail_when - (not (Round.equal expected round)) - (Dal_attestation_for_wrong_round {expected; given = round}) - | None -> return_unit - in - let attester = pkh_of_consensus_key consensus_key in - let*? () = - error_when - (Option.is_none @@ Dal.Attestation.shards_of_attester ctxt ~attester) - (Dal_data_availibility_attester_not_in_committee - {attester; level = expected}) - in - return consensus_key - let apply_attestation ctxt consensus_key level attestation = let open Result_syntax in let* () = assert_dal_feature_enabled ctxt in diff --git a/src/proto_alpha/lib_protocol/dal_apply.mli b/src/proto_alpha/lib_protocol/dal_apply.mli index 3b0ecec076da2579bbed8f83b3b5e8bbb3a665a3..978baf3c8b2e97577b411f19f146e73f6d5e9e02 100644 --- a/src/proto_alpha/lib_protocol/dal_apply.mli +++ b/src/proto_alpha/lib_protocol/dal_apply.mli @@ -54,22 +54,6 @@ val validate_block_attestation : attestation (like level, round, slot) are done by the caller. *) val validate_mempool_attestation : t -> Dal.Attestation.t -> unit tzresult Lwt.t -(** [validate_dal_attestation ctxt get_consensus_key_and_round op] checks whether - the DAL attestation [op] is valid. If an [Error _] is returned, the [op] - is not valid. The checks made are: - * the attestation size does not exceed the maximum; - * the level as expected; - * the round is as expected; - * the delegate is in the DAL committee. - [get_consensus_key_and_round_opt ()] returns the delegate that supposedly - issued the attestation and optionally the round at which it was emitted. The - round is not provided in the mempool validation mode. *) -val validate_dal_attestation : - t -> - (unit -> (Consensus_key.pk * Round.t option) tzresult Lwt.t) -> - Dal.Attestation.operation -> - Consensus_key.pk tzresult Lwt.t - (** [apply_attestation ctxt consensus_key level attestation] applies [attestation] into the [ctxt] assuming [consensus_key.delegate] issued those attestations at level [level]. *) diff --git a/src/proto_alpha/lib_protocol/dal_attestation_repr.ml b/src/proto_alpha/lib_protocol/dal_attestation_repr.ml index b5c397f9bee39ae5e7a1fc36a80250604ec83f40..2fc9e154e15b5e03ad293c0b135372d2dead4e08 100644 --- a/src/proto_alpha/lib_protocol/dal_attestation_repr.ml +++ b/src/proto_alpha/lib_protocol/dal_attestation_repr.ml @@ -43,13 +43,6 @@ (* A set of (attested) slot indexes. *) type t = Bitset.t -type operation = { - attestation : t; - level : Raw_level_repr.t; - round : Round_repr.t; - slot : Slot_repr.t; -} - let encoding = Bitset.encoding let empty = Bitset.empty diff --git a/src/proto_alpha/lib_protocol/dal_attestation_repr.mli b/src/proto_alpha/lib_protocol/dal_attestation_repr.mli index a7c7b0a945bbfb8e9bc6203941b41326f11f9978..20f45a10a1f666dd946ec200b28787282cb089f1 100644 --- a/src/proto_alpha/lib_protocol/dal_attestation_repr.mli +++ b/src/proto_alpha/lib_protocol/dal_attestation_repr.mli @@ -30,9 +30,8 @@ For the data-availability layer, the layer 1 provides a list of slots at every level (see {!Dal_slot_repr}). Slots are not posted directly onto L1 blocks. Stakeholders, called attesters in this - context, can commit on the availability of the data (via - attestation operations, see - https://gitlab.com/tezos/tezos/-/issues/3115). + context, can attest on the availability of the data via + attestation operations. The slot is uniformly split into shards. Each attester commits, for every slot, on the availability of all shards they are assigned @@ -44,27 +43,6 @@ type t = private Bitset.t -(** The shape of Dal attestation operations injected by delegates. *) -type operation = { - attestation : t; - (** The bitset of slots that are attested to be available. *) - level : Raw_level_repr.t; - (** Similar to {!Operation_repr.consensus_content.level}. It is the level - at which the operation is valid in the mempool. It is the predecessor - at the level of the block that contains it. It should be equal to the - attested slot's published level plus the DAL attestation lag minus - one. Whenever there is a need to disambiguate, one should use - "attestation level" for the level inside the operation and "attested - level" for the level of the block. We have: - - [attestation_level + 1 = attested_level] - - [published_level + attestation_lag = attested_level] *) - round : Round_repr.t; - (** Similar to {!Operation_repr.consensus_content.round}. *) - slot : Slot_repr.t; - (** Similar to {!Operation_repr.consensus_content.slot}. It is the - attester's first consensus slot at [level]. *) -} - (** The size of the encoding is not bounded. However, the size of a DAL attestation bitset is checked during validation of an attestation; and there is a bound on the size of a generic operation. *) diff --git a/src/proto_alpha/lib_protocol/dal_errors_repr.ml b/src/proto_alpha/lib_protocol/dal_errors_repr.ml index 7728cc1161418760940684df6487759583e843a8..91b4f8cbb00c476a5dada34e709b990ca106442d 100644 --- a/src/proto_alpha/lib_protocol/dal_errors_repr.ml +++ b/src/proto_alpha/lib_protocol/dal_errors_repr.ml @@ -26,7 +26,6 @@ type error += | Dal_feature_disabled | Dal_slot_index_above_hard_limit of {given : int; limit : int} - | Dal_attestation_unexpected_size of {expected : int; got : int} | Dal_publish_slot_header_invalid_index of { given : Dal_slot_index_repr.t; maximum : Dal_slot_index_repr.t; @@ -44,24 +43,11 @@ type error += attester : Signature.Public_key_hash.t; level : Raw_level_repr.t; } - | Dal_operation_for_old_level of { - expected : Raw_level_repr.t; - given : Raw_level_repr.t; - } - | Dal_operation_for_future_level of { - expected : Raw_level_repr.t; - given : Raw_level_repr.t; - } - | Dal_attestation_for_wrong_round of { - expected : Round_repr.t; - given : Round_repr.t; - } | Dal_cryptobox_error of {explanation : string} | Dal_register_invalid_slot_header of { length : int; slot_header : Dal_slot_repr.Header.t; } - | Dal_unexpected_attestation_at_root_level let () = let open Data_encoding in @@ -78,21 +64,6 @@ let () = (function Dal_feature_disabled -> Some () | _ -> None) (fun () -> Dal_feature_disabled) ; - let description = - "The attestation for data availability has a different size" - in - register_error_kind - `Permanent - ~id:"dal_attestation_unexpected_size" - ~title:"DAL attestation unexpected size" - ~description - ~pp:(fun ppf (expected, got) -> - Format.fprintf ppf "%s: Expected %d. Got %d." description expected got) - (obj2 (req "expected_size" int31) (req "got" int31)) - (function - | Dal_attestation_unexpected_size {expected; got} -> Some (expected, got) - | _ -> None) - (fun (expected, got) -> Dal_attestation_unexpected_size {expected; got}) ; let description = "Slot index above hard limit" in register_error_kind `Permanent @@ -210,71 +181,6 @@ let () = | _ -> None) (fun (commitment, commitment_proof) -> Dal_publish_slot_header_invalid_proof {commitment; commitment_proof}) ; - register_error_kind - `Outdated - ~id:"Dal_operation_for_old_level" - ~title:"Dal operation for an old level" - ~description:"The Dal operation targets an old level" - ~pp:(fun ppf (expected_lvl, given_lvl) -> - Format.fprintf - ppf - "Dal operation targets an old level %a. Expected level is %a." - Raw_level_repr.pp - given_lvl - Raw_level_repr.pp - expected_lvl) - Data_encoding.( - obj2 - (req "expected_level" Raw_level_repr.encoding) - (req "given_level" Raw_level_repr.encoding)) - (function - | Dal_operation_for_old_level {expected; given} -> Some (expected, given) - | _ -> None) - (fun (expected, given) -> Dal_operation_for_old_level {expected; given}) ; - register_error_kind - `Temporary - ~id:"Dal_operation_for_future_level" - ~title:"Dal operation for a future level" - ~description:"The Dal operation targets a future level" - ~pp:(fun ppf (expected_lvl, given_lvl) -> - Format.fprintf - ppf - "Dal operation targets a future level %a. Expected level is %a." - Raw_level_repr.pp - given_lvl - Raw_level_repr.pp - expected_lvl) - Data_encoding.( - obj2 - (req "expected_level" Raw_level_repr.encoding) - (req "given_level" Raw_level_repr.encoding)) - (function - | Dal_operation_for_future_level {expected; given} -> - Some (expected, given) - | _ -> None) - (fun (expected, given) -> Dal_operation_for_future_level {expected; given}) ; - register_error_kind - `Temporary - ~id:"Dal_attestation_for_wrong_round" - ~title:"Dal attestation for a wrong round" - ~description:"The DAL attestation targets an unexpected round." - ~pp:(fun ppf (expected_round, given_round) -> - Format.fprintf - ppf - "The DAL attestation targets unexpected round %a, expected %a." - Round_repr.pp - given_round - Round_repr.pp - expected_round) - Data_encoding.( - obj2 - (req "expected_round" Round_repr.encoding) - (req "given_round" Round_repr.encoding)) - (function - | Dal_attestation_for_wrong_round {expected; given} -> - Some (expected, given) - | _ -> None) - (fun (expected, given) -> Dal_attestation_for_wrong_round {expected; given}) ; register_error_kind `Permanent ~id:"Dal_data_availibility_attester_not_in_committee" @@ -333,14 +239,4 @@ let () = Some (length, slot_header) | _ -> None) (fun (length, slot_header) -> - Dal_register_invalid_slot_header {length; slot_header}) ; - let description = "DAL attestations are not expected at root level" in - register_error_kind - `Temporary - ~id:"dal_unexpected_attestation_at_root_level" - ~title:"DAL unexpected attestation at root level" - ~description - ~pp:(fun ppf () -> Format.fprintf ppf "%s" description) - empty - (function Dal_unexpected_attestation_at_root_level -> Some () | _ -> None) - (fun () -> Dal_unexpected_attestation_at_root_level) + Dal_register_invalid_slot_header {length; slot_header}) diff --git a/src/proto_alpha/lib_protocol/operation_repr.ml b/src/proto_alpha/lib_protocol/operation_repr.ml index 6ca00e6c175efe1e27c294a014a0acc2e9dcaa71..66339e3341198ef91fdb068370eff13d7c86234b 100644 --- a/src/proto_alpha/lib_protocol/operation_repr.ml +++ b/src/proto_alpha/lib_protocol/operation_repr.ml @@ -39,8 +39,6 @@ module Kind = struct type attestation = attestation_consensus_kind consensus - type dal_attestation = Dal_attestation_kind - type seed_nonce_revelation = Seed_nonce_revelation_kind type vdf_revelation = Vdf_revelation_kind @@ -185,15 +183,11 @@ let pp_consensus_content ppf content = type consensus_watermark = | Attestation of Chain_id.t | Preattestation of Chain_id.t - | Dal_attestation of Chain_id.t let to_watermark = function | Preattestation chain_id -> Signature.Custom (Bytes.cat (Bytes.of_string "\x12") (Chain_id.to_bytes chain_id)) - | Dal_attestation chain_id -> - Signature.Custom - (Bytes.cat (Bytes.of_string "\x14") (Chain_id.to_bytes chain_id)) | Attestation chain_id -> Signature.Custom (Bytes.cat (Bytes.of_string "\x13") (Chain_id.to_bytes chain_id)) @@ -210,10 +204,6 @@ let of_watermark = function Option.map (fun chain_id -> Attestation chain_id) (Chain_id.of_bytes_opt (Bytes.sub b 1 (Bytes.length b - 1))) - | '\x14' -> - Option.map - (fun chain_id -> Dal_attestation chain_id) - (Chain_id.of_bytes_opt (Bytes.sub b 1 (Bytes.length b - 1))) | _ -> None else None | _ -> None @@ -245,9 +235,6 @@ and _ contents = dal_content : dal_content option; } -> Kind.attestation contents - | Dal_attestation : - Dal_attestation_repr.operation - -> Kind.dal_attestation contents | Seed_nonce_revelation : { level : Raw_level_repr.t; nonce : Seed_repr.nonce; @@ -1305,31 +1292,6 @@ module Encoding = struct ])) (varopt "signature" Signature.encoding))) - let dal_attestation_encoding = - obj4 - (req "attestation" Dal_attestation_repr.encoding) - (req "level" Raw_level_repr.encoding) - (req "round" Round_repr.encoding) - (req "slot" Slot_repr.encoding) - - let dal_attestation_case = - Case - { - tag = 22; - name = "dal_attestation"; - encoding = dal_attestation_encoding; - select = - (function Contents (Dal_attestation _ as op) -> Some op | _ -> None); - proj = - (fun (Dal_attestation - Dal_attestation_repr.{attestation; level; round; slot}) -> - (attestation, level, round, slot)); - inj = - (fun (attestation, level, round, slot) -> - Dal_attestation - Dal_attestation_repr.{attestation; level; round; slot}); - } - let seed_nonce_revelation_case = Case { @@ -1686,7 +1648,6 @@ module Encoding = struct let common_cases = [ - PCase dal_attestation_case; PCase seed_nonce_revelation_case; PCase vdf_revelation_case; PCase double_baking_evidence_case; @@ -2027,7 +1988,6 @@ let acceptable_pass (op : packed_operation) = | Single (Failing_noop _) -> None | Single (Preattestation _) -> Some consensus_pass | Single (Attestation _) -> Some consensus_pass - | Single (Dal_attestation _) -> Some consensus_pass | Single (Proposals _) -> Some voting_pass | Single (Ballot _) -> Some voting_pass | Single (Seed_nonce_revelation _) -> Some anonymous_pass @@ -2119,7 +2079,6 @@ let check_signature (type kind) key chain_id (op : kind operation) = match op.protocol_data.contents with | Single (Preattestation _) -> to_watermark (Preattestation chain_id) | Single (Attestation _) -> to_watermark (Attestation chain_id) - | Single (Dal_attestation _) -> to_watermark (Dal_attestation chain_id) | Single ( Failing_noop _ | Proposals _ | Ballot _ | Seed_nonce_revelation _ | Vdf_revelation _ | Double_attestation_evidence _ @@ -2204,8 +2163,6 @@ let equal_contents_kind : type a b. a contents -> b contents -> (a, b) eq option | Preattestation _, _ -> None | Attestation _, Attestation _ -> Some Eq | Attestation _, _ -> None - | Dal_attestation _, Dal_attestation _ -> Some Eq - | Dal_attestation _, _ -> None | Seed_nonce_revelation _, Seed_nonce_revelation _ -> Some Eq | Seed_nonce_revelation _, _ -> None | Vdf_revelation _, Vdf_revelation _ -> Some Eq @@ -2320,9 +2277,6 @@ type attestation_infos = { number_of_dal_attested_slots : int; } -(** [dal_attestation_infos] gives the weight of a DAL attestation. *) -type dal_attestation_infos = attestation_infos - (** [double_baking_infos] is the pair of a {!round_infos} and a {!block_header} hash. *) type double_baking_infos = {round : round_infos; bh_hash : Block_hash.t} @@ -2378,22 +2332,6 @@ let attestation_infos_from_content (c : consensus_content) d; } -let dal_attestation_infos_from_dal_operation - {Dal_attestation_repr.attestation; level; round; slot} = - let round_infos = - (* copy of {!round_infos_from_consensus_content} *) - let level = Raw_level_repr.to_int32 level in - match Round_repr.to_int round with - | Ok round -> {level; round} - | Error _ -> {level; round = -1} - in - { - round_infos; - slot = Slot_repr.to_int slot; - number_of_dal_attested_slots = - Dal_attestation_repr.number_of_attested_slots attestation; - } - (** Compute a {!double_baking_infos} and a {!Block_header_repr.hash} from a {!Block_header_repr.t}. It is used to compute the weight of a {!Double_baking_evidence}. @@ -2427,9 +2365,6 @@ let consensus_infos_and_hash_from_block_header (bh : Block_header_repr.t) = {!attestation_infos}. For {!Attestation}s it also depends on the number of attested DAL slots. - The [weight] of a {!Dal_attestation} is the same as that of an - {!Attestation}. - The [weight] of a voting operation depends on the pair of its [period] and [source]. @@ -2458,7 +2393,6 @@ let consensus_infos_and_hash_from_block_header (bh : Block_header_repr.t) = type _ weight = | Weight_attestation : attestation_infos -> consensus_pass_type weight | Weight_preattestation : preattestation_infos -> consensus_pass_type weight - | Weight_dal_attestation : dal_attestation_infos -> consensus_pass_type weight | Weight_proposals : int32 * Signature.Public_key_hash.t -> voting_pass_type weight @@ -2557,11 +2491,6 @@ let weight_of : packed_operation -> operation_weight = ( Consensus, Weight_attestation (attestation_infos_from_content consensus_content dal_content) ) - | Single (Dal_attestation content) -> - W - ( Consensus, - Weight_dal_attestation - (dal_attestation_infos_from_dal_operation content) ) | Single (Proposals {period; source; _}) -> W (Voting, Weight_proposals (period, source)) | Single (Ballot {period; source; _}) -> @@ -2675,12 +2604,6 @@ let compare_attestation_infos ((infos1, slot1), n1) ((infos2, slot2), n2) -(** Two valid {!Dal_attestation} are compared in the lexicographic order of - their level, round, reverse slot, and number of attested slots, meaning - that, in order, higher level is better, higher round is better, smaller slot - is better, higher number of attested slots is better. *) -let compare_dal_attestation_infos = compare_attestation_infos - (** {4 Comparison of valid operations of the same validation pass} *) (** {5 Comparison of valid consensus operations} *) @@ -2709,14 +2632,6 @@ let compare_consensus_weight w1 w2 = Weight_attestation {round_infos = round_infos2; _} ) -> let cmp = compare_round_infos round_infos1 round_infos2 in if Compare.Int.(cmp <> 0) then cmp else -1 - | Weight_dal_attestation infos1, Weight_dal_attestation infos2 -> - compare_dal_attestation_infos infos1 infos2 - | Weight_dal_attestation _, (Weight_attestation _ | Weight_preattestation _) - -> - -1 - | (Weight_attestation _ | Weight_preattestation _), Weight_dal_attestation _ - -> - 1 (** {5 Comparison of valid voting operations} *) diff --git a/src/proto_alpha/lib_protocol/operation_repr.mli b/src/proto_alpha/lib_protocol/operation_repr.mli index 0f48611aa3b399727554f539ba8d4065cf2a6951..40243a2dddf20ca92810a2a4bcff9887509755b1 100644 --- a/src/proto_alpha/lib_protocol/operation_repr.mli +++ b/src/proto_alpha/lib_protocol/operation_repr.mli @@ -73,8 +73,6 @@ module Kind : sig type attestation = attestation_consensus_kind consensus - type dal_attestation = Dal_attestation_kind - type seed_nonce_revelation = Seed_nonce_revelation_kind type vdf_revelation = Vdf_revelation_kind @@ -190,12 +188,18 @@ val consensus_content_encoding : consensus_content Data_encoding.t val pp_consensus_content : Format.formatter -> consensus_content -> unit +(** The DAL content in an attestation operation having some level [l] refers to a + slot published at level [l - attestation_lag + 1]. Whenever there is a need + to disambiguate, one should use "attestation level" for the level inside the + operation and "attested level" for the level of the block including the + operation. We have: + - [attestation_level + 1 = attested_level] + - [published_level + attestation_lag = attested_level] *) type dal_content = {attestation : Dal_attestation_repr.t} type consensus_watermark = | Attestation of Chain_id.t | Preattestation of Chain_id.t - | Dal_attestation of Chain_id.t val to_watermark : consensus_watermark -> Signature.watermark @@ -243,12 +247,6 @@ and _ contents = dal_content : dal_content option; } -> Kind.attestation contents - (* DAL/FIXME https://gitlab.com/tezos/tezos/-/issues/3115 - - Temporary operation to avoid modifying attestation encoding. *) - | Dal_attestation : - Dal_attestation_repr.operation - -> Kind.dal_attestation contents (* Seed_nonce_revelation: Nonces are created by bakers and are combined to create pseudo-random seeds. Bakers are urged to reveal their nonces after a given number of cycles to keep their block rewards @@ -610,7 +608,7 @@ val compare_by_passes : packed_operation -> packed_operation -> int The global order is as follows: - {!Attestation} and {!Preattestation} > {!Dal_attestation} > + {!Attestation} and {!Preattestation} > {!Proposals} > {!Ballot} > {!Double_preattestation_evidence} > {!Double_attestation_evidence} > {!Double_baking_evidence} > {!Vdf_revelation} > {!Seed_nonce_revelation} > {!Activate_account} @@ -625,10 +623,6 @@ val compare_by_passes : packed_operation -> packed_operation -> int DAL attested slots, the more the better. When the pair is equal and comparing an {!Attestation} to a {!Preattestation}, the {!Attestation} is better. - Two {!Dal_attestation} ops are compared in the lexicographic order of the - tuple of their level, their slot, their number of slots attested as - available, and their attesters' hash. - Two voting operations are compared in the lexicographic order of the pair of their [period] and [source]. A {!Proposals} is better than a {!Ballot}. @@ -696,8 +690,6 @@ module Encoding : sig val attestation_with_dal_case : Kind.attestation case - val dal_attestation_case : Kind.dal_attestation case - val seed_nonce_revelation_case : Kind.seed_nonce_revelation case val vdf_revelation_case : Kind.vdf_revelation case diff --git a/src/proto_alpha/lib_protocol/test/helpers/block.ml b/src/proto_alpha/lib_protocol/test/helpers/block.ml index d7fead596c3fb35bb1b91f30a406601c083b3b33..a2313eb6130724cd439d1206705fb6f1b4c9e855 100644 --- a/src/proto_alpha/lib_protocol/test/helpers/block.ml +++ b/src/proto_alpha/lib_protocol/test/helpers/block.ml @@ -1086,7 +1086,7 @@ let balance_updates_of_single_content : type a. a Protocol.Apply_results.contents_result -> Protocol.Alpha_context.Receipt.balance_updates = function - | Dal_attestation_result _ | Proposals_result | Ballot_result -> [] + | Proposals_result | Ballot_result -> [] | Preattestation_result {balance_updates; _} | Attestation_result {balance_updates; _} | Seed_nonce_revelation_result balance_updates diff --git a/src/proto_alpha/lib_protocol/test/helpers/op.ml b/src/proto_alpha/lib_protocol/test/helpers/op.ml index 229c722639edcecbfb21836694abfd6ebcc94803..86549fcc13980f03a774adbec0f90e8a2f687915 100644 --- a/src/proto_alpha/lib_protocol/test/helpers/op.ml +++ b/src/proto_alpha/lib_protocol/test/helpers/op.ml @@ -134,48 +134,6 @@ let attestation ?delegate ?slot ?level ?round ?block_payload_hash ?dal_content in return (Operation.pack op) -let raw_dal_attestation ?delegate ?attestation block = - let open Lwt_result_wrap_syntax in - let ctxt = Context.B block in - let*? level = Context.get_level ctxt in - let*?@ round = Block.get_round block in - let* committee = Context.Dal.shards ctxt () in - let delegate = - match delegate with None -> Stdlib.List.hd committee |> fst | Some d -> d - in - match - List.assoc ~equal:Signature.Public_key_hash.equal delegate committee - with - | None -> return_none - | Some _interval -> ( - let* slots = Context.get_attester_slot ctxt delegate in - match slots with - | None -> return_none - | Some slots -> ( - match List.hd slots with - | None -> assert false - | Some slot -> - let attestation = - Option.value attestation ~default:Dal.Attestation.empty - in - let branch = block.Block.header.shell.predecessor in - let* signer = Account.find delegate in - let op = - Single (Dal_attestation {attestation; level; round; slot}) - in - sign - ~watermark: - Operation.(to_watermark (Dal_attestation Chain_id.zero)) - signer.sk - branch - op - |> return_some)) - -let dal_attestation ?delegate ?attestation block = - let open Lwt_result_wrap_syntax in - let* op = raw_dal_attestation ?delegate ?attestation block in - return (Option.map Operation.pack op) - let raw_preattestation ?delegate ?slot ?level ?round ?block_payload_hash ?branch attested_block = let open Lwt_result_syntax in diff --git a/src/proto_alpha/lib_protocol/test/helpers/op.mli b/src/proto_alpha/lib_protocol/test/helpers/op.mli index da972eec3e159dc4c175de0e8f7ec23a1e50b242..507e8e9d0755094fb79ca08b97d36d51f0f318d6 100644 --- a/src/proto_alpha/lib_protocol/test/helpers/op.mli +++ b/src/proto_alpha/lib_protocol/test/helpers/op.mli @@ -99,27 +99,6 @@ val attestation : Block.t -> Operation.packed tzresult Lwt.t -(** Build a DAL attestation for the given [delegate] and the given [block]'s - level (to be included in the block at the next level), if - possible. Otherwise returns [None]. It is possible to build one if: - [delegate] is part of the DAL committee for the current epoch, and - [delegate] is part of the TB committee for the current level. Recall that - the slot to be included in the attestation is the delegate's first TB slot - at the current level. *) -val raw_dal_attestation : - ?delegate:public_key_hash -> - ?attestation:Dal.Attestation.t -> - Block.t -> - Kind.dal_attestation Operation.t option tzresult Lwt.t - -(** Create a packed DAL attestation that is expected for a given - [Block.t] by packing the result of {!raw_dal_attestation}. *) -val dal_attestation : - ?delegate:public_key_hash -> - ?attestation:Dal.Attestation.t -> - Block.t -> - Operation.packed option tzresult Lwt.t - (** Create a packed preattestation that is expected for a given [Block.t] by packing the result of {!raw_preattestation}. *) val preattestation : diff --git a/src/proto_alpha/lib_protocol/test/helpers/operation_generator.ml b/src/proto_alpha/lib_protocol/test/helpers/operation_generator.ml index bcd0d6b10008ee445500736540aebf72d1158570..98e415c8e9debebedc7ac32ecb24beaa8007fc42 100644 --- a/src/proto_alpha/lib_protocol/test/helpers/operation_generator.ml +++ b/src/proto_alpha/lib_protocol/test/helpers/operation_generator.ml @@ -49,7 +49,7 @@ let all_passes = [`PConsensus; `PAnonymous; `PVote; `PManager] let all_non_manager_passes = [`PConsensus; `PAnonymous; `PVote] -let consensus_kinds = [`KPreattestation; `KAttestation; `KDal_attestation] +let consensus_kinds = [`KPreattestation; `KAttestation] let anonymous_kinds = [ @@ -388,14 +388,6 @@ let generate_attestation = let+ cc = generate_consensus_content in Attestation {consensus_content = cc; dal_content = None} -let generate_dal_attestation = - let open QCheck2.Gen in - let* level = gen_level in - let* round = gen_round in - let+ slot = gen_slot in - Dal_attestation - Dal.Attestation.{attestation = Dal.Attestation.empty; level; round; slot} - let generate_vdf_revelation = let open QCheck2.Gen in let+ solution = oneofl vdf_solutions in @@ -644,7 +636,6 @@ let generate_non_manager_operation = match kind with | `KPreattestation -> generate_operation generate_preattestation | `KAttestation -> generate_operation generate_attestation - | `KDal_attestation -> generate_operation generate_dal_attestation | `KSeed_nonce_revelation -> generate_operation generate_seed_nonce_revelation | `KVdf_revelation -> generate_operation generate_vdf_revelation | `KDouble_attestation -> generate_operation generate_double_attestation @@ -718,7 +709,6 @@ let generate_operation = match kind with | `KPreattestation -> generate_operation generate_preattestation | `KAttestation -> generate_operation generate_attestation - | `KDal_attestation -> generate_operation generate_dal_attestation | `KSeed_nonce_revelation -> generate_operation generate_seed_nonce_revelation | `KVdf_revelation -> generate_operation generate_vdf_revelation diff --git a/src/proto_alpha/lib_protocol/test/integration/consensus/test_attestation.ml b/src/proto_alpha/lib_protocol/test/integration/consensus/test_attestation.ml index d3009d5e7fffff1792d54b95029d86869e7a5adc..33b64939edd98f349252f364c3cad4736d2a45d5 100644 --- a/src/proto_alpha/lib_protocol/test/integration/consensus/test_attestation.ml +++ b/src/proto_alpha/lib_protocol/test/integration/consensus/test_attestation.ml @@ -648,16 +648,17 @@ let test_attestation_threshold ~sufficient_threshold () = | Validate_errors.Block.Not_enough_attestations _ -> true | _ -> false) -let test_two_dal_attestations_with_same_attester () = +let test_two_attestations_with_same_attester () = let open Lwt_result_syntax in let* _genesis, attested_block = init_genesis ~dal_enable:true () in - let* op1 = Op.raw_dal_attestation attested_block in - let op1 = Stdlib.Option.get op1 in - let attestation = - Dal.Attestation.commit Dal.Attestation.empty Dal.Slot_index.zero + let* op1 = Op.raw_attestation attested_block in + let dal_content = + let attestation = + Dal.Attestation.commit Dal.Attestation.empty Dal.Slot_index.zero + in + {attestation} in - let* op2 = Op.raw_dal_attestation ~attestation attested_block in - let op2 = Stdlib.Option.get op2 in + let* op2 = Op.raw_attestation ~dal_content attested_block in let*! res = Block.bake ~baking_mode:Application @@ -668,7 +669,7 @@ let test_two_dal_attestations_with_same_attester () = | Validate_errors.( Consensus.Conflicting_consensus_operation { - kind = Dal_attestation; + kind = Attestation; conflict = Operation_conflict {existing; new_operation}; }) -> Operation_hash.equal existing (Operation.hash op1) @@ -729,9 +730,9 @@ let tests = `Quick (test_attestation_threshold ~sufficient_threshold:false); Tztest.tztest - "two DAL attestations with same attester in a block" + "two attestations with same attester in a block" `Quick - test_two_dal_attestations_with_same_attester; + test_two_attestations_with_same_attester; ] let () = diff --git a/src/proto_alpha/lib_protocol/test/integration/validate/generator_descriptors.ml b/src/proto_alpha/lib_protocol/test/integration/validate/generator_descriptors.ml index e8630f4a317e099f7c8125c532af5d1c71782aa5..a6261135a2579cc813b19963702bdca6f2004962 100644 --- a/src/proto_alpha/lib_protocol/test/integration/validate/generator_descriptors.ml +++ b/src/proto_alpha/lib_protocol/test/integration/validate/generator_descriptors.ml @@ -634,24 +634,6 @@ let attestation_descriptor = List.filter_map_es gen state.delegates); } -let dal_attestation_descriptor = - let open Lwt_result_syntax in - { - parameters = - (fun params -> - let dal = {params.constants.dal with feature_enable = true} in - let constants = {params.constants with dal} in - {params with constants}); - required_cycle = (fun _ -> 1); - required_block = (fun _ -> 1); - prelude = (On 1, fun state -> return ([], state)); - opt_prelude = None; - candidates_generator = - (fun state -> - let gen (delegate, _) = Op.dal_attestation ~delegate state.block in - List.filter_map_es gen state.delegates); - } - module Manager = Manager_operation_helpers let required_nb_account = 7 @@ -806,7 +788,6 @@ let manager_descriptor max_batch_size nb_accounts = type op_kind = | KAttestation | KPreattestation - | KDalattestation | KBallotExp | KBallotProm | KProposals @@ -823,7 +804,6 @@ let op_kind_of_packed_operation op = match contents with | Single (Preattestation _) -> KPreattestation | Single (Attestation _) -> KAttestation - | Single (Dal_attestation _) -> KDalattestation | Single (Seed_nonce_revelation _) -> KNonce | Single (Vdf_revelation _) -> KVdf | Single (Double_attestation_evidence _) -> KDbl_consensus @@ -844,7 +824,6 @@ let pp_op_kind fmt kind = | KManager -> "manager" | KAttestation -> "attestation" | KPreattestation -> "preattestation" - | KDalattestation -> "dal_attestation" | KBallotExp -> "ballot" | KBallotProm -> "ballot" | KProposals -> "proposals" @@ -859,7 +838,6 @@ let descriptor_of ~nb_bootstrap ~max_batch_size = function | KManager -> manager_descriptor max_batch_size nb_bootstrap | KAttestation -> attestation_descriptor | KPreattestation -> preattestation_descriptor - | KDalattestation -> dal_attestation_descriptor | KBallotExp -> ballot_exploration_descriptor | KBallotProm -> ballot_promotion_descriptor | KProposals -> proposal_descriptor @@ -886,7 +864,6 @@ let non_exclusive_kinds = KManager; KAttestation; KPreattestation; - KDalattestation; KActivate; KDbl_consensus; KDbl_baking; diff --git a/src/proto_alpha/lib_protocol/test/integration/validate/generator_descriptors.mli b/src/proto_alpha/lib_protocol/test/integration/validate/generator_descriptors.mli index a253dbec124560ad02d373fea17e4220e45876be..f9931fee84e2f19cfd9933ee8cf9d0e1a4f9a6be 100644 --- a/src/proto_alpha/lib_protocol/test/integration/validate/generator_descriptors.mli +++ b/src/proto_alpha/lib_protocol/test/integration/validate/generator_descriptors.mli @@ -123,7 +123,6 @@ type descriptor = { type op_kind = | KAttestation | KPreattestation - | KDalattestation | KBallotExp | KBallotProm | KProposals diff --git a/src/proto_alpha/lib_protocol/test/integration/validate/test_sanity.ml b/src/proto_alpha/lib_protocol/test/integration/validate/test_sanity.ml index 98b47f13288f011cdd0d2677278e12e44d7f5210..882f29bc3237124998577c24b05b4bbf0d3ef666 100644 --- a/src/proto_alpha/lib_protocol/test/integration/validate/test_sanity.ml +++ b/src/proto_alpha/lib_protocol/test/integration/validate/test_sanity.ml @@ -123,8 +123,6 @@ let covalidation_sanity () = | Single (Preattestation _), _ -> assert false | Single (Attestation _), KAttestation -> return_unit | Single (Attestation _), _ -> assert false - | Single (Dal_attestation _), KDalattestation -> return_unit - | Single (Dal_attestation _), _ -> assert false | Single (Seed_nonce_revelation _), KNonce -> return_unit | Single (Seed_nonce_revelation _), _ -> assert false | Single (Vdf_revelation _), KVdf -> return_unit diff --git a/src/proto_alpha/lib_protocol/validate.ml b/src/proto_alpha/lib_protocol/validate.ml index ee449695c4752b4df8d6c34004da693783978e7e..bb8052cd310e62c423d3246faf528ccb3879dbbd 100644 --- a/src/proto_alpha/lib_protocol/validate.ml +++ b/src/proto_alpha/lib_protocol/validate.ml @@ -68,7 +68,6 @@ end) type consensus_state = { preattestations_seen : Operation_hash.t Consensus_conflict_map.t; attestations_seen : Operation_hash.t Consensus_conflict_map.t; - dal_attestation_seen : Operation_hash.t Consensus_conflict_map.t; } let consensus_conflict_map_encoding = @@ -87,20 +86,18 @@ let consensus_state_encoding = let open Data_encoding in def "consensus_state" @@ conv - (fun {preattestations_seen; attestations_seen; dal_attestation_seen} -> - (preattestations_seen, attestations_seen, dal_attestation_seen)) - (fun (preattestations_seen, attestations_seen, dal_attestation_seen) -> - {preattestations_seen; attestations_seen; dal_attestation_seen}) - (obj3 + (fun {preattestations_seen; attestations_seen} -> + (preattestations_seen, attestations_seen)) + (fun (preattestations_seen, attestations_seen) -> + {preattestations_seen; attestations_seen}) + (obj2 (req "preattestations_seen" consensus_conflict_map_encoding) - (req "attestations_seen" consensus_conflict_map_encoding) - (req "dal_attestation_seen" consensus_conflict_map_encoding)) + (req "attestations_seen" consensus_conflict_map_encoding)) let empty_consensus_state = { preattestations_seen = Consensus_conflict_map.empty; attestations_seen = Consensus_conflict_map.empty; - dal_attestation_seen = Consensus_conflict_map.empty; } type voting_state = { @@ -428,7 +425,7 @@ let init_block_state vi = let get_initial_ctxt {info; _} = info.ctxt (** Validation of consensus operations (validation pass [0]): - preattestation, attestation, and dal_attestation. *) + preattestations and attestations. *) module Consensus = struct open Validate_errors.Consensus @@ -838,104 +835,6 @@ module Consensus = struct in {vs with consensus_state = {vs.consensus_state with attestations_seen}} - let check_dal_attestation vi ~check_signature - (operation : Kind.dal_attestation operation) = - (* DAL/TODO https://gitlab.com/tezos/tezos/-/issues/3115 - This is a temporary operation to avoid modifying the attestation - encoding. At some point, this operation should be merged with an - attestation. *) - let open Lwt_result_syntax in - let (Single (Dal_attestation op)) = operation.protocol_data.contents in - let*? consensus_info = - Option.value_e - ~error:(trace_of_error Consensus_operation_not_allowed) - vi.consensus_info - in - let get_consensus_key_and_round_opt () = - match vi.mode with - | Application _ | Partial_validation _ | Construction _ -> - let*? consensus_key, _voting_power = - get_delegate_details - consensus_info.attestation_slot_map - Dal_attestation - op.slot - in - return (consensus_key, Some consensus_info.predecessor_round) - | Mempool -> - let* (_ctxt : t), consensus_key = - Stake_distribution.slot_owner - vi.ctxt - (Level.from_raw vi.ctxt op.level) - op.slot - in - return (consensus_key, None) - in - let* consensus_key = - (* Note that this function checks the dal feature flag. *) - Dal_apply.validate_dal_attestation - vi.ctxt - get_consensus_key_and_round_opt - op - in - let*? () = - if check_signature then - Operation.check_signature - consensus_key.consensus_pk - vi.chain_id - operation - else ok_unit - in - return_unit - - let check_dal_attestation_conflict vs oph - (operation : Kind.dal_attestation operation) = - let (Single (Dal_attestation {attestation = _; level; round; slot})) = - operation.protocol_data.contents - in - match - Consensus_conflict_map.find_opt - (slot, level, round) - vs.consensus_state.dal_attestation_seen - with - | None -> ok_unit - | Some existing -> - Error (Operation_conflict {existing; new_operation = oph}) - - let wrap_dal_attestation_conflict = function - | Ok () -> ok_unit - | Error conflict -> - result_error - Validate_errors.Consensus.( - Conflicting_consensus_operation {kind = Dal_attestation; conflict}) - - let add_dal_attestation vs oph (operation : Kind.dal_attestation operation) = - let (Single (Dal_attestation {attestation = _; level; round; slot})) = - operation.protocol_data.contents - in - { - vs with - consensus_state = - { - vs.consensus_state with - dal_attestation_seen = - Consensus_conflict_map.add - (slot, level, round) - oph - vs.consensus_state.dal_attestation_seen; - }; - } - - let remove_dal_attestation vs (operation : Kind.dal_attestation operation) = - let (Single (Dal_attestation {attestation = _; level; round; slot})) = - operation.protocol_data.contents - in - let dal_attestation_seen = - Consensus_conflict_map.remove - (slot, level, round) - vs.consensus_state.dal_attestation_seen - in - {vs with consensus_state = {vs.consensus_state with dal_attestation_seen}} - (** In Construction mode, check that the preattestation has the same round as any previously validated preattestations. @@ -1000,17 +899,6 @@ module Consensus = struct let block_state = may_update_attestation_power info block_state power in let operation_state = add_attestation operation_state oph operation in return {info; operation_state; block_state} - - let validate_dal_attestation ~check_signature info operation_state block_state - oph operation = - let open Lwt_result_syntax in - let* () = check_dal_attestation info ~check_signature operation in - let*? () = - check_dal_attestation_conflict operation_state oph operation - |> wrap_dal_attestation_conflict - in - let operation_state = add_dal_attestation operation_state oph operation in - return {info; operation_state; block_state} end (** {2 Validation of voting operations} @@ -2557,8 +2445,6 @@ let check_operation ?(check_signature = true) info (type kind) Consensus.check_attestation info ~check_signature operation in return_unit - | Single (Dal_attestation _) -> - Consensus.check_dal_attestation info ~check_signature operation | Single (Proposals _) -> Voting.check_proposals info ~check_signature operation | Single (Ballot _) -> Voting.check_ballot info ~check_signature operation @@ -2614,11 +2500,6 @@ let check_operation_conflict (type kind) operation_conflict_state oph operation_conflict_state oph operation - | Single (Dal_attestation _) -> - Consensus.check_dal_attestation_conflict - operation_conflict_state - oph - operation | Single (Proposals _) -> Voting.check_proposals_conflict operation_conflict_state oph operation | Single (Ballot _) -> @@ -2674,8 +2555,6 @@ let add_valid_operation operation_conflict_state oph (type kind) Consensus.add_preattestation operation_conflict_state oph operation | Single (Attestation _) -> Consensus.add_attestation operation_conflict_state oph operation - | Single (Dal_attestation _) -> - Consensus.add_dal_attestation operation_conflict_state oph operation | Single (Proposals _) -> Voting.add_proposals operation_conflict_state oph operation | Single (Ballot _) -> @@ -2719,8 +2598,6 @@ let remove_operation operation_conflict_state (type kind) Consensus.remove_preattestation operation_conflict_state operation | Single (Attestation _) -> Consensus.remove_attestation operation_conflict_state operation - | Single (Dal_attestation _) -> - Consensus.remove_dal_attestation operation_conflict_state operation | Single (Proposals _) -> Voting.remove_proposals operation_conflict_state operation | Single (Ballot _) -> Voting.remove_ballot operation_conflict_state operation @@ -2817,14 +2694,6 @@ let validate_operation ?(check_signature = true) block_state oph operation - | Single (Dal_attestation _) -> - Consensus.validate_dal_attestation - ~check_signature - info - operation_state - block_state - oph - operation | Single (Proposals _) -> let open Voting in let* () = check_proposals info ~check_signature operation in diff --git a/src/proto_alpha/lib_protocol/validate_errors.ml b/src/proto_alpha/lib_protocol/validate_errors.ml index 6aea6163aafd506b799ad6d0b87e9b05a3a30e69..902d909b7f6b46b7ca1f3bdd3a28f69df61c7661 100644 --- a/src/proto_alpha/lib_protocol/validate_errors.ml +++ b/src/proto_alpha/lib_protocol/validate_errors.ml @@ -69,23 +69,15 @@ module Consensus = struct (** This type is only used in consensus operation errors to make them more informative. *) - type consensus_operation_kind = - | Preattestation - | Attestation - | Dal_attestation + type consensus_operation_kind = Preattestation | Attestation let consensus_operation_kind_encoding = Data_encoding.string_enum - [ - ("Preattestation", Preattestation); - ("Attestation", Attestation); - ("Dal_attestation", Dal_attestation); - ] + [("Preattestation", Preattestation); ("Attestation", Attestation)] let consensus_operation_kind_pp fmt = function | Preattestation -> Format.fprintf fmt "Preattestation" | Attestation -> Format.fprintf fmt "Attestation" - | Dal_attestation -> Format.fprintf fmt "Dal_attestation" (** Errors for preattestation and attestation. *) type error += diff --git a/src/proto_alpha/lib_protocol/validate_errors.mli b/src/proto_alpha/lib_protocol/validate_errors.mli index b2e80dbee8c23176aa140baa98ce8b1a323a7d23..3a790ef96dbf5b1a7d9630d5d8b3cbf186e3cc81 100644 --- a/src/proto_alpha/lib_protocol/validate_errors.mli +++ b/src/proto_alpha/lib_protocol/validate_errors.mli @@ -34,10 +34,7 @@ type operation_conflict = (** Errors that may arise while validating a consensus operation. *) module Consensus : sig - type consensus_operation_kind = - | Preattestation - | Attestation - | Dal_attestation + type consensus_operation_kind = Preattestation | Attestation (** Errors for preattestations and attestations. *) type error += diff --git a/src/proto_alpha/lib_sc_rollup_node/sc_rollup_injector.ml b/src/proto_alpha/lib_sc_rollup_node/sc_rollup_injector.ml index da2fa6e8197863bd12873cdf5c52c73e5ee10165..6fb74e1753ba63ac3aa89176f789e720cf2e775a 100644 --- a/src/proto_alpha/lib_sc_rollup_node/sc_rollup_injector.ml +++ b/src/proto_alpha/lib_sc_rollup_node/sc_rollup_injector.ml @@ -176,7 +176,6 @@ module Proto_client = struct match op_result with | Preattestation_result _ -> Successful | Attestation_result _ -> Successful - | Dal_attestation_result _ -> Successful | Seed_nonce_revelation_result _ -> Successful | Vdf_revelation_result _ -> Successful | Double_attestation_evidence_result _ -> Successful diff --git a/tezt/lib_tezos/operation_core.ml b/tezt/lib_tezos/operation_core.ml index 750a8cbf54bc78419ec45fa3ba1dbea40878983f..fe752016fd31e9a9e65dd1a73f6bcee7b38633c7 100644 --- a/tezt/lib_tezos/operation_core.ml +++ b/tezt/lib_tezos/operation_core.ml @@ -25,10 +25,7 @@ open Runnable.Syntax -type consensus_kind = - | Attestation of {with_dal : bool} - | Preattestation - | Dal_attestation +type consensus_kind = Attestation of {with_dal : bool} | Preattestation type kind = | Consensus of {kind : consensus_kind; chain_id : string} @@ -107,7 +104,6 @@ let sign ?protocol ({kind; signer; _} as t) client = match kind with | Preattestation -> "\x12" | Attestation _ -> "\x13" - | Dal_attestation -> "\x14" in Tezos_crypto.Signature.Custom (Bytes.cat (Bytes.of_string prefix) (Bytes.of_string chain_id)) @@ -264,12 +260,6 @@ module Consensus = struct consensus : consensus_content; dal : dal_content option; } - | Dal_attestation of { - attestation : bool array; - level : int; - round : int; - slot : int; - } let consensus ~use_legacy_name ~kind ~slot ~level ~round ~block_payload_hash = let consensus = {slot; level; round; block_payload_hash} in @@ -278,7 +268,6 @@ module Consensus = struct | Attestation {with_dal} -> assert (with_dal = false) ; CAttestation {use_legacy_name; consensus; dal = None} - | Dal_attestation -> assert false let attestation ~use_legacy_name ~slot ~level ~round ~block_payload_hash ?dal_attestation () = @@ -294,9 +283,6 @@ module Consensus = struct let consensus = {slot; level; round; block_payload_hash} in CPreattestation {use_legacy_name; consensus} - let dal_attestation ~attestation ~level ~round ~slot = - Dal_attestation {attestation; level; round; slot} - let string_of_bool_vector dal_attestation = let aux (acc, n) b = let bit = if b then 1 else 0 in @@ -310,7 +296,6 @@ module Consensus = struct | Attestation {with_dal} -> name use_legacy_name ^ if with_dal then "_with_dal" else "" | Preattestation -> Format.sprintf "pre%s" (name use_legacy_name) - | Dal_attestation -> "dal_attestation" let json = function | CAttestation {use_legacy_name; consensus; dal} -> @@ -343,15 +328,6 @@ module Consensus = struct ("round", Ezjsonm.int consensus.round); ("block_payload_hash", Ezjsonm.string consensus.block_payload_hash); ] - | Dal_attestation {attestation; level; round; slot} -> - `O - [ - ("kind", Ezjsonm.string "dal_attestation"); - ("attestation", Ezjsonm.string (string_of_bool_vector attestation)); - ("level", Ezjsonm.int level); - ("round", Ezjsonm.int round); - ("slot", Ezjsonm.int slot); - ] let operation ?branch ?chain_id ~signer consensus_operation client = let json = `A [json consensus_operation] in @@ -369,7 +345,6 @@ module Consensus = struct match consensus_operation with | CPreattestation _ -> Preattestation | CAttestation _ -> Attestation {with_dal = false} - | Dal_attestation _ -> Dal_attestation in return (make ~branch ~signer ~kind:(Consensus {kind; chain_id}) json) diff --git a/tezt/lib_tezos/operation_core.mli b/tezt/lib_tezos/operation_core.mli index ebc79907756d9e1f545f626409b2faba0787aed2..0cd535eaf06f9f6032ceea82286acd47b8900c6a 100644 --- a/tezt/lib_tezos/operation_core.mli +++ b/tezt/lib_tezos/operation_core.mli @@ -61,10 +61,7 @@ type t type operation := t -type consensus_kind = - | Attestation of {with_dal : bool} - | Preattestation - | Dal_attestation +type consensus_kind = Attestation of {with_dal : bool} | Preattestation (** The kind is necessary because it determines the watermark of an operation which is necessary for signing an operation. This type @@ -233,14 +230,6 @@ module Consensus : sig (** A representation of a consensus operation. *) type t - (** [dal_attestation ~attestation ~level ~round ~slot] crafts a DAL - attestation operation to attest at [level], [round] the slot headers - published at level [level + 1 - attestation_lag]. For each slot, the - value of the booleans in [attestation] indicates whether the data is - deemed available. *) - val dal_attestation : - attestation:bool array -> level:int -> round:int -> slot:int -> t - (** [consensus ~kind ~use_legacy_name ~level ~round ~slot ~block_payload_hash] crafts a consensus operation with the [kind] at [level] on the [round] with the [slot] and [block_payload_hash]. If [use_legacy_name] is set, the