diff --git a/src/proto_alpha/lib_client/operation_result.ml b/src/proto_alpha/lib_client/operation_result.ml index 794aafd9b59c559e7b2989854ca1d8480f20dbcc..8d48614b7221c78233fc1ab7efb61e6940486227 100644 --- a/src/proto_alpha/lib_client/operation_result.ml +++ b/src/proto_alpha/lib_client/operation_result.ml @@ -345,12 +345,12 @@ let pp_balance_updates ppf balance_updates = Cycle.pp cycle | Nonce_revelation_rewards -> "nonce revelation rewards" - | Endorsing_rewards -> "attesting rewards" + | Attesting_rewards -> "attesting rewards" | Baking_rewards -> "baking rewards" | Baking_bonuses -> "baking bonuses" | Storage_fees -> "storage fees" | Double_signing_punishments -> "double signing punishments" - | Lost_endorsing_rewards (pkh, p, r) -> + | Lost_attesting_rewards (pkh, p, r) -> let reason = match (p, r) with | false, false -> "" @@ -888,8 +888,8 @@ let pp_contents_and_result : Consensus_key.pp {delegate; consensus_pkh = consensus_key} consensus_power - | ( Endorsement {level; _}, - Endorsement_result + | ( Attestation {level; _}, + Attestation_result {balance_updates; delegate; consensus_key; consensus_power} ) -> Format.fprintf ppf diff --git a/src/proto_alpha/lib_delegate/baking_actions.ml b/src/proto_alpha/lib_delegate/baking_actions.ml index 0a85d960db88ee96882413793d1d17d75a909094..e14351c1dc6918ee4d4cbe94f2f352727d3d7f3f 100644 --- a/src/proto_alpha/lib_delegate/baking_actions.ml +++ b/src/proto_alpha/lib_delegate/baking_actions.ml @@ -481,8 +481,8 @@ let sign_endorsements state endorsements = } in let contents = - (* No preendorsements are included *) - Single (Endorsement consensus_content) + (* No preattestations are included *) + Single (Attestation consensus_content) in let level = Raw_level.to_int32 consensus_content.level in let round = consensus_content.round in @@ -506,7 +506,7 @@ let sign_endorsements state endorsements = | false -> return state.global_state.config.force) >>=? fun may_sign -> (if may_sign then - let watermark = Operation.(to_watermark (Endorsement chain_id)) in + let watermark = Operation.(to_watermark (Attestation chain_id)) in let unsigned_operation = (shell, Contents_list contents) in let unsigned_operation_bytes = Data_encoding.Binary.to_bytes_exn diff --git a/src/proto_alpha/lib_delegate/baking_lib.ml b/src/proto_alpha/lib_delegate/baking_lib.ml index 8d6994eeb907cbcda6607bd8f05980cc7138a79b..70e2d976d04e7dd43e22cbc8aa803e627e1ca47f 100644 --- a/src/proto_alpha/lib_delegate/baking_lib.ml +++ b/src/proto_alpha/lib_delegate/baking_lib.ml @@ -199,7 +199,7 @@ let state_endorsing_power = Operation_pool.filter_endorsements (fun ({ - protocol_data = {contents = Single (Endorsement consensus_content); _}; + protocol_data = {contents = Single (Attestation consensus_content); _}; _; } : Kind.attestation operation) @@ -422,7 +422,7 @@ let baking_minimal_timestamp state = (fun ({ protocol_data = - {contents = Single (Endorsement consensus_content); _}; + {contents = Single (Attestation consensus_content); _}; _; } : Kind.attestation operation) diff --git a/src/proto_alpha/lib_delegate/client_baking_denunciation.ml b/src/proto_alpha/lib_delegate/client_baking_denunciation.ml index 3bee80abdedc3650cb0e07648a6347dc0edf001f..89725aad18926620bfeca45c094ad074c0e35278 100644 --- a/src/proto_alpha/lib_delegate/client_baking_denunciation.ml +++ b/src/proto_alpha/lib_delegate/client_baking_denunciation.ml @@ -139,14 +139,14 @@ let get_payload_hash (type kind) (op_kind : kind consensus_operation_type) (op : kind Operation.t) = match (op_kind, op.protocol_data.contents) with | Preattestation, Single (Preattestation consensus_content) - | Endorsement, Single (Endorsement consensus_content) -> + | Attestation, Single (Attestation consensus_content) -> consensus_content.block_payload_hash let get_slot (type kind) (op_kind : kind consensus_operation_type) (op : kind Operation.t) = match (op_kind, op.protocol_data.contents) with | Preattestation, Single (Preattestation consensus_content) - | Endorsement, Single (Endorsement consensus_content) -> + | Attestation, Single (Attestation consensus_content) -> consensus_content.slot let double_consensus_op_evidence (type kind) : @@ -158,7 +158,7 @@ let double_consensus_op_evidence (type kind) : op2:kind Alpha_context.operation -> unit -> bytes Environment.Error_monad.shell_tzresult Lwt.t = function - | Endorsement -> Plugin.RPC.Forge.double_endorsement_evidence + | Attestation -> Plugin.RPC.Forge.double_endorsement_evidence | Preattestation -> Plugin.RPC.Forge.double_preendorsement_evidence let lookup_recorded_consensus (type kind) consensus_key @@ -167,7 +167,7 @@ let lookup_recorded_consensus (type kind) consensus_key | None -> No_operation_seen | Some {endorsement; preendorsement} -> ( match op_kind with - | Endorsement -> endorsement + | Attestation -> endorsement | Preattestation -> preendorsement) let add_consensus_operation (type kind) consensus_key @@ -186,7 +186,7 @@ let add_consensus_operation (type kind) consensus_key x in match op_kind with - | Endorsement -> Some {record with endorsement = recorded_operation} + | Attestation -> Some {record with endorsement = recorded_operation} | Preattestation -> Some {record with preendorsement = recorded_operation}) map @@ -290,7 +290,7 @@ let process_consensus_op (type kind) state cctxt let double_op_detected, double_op_denounced = Events.( match op_kind with - | Endorsement -> + | Attestation -> (double_attestation_detected, double_attestation_denounced) | Preattestation -> ( double_preattestation_detected, @@ -345,7 +345,7 @@ let process_operations (cctxt : #Protocol_client_context.full) state round slot | Operation_data - ({contents = Single (Endorsement {round; slot; level; _}); _} as + ({contents = Single (Attestation {round; slot; level; _}); _} as protocol_data) -> let new_endorsement : Kind.attestation Alpha_context.operation = {shell; protocol_data} @@ -353,7 +353,7 @@ let process_operations (cctxt : #Protocol_client_context.full) state process_consensus_op state cctxt - Endorsement + Attestation new_endorsement chain_id level diff --git a/src/proto_alpha/lib_delegate/operation_pool.ml b/src/proto_alpha/lib_delegate/operation_pool.ml index 6a60da07cc140904f92ceb35b7b86c8ef8466aaa..f3eee2463c1671b3e96e0a0218d4a00bf571dbef 100644 --- a/src/proto_alpha/lib_delegate/operation_pool.ml +++ b/src/proto_alpha/lib_delegate/operation_pool.ml @@ -242,7 +242,7 @@ let filter_with_relevant_consensus_ops ~(endorsement_filter : consensus_filter) | ( Operation_data { contents = - Single (Endorsement {level; round; block_payload_hash; _}); + Single (Attestation {level; round; block_payload_hash; _}); _; }, _ ) -> @@ -264,7 +264,7 @@ let unpack_preendorsement packed_preendorsement = let unpack_endorsement packed_endorsement = let {shell; protocol_data = Operation_data data} = packed_endorsement in match data with - | {contents = Single (Endorsement _); _} -> + | {contents = Single (Attestation _); _} -> Some ({shell; protocol_data = data} : Kind.attestation Operation.t) | _ -> None @@ -297,7 +297,7 @@ let filter_endorsements ops = | { shell = {branch}; protocol_data = - Operation_data ({contents = Single (Endorsement _); _} as content); + Operation_data ({contents = Single (Attestation _); _} as content); _; } -> Some @@ -344,7 +344,7 @@ let extract_operations_of_list_list = function ( {shell; protocol_data = data} :: preendorsements, endorsements, dal_attestations ) - | {contents = Single (Endorsement _); _} -> + | {contents = Single (Attestation _); _} -> ( preendorsements, {shell; protocol_data = data} :: endorsements, dal_attestations ) diff --git a/src/proto_alpha/lib_delegate/operation_worker.ml b/src/proto_alpha/lib_delegate/operation_worker.ml index 6440698effc3821a574dba81783fdfb0ceecf03f..4fa7b7194d4e853a56be0e6aa2c16264e7649a18 100644 --- a/src/proto_alpha/lib_delegate/operation_worker.ml +++ b/src/proto_alpha/lib_delegate/operation_worker.ml @@ -181,9 +181,9 @@ module Endorsement_set = Set.Make (struct type t = Kind.attestation operation let compare - ({protocol_data = {contents = Single (Endorsement op1); _}; shell = _} : + ({protocol_data = {contents = Single (Attestation op1); _}; shell = _} : t) - ({protocol_data = {contents = Single (Endorsement op2); _}; shell = _} : + ({protocol_data = {contents = Single (Attestation op2); _}; shell = _} : t) = compare_consensus_contents op1 op2 end) @@ -391,7 +391,7 @@ let update_monitoring ?(should_lock = true) state ops = let { shell = _; protocol_data = - {contents = Single (Endorsement consensus_content); _}; + {contents = Single (Attestation consensus_content); _}; _; } = op @@ -515,7 +515,7 @@ let update_operations_pool state (head_level, head_round) = | { protocol_data = Operation_data - {contents = Single (Endorsement {round; level; _}); _}; + {contents = Single (Attestation {round; level; _}); _}; _; } -> let round_i32 = Round.to_int32 round in diff --git a/src/proto_alpha/lib_delegate/test/mockup_simulator/mockup_simulator.ml b/src/proto_alpha/lib_delegate/test/mockup_simulator/mockup_simulator.ml index 570e0af607fa5a8775be7c45c7cb62a6057df149..4d3cbfc8892f7a689104e56c8a92533457775280 100644 --- a/src/proto_alpha/lib_delegate/test/mockup_simulator/mockup_simulator.ml +++ b/src/proto_alpha/lib_delegate/test/mockup_simulator/mockup_simulator.ml @@ -1342,8 +1342,8 @@ let op_is_signed_by ~public_key (op_hash : Operation_hash.t) | Single op_contents -> return (match op_contents with - | Endorsement _ -> - Alpha_context.Operation.to_watermark (Endorsement chain_id) + | Attestation _ -> + Alpha_context.Operation.to_watermark (Attestation chain_id) | Preattestation _ -> Alpha_context.Operation.to_watermark (Preattestation chain_id) | _ -> Signature.Generic_operation) @@ -1403,7 +1403,7 @@ let op_is_endorsement ?level ?round (op_hash : Operation_hash.t) match d.contents with | Single op_contents -> ( match op_contents with - | Endorsement consensus_content -> + | Attestation consensus_content -> let right_level = match level with | None -> true diff --git a/src/proto_alpha/lib_plugin/RPC.ml b/src/proto_alpha/lib_plugin/RPC.ml index b96e708771f0219c22abf328561cde8828244d16..e24ffb58a1917c4b9cfb8638fe85101ac8b678f4 100644 --- a/src/proto_alpha/lib_plugin/RPC.ml +++ b/src/proto_alpha/lib_plugin/RPC.ml @@ -1037,7 +1037,7 @@ module Scripts = struct let*? () = match packed_operation.protocol_data with | Operation_data {contents = Single (Preattestation _); _} - | Operation_data {contents = Single (Endorsement _); _} + | Operation_data {contents = Single (Attestation _); _} | Operation_data {contents = Single (Dal_attestation _); _} -> error Run_operation_does_not_support_consensus_operations | _ -> ok () @@ -2930,7 +2930,7 @@ module Forge = struct ({branch}, Contents_list (Single operation)) let endorsement ctxt b ~branch ~consensus_content () = - operation ctxt b ~branch (Endorsement consensus_content) + operation ctxt b ~branch (Attestation consensus_content) let proposals ctxt b ~branch ~source ~period ~proposals () = operation ctxt b ~branch (Proposals {source; period; proposals}) diff --git a/src/proto_alpha/lib_plugin/mempool.ml b/src/proto_alpha/lib_plugin/mempool.ml index e4fe71b5d26fc9ade50f233621c5cea4e2f343f3..4a939a41946605dc912d6ee432823187b45cdcdc 100644 --- a/src/proto_alpha/lib_plugin/mempool.ml +++ b/src/proto_alpha/lib_plugin/mempool.ml @@ -535,7 +535,7 @@ let pre_filter filter_info config | Single (Failing_noop _) -> Lwt.return (`Refused [Environment.wrap_tzerror Wrong_operation]) | Single (Preattestation consensus_content) - | Single (Endorsement consensus_content) -> + | Single (Attestation consensus_content) -> pre_filter_far_future_consensus_ops filter_info config consensus_content >>= fun keep -> if keep then Lwt.return @@ `Passed_prefilter consensus_prio @@ -679,7 +679,7 @@ let find_manager {shell = _; protocol_data = Operation_data {contents; _}} = | Single (Manager_operation {source; _}) -> Some source | Cons (Manager_operation {source; _}, _) -> Some source | Single - ( Preattestation _ | Endorsement _ | Dal_attestation _ | Proposals _ + ( Preattestation _ | Attestation _ | Dal_attestation _ | Proposals _ | Ballot _ | Seed_nonce_revelation _ | Vdf_revelation _ | Double_baking_evidence _ | Double_preattestation_evidence _ | Double_attestation_evidence _ | Activate_account _ | Drain_delegate _ diff --git a/src/proto_alpha/lib_protocol/adaptive_inflation_services.ml b/src/proto_alpha/lib_protocol/adaptive_inflation_services.ml index 201bb542705afe762ba1e9f77999dd441a880ba8..1c24b7817a63de77e0d4982fec3ae9701fe41177 100644 --- a/src/proto_alpha/lib_protocol/adaptive_inflation_services.ml +++ b/src/proto_alpha/lib_protocol/adaptive_inflation_services.ml @@ -198,7 +198,7 @@ let collect_expected_rewards ~ctxt = cycle; baking_reward_fixed_portion = baking_reward_fixed_portion ctxt; baking_reward_bonus_per_slot = baking_reward_bonus_per_slot ctxt; - endorsing_reward_per_slot = endorsing_reward_per_slot ctxt; + endorsing_reward_per_slot = attesting_reward_per_slot ctxt; liquidity_baking_subsidy = liquidity_baking_subsidy ctxt; seed_nonce_revelation_tip = seed_nonce_revelation_tip ctxt; vdf_revelation_tip = vdf_revelation_tip ctxt; @@ -226,7 +226,7 @@ let collect_expected_rewards ~ctxt = reward_from_constants ~coeff csts - ~reward_kind:Endorsing_reward_per_slot; + ~reward_kind:Attesting_reward_per_slot; liquidity_baking_subsidy = reward_from_constants ~coeff diff --git a/src/proto_alpha/lib_protocol/alpha_context.mli b/src/proto_alpha/lib_protocol/alpha_context.mli index 3b4002a6ce740531a0b2082da914c395d118fbb9..521a84afcc0b07ab4b7e21eaf463912ce5efb546 100644 --- a/src/proto_alpha/lib_protocol/alpha_context.mli +++ b/src/proto_alpha/lib_protocol/alpha_context.mli @@ -2037,12 +2037,12 @@ module Receipt : sig | Deposits of public_key_hash | Unstaked_deposits of public_key_hash * Cycle.t | Nonce_revelation_rewards - | Endorsing_rewards + | Attesting_rewards | Baking_rewards | Baking_bonuses | Storage_fees | Double_signing_punishments - | Lost_endorsing_rewards of public_key_hash * bool * bool + | Lost_attesting_rewards of public_key_hash * bool * bool | Liquidity_baking_subsidies | Burned | Commitments of Blinded_public_key_hash.t @@ -2222,7 +2222,7 @@ module Delegate : sig val baking_reward_bonus_per_slot : t -> Tez.t - val endorsing_reward_per_slot : t -> Tez.t + val attesting_reward_per_slot : t -> Tez.t val liquidity_baking_subsidy : t -> Tez.t @@ -2234,7 +2234,7 @@ module Delegate : sig type reward_kind = | Baking_reward_fixed_portion | Baking_reward_bonus_per_slot - | Endorsing_reward_per_slot + | Attesting_reward_per_slot | Liquidity_baking_subsidy | Seed_nonce_revelation_tip | Vdf_revelation_tip @@ -4129,14 +4129,14 @@ end (** All the definitions below are re-exported from {!Operation_repr}. *) type 'a consensus_operation_type = - | Endorsement : Kind.attestation consensus_operation_type + | Attestation : Kind.attestation consensus_operation_type | Preattestation : Kind.preattestation consensus_operation_type type consensus_content = { slot : Slot.t; level : Raw_level.t; - (* The level is not required to validate an endorsement when it corresponds - to the current payload, but if we want to filter endorsements, we need + (* The level is not required to validate an attestation when it corresponds + to the current payload, but if we want to filter attestations, we need the level. *) round : Round.t; block_payload_hash : Block_payload_hash.t; @@ -4164,7 +4164,7 @@ and _ contents_list = and _ contents = | Preattestation : consensus_content -> Kind.preattestation contents - | Endorsement : consensus_content -> Kind.attestation contents + | Attestation : consensus_content -> Kind.attestation contents | Dal_attestation : Dal.Attestation.operation -> Kind.dal_attestation contents | Seed_nonce_revelation : { level : Raw_level.t; @@ -4358,7 +4358,7 @@ module Operation : sig type nonrec packed_protocol_data = packed_protocol_data type consensus_watermark = - | Endorsement of Chain_id.t + | Attestation of Chain_id.t | Preattestation of Chain_id.t | Dal_attestation of Chain_id.t @@ -4878,7 +4878,7 @@ module Token : sig | `Bootstrap | `Initial_commitments | `Revelation_rewards - | `Endorsing_rewards + | `Attesting_rewards | `Baking_rewards | `Baking_bonuses | `Minted @@ -4889,7 +4889,7 @@ module Token : sig type receiver = [ `Storage_fees | `Double_signing_punishments - | `Lost_endorsing_rewards of public_key_hash * bool * bool + | `Lost_attesting_rewards of public_key_hash * bool * bool | `Burned | `Sc_rollup_refutation_punishments | container ] diff --git a/src/proto_alpha/lib_protocol/apply.ml b/src/proto_alpha/lib_protocol/apply.ml index b447a6a3ee0de648454e5a417f8bafb07e7cf84c..42defbaac3968992e5b069db6d402a8439b40751 100644 --- a/src/proto_alpha/lib_protocol/apply.ml +++ b/src/proto_alpha/lib_protocol/apply.ml @@ -1978,7 +1978,7 @@ let record_operation (type kind) ctxt hash (operation : kind operation) : context = match operation.protocol_data.contents with | Single (Preattestation _) -> ctxt - | Single (Endorsement _) -> ctxt + | Single (Attestation _) -> ctxt | Single (Dal_attestation _) -> ctxt | Single ( Failing_noop _ | Proposals _ | Ballot _ | Seed_nonce_revelation _ @@ -2053,7 +2053,7 @@ let record_endorsement ctxt (mode : mode) (content : consensus_content) : let mk_endorsement_result ({delegate; consensus_pkh; _} : Consensus_key.pk) consensus_power = Single_result - (Endorsement_result + (Attestation_result { balance_updates = []; delegate; @@ -2136,11 +2136,11 @@ let punish_double_attestation_or_preattestation (type kind) ctxt match op1.protocol_data.contents with | Single (Preattestation _) -> Double_preattestation_evidence_result balance_updates - | Single (Endorsement _) -> + | Single (Attestation _) -> Double_attestation_evidence_result balance_updates in match op1.protocol_data.contents with - | Single (Preattestation e1) | Single (Endorsement e1) -> + | Single (Preattestation e1) | Single (Attestation e1) -> let level = Level.from_raw ctxt e1.level in Stake_distribution.slot_owner ctxt level e1.slot >>=? fun (ctxt, consensus_pk1) -> @@ -2180,7 +2180,7 @@ let apply_contents_list (type kind) ctxt chain_id (mode : mode) match contents_list with | Single (Preattestation consensus_content) -> record_preattestation ctxt mode consensus_content - | Single (Endorsement consensus_content) -> + | Single (Attestation consensus_content) -> record_endorsement ctxt mode consensus_content | Single (Dal_attestation op) -> (* DAL/FIXME https://gitlab.com/tezos/tezos/-/issues/3115 diff --git a/src/proto_alpha/lib_protocol/apply_results.ml b/src/proto_alpha/lib_protocol/apply_results.ml index 99dc9f7db0730afaacb199ad5bd71d56254b727a..0312a66eed4f3a68f9484195b364de0fef02b6bb 100644 --- a/src/proto_alpha/lib_protocol/apply_results.ml +++ b/src/proto_alpha/lib_protocol/apply_results.ml @@ -892,7 +892,7 @@ type 'kind contents_result = consensus_power : int; } -> Kind.preattestation contents_result - | Endorsement_result : { + | Attestation_result : { balance_updates : Receipt.balance_updates; delegate : Signature.public_key_hash; consensus_key : Signature.public_key_hash; @@ -1111,19 +1111,19 @@ module Encoding = struct encoding = consensus_result_encoding_legacy "endorsement"; select = (function - | Contents_result (Endorsement_result _ as op) -> Some op | _ -> None); + | Contents_result (Attestation_result _ as op) -> Some op | _ -> None); mselect = (function - | Contents_and_result ((Endorsement _ as op), res) -> Some (op, res) + | Contents_and_result ((Attestation _ as op), res) -> Some (op, res) | _ -> None); proj = (function - | Endorsement_result + | Attestation_result {balance_updates; delegate; consensus_key; consensus_power} -> (balance_updates, delegate, consensus_power, consensus_key)); inj = (fun (balance_updates, delegate, consensus_power, consensus_key) -> - Endorsement_result + Attestation_result {balance_updates; delegate; consensus_key; consensus_power}); } @@ -1134,19 +1134,19 @@ module Encoding = struct encoding = consensus_result_encoding; select = (function - | Contents_result (Endorsement_result _ as op) -> Some op | _ -> None); + | Contents_result (Attestation_result _ as op) -> Some op | _ -> None); mselect = (function - | Contents_and_result ((Endorsement _ as op), res) -> Some (op, res) + | Contents_and_result ((Attestation _ as op), res) -> Some (op, res) | _ -> None); proj = (function - | Endorsement_result + | Attestation_result {balance_updates; delegate; consensus_key; consensus_power} -> (balance_updates, delegate, consensus_power, consensus_key)); inj = (fun (balance_updates, delegate, consensus_power, consensus_key) -> - Endorsement_result + Attestation_result {balance_updates; delegate; consensus_key; consensus_power}); } @@ -1477,7 +1477,7 @@ module Encoding = struct (Manager_operation_result {op with operation_result = Failed (kind, errs)})) | Contents_result (Preattestation_result _) -> None - | Contents_result (Endorsement_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 @@ -1970,8 +1970,8 @@ let kind_equal : kind contents -> kind2 contents_result -> (kind, kind2) eq option = fun op res -> match (op, res) with - | Endorsement _, Endorsement_result _ -> Some Eq - | Endorsement _, _ -> None + | Attestation _, Attestation_result _ -> Some Eq + | Attestation _, _ -> None | Preattestation _, Preattestation_result _ -> Some Eq | Preattestation _, _ -> None | Dal_attestation _, Dal_attestation_result _ -> Some Eq diff --git a/src/proto_alpha/lib_protocol/apply_results.mli b/src/proto_alpha/lib_protocol/apply_results.mli index 75e33ef795b20617302541176d4c322d37a2c493..964a0782f8acc67fb57356efa55f41936a56de85 100644 --- a/src/proto_alpha/lib_protocol/apply_results.mli +++ b/src/proto_alpha/lib_protocol/apply_results.mli @@ -65,7 +65,7 @@ and 'kind contents_result = consensus_power : int; } -> Kind.preattestation contents_result - | Endorsement_result : { + | Attestation_result : { balance_updates : Receipt.balance_updates; delegate : Signature.public_key_hash; consensus_key : Signature.public_key_hash; diff --git a/src/proto_alpha/lib_protocol/delegate_cycles.ml b/src/proto_alpha/lib_protocol/delegate_cycles.ml index dd22d07a5967085ec7fc4a864351253b403968d2..e1415d3d1db5daa4b1ab266dd7837a00ea9f40ee 100644 --- a/src/proto_alpha/lib_protocol/delegate_cycles.ml +++ b/src/proto_alpha/lib_protocol/delegate_cycles.ml @@ -142,7 +142,7 @@ let delegate_has_revealed_nonces delegate unrevelead_nonces_set = let distribute_endorsing_rewards ctxt last_cycle unrevealed_nonces = let endorsing_reward_per_slot = - Delegate_rewards.endorsing_reward_per_slot ctxt + Delegate_rewards.attesting_reward_per_slot ctxt in let unrevealed_nonces_set = List.fold_left @@ -183,7 +183,7 @@ let distribute_endorsing_rewards ctxt last_cycle unrevealed_nonces = Delegate_staking_parameters.pay_rewards ctxt ~active_stake - ~source:`Endorsing_rewards + ~source:`Attesting_rewards ~delegate rewards >|=? fun (ctxt, payed_rewards_receipts) -> @@ -192,8 +192,8 @@ let distribute_endorsing_rewards ctxt last_cycle unrevealed_nonces = (* Insufficient participation or unrevealed nonce: no rewards *) Token.transfer ctxt - `Endorsing_rewards - (`Lost_endorsing_rewards + `Attesting_rewards + (`Lost_attesting_rewards (delegate, not sufficient_participation, not has_revealed_nonces)) rewards >|=? fun (ctxt, payed_rewards_receipts) -> diff --git a/src/proto_alpha/lib_protocol/delegate_missed_endorsements_storage.ml b/src/proto_alpha/lib_protocol/delegate_missed_endorsements_storage.ml index a757bdf9f6db2741ec42437b917d2ff63ee5bff0..0895efb5357b466edefca43a3c8a88650f811c49 100644 --- a/src/proto_alpha/lib_protocol/delegate_missed_endorsements_storage.ml +++ b/src/proto_alpha/lib_protocol/delegate_missed_endorsements_storage.ml @@ -196,7 +196,7 @@ let participation_info ctxt delegate = Constants_storage.minimal_participation_ratio ctxt in let endorsing_reward_per_slot = - Delegate_rewards.endorsing_reward_per_slot ctxt + Delegate_rewards.attesting_reward_per_slot ctxt in let minimal_cycle_activity = expected_cycle_activity * numerator / denominator diff --git a/src/proto_alpha/lib_protocol/delegate_rewards.ml b/src/proto_alpha/lib_protocol/delegate_rewards.ml index d61593ea8996c967107911fe0a9921ad5b102bfa..4a85dbfaaa5b91a5a1c5a4c406f294b6da38824e 100644 --- a/src/proto_alpha/lib_protocol/delegate_rewards.ml +++ b/src/proto_alpha/lib_protocol/delegate_rewards.ml @@ -65,7 +65,7 @@ module M = struct type reward_kind = | Baking_reward_fixed_portion | Baking_reward_bonus_per_slot - | Endorsing_reward_per_slot + | Attesting_reward_per_slot | Liquidity_baking_subsidy | Seed_nonce_revelation_tip | Vdf_revelation_tip @@ -79,7 +79,7 @@ module M = struct reward_weights.baking_reward_fixed_portion_weight | Baking_reward_bonus_per_slot -> reward_weights.baking_reward_bonus_weight - | Endorsing_reward_per_slot -> reward_weights.attesting_reward_weight + | Attesting_reward_per_slot -> reward_weights.attesting_reward_weight | Liquidity_baking_subsidy -> reward_weights.liquidity_baking_subsidy_weight | Seed_nonce_revelation_tip -> @@ -104,7 +104,7 @@ module M = struct in if Compare.Int.(bonus_committee_size <= 0) then Tez_repr.zero else Tez_repr.div_exn rewards bonus_committee_size - | Endorsing_reward_per_slot -> + | Attesting_reward_per_slot -> Tez_repr.div_exn rewards csts.consensus_committee_size | _ -> rewards in @@ -126,8 +126,8 @@ let baking_reward_fixed_portion ctxt = let baking_reward_bonus_per_slot ctxt = reward_from_context ~ctxt ~reward_kind:Baking_reward_bonus_per_slot -let endorsing_reward_per_slot ctxt = - reward_from_context ~ctxt ~reward_kind:Endorsing_reward_per_slot +let attesting_reward_per_slot ctxt = + reward_from_context ~ctxt ~reward_kind:Attesting_reward_per_slot let liquidity_baking_subsidy ctxt = reward_from_context ~ctxt ~reward_kind:Liquidity_baking_subsidy diff --git a/src/proto_alpha/lib_protocol/delegate_rewards.mli b/src/proto_alpha/lib_protocol/delegate_rewards.mli index 14746445817785e39c19d9b2cb69021d37c0ed5b..62fbdeed45ecb6013139ae5e8f0875ee8b27b55e 100644 --- a/src/proto_alpha/lib_protocol/delegate_rewards.mli +++ b/src/proto_alpha/lib_protocol/delegate_rewards.mli @@ -29,7 +29,7 @@ val baking_reward_fixed_portion : Raw_context.t -> Tez_repr.t val baking_reward_bonus_per_slot : Raw_context.t -> Tez_repr.t -val endorsing_reward_per_slot : Raw_context.t -> Tez_repr.t +val attesting_reward_per_slot : Raw_context.t -> Tez_repr.t val liquidity_baking_subsidy : Raw_context.t -> Tez_repr.t @@ -41,7 +41,7 @@ module For_RPC : sig type reward_kind = | Baking_reward_fixed_portion | Baking_reward_bonus_per_slot - | Endorsing_reward_per_slot + | Attesting_reward_per_slot | Liquidity_baking_subsidy | Seed_nonce_revelation_tip | Vdf_revelation_tip diff --git a/src/proto_alpha/lib_protocol/operation_repr.ml b/src/proto_alpha/lib_protocol/operation_repr.ml index 9a370360d8e931a09430b93bc4dd992f522a901e..1fd6be0b4aa497137513489709f2a81f3cb1e8b2 100644 --- a/src/proto_alpha/lib_protocol/operation_repr.ml +++ b/src/proto_alpha/lib_protocol/operation_repr.ml @@ -135,14 +135,14 @@ module Kind = struct end type 'a consensus_operation_type = - | Endorsement : Kind.attestation consensus_operation_type + | Attestation : Kind.attestation consensus_operation_type | Preattestation : Kind.preattestation consensus_operation_type type consensus_content = { slot : Slot_repr.t; level : Raw_level_repr.t; - (* The level is not required to validate an endorsement when it corresponds - to the current payload, but if we want to filter endorsements, we need + (* The level is not required to validate an attestation when it corresponds + to the current payload, but if we want to filter attestations, we need the level. *) round : Round_repr.t; block_payload_hash : Block_payload_hash.t; @@ -178,7 +178,7 @@ let pp_consensus_content ppf content = content.block_payload_hash type consensus_watermark = - | Endorsement of Chain_id.t + | Attestation of Chain_id.t | Preattestation of Chain_id.t | Dal_attestation of Chain_id.t @@ -189,11 +189,11 @@ let to_watermark = function | Dal_attestation chain_id (* FIXME: https://gitlab.com/tezos/tezos/-/issues/4479 - We reuse the watermark of an endorsement. This is because this - operation is temporary and aims to be merged with an endorsement + We reuse the watermark of an attestation. This is because this + operation is temporary and aims to be merged with an attestation later on. Moreover, there is a leak of abstraction with the shell which makes adding a new watermark a bit awkward. *) - | Endorsement chain_id -> + | Attestation chain_id -> Signature.Custom (Bytes.cat (Bytes.of_string "\x13") (Chain_id.to_bytes chain_id)) @@ -207,7 +207,7 @@ let of_watermark = function (Chain_id.of_bytes_opt (Bytes.sub b 1 (Bytes.length b - 1))) | '\x13' -> Option.map - (fun chain_id -> Endorsement chain_id) + (fun chain_id -> Attestation chain_id) (Chain_id.of_bytes_opt (Bytes.sub b 1 (Bytes.length b - 1))) | _ -> None else None @@ -235,7 +235,7 @@ and _ contents_list = and _ contents = | Preattestation : consensus_content -> Kind.preattestation contents - | Endorsement : consensus_content -> Kind.attestation contents + | Attestation : consensus_content -> Kind.attestation contents | Dal_attestation : Dal_attestation_repr.operation -> Kind.dal_attestation contents @@ -1081,16 +1081,16 @@ module Encoding = struct name = "endorsement"; encoding = endorsement_encoding; select = - (function Contents (Endorsement _ as op) -> Some op | _ -> None); + (function Contents (Attestation _ as op) -> Some op | _ -> None); proj = - (fun (Endorsement consensus_content) -> + (fun (Attestation consensus_content) -> ( consensus_content.slot, consensus_content.level, consensus_content.round, consensus_content.block_payload_hash )); inj = (fun (slot, level, round, block_payload_hash) -> - Endorsement {slot; level; round; block_payload_hash}); + Attestation {slot; level; round; block_payload_hash}); } let attestation_case = @@ -1100,16 +1100,16 @@ module Encoding = struct name = "attestation"; encoding = endorsement_encoding; select = - (function Contents (Endorsement _ as op) -> Some op | _ -> None); + (function Contents (Attestation _ as op) -> Some op | _ -> None); proj = - (fun (Endorsement consensus_content) -> + (fun (Attestation consensus_content) -> ( consensus_content.slot, consensus_content.level, consensus_content.round, consensus_content.block_payload_hash )); inj = (fun (slot, level, round, block_payload_hash) -> - Endorsement {slot; level; round; block_payload_hash}); + Attestation {slot; level; round; block_payload_hash}); } let endorsement_encoding = @@ -1847,7 +1847,7 @@ let acceptable_pass (op : packed_operation) = match protocol_data.contents with | Single (Failing_noop _) -> None | Single (Preattestation _) -> Some consensus_pass - | Single (Endorsement _) -> Some consensus_pass + | Single (Attestation _) -> Some consensus_pass | Single (Dal_attestation _) -> Some consensus_pass | Single (Proposals _) -> Some voting_pass | Single (Ballot _) -> Some voting_pass @@ -1937,7 +1937,7 @@ let check_signature (type kind) key chain_id (op : kind operation) = let watermark = match op.protocol_data.contents with | Single (Preattestation _) -> to_watermark (Preattestation chain_id) - | Single (Endorsement _) -> to_watermark (Endorsement 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 _ @@ -2019,8 +2019,8 @@ let equal_contents_kind : type a b. a contents -> b contents -> (a, b) eq option match (op1, op2) with | Preattestation _, Preattestation _ -> Some Eq | Preattestation _, _ -> None - | Endorsement _, Endorsement _ -> Some Eq - | Endorsement _, _ -> None + | Attestation _, Attestation _ -> Some Eq + | Attestation _, _ -> None | Dal_attestation _, Dal_attestation _ -> Some Eq | Dal_attestation _, _ -> None | Seed_nonce_revelation _, Seed_nonce_revelation _ -> Some Eq @@ -2125,9 +2125,9 @@ let compare_inner_pass : type a b. a pass -> b pass -> int = failed to convert in a {!int}, the value of [round] is (-1). *) type round_infos = {level : int32; round : int} -(** [endorsement_infos] is the pair of a {!round_infos} and a [slot] +(** [attestation_infos] is the pair of a {!round_infos} and a [slot] convert into an {!int}. *) -type endorsement_infos = {round : round_infos; slot : int} +type attestation_infos = {round : round_infos; slot : int} (** [double_baking_infos] is the pair of a {!round_infos} and a {!block_header} hash. *) @@ -2146,15 +2146,15 @@ let round_infos_from_consensus_content (c : consensus_content) = | Ok round -> {level; round} | Error _ -> {level; round = -1} -(** Compute a {!endorsement_infos} from a {!consensus_content}. It is - used to compute the weight of {!Endorsement} and {!Preattestation}. +(** Compute a {!attestation_infos} from a {!consensus_content}. It is + used to compute the weight of {!Attestation} and {!Preattestation}. - Precondition: [c] comes from a valid operation. The {!Endorsement} + Precondition: [c] comes from a valid operation. The {!Attestation} or {!Preattestation} is valid, so its [round] must succeed to convert into an {!int}. Hence, for the unreachable path where the convertion fails, we put (-1) as [round] value (see {!round_infos_from_consensus_content}). *) -let endorsement_infos_from_consensus_content (c : consensus_content) = +let attestation_infos_from_consensus_content (c : consensus_content) = let slot = Slot_repr.to_int c.slot in let round = round_infos_from_consensus_content c in {round; slot} @@ -2188,8 +2188,8 @@ let consensus_infos_and_hash_from_block_header (bh : Block_header_repr.t) = is used to compare it to an operation of the same pass. Operation weight are defined by validation pass. - The [weight] of an {!Endorsement} or {!Preattestation} depends on - its {!endorsement_infos}. + The [weight] of an {!Attestation} or {!Preattestation} depends on + its {!attestation_infos}. The [weight] of a {!Dal_attestation} depends on the pair of the size of its bitset, {!Dal_attestation_repr.t}, and the @@ -2221,8 +2221,8 @@ let consensus_infos_and_hash_from_block_header (bh : Block_header_repr.t) = The [weight] of {!Manager_operation} depends on its [fee] and [gas_limit] ratio expressed in {!Q.t}. *) type _ weight = - | Weight_endorsement : endorsement_infos -> consensus_pass_type weight - | Weight_preattestation : endorsement_infos -> consensus_pass_type weight + | Weight_attestation : attestation_infos -> consensus_pass_type weight + | Weight_preattestation : attestation_infos -> consensus_pass_type weight | Weight_dal_attestation : (* attestor * num_attestations * level *) (Signature.Public_key_hash.t * int * int32) @@ -2319,12 +2319,12 @@ let weight_of : packed_operation -> operation_weight = W ( Consensus, Weight_preattestation - (endorsement_infos_from_consensus_content consensus_content) ) - | Single (Endorsement consensus_content) -> + (attestation_infos_from_consensus_content consensus_content) ) + | Single (Attestation consensus_content) -> W ( Consensus, - Weight_endorsement - (endorsement_infos_from_consensus_content consensus_content) ) + Weight_attestation + (attestation_infos_from_consensus_content consensus_content) ) | Single (Dal_attestation Dal_attestation_repr.{attestor; attestation; level}) -> W @@ -2343,7 +2343,7 @@ let weight_of : packed_operation -> operation_weight = W (Anonymous, Weight_vdf_revelation solution) | Single (Double_attestation_evidence {op1; _}) -> ( match op1.protocol_data.contents with - | Single (Endorsement consensus_content) -> + | Single (Attestation consensus_content) -> W ( Anonymous, Weight_double_attestation @@ -2412,7 +2412,7 @@ let compare_round_infos infos1 infos2 = (infos1.level, infos1.round) (infos2.level, infos2.round) -(** When comparing {!Endorsement} to {!Preattestation} or +(** When comparing {!Attestation} to {!Preattestation} or {!Double_attestation_evidence} to {!Double_preattestation}, in case of {!round_infos} equality, the position is relevant to compute the order. *) @@ -2426,10 +2426,10 @@ let compare_round_infos_with_prioritized_position ~prioritized_position infos1 if Compare.Int.(cmp <> 0) then cmp else match prioritized_position with Fstpos -> 1 | Sndpos -> -1 | Nopos -> 0 -(** When comparing consensus operation with {!endorsement_infos}, in +(** When comparing consensus operation with {!attestation_infos}, in case of equality of their {!round_infos}, either they are of the same kind and their [slot] have to be compared in the reverse - order, otherwise the {!Endorsement} is better and + order, otherwise the {!Attestation} is better and [prioritized_position] gives its position. *) let compare_prioritized_position_or_slot ~prioritized_position = match prioritized_position with @@ -2437,12 +2437,12 @@ let compare_prioritized_position_or_slot ~prioritized_position = | Fstpos -> fun _ _ -> 1 | Sndpos -> fun _ _ -> -1 -(** Two {!endorsement_infos} are compared by their {!round_infos}. +(** Two {!attestation_infos} are compared by their {!round_infos}. When their {!round_infos} are equal, they are compared according to their priority or their [slot], see {!compare_prioritized_position_or_slot} for more details. *) -let compare_endorsement_infos ~prioritized_position (infos1 : endorsement_infos) - (infos2 : endorsement_infos) = +let compare_attestation_infos ~prioritized_position (infos1 : attestation_infos) + (infos2 : attestation_infos) = compare_pair_in_lexico_order ~cmp_fst:compare_round_infos ~cmp_snd:(compare_prioritized_position_or_slot ~prioritized_position) @@ -2462,45 +2462,45 @@ let compare_baking_infos infos1 infos2 = (** Two valid {!Dal_attestation} are compared in the lexicographic order of their pairs of bitsets size and attestor hash. *) -let compare_dal_attestation (attestor1, endorsements1, level1) - (attestor2, endorsements2, level2) = +let compare_dal_attestation (attestor1, attestations1, level1) + (attestor2, attestations2, level2) = compare_pair_in_lexico_order ~cmp_fst: (compare_pair_in_lexico_order ~cmp_fst:Compare.Int32.compare ~cmp_snd:Compare.Int.compare) ~cmp_snd:Signature.Public_key_hash.compare - ((level1, endorsements1), attestor1) - ((level2, endorsements2), attestor2) + ((level1, attestations1), attestor1) + ((level2, attestations2), attestor2) (** {4 Comparison of valid operations of the same validation pass} *) (** {5 Comparison of valid consensus operations} *) (** Comparing consensus operations by their [weight] uses the - comparison on {!endorsement_infos} for {!Endorsement} and - {!Preattestation}: see {!endorsement_infos} for more details. + comparison on {!attestation_infos} for {!Attestation} and + {!Preattestation}: see {!attestation_infos} for more details. {!Dal_attestation} is smaller than the other kinds of consensus operations. Two valid {!Dal_attestation} are compared by {!compare_dal_attestation}. *) let compare_consensus_weight w1 w2 = match (w1, w2) with - | Weight_endorsement infos1, Weight_endorsement infos2 -> - compare_endorsement_infos ~prioritized_position:Nopos infos1 infos2 + | Weight_attestation infos1, Weight_attestation infos2 -> + compare_attestation_infos ~prioritized_position:Nopos infos1 infos2 | Weight_preattestation infos1, Weight_preattestation infos2 -> - compare_endorsement_infos ~prioritized_position:Nopos infos1 infos2 - | Weight_endorsement infos1, Weight_preattestation infos2 -> - compare_endorsement_infos ~prioritized_position:Fstpos infos1 infos2 - | Weight_preattestation infos1, Weight_endorsement infos2 -> - compare_endorsement_infos ~prioritized_position:Sndpos infos1 infos2 + compare_attestation_infos ~prioritized_position:Nopos infos1 infos2 + | Weight_attestation infos1, Weight_preattestation infos2 -> + compare_attestation_infos ~prioritized_position:Fstpos infos1 infos2 + | Weight_preattestation infos1, Weight_attestation infos2 -> + compare_attestation_infos ~prioritized_position:Sndpos infos1 infos2 | ( Weight_dal_attestation (attestor1, size1, lvl1), Weight_dal_attestation (attestor2, size2, lvl2) ) -> compare_dal_attestation (attestor1, size1, lvl1) (attestor2, size2, lvl2) - | Weight_dal_attestation _, (Weight_endorsement _ | Weight_preattestation _) + | Weight_dal_attestation _, (Weight_attestation _ | Weight_preattestation _) -> -1 - | (Weight_endorsement _ | Weight_preattestation _), Weight_dal_attestation _ + | (Weight_attestation _ | Weight_preattestation _), Weight_dal_attestation _ -> 1 diff --git a/src/proto_alpha/lib_protocol/operation_repr.mli b/src/proto_alpha/lib_protocol/operation_repr.mli index 813f7c7d8fa5136130c5c0983bdc11008a2d18ae..d6a936e7c118e6043c9b69658e889d3f4467849d 100644 --- a/src/proto_alpha/lib_protocol/operation_repr.mli +++ b/src/proto_alpha/lib_protocol/operation_repr.mli @@ -169,18 +169,18 @@ module Kind : sig end type 'a consensus_operation_type = - | Endorsement : Kind.attestation consensus_operation_type + | Attestation : Kind.attestation consensus_operation_type | Preattestation : Kind.preattestation consensus_operation_type type consensus_content = { slot : Slot_repr.t; (* By convention, this is the validator's first slot. *) level : Raw_level_repr.t; - (* The level of (pre)endorsed block. *) + (* The level of (pre)attested block. *) round : Round_repr.t; - (* The round of (pre)endorsed block. *) + (* The round of (pre)attested block. *) block_payload_hash : Block_payload_hash.t; - (* The payload hash of (pre)endorsed block. *) + (* The payload hash of (pre)attested block. *) } val consensus_content_encoding : consensus_content Data_encoding.t @@ -188,7 +188,7 @@ val consensus_content_encoding : consensus_content Data_encoding.t val pp_consensus_content : Format.formatter -> consensus_content -> unit type consensus_watermark = - | Endorsement of Chain_id.t + | Attestation of Chain_id.t | Preattestation of Chain_id.t | Dal_attestation of Chain_id.t @@ -231,12 +231,12 @@ and _ contents = (* Preattestation: About consensus, preattestation of a block held by a validator (specific to Tenderbake). *) | Preattestation : consensus_content -> Kind.preattestation contents - (* Endorsement: About consensus, endorsement of a block held by a + (* Attestation: About consensus, attestation of a block held by a validator. *) - | Endorsement : consensus_content -> Kind.attestation contents + | Attestation : consensus_content -> Kind.attestation contents (* DAL/FIXME https://gitlab.com/tezos/tezos/-/issues/3115 - Temporary operation to avoid modifying endorsement encoding. *) + Temporary operation to avoid modifying attestation encoding. *) | Dal_attestation : Dal_attestation_repr.operation -> Kind.dal_attestation contents @@ -257,7 +257,7 @@ and _ contents = -> Kind.vdf_revelation contents (* Double_preattestation_evidence: Double-preattestation is a kind of malicious attack where a byzantine attempts to fork - the chain by preendorsing blocks with different + the chain by preattesting blocks with different contents (at the same level and same round) twice. This behavior may be reported and the byzantine will have its security deposit forfeited. *) @@ -267,7 +267,7 @@ and _ contents = } -> Kind.double_preattestation_evidence contents (* Double_attestation_evidence: Similar to double-preattestation but - for endorsements. *) + for attestations. *) | Double_attestation_evidence : { op1 : Kind.attestation operation; op2 : Kind.attestation operation; @@ -594,33 +594,25 @@ val compare_by_passes : packed_operation -> packed_operation -> int The global order is as follows: - {!Endorsement} and {!Preattestation} > {!Dal_attestation} > -<<<<<<< HEAD + {!Attestation} and {!Preattestation} > {!Dal_attestation} > {!Proposals} > {!Ballot} > {!Double_preattestation_evidence} > - {!Double_endorsement_evidence} > {!Double_baking_evidence} > -||||||| parent of 45950febbf (alpha: rename double_endorsement_evidence contents type) - {!Proposals} > {!Ballot} > {!Double_preendorsement_evidence} > - {!Double_endorsement_evidence} > {!Double_baking_evidence} > -======= - {!Proposals} > {!Ballot} > {!Double_preendorsement_evidence} > {!Double_attestation_evidence} > {!Double_baking_evidence} > ->>>>>>> 45950febbf (alpha: rename double_endorsement_evidence contents type) {!Vdf_revelation} > {!Seed_nonce_revelation} > {!Activate_account} > {!Drain_delegate} > {!Manager_operation}. - {!Endorsement} and {!Preattestation} are compared by the pair of + {!Attestation} and {!Preattestation} are compared by the pair of their [level] and [round] such as the farther to the current state [level] and [round] is greater; e.g. the greater pair in lexicographic order being the better. When equal and both operations being of the same kind, we compare their [slot]: the - The smaller being the better, assuming that the more slots an endorser + The smaller being the better, assuming that the more slots an attester has, the smaller is its smallest [slot]. When the pair is equal - and comparing an {!Endorsement] to a {!Preattestation}, the - {!Endorsement} is better. + and comparing an {!Attestation] to a {!Preattestation}, the + {!Attestation} is better. Two {!Dal_attestation} ops are compared in the lexicographic - order of the pair of their number of endorsed slots as available - and their endorsers. + order of the pair of their number of attested slots as available + and their attesters. Two voting operations are compared in the lexicographic order of the pair of their [period] and [source]. A {!Proposals} is better diff --git a/src/proto_alpha/lib_protocol/receipt_repr.ml b/src/proto_alpha/lib_protocol/receipt_repr.ml index 4002d89170977136e966623eca72a75cad5fc1d1..28ee035a7d904c5f49e12117f50e61a337fa2e7c 100644 --- a/src/proto_alpha/lib_protocol/receipt_repr.ml +++ b/src/proto_alpha/lib_protocol/receipt_repr.ml @@ -30,12 +30,12 @@ type balance = | Deposits of Signature.Public_key_hash.t | Unstaked_deposits of Signature.Public_key_hash.t * Cycle_repr.t | Nonce_revelation_rewards - | Endorsing_rewards + | Attesting_rewards | Baking_rewards | Baking_bonuses | Storage_fees | Double_signing_punishments - | Lost_endorsing_rewards of Signature.Public_key_hash.t * bool * bool + | Lost_attesting_rewards of Signature.Public_key_hash.t * bool * bool | Liquidity_baking_subsidies | Burned | Commitments of Blinded_public_key_hash.t @@ -112,8 +112,8 @@ let balance_encoding ~use_legacy_attestation_name = (constant (if use_legacy_attestation_name then "endorsing rewards" else "attesting rewards")))) - (function Endorsing_rewards -> Some ((), ()) | _ -> None) - (fun ((), ()) -> Endorsing_rewards); + (function Attesting_rewards -> Some ((), ()) | _ -> None) + (fun ((), ()) -> Attesting_rewards); case (Tag 8) ~title:"Baking_rewards" @@ -163,9 +163,9 @@ let balance_encoding ~use_legacy_attestation_name = (req "participation" Data_encoding.bool) (req "revelation" Data_encoding.bool)) (function - | Lost_endorsing_rewards (d, p, r) -> Some ((), (), d, p, r) + | Lost_attesting_rewards (d, p, r) -> Some ((), (), d, p, r) | _ -> None) - (fun ((), (), d, p, r) -> Lost_endorsing_rewards (d, p, r)); + (fun ((), (), d, p, r) -> Lost_attesting_rewards (d, p, r)); case (Tag 14) ~title:"Liquidity_baking_subsidies" @@ -278,7 +278,7 @@ let compare_balance ba bb = | Unstaked_deposits (pkha, ca), Unstaked_deposits (pkhb, cb) -> Compare.or_else (Signature.Public_key_hash.compare pkha pkhb) (fun () -> Cycle_repr.compare ca cb) - | Lost_endorsing_rewards (pkha, pa, ra), Lost_endorsing_rewards (pkhb, pb, rb) + | Lost_attesting_rewards (pkha, pa, ra), Lost_attesting_rewards (pkhb, pb, rb) -> let c = Signature.Public_key_hash.compare pkha pkhb in if is_not_zero c then c @@ -298,12 +298,12 @@ let compare_balance ba bb = | Deposits _ -> 2 | Unstaked_deposits _ -> 3 | Nonce_revelation_rewards -> 4 - | Endorsing_rewards -> 5 + | Attesting_rewards -> 5 | Baking_rewards -> 6 | Baking_bonuses -> 7 | Storage_fees -> 8 | Double_signing_punishments -> 9 - | Lost_endorsing_rewards _ -> 10 + | Lost_attesting_rewards _ -> 10 | Liquidity_baking_subsidies -> 11 | Burned -> 12 | Commitments _ -> 13 diff --git a/src/proto_alpha/lib_protocol/receipt_repr.mli b/src/proto_alpha/lib_protocol/receipt_repr.mli index 6a312891527fca73ff1a72676417cdc151c35be5..d6e6a710d83c79514bf3ab611afff471a4282e05 100644 --- a/src/proto_alpha/lib_protocol/receipt_repr.mli +++ b/src/proto_alpha/lib_protocol/receipt_repr.mli @@ -31,12 +31,12 @@ type balance = | Deposits of Signature.Public_key_hash.t | Unstaked_deposits of Signature.Public_key_hash.t * Cycle_repr.t | Nonce_revelation_rewards - | Endorsing_rewards + | Attesting_rewards | Baking_rewards | Baking_bonuses | Storage_fees | Double_signing_punishments - | Lost_endorsing_rewards of Signature.Public_key_hash.t * bool * bool + | Lost_attesting_rewards of Signature.Public_key_hash.t * bool * bool | Liquidity_baking_subsidies | Burned | Commitments of Blinded_public_key_hash.t diff --git a/src/proto_alpha/lib_protocol/test/helpers/context.ml b/src/proto_alpha/lib_protocol/test/helpers/context.ml index 84462f095c9e0a0707863ebdfc57cfbbe3e1ac0e..b71d99eee25b3e7a6e004bed3cb85ea33ad09c94 100644 --- a/src/proto_alpha/lib_protocol/test/helpers/context.ml +++ b/src/proto_alpha/lib_protocol/test/helpers/context.ml @@ -239,7 +239,7 @@ let get_endorsing_reward ctxt ~expected_endorsing_power = let endorsing_reward_per_slot = Delegate.Rewards.For_RPC.reward_from_constants csts - ~reward_kind:Endorsing_reward_per_slot + ~reward_kind:Attesting_reward_per_slot in Lwt.return (Environment.wrap_tzresult diff --git a/src/proto_alpha/lib_protocol/test/helpers/op.ml b/src/proto_alpha/lib_protocol/test/helpers/op.ml index f8154aa0f1f383c67dab0451515a4f936f1312dd..7f2c201b98b8c8f764f4717acf44d673db4a6b19 100644 --- a/src/proto_alpha/lib_protocol/test/helpers/op.ml +++ b/src/proto_alpha/lib_protocol/test/helpers/op.ml @@ -110,10 +110,10 @@ let raw_endorsement ?delegate ?slot ?level ?round ?block_payload_hash ?branch ?branch endorsed_block in - let op = Single (Endorsement consensus_content) in + let op = Single (Attestation consensus_content) in return (sign - ~watermark:Operation.(to_watermark (Endorsement Chain_id.zero)) + ~watermark:Operation.(to_watermark (Attestation Chain_id.zero)) signer branch op) 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 64775af05039914ca056e6eefc43947188dad7e1..026987c443e9bf4c8ce0fdf12ce3746f8e717517 100644 --- a/src/proto_alpha/lib_protocol/test/helpers/operation_generator.ml +++ b/src/proto_alpha/lib_protocol/test/helpers/operation_generator.ml @@ -385,7 +385,7 @@ let generate_preendorsement = let generate_endorsement = let open QCheck2.Gen in let+ cc = generate_consensus_content in - Endorsement cc + Attestation cc let generate_dal_attestation = let open QCheck2.Gen in diff --git a/src/proto_alpha/lib_protocol/test/integration/consensus/test_endorsement.ml b/src/proto_alpha/lib_protocol/test/integration/consensus/test_endorsement.ml index cf268f0dd53f0807d70db1a6a96e667d75512905..3fa78e34433196bcaa11e3e723e851058fe59024 100644 --- a/src/proto_alpha/lib_protocol/test/integration/consensus/test_endorsement.ml +++ b/src/proto_alpha/lib_protocol/test/integration/consensus/test_endorsement.ml @@ -579,7 +579,7 @@ let test_no_conflict_various_levels_and_rounds () = let (Operation_data protocol_data) = op.protocol_data in let content = match protocol_data.contents with - | Single (Endorsement content) -> content + | Single (Attestation content) -> content | _ -> assert false in Format.eprintf diff --git a/src/proto_alpha/lib_protocol/test/integration/consensus/test_participation.ml b/src/proto_alpha/lib_protocol/test/integration/consensus/test_participation.ml index d75790c3e3b12e1fa69c2ea28d22d054a3df6dd8..ccb4a7ef600f0a4b726fe6a10eccbf2965c35e5c 100644 --- a/src/proto_alpha/lib_protocol/test/integration/consensus/test_participation.ml +++ b/src/proto_alpha/lib_protocol/test/integration/consensus/test_participation.ml @@ -140,7 +140,7 @@ let test_participation_rpc () = let endorsing_reward_per_slot = Alpha_context.Delegate.Rewards.For_RPC.reward_from_constants csts.parametric - ~reward_kind:Endorsing_reward_per_slot + ~reward_kind:Attesting_reward_per_slot in let expected_endorsing_rewards = Tez.mul_exn endorsing_reward_per_slot expected_cycle_activity diff --git a/src/proto_alpha/lib_protocol/test/integration/test_constants.ml b/src/proto_alpha/lib_protocol/test/integration/test_constants.ml index b348d4c1ec9eeb6f0cc2b5c1e05df7e5f2267d61..169f63696d5ad12c38327282677dabf0b3597c44 100644 --- a/src/proto_alpha/lib_protocol/test/integration/test_constants.ml +++ b/src/proto_alpha/lib_protocol/test/integration/test_constants.ml @@ -193,7 +193,7 @@ let liquidity_baking_subsidy_param () = in baking_reward_fixed_portion +? baking_reward_bonus >>?= fun baking_rewards -> let endorsing_reward_per_slot = - get_reward ~reward_kind:Endorsing_reward_per_slot + get_reward ~reward_kind:Attesting_reward_per_slot in endorsing_reward_per_slot *? Int64.of_int constants.consensus_committee_size >>?= fun validators_rewards -> diff --git a/src/proto_alpha/lib_protocol/test/integration/test_token.ml b/src/proto_alpha/lib_protocol/test/integration/test_token.ml index 84e8b6650459269e96bf8bba77cd3ab55f9cdda4..af5904dba3ab5033b12e658e6c996049284b7db0 100644 --- a/src/proto_alpha/lib_protocol/test/integration/test_token.ml +++ b/src/proto_alpha/lib_protocol/test/integration/test_token.ml @@ -242,14 +242,14 @@ let test_transferring_to_burned ctxt = let pkh = Signature.Public_key_hash.zero in let p, r = (Random.bool (), Random.bool ()) in wrap - (Token.transfer ctxt `Minted (`Lost_endorsing_rewards (pkh, p, r)) amount) + (Token.transfer ctxt `Minted (`Lost_attesting_rewards (pkh, p, r)) amount) >>=? fun (_, bupds) -> Assert.equal_bool ~loc:__LOC__ (bupds = [ minted_bupd; - (Lost_endorsing_rewards (pkh, p, r), Credited amount, Block_application); + (Lost_attesting_rewards (pkh, p, r), Credited amount, Block_application); ]) true >>=? fun () -> @@ -427,8 +427,8 @@ let test_transferring_from_giver () = test_transferring_from_infinite_source ctxt `Revelation_rewards (fun am -> [(Nonce_revelation_rewards, Debited am, Block_application)]) >>=? fun () -> - test_transferring_from_infinite_source ctxt `Endorsing_rewards (fun am -> - [(Endorsing_rewards, Debited am, Block_application)]) + test_transferring_from_infinite_source ctxt `Attesting_rewards (fun am -> + [(Attesting_rewards, Debited am, Block_application)]) >>=? fun () -> test_transferring_from_infinite_source ctxt `Baking_rewards (fun am -> [(Baking_rewards, Debited am, Block_application)]) 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 d975ec37811ba2c82ce3aba855122e65f08af1eb..a9de7aa1c98c206831c7493b1e70994f8d008070 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 @@ -837,7 +837,7 @@ let op_kind_of_packed_operation op = let (Operation_data {contents; _}) = op.protocol_data in match contents with | Single (Preattestation _) -> KPreendorsement - | Single (Endorsement _) -> KEndorsement + | Single (Attestation _) -> KEndorsement | Single (Dal_attestation _) -> KDalattestation | Single (Seed_nonce_revelation _) -> KNonce | Single (Vdf_revelation _) -> KVdf 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 2df606a2bf1113a1b6c745c44c8bb182589c6baa..3418f015a441108eadba71af2e85f80260a4b52b 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 @@ -120,8 +120,8 @@ let covalidation_sanity () = match (contents, kind) with | Single (Preattestation _), KPreendorsement -> return_unit | Single (Preattestation _), _ -> assert false - | Single (Endorsement _), KEndorsement -> return_unit - | Single (Endorsement _), _ -> assert false + | Single (Attestation _), KEndorsement -> return_unit + | Single (Attestation _), _ -> assert false | Single (Dal_attestation _), KDalattestation -> return_unit | Single (Dal_attestation _), _ -> assert false | Single (Seed_nonce_revelation _), KNonce -> return_unit diff --git a/src/proto_alpha/lib_protocol/test/pbt/test_balance_updates_encoding.ml b/src/proto_alpha/lib_protocol/test/pbt/test_balance_updates_encoding.ml index 2b25380efe1401fdde76536884b3040c420530be..d9c5fa596232ec58dc0a69c915e4b49b1551a158 100644 --- a/src/proto_alpha/lib_protocol/test/pbt/test_balance_updates_encoding.ml +++ b/src/proto_alpha/lib_protocol/test/pbt/test_balance_updates_encoding.ml @@ -46,7 +46,7 @@ let deposits = let lost_endorsing_rewards = let pkh, _, _ = Signature.generate_key () in - Receipt_repr.Lost_endorsing_rewards (pkh, false, false) + Receipt_repr.Lost_attesting_rewards (pkh, false, false) let unstaked_deposits = let pkh, _, _ = Signature.generate_key () in @@ -73,7 +73,7 @@ let generate_balance = deposits; unstaked_deposits; Nonce_revelation_rewards; - Endorsing_rewards; + Attesting_rewards; Baking_rewards; Baking_bonuses; Storage_fees; diff --git a/src/proto_alpha/lib_protocol/test/unit/test_receipt.ml b/src/proto_alpha/lib_protocol/test/unit/test_receipt.ml index 42f1f9686ddd80a3a2b2f1572affd3b2fb8d3cf4..8eaa901875dacb449a32d7a2ea71519dcaaf00ec 100644 --- a/src/proto_alpha/lib_protocol/test/unit/test_receipt.ml +++ b/src/proto_alpha/lib_protocol/test/unit/test_receipt.ml @@ -77,12 +77,12 @@ let test_encodings () = test_encodings Block_fees >>=? fun () -> test_encodings (Deposits pkh) >>=? fun () -> test_encodings Nonce_revelation_rewards >>=? fun () -> - test_encodings Endorsing_rewards >>=? fun () -> + test_encodings Attesting_rewards >>=? fun () -> test_encodings Baking_rewards >>=? fun () -> test_encodings Baking_bonuses >>=? fun () -> test_encodings Storage_fees >>=? fun () -> test_encodings Double_signing_punishments >>=? fun () -> - test_encodings (Lost_endorsing_rewards (pkh, Random.bool (), Random.bool ())) + test_encodings (Lost_attesting_rewards (pkh, Random.bool (), Random.bool ())) >>=? fun () -> test_encodings Liquidity_baking_subsidies >>=? fun () -> test_encodings Burned >>=? fun () -> diff --git a/src/proto_alpha/lib_protocol/token.ml b/src/proto_alpha/lib_protocol/token.ml index 03c99d422f5a9e9ad09bac04b331dd166dfaf3fd..4315020f8e8738685af5aa442536b113102e8769 100644 --- a/src/proto_alpha/lib_protocol/token.ml +++ b/src/proto_alpha/lib_protocol/token.ml @@ -36,7 +36,7 @@ type infinite_source = | `Bootstrap | `Initial_commitments | `Revelation_rewards - | `Endorsing_rewards + | `Attesting_rewards | `Baking_rewards | `Baking_bonuses | `Minted @@ -48,7 +48,7 @@ type giver = [infinite_source | container] type infinite_sink = [ `Storage_fees | `Double_signing_punishments - | `Lost_endorsing_rewards of Signature.Public_key_hash.t * bool * bool + | `Lost_attesting_rewards of Signature.Public_key_hash.t * bool * bool | `Sc_rollup_refutation_punishments | `Burned ] @@ -96,7 +96,7 @@ let credit ctxt receiver amount origin = match infinite_sink with | `Storage_fees -> Storage_fees | `Double_signing_punishments -> Double_signing_punishments - | `Lost_endorsing_rewards (d, p, r) -> Lost_endorsing_rewards (d, p, r) + | `Lost_attesting_rewards (d, p, r) -> Lost_attesting_rewards (d, p, r) | `Sc_rollup_refutation_punishments -> Sc_rollup_refutation_punishments | `Burned -> Burned in @@ -152,7 +152,7 @@ let spend ctxt giver amount origin = | `Minted -> Minted | `Liquidity_baking_subsidies -> Liquidity_baking_subsidies | `Revelation_rewards -> Nonce_revelation_rewards - | `Endorsing_rewards -> Endorsing_rewards + | `Attesting_rewards -> Attesting_rewards | `Baking_rewards -> Baking_rewards | `Baking_bonuses -> Baking_bonuses | `Sc_rollup_refutation_rewards -> Sc_rollup_refutation_rewards diff --git a/src/proto_alpha/lib_protocol/token.mli b/src/proto_alpha/lib_protocol/token.mli index 06f6b880ea40edb88235323155b70e687d1b78d1..98ffccd945c49bf583ddf41d53828e3aaf55686b 100644 --- a/src/proto_alpha/lib_protocol/token.mli +++ b/src/proto_alpha/lib_protocol/token.mli @@ -79,7 +79,7 @@ type infinite_source = | `Initial_commitments (** Funding of Genesis' prefunded accounts requiring an activation *) | `Revelation_rewards (** Seed nonce revelation rewards *) - | `Endorsing_rewards (** Consensus endorsing rewards *) + | `Attesting_rewards (** Consensus attesting rewards *) | `Baking_rewards (** Consensus baking fixed rewards *) | `Baking_bonuses (** Consensus baking variable bonus *) | `Minted (** Generic source for test purpose *) @@ -94,7 +94,7 @@ type giver = [infinite_source | container] type infinite_sink = [ `Storage_fees (** Fees burnt to compensate storage usage *) | `Double_signing_punishments (** Consensus slashing *) - | `Lost_endorsing_rewards of Signature.Public_key_hash.t * bool * bool + | `Lost_attesting_rewards of Signature.Public_key_hash.t * bool * bool (** Consensus rewards not distributed because the participation of the delegate was too low. *) | `Sc_rollup_refutation_punishments (** Smart rollups refutation slashing *) | `Burned (** Generic sink mainly for test purpose *) ] diff --git a/src/proto_alpha/lib_protocol/validate.ml b/src/proto_alpha/lib_protocol/validate.ml index 5f9bbe58ca54a00c49c672defecce3b5cd5e2d12..20c3d321be251c3fae23e412e4f1aa07cb38dee1 100644 --- a/src/proto_alpha/lib_protocol/validate.ml +++ b/src/proto_alpha/lib_protocol/validate.ml @@ -723,7 +723,7 @@ module Consensus = struct ~error:(trace_of_error Consensus_operation_not_allowed) vi.consensus_info in - let (Single (Endorsement consensus_content)) = + let (Single (Attestation consensus_content)) = operation.protocol_data.contents in let* consensus_key, voting_power = @@ -749,7 +749,7 @@ module Consensus = struct let check_endorsement_conflict vs oph (operation : Kind.attestation operation) = - let (Single (Endorsement {slot; level; round; _})) = + let (Single (Attestation {slot; level; round; _})) = operation.protocol_data.contents in match @@ -769,7 +769,7 @@ module Consensus = struct Conflicting_consensus_operation {kind = Attestation; conflict}) let add_endorsement vs oph (op : Kind.attestation operation) = - let (Single (Endorsement {slot; level; round; _})) = + let (Single (Attestation {slot; level; round; _})) = op.protocol_data.contents in let endorsements_seen = @@ -793,7 +793,7 @@ module Consensus = struct let remove_endorsement vs (operation : Kind.attestation operation) = (* We do not remove the endorsement power because it is not relevant for the mempool mode. *) - let (Single (Endorsement {slot; level; round; _})) = + let (Single (Attestation {slot; level; round; _})) = operation.protocol_data.contents in let endorsements_seen = @@ -1337,7 +1337,7 @@ module Anonymous = struct let open Lwt_result_syntax in match (op1.protocol_data.contents, op2.protocol_data.contents) with | Single (Preattestation e1), Single (Preattestation e2) - | Single (Endorsement e1), Single (Endorsement e2) -> + | Single (Attestation e1), Single (Attestation e2) -> let op1_hash = Operation.hash op1 in let op2_hash = Operation.hash op2 in let same_levels = Raw_level.(e1.level = e2.level) in @@ -1425,7 +1425,7 @@ module Anonymous = struct let check_double_attesting_evidence_conflict (type kind) vs oph (op1 : kind Kind.consensus Operation.t) = match op1.protocol_data.contents with - | Single (Preattestation e1) | Single (Endorsement e1) -> ( + | Single (Preattestation e1) | Single (Attestation e1) -> ( match Double_attesting_evidence_map.find (e1.level, e1.round, e1.slot) @@ -1456,7 +1456,7 @@ module Anonymous = struct let add_double_attesting_evidence (type kind) vs oph (op1 : kind Kind.consensus Operation.t) = match op1.protocol_data.contents with - | Single (Preattestation e1) | Single (Endorsement e1) -> + | Single (Preattestation e1) | Single (Attestation e1) -> let double_attesting_evidences_seen = Double_attesting_evidence_map.add (e1.level, e1.round, e1.slot) @@ -1486,7 +1486,7 @@ module Anonymous = struct let remove_double_attesting_evidence (type kind) vs (op : kind Kind.consensus Operation.t) = match op.protocol_data.contents with - | Single (Endorsement e) | Single (Preattestation e) -> + | Single (Attestation e) | Single (Preattestation e) -> let double_attesting_evidences_seen = Double_attesting_evidence_map.remove (e.level, e.round, e.slot) @@ -2452,7 +2452,7 @@ let check_operation ?(check_signature = true) info (type kind) Consensus.check_preattestation info ~check_signature operation in return_unit - | Single (Endorsement _) -> + | Single (Attestation _) -> let* (_voting_power : int) = Consensus.check_endorsement info ~check_signature operation in @@ -2508,7 +2508,7 @@ let check_operation_conflict (type kind) operation_conflict_state oph operation_conflict_state oph operation - | Single (Endorsement _) -> + | Single (Attestation _) -> Consensus.check_endorsement_conflict operation_conflict_state oph @@ -2571,7 +2571,7 @@ let add_valid_operation operation_conflict_state oph (type kind) match operation.protocol_data.contents with | Single (Preattestation _) -> Consensus.add_preattestation operation_conflict_state oph operation - | Single (Endorsement _) -> + | Single (Attestation _) -> Consensus.add_endorsement operation_conflict_state oph operation | Single (Dal_attestation _) -> Consensus.add_dal_attestation operation_conflict_state oph operation @@ -2616,7 +2616,7 @@ let remove_operation operation_conflict_state (type kind) match operation.protocol_data.contents with | Single (Preattestation _) -> Consensus.remove_preattestation operation_conflict_state operation - | Single (Endorsement _) -> + | Single (Attestation _) -> Consensus.remove_endorsement operation_conflict_state operation | Single (Dal_attestation _) -> Consensus.remove_dal_attestation operation_conflict_state operation @@ -2708,7 +2708,7 @@ let validate_operation ?(check_signature = true) block_state oph operation - | Single (Endorsement _) -> + | Single (Attestation _) -> Consensus.validate_endorsement ~check_signature info 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 9f90481cc5d0121cdd1778b1c169b176b675d816..ee7c6055287a9672069e583441dd47d1af7d95e8 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 @@ -158,7 +158,7 @@ module Proto_client = struct (op_result : kind Apply_results.contents_result) : operation_status = match op_result with | Preattestation_result _ -> Successful - | Endorsement_result _ -> Successful + | Attestation_result _ -> Successful | Dal_attestation_result _ -> Successful | Seed_nonce_revelation_result _ -> Successful | Vdf_revelation_result _ -> Successful diff --git a/tezt/tests/prevalidator.ml b/tezt/tests/prevalidator.ml index 3a630c1590fda3d0d21cd5ce700d2cfbe8cfa11b..87e25cb44e528a6286064be531a58b878535e78e 100644 --- a/tezt/tests/prevalidator.ml +++ b/tezt/tests/prevalidator.ml @@ -2318,7 +2318,7 @@ let get_endorsement_as_bytes client = Operation_data { contents = - Single (Endorsement {slot; round; level; block_payload_hash}); + Single (Attestation {slot; round; level; block_payload_hash}); signature = Some signature; }; }