diff --git a/src/proto_alpha/lib_delegate/client_baking_denunciation.ml b/src/proto_alpha/lib_delegate/client_baking_denunciation.ml index 89725aad18926620bfeca45c094ad074c0e35278..c6737f064a5e7e6a618a956aebedebaea22c0142 100644 --- a/src/proto_alpha/lib_delegate/client_baking_denunciation.ml +++ b/src/proto_alpha/lib_delegate/client_baking_denunciation.ml @@ -158,8 +158,8 @@ let double_consensus_op_evidence (type kind) : op2:kind Alpha_context.operation -> unit -> bytes Environment.Error_monad.shell_tzresult Lwt.t = function - | Attestation -> Plugin.RPC.Forge.double_endorsement_evidence - | Preattestation -> Plugin.RPC.Forge.double_preendorsement_evidence + | Attestation -> Plugin.RPC.Forge.double_attestation_evidence + | Preattestation -> Plugin.RPC.Forge.double_preattestation_evidence let lookup_recorded_consensus (type kind) consensus_key (op_kind : kind consensus_operation_type) map : kind recorded_consensus = diff --git a/src/proto_alpha/lib_plugin/RPC.ml b/src/proto_alpha/lib_plugin/RPC.ml index be3f9990380ccc6f1564116d51321b14e5873aac..433eb5abd596fc037a1d912a321ca8a9ffb98091 100644 --- a/src/proto_alpha/lib_plugin/RPC.ml +++ b/src/proto_alpha/lib_plugin/RPC.ml @@ -2929,7 +2929,7 @@ module Forge = struct () ({branch}, Contents_list (Single operation)) - let endorsement ctxt b ~branch ~consensus_content () = + let attestation ctxt b ~branch ~consensus_content () = operation ctxt b ~branch (Attestation consensus_content) let proposals ctxt b ~branch ~source ~period ~proposals () = @@ -2950,10 +2950,10 @@ module Forge = struct let double_baking_evidence ctxt block ~branch ~bh1 ~bh2 () = operation ctxt block ~branch (Double_baking_evidence {bh1; bh2}) - let double_endorsement_evidence ctxt block ~branch ~op1 ~op2 () = + let double_attestation_evidence ctxt block ~branch ~op1 ~op2 () = operation ctxt block ~branch (Double_attestation_evidence {op1; op2}) - let double_preendorsement_evidence ctxt block ~branch ~op1 ~op2 () = + let double_preattestation_evidence ctxt block ~branch ~op1 ~op2 () = operation ctxt block ~branch (Double_preattestation_evidence {op1; op2}) let empty_proof_of_work_nonce = @@ -3341,7 +3341,7 @@ module Attestation_rights = struct estimated_time : Time.t option; } - let delegate_rights_encoding use_endorsement = + let delegate_rights_encoding use_legacy_attestation_name = let open Data_encoding in conv (fun {delegate; consensus_key; first_slot; attestation_power} -> @@ -3352,11 +3352,12 @@ module Attestation_rights = struct (req "delegate" Signature.Public_key_hash.encoding) (req "first_slot" Slot.encoding) (req - (if use_endorsement then "endorsing_power" else "attestation_power") + (if use_legacy_attestation_name then "endorsing_power" + else "attestation_power") uint16) (req "consensus_key" Signature.Public_key_hash.encoding)) - let encoding ~use_endorsement = + let encoding ~use_legacy_attestation_name = let open Data_encoding in conv (fun {level; delegates_rights; estimated_time} -> @@ -3365,7 +3366,9 @@ module Attestation_rights = struct {level; delegates_rights; estimated_time}) (obj3 (req "level" Raw_level.encoding) - (req "delegates" (list (delegate_rights_encoding use_endorsement))) + (req + "delegates" + (list (delegate_rights_encoding use_legacy_attestation_name))) (opt "estimated_time" Timestamp.encoding)) module S = struct @@ -3413,7 +3416,7 @@ module Attestation_rights = struct block's, based on the hypothesis that all predecessor blocks were \ baked at the first round." ~query:attestation_rights_query - ~output:(list (encoding ~use_endorsement:false)) + ~output:(list (encoding ~use_legacy_attestation_name:false)) attestation_path (* TODO: https://gitlab.com/tezos/tezos/-/issues/5156 @@ -3439,7 +3442,7 @@ module Attestation_rights = struct on the hypothesis that all predecessor blocks were baked at the \ first round." ~query:attestation_rights_query - ~output:(list (encoding ~use_endorsement:true)) + ~output:(list (encoding ~use_legacy_attestation_name:true)) endorsing_path end @@ -3567,11 +3570,11 @@ module Validators = struct let validators = RPC_service.get_service ~description: - "Retrieves the level, the endorsement slots and the public key hash \ - of each delegate allowed to endorse a block.\n\ + "Retrieves the level, the attestation slots and the public key hash \ + of each delegate allowed to attest a block.\n\ By default, it provides this information for the next level.\n\ Parameter `level` can be used to specify the (valid) level(s) in \ - the past or future at which the endorsement rights have to be \ + the past or future at which the attestation rights have to be \ returned. Parameter `delegate` can be used to restrict the results \ results to the given delegates. Parameter `consensus_key` can be \ used to restrict the results to the given consensus_keys.\n" @@ -3580,7 +3583,7 @@ module Validators = struct path end - let add_endorsing_slots_at_level (ctxt, acc) level = + let add_attestation_slots_at_level (ctxt, acc) level = Baking.attesting_rights ctxt level >|=? fun (ctxt, rights) -> ( ctxt, Signature.Public_key_hash.Map.fold @@ -3595,7 +3598,7 @@ module Validators = struct requested_levels ~default_level:(Level.current ctxt) ctxt [] q.levels in List.fold_left_es - add_endorsing_slots_at_level + add_attestation_slots_at_level (ctxt, []) (List.rev levels) >|=? fun (_ctxt, rights) -> diff --git a/src/proto_alpha/lib_plugin/mempool.ml b/src/proto_alpha/lib_plugin/mempool.ml index c9386fbaba26a05c089bbf99c10968d15da95d59..4300166599be98a3f2cddfd167e087ed712ce9d8 100644 --- a/src/proto_alpha/lib_plugin/mempool.ml +++ b/src/proto_alpha/lib_plugin/mempool.ml @@ -438,7 +438,7 @@ let acceptable ~drift ~op_earliest_ts ~now_timestamp = to the clock. This is a stricter than necessary filter as it will reject operations that - could be valid in the current timeframe if the proposal they endorse is + could be valid in the current timeframe if the proposal they attest is built over a predecessor of the current proposal that would be of lower round than the current one. @@ -510,10 +510,10 @@ let pre_filter_far_future_consensus_ops filter_info config in match res with Ok b -> Lwt.return b | Error _ -> Lwt.return_false -(** A quasi infinite amount of "valid" (pre)endorsements could be +(** A quasi infinite amount of "valid" (pre)attestations could be sent by a committee member, one for each possible round number. - This filter rejects (pre)endorsements that refer to a round + This filter rejects (pre)attestations that refer to a round that could not have been reached within the time span between the last head's timestamp and the current local clock.