diff --git a/teztale/bin_teztale_archiver/Proxford_machine.real.ml b/teztale/bin_teztale_archiver/Proxford_machine.real.ml index 393890dbf3973a99ff8b62c4ca6c7b73b7e2931c..9d904582e604627bfeb5623fc395bff57d710542 100644 --- a/teztale/bin_teztale_archiver/Proxford_machine.real.ml +++ b/teztale/bin_teztale_archiver/Proxford_machine.real.ml @@ -56,7 +56,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct module BlockIdMap = Map.Make (Protocol.Block_payload_hash) - let extract_endorsement + let extract_attestation (operation_content : Protocol.Alpha_context.packed_operation) = match operation_content with | { @@ -72,7 +72,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Some ( ( block_payload_hash, Protocol.Alpha_context.Raw_level.to_int32 level, - Consensus_ops.Endorsement, + Consensus_ops.Attestation, Some (Protocol.Alpha_context.Round.to_int32 round) ), slot_to_int slot ) | { @@ -88,7 +88,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Some ( ( block_payload_hash, Protocol.Alpha_context.Raw_level.to_int32 level, - Consensus_ops.Preendorsement, + Consensus_ops.Preattestation, Some (Protocol.Alpha_context.Round.to_int32 round) ), slot_to_int slot ) | _ -> None @@ -110,7 +110,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct return ( Lwt_stream.filter_map (fun ((hash, op), errors) -> - Option.map (fun x -> ((hash, x), errors)) (extract_endorsement op)) + Option.map (fun x -> ((hash, x), errors)) (extract_attestation op)) op_stream, stopper ) @@ -188,7 +188,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct let block_round (header : Block_header.t) = raw_block_round header.Block_header.shell - let get_endorsement_round protocol_data = + let get_attestation_round protocol_data = match protocol_data with | Protocol.Alpha_context.Operation_data {contents; _} -> ( match contents with @@ -196,7 +196,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Protocol.Alpha_context.Round.to_int32 round | _ -> assert false) - let get_preendorsement_round protocol_data = + let get_preattestation_round protocol_data = match protocol_data with | Protocol.Alpha_context.Operation_data {contents; _} -> ( match contents with @@ -228,8 +228,8 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct op = { hash; - round = Some (get_preendorsement_round protocol_data); - kind = Consensus_ops.Preendorsement; + round = Some (get_preattestation_round protocol_data); + kind = Consensus_ops.Preattestation; }; delegate; power = consensus_power; @@ -248,8 +248,8 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct op = { hash; - round = Some (get_endorsement_round protocol_data); - kind = Consensus_ops.Endorsement; + round = Some (get_attestation_round protocol_data); + kind = Consensus_ops.Attestation; }; delegate; power = consensus_power; diff --git a/teztale/bin_teztale_archiver/PsBabyM1_machine.real.ml b/teztale/bin_teztale_archiver/PsBabyM1_machine.real.ml index 23451e24034f6a5b3d8abfa7090930da8e79e1da..a1f55be3e55e4d7897c4c71d5fff35ac3933ca02 100644 --- a/teztale/bin_teztale_archiver/PsBabyM1_machine.real.ml +++ b/teztale/bin_teztale_archiver/PsBabyM1_machine.real.ml @@ -51,7 +51,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct module BlockIdMap = Block_hash.Map - let extract_endorsement + let extract_attestation (_operation_content : Protocol.Alpha_context.packed_operation) = (* match operation_content with | { @@ -66,7 +66,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Some ( ( branch, Protocol.Alpha_context.Raw_level.to_int32 level, - Consensus_ops.Endorsement, + Consensus_ops.Attestation, None ), slot ) | _ ->*) @@ -89,7 +89,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct return ( Lwt_stream.filter_map (fun ((hash, op), errors) -> - Option.map (fun x -> ((hash, x), errors)) (extract_endorsement op)) + Option.map (fun x -> ((hash, x), errors)) (extract_attestation op)) op_stream, stopper ) @@ -174,7 +174,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct ~block:(`Hash (hash, 0)) 0 in - let endorsements = + let attestations = List.filter_map (fun Block_services.{hash; receipt; _} -> match receipt with @@ -189,14 +189,14 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Some Consensus_ops. { - op = {hash; round = None; kind = Consensus_ops.Endorsement}; + op = {hash; round = None; kind = Consensus_ops.Attestation}; delegate = public_key_hash_of_v0 delegate; power = List.length slots; } | _ -> None) ops in - return endorsements + return attestations let get_block_info cctxt level = let* info = diff --git a/teztale/bin_teztale_archiver/PsCARTHA_machine.real.ml b/teztale/bin_teztale_archiver/PsCARTHA_machine.real.ml index da4db71a16bba8fb17daca5beb965eb5973c1149..d0c91041013635f01eab604bc8bcdcb4389c451a 100644 --- a/teztale/bin_teztale_archiver/PsCARTHA_machine.real.ml +++ b/teztale/bin_teztale_archiver/PsCARTHA_machine.real.ml @@ -51,7 +51,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct module BlockIdMap = Block_hash.Map - let extract_endorsement + let extract_attestation (_operation_content : Protocol.Alpha_context.packed_operation) = (* match operation_content with | { @@ -66,7 +66,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Some ( ( branch, Protocol.Alpha_context.Raw_level.to_int32 level, - Consensus_ops.Endorsement, + Consensus_ops.Attestation, None ), slot ) | _ ->*) @@ -89,7 +89,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct return ( Lwt_stream.filter_map (fun ((hash, op), errors) -> - Option.map (fun x -> ((hash, x), errors)) (extract_endorsement op)) + Option.map (fun x -> ((hash, x), errors)) (extract_attestation op)) op_stream, stopper ) @@ -174,7 +174,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct ~block:(`Hash (hash, 0)) 0 in - let endorsements = + let attestations = List.filter_map (fun Block_services.{hash; receipt; _} -> match receipt with @@ -189,14 +189,14 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Some Consensus_ops. { - op = {hash; round = None; kind = Consensus_ops.Endorsement}; + op = {hash; round = None; kind = Consensus_ops.Attestation}; delegate = public_key_hash_of_v0 delegate; power = List.length slots; } | _ -> None) ops in - return endorsements + return attestations let get_block_info cctxt level = let* header = diff --git a/teztale/bin_teztale_archiver/PsDELPH1_machine.real.ml b/teztale/bin_teztale_archiver/PsDELPH1_machine.real.ml index be4f1d665dd9be39043a0c6342852b49a1013c25..17d001ef44057f688579852fcf37442c109f528e 100644 --- a/teztale/bin_teztale_archiver/PsDELPH1_machine.real.ml +++ b/teztale/bin_teztale_archiver/PsDELPH1_machine.real.ml @@ -51,7 +51,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct module BlockIdMap = Block_hash.Map - let extract_endorsement + let extract_attestation (_operation_content : Protocol.Alpha_context.packed_operation) = (* match operation_content with | { @@ -66,7 +66,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Some ( ( branch, Protocol.Alpha_context.Raw_level.to_int32 level, - Consensus_ops.Endorsement, + Consensus_ops.Attestation, None ), slot ) | _ ->*) @@ -89,7 +89,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct return ( Lwt_stream.filter_map (fun ((hash, op), errors) -> - Option.map (fun x -> ((hash, x), errors)) (extract_endorsement op)) + Option.map (fun x -> ((hash, x), errors)) (extract_attestation op)) op_stream, stopper ) @@ -174,7 +174,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct ~block:(`Hash (hash, 0)) 0 in - let endorsements = + let attestations = List.filter_map (fun Block_services.{hash; receipt; _} -> match receipt with @@ -189,14 +189,14 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Some Consensus_ops. { - op = {hash; round = None; kind = Consensus_ops.Endorsement}; + op = {hash; round = None; kind = Consensus_ops.Attestation}; delegate = public_key_hash_of_v0 delegate; power = List.length slots; } | _ -> None) ops in - return endorsements + return attestations let get_block_info cctxt level = let* header = diff --git a/teztale/bin_teztale_archiver/PsFLoren_machine.real.ml b/teztale/bin_teztale_archiver/PsFLoren_machine.real.ml index fce8cb257e8e71dfe3ed0ab3e6af6415856251c8..7eca77b2757aef2d08de5a0b406f3ae03538e1f7 100644 --- a/teztale/bin_teztale_archiver/PsFLoren_machine.real.ml +++ b/teztale/bin_teztale_archiver/PsFLoren_machine.real.ml @@ -52,7 +52,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct module BlockIdMap = Block_hash.Map - let extract_endorsement + let extract_attestation (operation_content : Protocol.Alpha_context.packed_operation) = match operation_content with | { @@ -81,7 +81,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Some ( ( branch, Protocol.Alpha_context.Raw_level.to_int32 level, - Consensus_ops.Endorsement, + Consensus_ops.Attestation, None ), slot ) | _ -> None @@ -103,7 +103,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct return ( Lwt_stream.filter_map (fun ((hash, op), errors) -> - Option.map (fun x -> ((hash, x), errors)) (extract_endorsement op)) + Option.map (fun x -> ((hash, x), errors)) (extract_attestation op)) op_stream, stopper ) @@ -188,7 +188,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct ~block:(`Hash (hash, 0)) 0 in - let endorsements = + let attestations = List.filter_map (fun Block_services.{hash; receipt; _} -> match receipt with @@ -204,14 +204,14 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Some Consensus_ops. { - op = {hash; round = None; kind = Consensus_ops.Endorsement}; + op = {hash; round = None; kind = Consensus_ops.Attestation}; delegate = public_key_hash_of_v0 delegate; power = List.length slots; } | _ -> None) ops in - return endorsements + return attestations let get_block_info cctxt level = let* header = diff --git a/teztale/bin_teztale_archiver/PsParisC_machine.real.ml b/teztale/bin_teztale_archiver/PsParisC_machine.real.ml index 1526e4dd1a8de133b5eaf5fb1e2048e2dd74a8be..7cc4a1d402260cf87a69c0343e7e24402e339724 100644 --- a/teztale/bin_teztale_archiver/PsParisC_machine.real.ml +++ b/teztale/bin_teztale_archiver/PsParisC_machine.real.ml @@ -77,7 +77,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Some ( ( block_payload_hash, Protocol.Alpha_context.Raw_level.to_int32 level, - Consensus_ops.Endorsement, + Consensus_ops.Attestation, Some (Protocol.Alpha_context.Round.to_int32 round) ), slot_to_int slot ) | { @@ -93,7 +93,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Some ( ( block_payload_hash, Protocol.Alpha_context.Raw_level.to_int32 level, - Consensus_ops.Preendorsement, + Consensus_ops.Preattestation, Some (Protocol.Alpha_context.Round.to_int32 round) ), slot_to_int slot ) | _ -> None @@ -234,7 +234,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct { hash; round = Some (get_preattestation_round protocol_data); - kind = Consensus_ops.Preendorsement; + kind = Consensus_ops.Preattestation; }; delegate; power = consensus_power; @@ -254,7 +254,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct { hash; round = Some (get_attestation_round protocol_data); - kind = Consensus_ops.Endorsement; + kind = Consensus_ops.Attestation; }; delegate; power = consensus_power; diff --git a/teztale/bin_teztale_archiver/PsYLVpVv_machine.real.ml b/teztale/bin_teztale_archiver/PsYLVpVv_machine.real.ml index 24647a6e924c9a45c4897f50603fe6c8ea2b4351..2e7d7fb11d21cbec38e3be289f3ac49cf8341d8c 100644 --- a/teztale/bin_teztale_archiver/PsYLVpVv_machine.real.ml +++ b/teztale/bin_teztale_archiver/PsYLVpVv_machine.real.ml @@ -51,7 +51,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct module BlockIdMap = Block_hash.Map - let extract_endorsement + let extract_attestation (_operation_content : Protocol.Alpha_context.packed_operation) = (* match operation_content with | { @@ -66,7 +66,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Some ( ( branch, Protocol.Alpha_context.Raw_level.to_int32 level, - Consensus_ops.Endorsement, + Consensus_ops.Attestation, None ), slot ) | _ ->*) @@ -89,7 +89,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct return ( Lwt_stream.filter_map (fun ((hash, op), errors) -> - Option.map (fun x -> ((hash, x), errors)) (extract_endorsement op)) + Option.map (fun x -> ((hash, x), errors)) (extract_attestation op)) op_stream, stopper ) @@ -174,7 +174,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct ~block:(`Hash (hash, 0)) 0 in - let endorsements = + let attestations = List.filter_map (fun Block_services.{hash; receipt; _} -> match receipt with @@ -189,14 +189,14 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Some Consensus_ops. { - op = {hash; round = None; kind = Consensus_ops.Endorsement}; + op = {hash; round = None; kind = Consensus_ops.Attestation}; delegate = public_key_hash_of_v0 delegate; power = List.length slots; } | _ -> None) ops in - return endorsements + return attestations let get_block_info cctxt level = let* header = diff --git a/teztale/bin_teztale_archiver/PsddFKi3_machine.real.ml b/teztale/bin_teztale_archiver/PsddFKi3_machine.real.ml index e02d183d14d0a9d3840c2ec64ca26d03f492d426..07a9f2370d30a6ea46fc8faad22e85813fc5572c 100644 --- a/teztale/bin_teztale_archiver/PsddFKi3_machine.real.ml +++ b/teztale/bin_teztale_archiver/PsddFKi3_machine.real.ml @@ -51,7 +51,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct module BlockIdMap = Block_hash.Map - let extract_endorsement + let extract_attestation (_operation_content : Protocol.Alpha_context.packed_operation) = (* match operation_content with | { @@ -66,7 +66,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Some ( ( branch, Protocol.Alpha_context.Raw_level.to_int32 level, - Consensus_ops.Endorsement, + Consensus_ops.Attestation, None ), slot ) | _ ->*) @@ -89,7 +89,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct return ( Lwt_stream.filter_map (fun ((hash, op), errors) -> - Option.map (fun x -> ((hash, x), errors)) (extract_endorsement op)) + Option.map (fun x -> ((hash, x), errors)) (extract_attestation op)) op_stream, stopper ) @@ -174,7 +174,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct ~block:(`Hash (hash, 0)) 0 in - let endorsements = + let attestations = List.filter_map (fun Block_services.{hash; receipt; _} -> match receipt with @@ -189,14 +189,14 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Some Consensus_ops. { - op = {hash; round = None; kind = Consensus_ops.Endorsement}; + op = {hash; round = None; kind = Consensus_ops.Attestation}; delegate = public_key_hash_of_v0 delegate; power = List.length slots; } | _ -> None) ops in - return endorsements + return attestations let get_block_info cctxt level = let* header = diff --git a/teztale/bin_teztale_archiver/Psithaca_machine.real.ml b/teztale/bin_teztale_archiver/Psithaca_machine.real.ml index aad18f5890d6e4ff813c3b2f774f575215bfb593..59b85cfddf8ca219da642b315a6c42de603b8aa3 100644 --- a/teztale/bin_teztale_archiver/Psithaca_machine.real.ml +++ b/teztale/bin_teztale_archiver/Psithaca_machine.real.ml @@ -63,7 +63,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct module BlockIdMap = Map.Make (Protocol.Block_payload_hash) - let extract_endorsement + let extract_attestation (operation_content : Protocol.Alpha_context.packed_operation) = match operation_content with | { @@ -79,7 +79,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Some ( ( block_payload_hash, Protocol.Alpha_context.Raw_level.to_int32 level, - Consensus_ops.Endorsement, + Consensus_ops.Attestation, Some (Protocol.Alpha_context.Round.to_int32 round) ), slot_to_int slot ) | { @@ -95,7 +95,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Some ( ( block_payload_hash, Protocol.Alpha_context.Raw_level.to_int32 level, - Consensus_ops.Preendorsement, + Consensus_ops.Preattestation, Some (Protocol.Alpha_context.Round.to_int32 round) ), slot_to_int slot ) | _ -> None @@ -117,7 +117,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct return ( Lwt_stream.filter_map (fun ((hash, op), errors) -> - Option.map (fun x -> ((hash, x), errors)) (extract_endorsement op)) + Option.map (fun x -> ((hash, x), errors)) (extract_attestation op)) op_stream, stopper ) @@ -198,7 +198,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct let block_round (header : Block_header.t) = raw_block_round header.Block_header.shell - let get_endorsement_round protocol_data = + let get_attestation_round protocol_data = match protocol_data with | Protocol.Alpha_context.Operation_data {contents; _} -> ( match contents with @@ -206,7 +206,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Protocol.Alpha_context.Round.to_int32 round | _ -> assert false) - let get_preendorsement_round protocol_data = + let get_preattestation_round protocol_data = match protocol_data with | Protocol.Alpha_context.Operation_data {contents; _} -> ( match contents with @@ -238,8 +238,8 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct op = { hash; - round = Some (get_preendorsement_round protocol_data); - kind = Consensus_ops.Preendorsement; + round = Some (get_preattestation_round protocol_data); + kind = Consensus_ops.Preattestation; }; delegate = public_key_hash_of_v0 delegate; power = preendorsement_power; @@ -258,8 +258,8 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct op = { hash; - round = Some (get_endorsement_round protocol_data); - kind = Consensus_ops.Endorsement; + round = Some (get_attestation_round protocol_data); + kind = Consensus_ops.Attestation; }; delegate = public_key_hash_of_v0 delegate; power = endorsement_power; diff --git a/teztale/bin_teztale_archiver/PsquebeC_machine.real.ml b/teztale/bin_teztale_archiver/PsquebeC_machine.real.ml index 0368b80f1f309b29e3b299b93ad47b11e6d3ba12..9431da2a96fb87563f5f08f3ad8f148098ab7f01 100644 --- a/teztale/bin_teztale_archiver/PsquebeC_machine.real.ml +++ b/teztale/bin_teztale_archiver/PsquebeC_machine.real.ml @@ -56,7 +56,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct module BlockIdMap = Map.Make (Protocol.Block_payload_hash) - let extract_endorsement + let extract_attestation (operation_content : Protocol.Alpha_context.packed_operation) = match operation_content with | { @@ -77,7 +77,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Some ( ( block_payload_hash, Protocol.Alpha_context.Raw_level.to_int32 level, - Consensus_ops.Endorsement, + Consensus_ops.Attestation, Some (Protocol.Alpha_context.Round.to_int32 round) ), slot_to_int slot ) | { @@ -93,7 +93,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Some ( ( block_payload_hash, Protocol.Alpha_context.Raw_level.to_int32 level, - Consensus_ops.Preendorsement, + Consensus_ops.Preattestation, Some (Protocol.Alpha_context.Round.to_int32 round) ), slot_to_int slot ) | _ -> None @@ -115,7 +115,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct return ( Lwt_stream.filter_map (fun ((hash, op), errors) -> - Option.map (fun x -> ((hash, x), errors)) (extract_endorsement op)) + Option.map (fun x -> ((hash, x), errors)) (extract_attestation op)) op_stream, stopper ) @@ -193,7 +193,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct let block_round (header : Block_header.t) = raw_block_round header.Block_header.shell - let get_endorsement_round protocol_data = + let get_attestation_round protocol_data = match protocol_data with | Protocol.Alpha_context.Operation_data {contents; _} -> ( match contents with @@ -201,7 +201,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Protocol.Alpha_context.Round.to_int32 round | _ -> assert false) - let get_preendorsement_round protocol_data = + let get_preattestation_round protocol_data = match protocol_data with | Protocol.Alpha_context.Operation_data {contents; _} -> ( match contents with @@ -233,8 +233,8 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct op = { hash; - round = Some (get_preendorsement_round protocol_data); - kind = Consensus_ops.Preendorsement; + round = Some (get_preattestation_round protocol_data); + kind = Consensus_ops.Preattestation; }; delegate; power = consensus_power; @@ -253,8 +253,8 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct op = { hash; - round = Some (get_endorsement_round protocol_data); - kind = Consensus_ops.Endorsement; + round = Some (get_attestation_round protocol_data); + kind = Consensus_ops.Attestation; }; delegate; power = consensus_power; diff --git a/teztale/bin_teztale_archiver/Pt24m4xi_machine.real.ml b/teztale/bin_teztale_archiver/Pt24m4xi_machine.real.ml index c5f30dd06c7feb516853d699c53f294ba52e3141..71abaebcc3f62045c94ffffe724104278cf4e2b0 100644 --- a/teztale/bin_teztale_archiver/Pt24m4xi_machine.real.ml +++ b/teztale/bin_teztale_archiver/Pt24m4xi_machine.real.ml @@ -51,7 +51,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct module BlockIdMap = Block_hash.Map - let extract_endorsement + let extract_attestation (_operation_content : Protocol.Alpha_context.packed_operation) = (* match operation_content with | { @@ -66,7 +66,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Some ( ( branch, Protocol.Alpha_context.Raw_level.to_int32 level, - Consensus_ops.Endorsement, + Consensus_ops.Attestation, None ), slot ) | _ ->*) @@ -89,7 +89,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct return ( Lwt_stream.filter_map (fun ((hash, op), errors) -> - Option.map (fun x -> ((hash, x), errors)) (extract_endorsement op)) + Option.map (fun x -> ((hash, x), errors)) (extract_attestation op)) op_stream, stopper ) @@ -174,7 +174,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct ~block:(`Hash (hash, 0)) 0 in - let endorsements = + let attestations = List.filter_map (fun Block_services.{hash; receipt; _} -> match receipt with @@ -189,14 +189,14 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Some Consensus_ops. { - op = {hash; round = None; kind = Consensus_ops.Endorsement}; + op = {hash; round = None; kind = Consensus_ops.Attestation}; delegate = public_key_hash_of_v0 delegate; power = List.length slots; } | _ -> None) ops in - return endorsements + return attestations let get_block_info cctxt level = let* header = diff --git a/teztale/bin_teztale_archiver/PtCJ7pwo_machine.real.ml b/teztale/bin_teztale_archiver/PtCJ7pwo_machine.real.ml index ae9e66c0201e5518e38358162f01facd92a0ab96..fa18c2d493db1bc672c60aa08cf458c1d18d6375 100644 --- a/teztale/bin_teztale_archiver/PtCJ7pwo_machine.real.ml +++ b/teztale/bin_teztale_archiver/PtCJ7pwo_machine.real.ml @@ -51,7 +51,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct module BlockIdMap = Block_hash.Map - let extract_endorsement + let extract_attestation (_operation_content : Protocol.Alpha_context.packed_operation) = (* match operation_content with | { @@ -66,7 +66,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Some ( ( branch, Protocol.Alpha_context.Raw_level.to_int32 level, - Consensus_ops.Endorsement, + Consensus_ops.Attestation, None ), slot ) | _ ->*) @@ -89,7 +89,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct return ( Lwt_stream.filter_map (fun ((hash, op), errors) -> - Option.map (fun x -> ((hash, x), errors)) (extract_endorsement op)) + Option.map (fun x -> ((hash, x), errors)) (extract_attestation op)) op_stream, stopper ) @@ -174,7 +174,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct ~block:(`Hash (hash, 0)) 0 in - let endorsements = + let attestations = List.filter_map (fun Block_services.{hash; receipt; _} -> match receipt with @@ -189,14 +189,14 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Some Consensus_ops. { - op = {hash; round = None; kind = Consensus_ops.Endorsement}; + op = {hash; round = None; kind = Consensus_ops.Attestation}; delegate = public_key_hash_of_v0 delegate; power = List.length slots; } | _ -> None) ops in - return endorsements + return attestations let get_block_info cctxt level = let* header = diff --git a/teztale/bin_teztale_archiver/PtEdo2Zk_machine.real.ml b/teztale/bin_teztale_archiver/PtEdo2Zk_machine.real.ml index ee8aed1d41f64e6db0d1497519e3fef799387805..891efdb8b783ce6bba64b9e37c8cf0f5eb740e35 100644 --- a/teztale/bin_teztale_archiver/PtEdo2Zk_machine.real.ml +++ b/teztale/bin_teztale_archiver/PtEdo2Zk_machine.real.ml @@ -51,7 +51,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct module BlockIdMap = Block_hash.Map - let extract_endorsement + let extract_attestation (_operation_content : Protocol.Alpha_context.packed_operation) = (* match operation_content with | { @@ -66,7 +66,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Some ( ( branch, Protocol.Alpha_context.Raw_level.to_int32 level, - Consensus_ops.Endorsement, + Consensus_ops.Attestation, None ), slot ) | _ ->*) @@ -89,7 +89,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct return ( Lwt_stream.filter_map (fun ((hash, op), errors) -> - Option.map (fun x -> ((hash, x), errors)) (extract_endorsement op)) + Option.map (fun x -> ((hash, x), errors)) (extract_attestation op)) op_stream, stopper ) @@ -174,7 +174,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct ~block:(`Hash (hash, 0)) 0 in - let endorsements = + let attestations = List.filter_map (fun Block_services.{hash; receipt; _} -> match receipt with @@ -189,14 +189,14 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Some Consensus_ops. { - op = {hash; round = None; kind = Consensus_ops.Endorsement}; + op = {hash; round = None; kind = Consensus_ops.Attestation}; delegate = public_key_hash_of_v0 delegate; power = List.length slots; } | _ -> None) ops in - return endorsements + return attestations let get_block_info cctxt level = let* header = diff --git a/teztale/bin_teztale_archiver/PtGRANAD_machine.real.ml b/teztale/bin_teztale_archiver/PtGRANAD_machine.real.ml index f7fe1f2e560a9a4c3d5748e4d35002f39c516bab..23d251391b95ffeccb7468e8765a768b1d193dbf 100644 --- a/teztale/bin_teztale_archiver/PtGRANAD_machine.real.ml +++ b/teztale/bin_teztale_archiver/PtGRANAD_machine.real.ml @@ -52,7 +52,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct module BlockIdMap = Block_hash.Map - let extract_endorsement + let extract_attestation (operation_content : Protocol.Alpha_context.packed_operation) = match operation_content with | { @@ -81,7 +81,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Some ( ( branch, Protocol.Alpha_context.Raw_level.to_int32 level, - Consensus_ops.Endorsement, + Consensus_ops.Attestation, None ), slot ) | _ -> None @@ -103,7 +103,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct return ( Lwt_stream.filter_map (fun ((hash, op), errors) -> - Option.map (fun x -> ((hash, x), errors)) (extract_endorsement op)) + Option.map (fun x -> ((hash, x), errors)) (extract_attestation op)) op_stream, stopper ) @@ -188,7 +188,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct ~block:(`Hash (hash, 0)) 0 in - let endorsements = + let attestations = List.filter_map (fun Block_services.{hash; receipt; _} -> match receipt with @@ -204,14 +204,14 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Some Consensus_ops. { - op = {hash; round = None; kind = Consensus_ops.Endorsement}; + op = {hash; round = None; kind = Consensus_ops.Attestation}; delegate = public_key_hash_of_v0 delegate; power = List.length slots; } | _ -> None) ops in - return endorsements + return attestations let get_block_info cctxt level = let* header = diff --git a/teztale/bin_teztale_archiver/PtHangz2_machine.real.ml b/teztale/bin_teztale_archiver/PtHangz2_machine.real.ml index 9f4d30f9f7497d602c7345c6ea1c84ac68e4b0eb..a32c5c14f53ab4890f6218138d1bd3dc6da30dea 100644 --- a/teztale/bin_teztale_archiver/PtHangz2_machine.real.ml +++ b/teztale/bin_teztale_archiver/PtHangz2_machine.real.ml @@ -53,7 +53,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct module BlockIdMap = Block_hash.Map - let extract_endorsement + let extract_attestation (operation_content : Protocol.Alpha_context.packed_operation) = match operation_content with | { @@ -82,7 +82,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Some ( ( branch, Protocol.Alpha_context.Raw_level.to_int32 level, - Consensus_ops.Endorsement, + Consensus_ops.Attestation, None ), slot ) | _ -> None @@ -104,7 +104,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct return ( Lwt_stream.filter_map (fun ((hash, op), errors) -> - Option.map (fun x -> ((hash, x), errors)) (extract_endorsement op)) + Option.map (fun x -> ((hash, x), errors)) (extract_attestation op)) op_stream, stopper ) @@ -189,7 +189,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct ~block:(`Hash (hash, 0)) 0 in - let endorsements = + let attestations = List.filter_map (fun Block_services.{hash; receipt; _} -> match receipt with @@ -205,14 +205,14 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Some Consensus_ops. { - op = {hash; round = None; kind = Consensus_ops.Endorsement}; + op = {hash; round = None; kind = Consensus_ops.Attestation}; delegate = public_key_hash_of_v0 delegate; power = List.length slots; } | _ -> None) ops in - return endorsements + return attestations let get_block_info cctxt level = let* header = diff --git a/teztale/bin_teztale_archiver/PtJakart_machine.real.ml b/teztale/bin_teztale_archiver/PtJakart_machine.real.ml index 5abc760d10539d9abc2b1dd1244c88c18a2d6745..b40f12be777d328a656644fcc1648bfb607e5f14 100644 --- a/teztale/bin_teztale_archiver/PtJakart_machine.real.ml +++ b/teztale/bin_teztale_archiver/PtJakart_machine.real.ml @@ -63,7 +63,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct module BlockIdMap = Map.Make (Protocol.Block_payload_hash) - let extract_endorsement + let extract_attestation (operation_content : Protocol.Alpha_context.packed_operation) = match operation_content with | { @@ -79,7 +79,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Some ( ( block_payload_hash, Protocol.Alpha_context.Raw_level.to_int32 level, - Consensus_ops.Endorsement, + Consensus_ops.Attestation, Some (Protocol.Alpha_context.Round.to_int32 round) ), slot_to_int slot ) | { @@ -95,7 +95,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Some ( ( block_payload_hash, Protocol.Alpha_context.Raw_level.to_int32 level, - Consensus_ops.Preendorsement, + Consensus_ops.Preattestation, Some (Protocol.Alpha_context.Round.to_int32 round) ), slot_to_int slot ) | _ -> None @@ -117,7 +117,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct return ( Lwt_stream.filter_map (fun ((hash, op), errors) -> - Option.map (fun x -> ((hash, x), errors)) (extract_endorsement op)) + Option.map (fun x -> ((hash, x), errors)) (extract_attestation op)) op_stream, stopper ) @@ -198,7 +198,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct let block_round (header : Block_header.t) = raw_block_round header.Block_header.shell - let get_endorsement_round protocol_data = + let get_attestation_round protocol_data = match protocol_data with | Protocol.Alpha_context.Operation_data {contents; _} -> ( match contents with @@ -206,7 +206,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Protocol.Alpha_context.Round.to_int32 round | _ -> assert false) - let get_preendorsement_round protocol_data = + let get_preattestation_round protocol_data = match protocol_data with | Protocol.Alpha_context.Operation_data {contents; _} -> ( match contents with @@ -238,8 +238,8 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct op = { hash; - round = Some (get_preendorsement_round protocol_data); - kind = Consensus_ops.Preendorsement; + round = Some (get_preattestation_round protocol_data); + kind = Consensus_ops.Preattestation; }; delegate = public_key_hash_of_v0 delegate; power = preendorsement_power; @@ -258,8 +258,8 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct op = { hash; - round = Some (get_endorsement_round protocol_data); - kind = Consensus_ops.Endorsement; + round = Some (get_attestation_round protocol_data); + kind = Consensus_ops.Attestation; }; delegate = public_key_hash_of_v0 delegate; power = endorsement_power; diff --git a/teztale/bin_teztale_archiver/PtKathma_machine.real.ml b/teztale/bin_teztale_archiver/PtKathma_machine.real.ml index 93a7a6a28da1386cd610f7cb34af08e537a31567..b3bf4e7dca6faf1dcd9fa864b450e5ed6e34d415 100644 --- a/teztale/bin_teztale_archiver/PtKathma_machine.real.ml +++ b/teztale/bin_teztale_archiver/PtKathma_machine.real.ml @@ -63,7 +63,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct module BlockIdMap = Map.Make (Protocol.Block_payload_hash) - let extract_endorsement + let extract_attestation (operation_content : Protocol.Alpha_context.packed_operation) = match operation_content with | { @@ -79,7 +79,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Some ( ( block_payload_hash, Protocol.Alpha_context.Raw_level.to_int32 level, - Consensus_ops.Endorsement, + Consensus_ops.Attestation, Some (Protocol.Alpha_context.Round.to_int32 round) ), slot_to_int slot ) | { @@ -95,7 +95,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Some ( ( block_payload_hash, Protocol.Alpha_context.Raw_level.to_int32 level, - Consensus_ops.Preendorsement, + Consensus_ops.Preattestation, Some (Protocol.Alpha_context.Round.to_int32 round) ), slot_to_int slot ) | _ -> None @@ -117,7 +117,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct return ( Lwt_stream.filter_map (fun ((hash, op), errors) -> - Option.map (fun x -> ((hash, x), errors)) (extract_endorsement op)) + Option.map (fun x -> ((hash, x), errors)) (extract_attestation op)) op_stream, stopper ) @@ -198,7 +198,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct let block_round (header : Block_header.t) = raw_block_round header.Block_header.shell - let get_endorsement_round protocol_data = + let get_attestation_round protocol_data = match protocol_data with | Protocol.Alpha_context.Operation_data {contents; _} -> ( match contents with @@ -206,7 +206,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Protocol.Alpha_context.Round.to_int32 round | _ -> assert false) - let get_preendorsement_round protocol_data = + let get_preattestation_round protocol_data = match protocol_data with | Protocol.Alpha_context.Operation_data {contents; _} -> ( match contents with @@ -238,8 +238,8 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct op = { hash; - round = Some (get_preendorsement_round protocol_data); - kind = Consensus_ops.Preendorsement; + round = Some (get_preattestation_round protocol_data); + kind = Consensus_ops.Preattestation; }; delegate = public_key_hash_of_v0 delegate; power = preendorsement_power; @@ -258,8 +258,8 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct op = { hash; - round = Some (get_endorsement_round protocol_data); - kind = Consensus_ops.Endorsement; + round = Some (get_attestation_round protocol_data); + kind = Consensus_ops.Attestation; }; delegate = public_key_hash_of_v0 delegate; power = endorsement_power; diff --git a/teztale/bin_teztale_archiver/PtLimaPt_machine.real.ml b/teztale/bin_teztale_archiver/PtLimaPt_machine.real.ml index 674b4162424be7e70f962809e42c6d665e63adff..5a5caee9199a389ebdc91286a54dc948547ce7e3 100644 --- a/teztale/bin_teztale_archiver/PtLimaPt_machine.real.ml +++ b/teztale/bin_teztale_archiver/PtLimaPt_machine.real.ml @@ -63,7 +63,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct module BlockIdMap = Map.Make (Protocol.Block_payload_hash) - let extract_endorsement + let extract_attestation (operation_content : Protocol.Alpha_context.packed_operation) = match operation_content with | { @@ -79,7 +79,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Some ( ( block_payload_hash, Protocol.Alpha_context.Raw_level.to_int32 level, - Consensus_ops.Endorsement, + Consensus_ops.Attestation, Some (Protocol.Alpha_context.Round.to_int32 round) ), slot_to_int slot ) | { @@ -95,7 +95,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Some ( ( block_payload_hash, Protocol.Alpha_context.Raw_level.to_int32 level, - Consensus_ops.Preendorsement, + Consensus_ops.Preattestation, Some (Protocol.Alpha_context.Round.to_int32 round) ), slot_to_int slot ) | _ -> None @@ -117,7 +117,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct return ( Lwt_stream.filter_map (fun ((hash, op), errors) -> - Option.map (fun x -> ((hash, x), errors)) (extract_endorsement op)) + Option.map (fun x -> ((hash, x), errors)) (extract_attestation op)) op_stream, stopper ) @@ -199,7 +199,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct let block_round (header : Block_header.t) = raw_block_round header.Block_header.shell - let get_endorsement_round protocol_data = + let get_attestation_round protocol_data = match protocol_data with | Protocol.Alpha_context.Operation_data {contents; _} -> ( match contents with @@ -207,7 +207,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Protocol.Alpha_context.Round.to_int32 round | _ -> assert false) - let get_preendorsement_round protocol_data = + let get_preattestation_round protocol_data = match protocol_data with | Protocol.Alpha_context.Operation_data {contents; _} -> ( match contents with @@ -239,8 +239,8 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct op = { hash; - round = Some (get_preendorsement_round protocol_data); - kind = Consensus_ops.Preendorsement; + round = Some (get_preattestation_round protocol_data); + kind = Consensus_ops.Preattestation; }; delegate = public_key_hash_of_v0 delegate; power = preendorsement_power; @@ -259,8 +259,8 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct op = { hash; - round = Some (get_endorsement_round protocol_data); - kind = Consensus_ops.Endorsement; + round = Some (get_attestation_round protocol_data); + kind = Consensus_ops.Attestation; }; delegate = public_key_hash_of_v0 delegate; power = endorsement_power; diff --git a/teztale/bin_teztale_archiver/PtMumbai_machine.real.ml b/teztale/bin_teztale_archiver/PtMumbai_machine.real.ml index 9d25883abe3c31af20e4e9f77494d6e501cc05e1..8ff282391653d593771757bdb550576a8149f70d 100644 --- a/teztale/bin_teztale_archiver/PtMumbai_machine.real.ml +++ b/teztale/bin_teztale_archiver/PtMumbai_machine.real.ml @@ -56,7 +56,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct module BlockIdMap = Map.Make (Protocol.Block_payload_hash) - let extract_endorsement + let extract_attestation (operation_content : Protocol.Alpha_context.packed_operation) = match operation_content with | { @@ -72,7 +72,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Some ( ( block_payload_hash, Protocol.Alpha_context.Raw_level.to_int32 level, - Consensus_ops.Endorsement, + Consensus_ops.Attestation, Some (Protocol.Alpha_context.Round.to_int32 round) ), slot_to_int slot ) | { @@ -88,7 +88,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Some ( ( block_payload_hash, Protocol.Alpha_context.Raw_level.to_int32 level, - Consensus_ops.Preendorsement, + Consensus_ops.Preattestation, Some (Protocol.Alpha_context.Round.to_int32 round) ), slot_to_int slot ) | _ -> None @@ -110,7 +110,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct return ( Lwt_stream.filter_map (fun ((hash, op), errors) -> - Option.map (fun x -> ((hash, x), errors)) (extract_endorsement op)) + Option.map (fun x -> ((hash, x), errors)) (extract_attestation op)) op_stream, stopper ) @@ -188,7 +188,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct let block_round (header : Block_header.t) = raw_block_round header.Block_header.shell - let get_endorsement_round protocol_data = + let get_attestation_round protocol_data = match protocol_data with | Protocol.Alpha_context.Operation_data {contents; _} -> ( match contents with @@ -196,7 +196,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Protocol.Alpha_context.Round.to_int32 round | _ -> assert false) - let get_preendorsement_round protocol_data = + let get_preattestation_round protocol_data = match protocol_data with | Protocol.Alpha_context.Operation_data {contents; _} -> ( match contents with @@ -228,8 +228,8 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct op = { hash; - round = Some (get_preendorsement_round protocol_data); - kind = Consensus_ops.Preendorsement; + round = Some (get_preattestation_round protocol_data); + kind = Consensus_ops.Preattestation; }; delegate; power = preendorsement_power; @@ -248,8 +248,8 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct op = { hash; - round = Some (get_endorsement_round protocol_data); - kind = Consensus_ops.Endorsement; + round = Some (get_attestation_round protocol_data); + kind = Consensus_ops.Attestation; }; delegate; power = endorsement_power; diff --git a/teztale/bin_teztale_archiver/PtNairob_machine.real.ml b/teztale/bin_teztale_archiver/PtNairob_machine.real.ml index 019e70956abe34fa6343d1388f629c2eb10a5b41..8d907831d2786a35495bcb46f532c1a426854c7f 100644 --- a/teztale/bin_teztale_archiver/PtNairob_machine.real.ml +++ b/teztale/bin_teztale_archiver/PtNairob_machine.real.ml @@ -56,7 +56,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct module BlockIdMap = Map.Make (Protocol.Block_payload_hash) - let extract_endorsement + let extract_attestation (operation_content : Protocol.Alpha_context.packed_operation) = match operation_content with | { @@ -72,7 +72,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Some ( ( block_payload_hash, Protocol.Alpha_context.Raw_level.to_int32 level, - Consensus_ops.Endorsement, + Consensus_ops.Attestation, Some (Protocol.Alpha_context.Round.to_int32 round) ), slot_to_int slot ) | { @@ -88,7 +88,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Some ( ( block_payload_hash, Protocol.Alpha_context.Raw_level.to_int32 level, - Consensus_ops.Preendorsement, + Consensus_ops.Preattestation, Some (Protocol.Alpha_context.Round.to_int32 round) ), slot_to_int slot ) | _ -> None @@ -110,7 +110,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct return ( Lwt_stream.filter_map (fun ((hash, op), errors) -> - Option.map (fun x -> ((hash, x), errors)) (extract_endorsement op)) + Option.map (fun x -> ((hash, x), errors)) (extract_attestation op)) op_stream, stopper ) @@ -188,7 +188,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct let block_round (header : Block_header.t) = raw_block_round header.Block_header.shell - let get_endorsement_round protocol_data = + let get_attestation_round protocol_data = match protocol_data with | Protocol.Alpha_context.Operation_data {contents; _} -> ( match contents with @@ -196,7 +196,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Protocol.Alpha_context.Round.to_int32 round | _ -> assert false) - let get_preendorsement_round protocol_data = + let get_preattestation_round protocol_data = match protocol_data with | Protocol.Alpha_context.Operation_data {contents; _} -> ( match contents with @@ -228,8 +228,8 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct op = { hash; - round = Some (get_preendorsement_round protocol_data); - kind = Consensus_ops.Preendorsement; + round = Some (get_preattestation_round protocol_data); + kind = Consensus_ops.Preattestation; }; delegate; power = preendorsement_power; @@ -248,8 +248,8 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct op = { hash; - round = Some (get_endorsement_round protocol_data); - kind = Consensus_ops.Endorsement; + round = Some (get_attestation_round protocol_data); + kind = Consensus_ops.Attestation; }; delegate; power = endorsement_power; diff --git a/teztale/bin_teztale_archiver/PtParisB_machine.real.ml b/teztale/bin_teztale_archiver/PtParisB_machine.real.ml index f2ddc67086726123aea7ac8173270eaaf3bc2358..cd87402201c312777c1df5af106d8801277990ae 100644 --- a/teztale/bin_teztale_archiver/PtParisB_machine.real.ml +++ b/teztale/bin_teztale_archiver/PtParisB_machine.real.ml @@ -77,7 +77,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Some ( ( block_payload_hash, Protocol.Alpha_context.Raw_level.to_int32 level, - Consensus_ops.Endorsement, + Consensus_ops.Attestation, Some (Protocol.Alpha_context.Round.to_int32 round) ), slot_to_int slot ) | { @@ -93,7 +93,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Some ( ( block_payload_hash, Protocol.Alpha_context.Raw_level.to_int32 level, - Consensus_ops.Preendorsement, + Consensus_ops.Preattestation, Some (Protocol.Alpha_context.Round.to_int32 round) ), slot_to_int slot ) | _ -> None @@ -234,7 +234,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct { hash; round = Some (get_preattestation_round protocol_data); - kind = Consensus_ops.Preendorsement; + kind = Consensus_ops.Preattestation; }; delegate; power = consensus_power; @@ -254,7 +254,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct { hash; round = Some (get_attestation_round protocol_data); - kind = Consensus_ops.Endorsement; + kind = Consensus_ops.Attestation; }; delegate; power = consensus_power; diff --git a/teztale/bin_teztale_archiver/alpha_machine.real.ml b/teztale/bin_teztale_archiver/alpha_machine.real.ml index 5fee34dd632101695608f058729b9c7313394fbd..e6b6424356e2e253260be7d6be9f779f3efa4703 100644 --- a/teztale/bin_teztale_archiver/alpha_machine.real.ml +++ b/teztale/bin_teztale_archiver/alpha_machine.real.ml @@ -56,7 +56,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct module BlockIdMap = Map.Make (Protocol.Block_payload_hash) - let extract_endorsement + let extract_attestation (operation_content : Protocol.Alpha_context.packed_operation) = match operation_content with | { @@ -77,7 +77,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Some ( ( block_payload_hash, Protocol.Alpha_context.Raw_level.to_int32 level, - Consensus_ops.Endorsement, + Consensus_ops.Attestation, Some (Protocol.Alpha_context.Round.to_int32 round) ), slot_to_int slot ) | { @@ -93,7 +93,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Some ( ( block_payload_hash, Protocol.Alpha_context.Raw_level.to_int32 level, - Consensus_ops.Preendorsement, + Consensus_ops.Preattestation, Some (Protocol.Alpha_context.Round.to_int32 round) ), slot_to_int slot ) | _ -> None @@ -115,7 +115,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct return ( Lwt_stream.filter_map (fun ((hash, op), errors) -> - Option.map (fun x -> ((hash, x), errors)) (extract_endorsement op)) + Option.map (fun x -> ((hash, x), errors)) (extract_attestation op)) op_stream, stopper ) @@ -193,7 +193,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct let block_round (header : Block_header.t) = raw_block_round header.Block_header.shell - let get_endorsement_round protocol_data = + let get_attestation_round protocol_data = match protocol_data with | Protocol.Alpha_context.Operation_data {contents; _} -> ( match contents with @@ -201,7 +201,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Protocol.Alpha_context.Round.to_int32 round | _ -> assert false) - let get_preendorsement_round protocol_data = + let get_preattestation_round protocol_data = match protocol_data with | Protocol.Alpha_context.Operation_data {contents; _} -> ( match contents with @@ -233,8 +233,8 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct op = { hash; - round = Some (get_preendorsement_round protocol_data); - kind = Consensus_ops.Preendorsement; + round = Some (get_preattestation_round protocol_data); + kind = Consensus_ops.Preattestation; }; delegate; power = consensus_power; @@ -253,8 +253,8 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct op = { hash; - round = Some (get_endorsement_round protocol_data); - kind = Consensus_ops.Endorsement; + round = Some (get_attestation_round protocol_data); + kind = Consensus_ops.Attestation; }; delegate; power = consensus_power; diff --git a/teztale/bin_teztale_archiver/converter.ml b/teztale/bin_teztale_archiver/converter.ml index 69332db76167e948a1524ddedaac2f8f8d7dee8c..68ffe9f8ae03545d18012b90921afa01fc3eebed 100644 --- a/teztale/bin_teztale_archiver/converter.ml +++ b/teztale/bin_teztale_archiver/converter.ml @@ -12,7 +12,7 @@ let fake_hash level round delegate kind = level; Int32.to_string (Option.value round ~default:0l); Tezos_crypto.Signature.Public_key_hash.to_string delegate; - (if kind = Consensus_ops.Endorsement then "" else "P"); + (if kind = Consensus_ops.Attestation then "" else "P"); ] let to_received_ops ctx endpoint auth level data = diff --git a/teztale/bin_teztale_archiver/general_archiver.ml b/teztale/bin_teztale_archiver/general_archiver.ml index cefa8da64f5d73ec1924612efeb0b85e27bdbebf..bd2cdd569fa28371aa860a647ebb73b41443ddc6 100644 --- a/teztale/bin_teztale_archiver/general_archiver.ml +++ b/teztale/bin_teztale_archiver/general_archiver.ml @@ -18,12 +18,12 @@ let print_failures logger f = let*! o = f in match o with Ok () -> Lwt.return_unit | Error e -> print_error logger e -let split_endorsements_preendorsements operations = +let split_attestations_preattestations operations = List.fold_left (fun (en, pre) (Consensus_ops.{op = {kind; _}; _} as x) -> match kind with - | Consensus_ops.Preendorsement -> (en, x :: pre) - | Consensus_ops.Endorsement -> (x :: en, pre)) + | Consensus_ops.Preattestation -> (en, x :: pre) + | Consensus_ops.Attestation -> (x :: en, pre)) ([], []) operations @@ -45,7 +45,7 @@ let rights_machine = Protocol_hash.Table.create 10 let past_block_machine = Protocol_hash.Table.create 10 -let endorsement_machine = Protocol_hash.Table.create 10 +let attestation_machine = Protocol_hash.Table.create 10 let validated_block_machine = Protocol_hash.Table.create 10 @@ -57,10 +57,10 @@ let maybe_add_rights (module A : Archiver.S) level rights = let () = Ring.add registered_rights_levels level in A.add_rights ~level rights -let dump_my_current_endorsements (module A : Archiver.S) ~unaccurate ~level - rights endorsements = +let dump_my_current_attestations (module A : Archiver.S) ~unaccurate ~level + rights attestations = let () = maybe_add_rights (module A) level rights in - let () = A.add_mempool ~unaccurate ~level endorsements in + let () = A.add_mempool ~unaccurate ~level attestations in return_unit module Define (Services : Protocol_machinery.PROTOCOL_SERVICES) = struct @@ -95,7 +95,7 @@ module Define (Services : Protocol_machinery.PROTOCOL_SERVICES) = struct return ( block_info_data info reception_times, cycle_info, - split_endorsements_preendorsements operations, + split_attestations_preattestations operations, [] ) let past_block ctxt level = @@ -171,7 +171,7 @@ module Define (Services : Protocol_machinery.PROTOCOL_SERVICES) = struct in (items, missing) - let endorsements_recorder (module A : Archiver.S) cctx current_level = + let attestations_recorder (module A : Archiver.S) cctx current_level = let cctx' = Services.wrap_full cctx in let* op_stream, _stopper = Services.consensus_operation_stream cctx' in let*! out = @@ -191,30 +191,30 @@ module Define (Services : Protocol_machinery.PROTOCOL_SERVICES) = struct Services.BlockIdMap.empty in Services.BlockIdMap.iter_ep - (fun _ (level, endorsements) -> + (fun _ (level, attestations) -> let* rights = Services.endorsing_rights cctx' ~reference_level:current_level level in - let items, missing = couple_ops_to_rights endorsements rights in + let items, missing = couple_ops_to_rights attestations rights in let full = Compare.Int32.(current_level = level) in - let endorsements = + let attestations = if full then List.fold_left (fun acc right -> (right, []) :: acc) items missing else items in - dump_my_current_endorsements + dump_my_current_attestations (module A) ~unaccurate:(not full) ~level rights - endorsements) + attestations) out let () = Protocol_hash.Table.add - endorsement_machine + attestation_machine Services.hash - endorsements_recorder + attestations_recorder end module Loops (Archiver : Archiver.S) = struct @@ -274,7 +274,7 @@ module Loops (Archiver : Archiver.S) = struct else return_unit (* hack to ignore transition block because they need their own instantiation of Block_services *)) - let endorsements_loop cctx = + let attestations_loop cctx = let logger = Log.logger () in let*! head_stream = Shell_services.Monitor.heads cctx cctx#chain in match head_stream with @@ -283,7 +283,7 @@ module Loops (Archiver : Archiver.S) = struct let*! _ = Lwt_stream.fold_s (fun (hash, header) acc -> - let*! endorsements_recorder, acc' = + let*! attestations_recorder, acc' = match acc with | Some (f, proto_level) when proto_level @@ -302,14 +302,14 @@ module Loops (Archiver : Archiver.S) = struct | Ok Shell_services.Blocks.{next_protocol; _} -> ( let recorder = Protocol_hash.Table.find - endorsement_machine + attestation_machine next_protocol in match recorder with | None -> let*! () = Lwt_fmt.eprintf - "no endorsement recorder found for protocol \ + "no attestation recorder found for protocol \ %a@." Protocol_hash.pp next_protocol @@ -325,7 +325,7 @@ module Loops (Archiver : Archiver.S) = struct in let block_level = header.Block_header.shell.Block_header.level in let*! () = - print_failures logger (endorsements_recorder cctx block_level) + print_failures logger (attestations_recorder cctx block_level) in Lwt.return acc') head_stream @@ -385,7 +385,7 @@ module Loops (Archiver : Archiver.S) = struct = let* (( _block_info, _cycle_info, - (endorsements, preendorsements), + (attestations, preattestations), _baking_rights ) as block_data) = get_applied_block cctx @@ -394,7 +394,7 @@ module Loops (Archiver : Archiver.S) = struct reception_time in let* () = - if List.is_empty endorsements then return_unit + if List.is_empty attestations then return_unit else let* rights = rights_of cctx (Int32.pred level) @@ -408,7 +408,7 @@ module Loops (Archiver : Archiver.S) = struct return_unit in let* () = - if List.is_empty preendorsements then + if List.is_empty preattestations then return_unit else let* rights = rights_of cctx level in diff --git a/teztale/bin_teztale_archiver/json_archiver.ml b/teztale/bin_teztale_archiver/json_archiver.ml index 4caeefcfd8b958a2c8f713429e0bbb9274ef94a8..6b2f2ce1571fc8bcf598cebbc46c2903c6700a1e 100644 --- a/teztale/bin_teztale_archiver/json_archiver.ml +++ b/teztale/bin_teztale_archiver/json_archiver.ml @@ -64,7 +64,7 @@ let drop_file_mutex filename = !files_in_use (* [add_to_operations block_hash ops_kind ops_round ops] adds the - preendorsements or endorsements in [ops] that were included in block + preattestations or attestations in [ops] that were included in block [block_hash] to the list of operations already known for operation's producer. *) let add_to_operations block_hash ops_hash ops_kind ?ops_round operations = @@ -102,8 +102,8 @@ let add_to_operations block_hash ops_hash ops_kind ?ops_round operations = } :: operations -(* [validators] are those delegates whose operations (either preendorsements or - endorsements) have been included in the given block.*) +(* [validators] are those delegates whose operations (either preattestations or + attestations) have been included in the given block.*) let add_inclusion_in_block block_hash validators delegate_operations = let updated_known, unknown = List.fold_left @@ -209,8 +209,8 @@ let dump_included_in_block logger path block_level block_hash block_predecessor block_round timestamp reception_times baker cycle_info consensus_ops baking_rights = let delegate_operations_t = - let endorsements_level = Int32.pred block_level in - let filename = filename_of_level path endorsements_level in + let attestations_level = Int32.pred block_level in + let filename = filename_of_level path attestations_level in Log.info logger (fun () -> Format.asprintf "Dumping delegate operations in block %a at level %li." diff --git a/teztale/bin_teztale_archiver/teztale_archiver_main.ml b/teztale/bin_teztale_archiver/teztale_archiver_main.ml index c5431d75ad0cd9ca73e0a627a34a8fb1c81bc8cf..21dc19ddccd5a5a4116fb6b3784cf428fbb08bea 100644 --- a/teztale/bin_teztale_archiver/teztale_archiver_main.ml +++ b/teztale/bin_teztale_archiver/teztale_archiver_main.ml @@ -44,7 +44,7 @@ let main_json cctxt prefix = Lwt.join [ General_archiver.Json_loops.blocks_loop cctxt; - General_archiver.Json_loops.endorsements_loop cctxt; + General_archiver.Json_loops.attestations_loop cctxt; ] in let () = Json_archiver.stop () in @@ -64,7 +64,7 @@ let main_server state cctxt = Lwt.join [ General_archiver.Server_loops.blocks_loop cctxt; - General_archiver.Server_loops.endorsements_loop cctxt; + General_archiver.Server_loops.attestations_loop cctxt; ] in let () = Server_archiver.stop () in diff --git a/teztale/bin_teztale_server/exporter.ml b/teztale/bin_teztale_server/exporter.ml index cde35a3d532b61a7b8078ca2b957b04e704ad7b6..76d7266f1fdc6adc9c3b37d90c61ff222d07a08a 100644 --- a/teztale/bin_teztale_server/exporter.ml +++ b/teztale/bin_teztale_server/exporter.ml @@ -203,8 +203,8 @@ type op_info = { } let kind_of_bool = function - | false -> Lib_teztale_base.Consensus_ops.Preendorsement - | true -> Lib_teztale_base.Consensus_ops.Endorsement + | false -> Lib_teztale_base.Consensus_ops.Preattestation + | true -> Lib_teztale_base.Consensus_ops.Attestation let select_ops conf db_pool boundaries = (* We make 3 queries: @@ -262,12 +262,12 @@ let select_ops conf db_pool boundaries = in Int32Map.add level ops info in - let cb_included ((level, delegate, endorsement, round), (op_hash, block_hash)) + let cb_included ((level, delegate, attestation, round), (op_hash, block_hash)) info = let ops = match Int32Map.find_opt level info with Some m -> m | None -> Ops.empty in - let kind = kind_of_bool endorsement in + let kind = kind_of_bool attestation in let ops = Ops.update delegate @@ -293,11 +293,11 @@ let select_ops conf db_pool boundaries = let cb_received ( (level, delegate, reception_time, op_hash), - (errors, source, endorsement, round) ) info = + (errors, source, attestation, round) ) info = let ops = match Int32Map.find_opt level info with Some m -> m | None -> Ops.empty in - let kind = kind_of_bool endorsement in + let kind = kind_of_bool attestation in let received_info = Lib_teztale_base.Data.Delegate_operations.{source; reception_time; errors} in diff --git a/teztale/bin_teztale_server/teztale_server_main.ml b/teztale/bin_teztale_server/teztale_server_main.ml index d099a5db90ec415805ea568311eb0e26d12ba318..b8bd54326e77f6409b537ce2ea3f03d9c8fcbe00 100644 --- a/teztale/bin_teztale_server/teztale_server_main.ml +++ b/teztale/bin_teztale_server/teztale_server_main.ml @@ -495,7 +495,7 @@ let may_insert_operations = let format_block_op level delegate (op : Lib_teztale_base.Consensus_ops.operation) = - ((level, op.hash, op.kind = Endorsement, op.round), delegate) + ((level, op.hash, op.kind = Attestation, op.round), delegate) let endorsing_rights_callback = let module Cache = @@ -581,7 +581,7 @@ let insert_operations_from_block (module Db : Caqti_lwt.CONNECTION) conf level List.map (fun op -> ( Lib_teztale_base.Consensus_ops. - (op.delegate, op.op.kind = Endorsement, op.op.round), + (op.delegate, op.op.kind = Attestation, op.op.round), (block_hash, level) )) operations in @@ -608,7 +608,7 @@ let block_callback = ( Lib_teztale_base.Data.Block. {delegate; timestamp; reception_times; round; hash; predecessor; _}, cycle_info, - (endorsements, preendorsements), + (attestations, preattestations), baking_rights ) -> let open Tezos_lwt_result_stdlib.Lwtreslib.Bare.Monad.Lwt_result_syntax in let level = Int32.of_string (Re.Group.get g 1) in @@ -672,7 +672,7 @@ let block_callback = we add it again in order to mark it as recent. *) Lwt_result.map (fun () -> - if endorsements <> [] then + if attestations <> [] then Block_lru_cache.add block_operations_cache hash) (if Block_lru_cache.mem block_operations_cache hash then return_unit @@ -683,7 +683,7 @@ let block_callback = conf (Int32.pred level) hash - endorsements + attestations in let* () = insert_operations_from_block @@ -691,7 +691,7 @@ let block_callback = conf level hash - preendorsements + preattestations in Lib_teztale_base.Log.debug logger (fun () -> Format.asprintf @@ -808,7 +808,7 @@ let operations_callback ~logger conf db_pool g source operations = ( ( op.reception_time, op.errors, right.Lib_teztale_base.Consensus_ops.address, - op.op.kind = Endorsement ), + op.op.kind = Attestation ), (op.op.round, source, level) )) ops) operations @@ -909,7 +909,7 @@ let import_callback ~logger conf db_pool g data = Sql_requests.maybe_insert_operation ( ( level, hash, - kind = Lib_teztale_base.Consensus_ops.Endorsement, + kind = Lib_teztale_base.Consensus_ops.Attestation, round ), delegate )) operations) @@ -947,7 +947,7 @@ let import_callback ~logger conf db_pool g data = ( ( reception_time, errors, delegate, - kind = Lib_teztale_base.Consensus_ops.Endorsement ), + kind = Lib_teztale_base.Consensus_ops.Attestation ), (round, source, level) )) mempool_inclusion) operations) @@ -966,7 +966,7 @@ let import_callback ~logger conf db_pool g data = Db.exec Sql_requests.insert_included_operation ( ( delegate, - kind = Lib_teztale_base.Consensus_ops.Endorsement, + kind = Lib_teztale_base.Consensus_ops.Attestation, round ), (block_hash, level) )) block_inclusion) diff --git a/teztale/lib_teztale_base/consensus_ops.ml b/teztale/lib_teztale_base/consensus_ops.ml index 77ba3eb832f5dbd92072e729cca3d16053331942..5f259e4e394ea091d022ecb39d989ab781a9b0ba 100644 --- a/teztale/lib_teztale_base/consensus_ops.ml +++ b/teztale/lib_teztale_base/consensus_ops.ml @@ -25,16 +25,11 @@ type rights = right list let rights_encoding = Data_encoding.list right_encoding -type operation_kind = Endorsement | Preendorsement +type operation_kind = Attestation | Preattestation let operation_kind_encoding = let open Data_encoding in - string_enum [("Endorsement", Endorsement); ("Preendorsement", Preendorsement)] - -let pp_operation_kind ppf kind = - match kind with - | Endorsement -> Format.fprintf ppf "Endorsement" - | Preendorsement -> Format.fprintf ppf "Preendorsement" + string_enum [("Endorsement", Attestation); ("Preendorsement", Preattestation)] type operation = { hash : Operation_hash.t; diff --git a/teztale/lib_teztale_base/consensus_ops.mli b/teztale/lib_teztale_base/consensus_ops.mli index e4435edc95ed949bfd16a48f6b7827cdb34a2d1f..51eefdf0d1f1c45c9404226de3e54ec8f3603e3f 100644 --- a/teztale/lib_teztale_base/consensus_ops.mli +++ b/teztale/lib_teztale_base/consensus_ops.mli @@ -15,12 +15,10 @@ type rights = right list val rights_encoding : rights Data_encoding.t -type operation_kind = Endorsement | Preendorsement +type operation_kind = Attestation | Preattestation val operation_kind_encoding : operation_kind Data_encoding.encoding -val pp_operation_kind : Format.formatter -> operation_kind -> unit - type operation = { hash : Operation_hash.t; kind : operation_kind; diff --git a/teztale/lib_teztale_base/data.ml b/teztale/lib_teztale_base/data.ml index 15644ec46c0181c1a21b0eeac229ffcda50e58d5..fada2bdd13547f564a25db13ece1d354aa6faa79 100644 --- a/teztale/lib_teztale_base/data.ml +++ b/teztale/lib_teztale_base/data.ml @@ -52,7 +52,7 @@ module Delegate_operations = struct (dft "kind" Consensus_ops.operation_kind_encoding - Consensus_ops.Endorsement) + Consensus_ops.Attestation) (opt "round" int32) (req "reception_time" (option Time.System.encoding)) (dft "errors" Tezos_rpc.Error.opt_encoding None) @@ -70,7 +70,7 @@ module Delegate_operations = struct (dft "kind" Consensus_ops.operation_kind_encoding - Consensus_ops.Endorsement) + Consensus_ops.Attestation) (opt "round" int32) (dft "received_in_mempools" (list reception_encoding) []) (dft "included_in_blocks" (list Block_hash.encoding) [])) @@ -126,7 +126,7 @@ module Delegate_operations = struct [ { hash = Operation_hash.zero; - kind = Endorsement; + kind = Attestation; mempool_inclusion; round = None; block_inclusion;