diff --git a/src/proto_alpha/lib_client/operation_result.ml b/src/proto_alpha/lib_client/operation_result.ml index 169968b89c2442442cd54db218c85afd43d197be..32e0fb40c1f44729265752af6e8d287323897b23 100644 --- a/src/proto_alpha/lib_client/operation_result.ml +++ b/src/proto_alpha/lib_client/operation_result.ml @@ -926,8 +926,8 @@ let pp_contents_and_result : (Operation.hash op2) pp_balance_updates bus - | ( Double_preendorsement_evidence {op1; op2}, - Double_preendorsement_evidence_result bus ) -> + | ( Double_preattestation_evidence {op1; op2}, + Double_preattestation_evidence_result bus ) -> Format.fprintf ppf "@[Double preattestation evidence:@,\ diff --git a/src/proto_alpha/lib_plugin/RPC.ml b/src/proto_alpha/lib_plugin/RPC.ml index 9dff9734bbbbc61d0f4874d59b4d50e492710481..d642826cc496c260d4967f27e4e7dfbc68e25174 100644 --- a/src/proto_alpha/lib_plugin/RPC.ml +++ b/src/proto_alpha/lib_plugin/RPC.ml @@ -2954,7 +2954,7 @@ module Forge = struct operation ctxt block ~branch (Double_endorsement_evidence {op1; op2}) let double_preendorsement_evidence ctxt block ~branch ~op1 ~op2 () = - operation ctxt block ~branch (Double_preendorsement_evidence {op1; op2}) + operation ctxt block ~branch (Double_preattestation_evidence {op1; op2}) let empty_proof_of_work_nonce = Bytes.make Constants_repr.proof_of_work_nonce_size '\000' diff --git a/src/proto_alpha/lib_plugin/mempool.ml b/src/proto_alpha/lib_plugin/mempool.ml index bd939bf6d5dd2e8ea369c85da36a589b43022f5f..2b4892c655a108fa8ca837bfd15c4b9c5f2a033f 100644 --- a/src/proto_alpha/lib_plugin/mempool.ml +++ b/src/proto_alpha/lib_plugin/mempool.ml @@ -545,7 +545,7 @@ let pre_filter filter_info config [Environment.wrap_tzerror Consensus_operation_in_far_future]) | Single (Dal_attestation _) | Single (Seed_nonce_revelation _) - | Single (Double_preendorsement_evidence _) + | Single (Double_preattestation_evidence _) | Single (Double_endorsement_evidence _) | Single (Double_baking_evidence _) | Single (Activate_account _) @@ -681,7 +681,7 @@ let find_manager {shell = _; protocol_data = Operation_data {contents; _}} = | Single ( Preattestation _ | Endorsement _ | Dal_attestation _ | Proposals _ | Ballot _ | Seed_nonce_revelation _ | Vdf_revelation _ - | Double_baking_evidence _ | Double_preendorsement_evidence _ + | Double_baking_evidence _ | Double_preattestation_evidence _ | Double_endorsement_evidence _ | Activate_account _ | Drain_delegate _ | Failing_noop _ ) -> None diff --git a/src/proto_alpha/lib_protocol/alpha_context.mli b/src/proto_alpha/lib_protocol/alpha_context.mli index 22148dd2c9a89c3e93bf26d69d2e9ac0c2ddb264..1a234925c0cc640bced8c507c93962a40f405985 100644 --- a/src/proto_alpha/lib_protocol/alpha_context.mli +++ b/src/proto_alpha/lib_protocol/alpha_context.mli @@ -4170,7 +4170,7 @@ and _ contents = solution : Seed.vdf_solution; } -> Kind.vdf_revelation contents - | Double_preendorsement_evidence : { + | Double_preattestation_evidence : { op1 : Kind.preattestation operation; op2 : Kind.preattestation operation; } diff --git a/src/proto_alpha/lib_protocol/apply.ml b/src/proto_alpha/lib_protocol/apply.ml index b611fbb92d4d5cdd660e1bfef11436983df8acc2..0037b73e1236679d55386991d9433b453132ef21 100644 --- a/src/proto_alpha/lib_protocol/apply.ml +++ b/src/proto_alpha/lib_protocol/apply.ml @@ -1983,7 +1983,7 @@ let record_operation (type kind) ctxt hash (operation : kind operation) : | Single ( Failing_noop _ | Proposals _ | Ballot _ | Seed_nonce_revelation _ | Vdf_revelation _ | Double_endorsement_evidence _ - | Double_preendorsement_evidence _ | Double_baking_evidence _ + | Double_preattestation_evidence _ | Double_baking_evidence _ | Activate_account _ | Drain_delegate _ | Manager_operation _ ) | Cons (Manager_operation _, _) -> record_non_consensus_operation_hash ctxt hash @@ -2135,7 +2135,7 @@ let punish_double_endorsement_or_preattestation (type kind) ctxt kind Kind.double_consensus_operation_evidence contents_result = match op1.protocol_data.contents with | Single (Preattestation _) -> - Double_preendorsement_evidence_result balance_updates + Double_preattestation_evidence_result balance_updates | Single (Endorsement _) -> Double_endorsement_evidence_result balance_updates in @@ -2219,7 +2219,7 @@ let apply_contents_list (type kind) ctxt chain_id (mode : mode) tip >|=? fun (ctxt, balance_updates) -> (ctxt, Single_result (Vdf_revelation_result balance_updates)) - | Single (Double_preendorsement_evidence {op1; op2 = _}) -> + | Single (Double_preattestation_evidence {op1; op2 = _}) -> punish_double_endorsement_or_preattestation ctxt ~op1 ~payload_producer | Single (Double_endorsement_evidence {op1; op2 = _}) -> punish_double_endorsement_or_preattestation ctxt ~op1 ~payload_producer diff --git a/src/proto_alpha/lib_protocol/apply_results.ml b/src/proto_alpha/lib_protocol/apply_results.ml index b7b34a4ac44c5aeb971f01b2bead028204b6678f..50992174b725e8dbaa4c9f2ebcbb3813b753bbb1 100644 --- a/src/proto_alpha/lib_protocol/apply_results.ml +++ b/src/proto_alpha/lib_protocol/apply_results.ml @@ -877,7 +877,7 @@ type 'kind contents_result = | Double_endorsement_evidence_result : Receipt.balance_updates -> Kind.double_attestation_evidence contents_result - | Double_preendorsement_evidence_result : + | Double_preattestation_evidence_result : Receipt.balance_updates -> Kind.double_preattestation_evidence contents_result | Double_baking_evidence_result : @@ -1215,17 +1215,17 @@ module Encoding = struct obj1 (dft "balance_updates" Receipt.balance_updates_encoding []); select = (function - | Contents_result (Double_preendorsement_evidence_result _ as op) -> + | Contents_result (Double_preattestation_evidence_result _ as op) -> Some op | _ -> None); mselect = (function - | Contents_and_result ((Double_preendorsement_evidence _ as op), res) + | Contents_and_result ((Double_preattestation_evidence _ as op), res) -> Some (op, res) | _ -> None); - proj = (fun (Double_preendorsement_evidence_result bus) -> bus); - inj = (fun bus -> Double_preendorsement_evidence_result bus); + proj = (fun (Double_preattestation_evidence_result bus) -> bus); + inj = (fun bus -> Double_preattestation_evidence_result bus); } let double_preattestation_evidence_case = @@ -1236,17 +1236,17 @@ module Encoding = struct obj1 (dft "balance_updates" Receipt.balance_updates_encoding []); select = (function - | Contents_result (Double_preendorsement_evidence_result _ as op) -> + | Contents_result (Double_preattestation_evidence_result _ as op) -> Some op | _ -> None); mselect = (function - | Contents_and_result ((Double_preendorsement_evidence _ as op), res) + | Contents_and_result ((Double_preattestation_evidence _ as op), res) -> Some (op, res) | _ -> None); - proj = (fun (Double_preendorsement_evidence_result bus) -> bus); - inj = (fun bus -> Double_preendorsement_evidence_result bus); + proj = (fun (Double_preattestation_evidence_result bus) -> bus); + inj = (fun bus -> Double_preattestation_evidence_result bus); } let double_baking_evidence_case = @@ -1407,7 +1407,7 @@ module Encoding = struct | Contents_result (Seed_nonce_revelation_result _) -> None | Contents_result (Vdf_revelation_result _) -> None | Contents_result (Double_endorsement_evidence_result _) -> None - | Contents_result (Double_preendorsement_evidence_result _) -> None + | Contents_result (Double_preattestation_evidence_result _) -> None | Contents_result (Double_baking_evidence_result _) -> None | Contents_result (Activate_account_result _) -> None | Contents_result (Drain_delegate_result _) -> None @@ -1904,9 +1904,9 @@ let kind_equal : | Seed_nonce_revelation _, _ -> None | Vdf_revelation _, Vdf_revelation_result _ -> Some Eq | Vdf_revelation _, _ -> None - | Double_preendorsement_evidence _, Double_preendorsement_evidence_result _ -> + | Double_preattestation_evidence _, Double_preattestation_evidence_result _ -> Some Eq - | Double_preendorsement_evidence _, _ -> None + | Double_preattestation_evidence _, _ -> None | Double_endorsement_evidence _, Double_endorsement_evidence_result _ -> Some Eq | Double_endorsement_evidence _, _ -> None diff --git a/src/proto_alpha/lib_protocol/apply_results.mli b/src/proto_alpha/lib_protocol/apply_results.mli index b5365624ab9ec8147619adc5b3ecd1a84bcac289..bf9ee06d8b22f807c70c1ef447a8d781bfcf5cda 100644 --- a/src/proto_alpha/lib_protocol/apply_results.mli +++ b/src/proto_alpha/lib_protocol/apply_results.mli @@ -85,7 +85,7 @@ and 'kind contents_result = | Double_endorsement_evidence_result : Receipt.balance_updates -> Kind.double_attestation_evidence contents_result - | Double_preendorsement_evidence_result : + | Double_preattestation_evidence_result : Receipt.balance_updates -> Kind.double_preattestation_evidence contents_result | Double_baking_evidence_result : diff --git a/src/proto_alpha/lib_protocol/operation_repr.ml b/src/proto_alpha/lib_protocol/operation_repr.ml index 66cf94c268318925aca57377c842b9ea7c6fb974..72732a088314a6a3463862dd3a09d4559f22b976 100644 --- a/src/proto_alpha/lib_protocol/operation_repr.ml +++ b/src/proto_alpha/lib_protocol/operation_repr.ml @@ -248,7 +248,7 @@ and _ contents = solution : Seed_repr.vdf_solution; } -> Kind.vdf_revelation contents - | Double_preendorsement_evidence : { + | Double_preattestation_evidence : { op1 : Kind.preattestation operation; op2 : Kind.preattestation operation; } @@ -1219,10 +1219,10 @@ module Encoding = struct (req "op2" (dynamic_size preendorsement_encoding)); select = (function - | Contents (Double_preendorsement_evidence _ as op) -> Some op + | Contents (Double_preattestation_evidence _ as op) -> Some op | _ -> None); - proj = (fun (Double_preendorsement_evidence {op1; op2}) -> (op1, op2)); - inj = (fun (op1, op2) -> Double_preendorsement_evidence {op1; op2}); + proj = (fun (Double_preattestation_evidence {op1; op2}) -> (op1, op2)); + inj = (fun (op1, op2) -> Double_preattestation_evidence {op1; op2}); } let double_preattestation_evidence_case : @@ -1237,10 +1237,10 @@ module Encoding = struct (req "op2" (dynamic_size preattestation_encoding)); select = (function - | Contents (Double_preendorsement_evidence _ as op) -> Some op + | Contents (Double_preattestation_evidence _ as op) -> Some op | _ -> None); - proj = (fun (Double_preendorsement_evidence {op1; op2}) -> (op1, op2)); - inj = (fun (op1, op2) -> Double_preendorsement_evidence {op1; op2}); + proj = (fun (Double_preattestation_evidence {op1; op2}) -> (op1, op2)); + inj = (fun (op1, op2) -> Double_preattestation_evidence {op1; op2}); } let double_endorsement_evidence_case : Kind.double_attestation_evidence case = @@ -1854,7 +1854,7 @@ let acceptable_pass (op : packed_operation) = | Single (Seed_nonce_revelation _) -> Some anonymous_pass | Single (Vdf_revelation _) -> Some anonymous_pass | Single (Double_endorsement_evidence _) -> Some anonymous_pass - | Single (Double_preendorsement_evidence _) -> Some anonymous_pass + | Single (Double_preattestation_evidence _) -> Some anonymous_pass | Single (Double_baking_evidence _) -> Some anonymous_pass | Single (Activate_account _) -> Some anonymous_pass | Single (Drain_delegate _) -> Some anonymous_pass @@ -1942,7 +1942,7 @@ let check_signature (type kind) key chain_id (op : kind operation) = | Single ( Failing_noop _ | Proposals _ | Ballot _ | Seed_nonce_revelation _ | Vdf_revelation _ | Double_endorsement_evidence _ - | Double_preendorsement_evidence _ | Double_baking_evidence _ + | Double_preattestation_evidence _ | Double_baking_evidence _ | Activate_account _ | Drain_delegate _ | Manager_operation _ ) -> Generic_operation | Cons (Manager_operation _, _ops) -> Generic_operation @@ -2029,9 +2029,9 @@ let equal_contents_kind : type a b. a contents -> b contents -> (a, b) eq option | Vdf_revelation _, _ -> None | Double_endorsement_evidence _, Double_endorsement_evidence _ -> Some Eq | Double_endorsement_evidence _, _ -> None - | Double_preendorsement_evidence _, Double_preendorsement_evidence _ -> + | Double_preattestation_evidence _, Double_preattestation_evidence _ -> Some Eq - | Double_preendorsement_evidence _, _ -> None + | Double_preattestation_evidence _, _ -> None | Double_baking_evidence _, Double_baking_evidence _ -> Some Eq | Double_baking_evidence _, _ -> None | Activate_account _, Activate_account _ -> Some Eq @@ -2203,7 +2203,7 @@ let consensus_infos_and_hash_from_block_header (bh : Block_header_repr.t) = The [weight] of a {!Seed_nonce_revelation} depends on its [level] converted in {!int32}. - The [weight] of a {!Double_preendorsement} or + The [weight] of a {!Double_preattestation} or {!Double_endorsement} depends on the [level] and [round] of their first denounciated operations. The [level] and [round] are wrapped in a {!round_infos}. @@ -2235,7 +2235,7 @@ type _ weight = -> voting_pass_type weight | Weight_seed_nonce_revelation : int32 -> anonymous_pass_type weight | Weight_vdf_revelation : Seed_repr.vdf_solution -> anonymous_pass_type weight - | Weight_double_preendorsement : round_infos -> anonymous_pass_type weight + | Weight_double_preattestation : round_infos -> anonymous_pass_type weight | Weight_double_endorsement : round_infos -> anonymous_pass_type weight | Weight_double_baking : double_baking_infos -> anonymous_pass_type weight | Weight_activate_account : @@ -2348,12 +2348,12 @@ let weight_of : packed_operation -> operation_weight = ( Anonymous, Weight_double_endorsement (round_infos_from_consensus_content consensus_content) )) - | Single (Double_preendorsement_evidence {op1; _}) -> ( + | Single (Double_preattestation_evidence {op1; _}) -> ( match op1.protocol_data.contents with | Single (Preattestation consensus_content) -> W ( Anonymous, - Weight_double_preendorsement + Weight_double_preattestation (round_infos_from_consensus_content consensus_content) )) | Single (Double_baking_evidence {bh1; _}) -> let double_baking_infos = @@ -2413,7 +2413,7 @@ let compare_round_infos infos1 infos2 = (infos2.level, infos2.round) (** When comparing {!Endorsement} to {!Preattestation} or - {!Double_endorsement_evidence} to {!Double_preendorsement}, in case + {!Double_endorsement_evidence} to {!Double_preattestation}, in case of {!round_infos} equality, the position is relevant to compute the order. *) type prioritized_position = Nopos | Fstpos | Sndpos @@ -2528,7 +2528,7 @@ let compare_vote_weight w1 w2 = (** {5 Comparison of valid anonymous operations} *) (** Comparing two {!Double_endorsement_evidence}, or two - {!Double_preendorsement_evidence}, or comparing them to each other + {!Double_preattestation_evidence}, or comparing them to each other is comparing their {!round_infos}, see {!compare_round_infos} for more details. @@ -2543,20 +2543,20 @@ let compare_vote_weight w1 w2 = Two {!Activate_account} are compared as their [id]. When comparing different kind of anonymous operations, the order is - as follows: {!Double_preendorsement_evidence} > + as follows: {!Double_preattestation_evidence} > {!Double_endorsement_evidence} > {!Double_baking_evidence} > {!Vdf_revelation} > {!Seed_nonce_revelation} > {!Activate_account}. *) let compare_anonymous_weight w1 w2 = match (w1, w2) with - | Weight_double_preendorsement infos1, Weight_double_preendorsement infos2 -> + | Weight_double_preattestation infos1, Weight_double_preattestation infos2 -> compare_round_infos infos1 infos2 - | Weight_double_preendorsement infos1, Weight_double_endorsement infos2 -> + | Weight_double_preattestation infos1, Weight_double_endorsement infos2 -> compare_round_infos_with_prioritized_position ~prioritized_position:Fstpos infos1 infos2 - | Weight_double_endorsement infos1, Weight_double_preendorsement infos2 -> + | Weight_double_endorsement infos1, Weight_double_preattestation infos2 -> compare_round_infos_with_prioritized_position ~prioritized_position:Sndpos infos1 @@ -2566,9 +2566,9 @@ let compare_anonymous_weight w1 w2 = | ( ( Weight_double_baking _ | Weight_seed_nonce_revelation _ | Weight_vdf_revelation _ | Weight_activate_account _ | Weight_drain_delegate _ ), - (Weight_double_preendorsement _ | Weight_double_endorsement _) ) -> + (Weight_double_preattestation _ | Weight_double_endorsement _) ) -> -1 - | ( (Weight_double_preendorsement _ | Weight_double_endorsement _), + | ( (Weight_double_preattestation _ | Weight_double_endorsement _), ( Weight_double_baking _ | Weight_seed_nonce_revelation _ | Weight_vdf_revelation _ | Weight_activate_account _ | Weight_drain_delegate _ ) ) -> diff --git a/src/proto_alpha/lib_protocol/operation_repr.mli b/src/proto_alpha/lib_protocol/operation_repr.mli index ed9075b52ec6e6111c5a380b15887348b5bdfa43..3667efd5473e1497fbb48afe85e23711bc3a7112 100644 --- a/src/proto_alpha/lib_protocol/operation_repr.mli +++ b/src/proto_alpha/lib_protocol/operation_repr.mli @@ -255,18 +255,18 @@ and _ contents = solution : Seed_repr.vdf_solution; } -> Kind.vdf_revelation contents - (* Double_preendorsement_evidence: Double-preendorsement is a + (* Double_preattestation_evidence: Double-preattestation is a kind of malicious attack where a byzantine attempts to fork the chain by preendorsing 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. *) - | Double_preendorsement_evidence : { + | Double_preattestation_evidence : { op1 : Kind.preattestation operation; op2 : Kind.preattestation operation; } -> Kind.double_preattestation_evidence contents - (* Double_endorsement_evidence: Similar to double-preendorsement but + (* Double_endorsement_evidence: Similar to double-preattestation but for endorsements. *) | Double_endorsement_evidence : { op1 : Kind.attestation operation; @@ -595,7 +595,7 @@ val compare_by_passes : packed_operation -> packed_operation -> int The global order is as follows: {!Endorsement} and {!Preattestation} > {!Dal_attestation} > - {!Proposals} > {!Ballot} > {!Double_preendorsement_evidence} > + {!Proposals} > {!Ballot} > {!Double_preattestation_evidence} > {!Double_endorsement_evidence} > {!Double_baking_evidence} > {!Vdf_revelation} > {!Seed_nonce_revelation} > {!Activate_account} > {!Drain_delegate} > {!Manager_operation}. diff --git a/src/proto_alpha/lib_protocol/test/helpers/op.ml b/src/proto_alpha/lib_protocol/test/helpers/op.ml index e729ab74f6bd245f3e593b5c042081798d8e6120..866693595cac5db02249fd7647e12bf9017ca52d 100644 --- a/src/proto_alpha/lib_protocol/test/helpers/op.ml +++ b/src/proto_alpha/lib_protocol/test/helpers/op.ml @@ -647,7 +647,7 @@ let double_endorsement ctxt op1 op2 = } let double_preendorsement ctxt op1 op2 = - let contents = Single (Double_preendorsement_evidence {op1; op2}) in + let contents = Single (Double_preattestation_evidence {op1; op2}) in let branch = Context.branch ctxt in { shell = {branch}; 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 d049ee52e515e4b3a12b09b4268e13021133bc96..09adbbaa5655c869f4b967fb723d75f996333bee 100644 --- a/src/proto_alpha/lib_protocol/test/helpers/operation_generator.ml +++ b/src/proto_alpha/lib_protocol/test/helpers/operation_generator.ml @@ -409,7 +409,7 @@ let generate_double_preendorsement = let open QCheck2.Gen in let* op1 = generate_op generate_preendorsement in let+ op2 = generate_op generate_preendorsement in - Double_preendorsement_evidence {op1; op2} + Double_preattestation_evidence {op1; op2} let generate_double_endorsement = let open QCheck2.Gen in 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 682a7a769eb0560bce775128c510dc1b23ae2d0a..dc2434190c593f6eb99defcf4ddb4d5960ccdd89 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 @@ -842,7 +842,7 @@ let op_kind_of_packed_operation op = | Single (Seed_nonce_revelation _) -> KNonce | Single (Vdf_revelation _) -> KVdf | Single (Double_endorsement_evidence _) -> KDbl_consensus - | Single (Double_preendorsement_evidence _) -> KDbl_consensus + | Single (Double_preattestation_evidence _) -> KDbl_consensus | Single (Double_baking_evidence _) -> KDbl_baking | Single (Activate_account _) -> KActivate | Single (Proposals _) -> 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 eee04bcceff3ef460bd48bb1e4acd775c70608d2..d20629c374925ed7913d71ff64317562ed7c6585 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 @@ -131,9 +131,9 @@ let covalidation_sanity () = | Single (Double_endorsement_evidence _), KDbl_consensus -> return_unit | Single (Double_endorsement_evidence _), _ -> assert false - | Single (Double_preendorsement_evidence _), KDbl_consensus -> + | Single (Double_preattestation_evidence _), KDbl_consensus -> return_unit - | Single (Double_preendorsement_evidence _), _ -> assert false + | Single (Double_preattestation_evidence _), _ -> assert false | Single (Double_baking_evidence _), KDbl_baking -> return_unit | Single (Double_baking_evidence _), _ -> assert false | Single (Activate_account _), KActivate -> return_unit diff --git a/src/proto_alpha/lib_protocol/validate.ml b/src/proto_alpha/lib_protocol/validate.ml index 13f1c73de486b506905456952bafd972f1d570a2..f0f6113e0faeb08dccc2316e41865f940499144c 100644 --- a/src/proto_alpha/lib_protocol/validate.ml +++ b/src/proto_alpha/lib_protocol/validate.ml @@ -1404,9 +1404,9 @@ module Anonymous = struct let*? () = Operation.check_signature delegate_pk vi.chain_id op2 in return_unit - let check_double_preendorsement_evidence vi + let check_double_preattestation_evidence vi (operation : Kind.double_preattestation_evidence operation) = - let (Single (Double_preendorsement_evidence {op1; op2})) = + let (Single (Double_preattestation_evidence {op1; op2})) = operation.protocol_data.contents in check_double_endorsing_evidence @@ -1435,9 +1435,9 @@ module Anonymous = struct | Some existing -> Error (Operation_conflict {existing; new_operation = oph})) - let check_double_preendorsement_evidence_conflict vs oph + let check_double_preattestation_evidence_conflict vs oph (operation : Kind.double_preattestation_evidence operation) = - let (Single (Double_preendorsement_evidence {op1; _})) = + let (Single (Double_preattestation_evidence {op1; _})) = operation.protocol_data.contents in check_double_endorsing_evidence_conflict vs oph op1 @@ -1476,9 +1476,9 @@ module Anonymous = struct in add_double_endorsing_evidence vs oph op1 - let add_double_preendorsement_evidence vs oph + let add_double_preattestation_evidence vs oph (operation : Kind.double_preattestation_evidence operation) = - let (Single (Double_preendorsement_evidence {op1; _})) = + let (Single (Double_preattestation_evidence {op1; _})) = operation.protocol_data.contents in add_double_endorsing_evidence vs oph op1 @@ -1497,9 +1497,9 @@ module Anonymous = struct in {vs with anonymous_state} - let remove_double_preendorsement_evidence vs + let remove_double_preattestation_evidence vs (operation : Kind.double_preattestation_evidence operation) = - let (Single (Double_preendorsement_evidence {op1; _})) = + let (Single (Double_preattestation_evidence {op1; _})) = operation.protocol_data.contents in remove_double_endorsing_evidence vs op1 @@ -2463,8 +2463,8 @@ let check_operation ?(check_signature = true) info (type kind) | Single (Ballot _) -> Voting.check_ballot info ~check_signature operation | Single (Activate_account _) -> Anonymous.check_activate_account info operation - | Single (Double_preendorsement_evidence _) -> - Anonymous.check_double_preendorsement_evidence info operation + | Single (Double_preattestation_evidence _) -> + Anonymous.check_double_preattestation_evidence info operation | Single (Double_endorsement_evidence _) -> Anonymous.check_double_endorsement_evidence info operation | Single (Double_baking_evidence _) -> @@ -2527,8 +2527,8 @@ let check_operation_conflict (type kind) operation_conflict_state oph operation_conflict_state oph operation - | Single (Double_preendorsement_evidence _) -> - Anonymous.check_double_preendorsement_evidence_conflict + | Single (Double_preattestation_evidence _) -> + Anonymous.check_double_preattestation_evidence_conflict operation_conflict_state oph operation @@ -2581,8 +2581,8 @@ let add_valid_operation operation_conflict_state oph (type kind) Voting.add_ballot operation_conflict_state oph operation | Single (Activate_account _) -> Anonymous.add_activate_account operation_conflict_state oph operation - | Single (Double_preendorsement_evidence _) -> - Anonymous.add_double_preendorsement_evidence + | Single (Double_preattestation_evidence _) -> + Anonymous.add_double_preattestation_evidence operation_conflict_state oph operation @@ -2625,8 +2625,8 @@ let remove_operation operation_conflict_state (type kind) | Single (Ballot _) -> Voting.remove_ballot operation_conflict_state operation | Single (Activate_account _) -> Anonymous.remove_activate_account operation_conflict_state operation - | Single (Double_preendorsement_evidence _) -> - Anonymous.remove_double_preendorsement_evidence + | Single (Double_preattestation_evidence _) -> + Anonymous.remove_double_preattestation_evidence operation_conflict_state operation | Single (Double_endorsement_evidence _) -> @@ -2756,18 +2756,18 @@ let validate_operation ?(check_signature = true) add_activate_account operation_state oph operation in return {info; operation_state; block_state} - | Single (Double_preendorsement_evidence _) -> + | Single (Double_preattestation_evidence _) -> let open Anonymous in - let* () = check_double_preendorsement_evidence info operation in + let* () = check_double_preattestation_evidence info operation in let*? () = - check_double_preendorsement_evidence_conflict + check_double_preattestation_evidence_conflict operation_state oph operation |> wrap_denunciation_conflict Preattestation in let operation_state = - add_double_preendorsement_evidence operation_state oph operation + add_double_preattestation_evidence operation_state oph operation in return {info; operation_state; block_state} | Single (Double_endorsement_evidence _) -> @@ -2893,7 +2893,7 @@ let check_fitness_locked_round bs fitness_locked_round = before the block's round, and that their total power is high enough. Note that this function does not check whether the block actually - contains preendorments when they are mandatory. This is checked by + contains preattestations when they are mandatory. This is checked by {!check_fitness_locked_round} instead. *) let check_preattestation_round_and_power vi vs round = let open Result_syntax in 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 5e2dec4b652658eaee56a14745210119e57f8533..72278a9be064d35b8c2df92b3d497d84896b667d 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 @@ -163,7 +163,7 @@ module Proto_client = struct | Seed_nonce_revelation_result _ -> Successful | Vdf_revelation_result _ -> Successful | Double_endorsement_evidence_result _ -> Successful - | Double_preendorsement_evidence_result _ -> Successful + | Double_preattestation_evidence_result _ -> Successful | Double_baking_evidence_result _ -> Successful | Activate_account_result _ -> Successful | Proposals_result -> Successful