diff --git a/teztale/bin_teztale_archiver/Proxford_machine.real.ml b/teztale/bin_teztale_archiver/Proxford_machine.real.ml index 9d904582e604627bfeb5623fc395bff57d710542..9b2f62a499e575cbbb976a3d1db404ed13260e3d 100644 --- a/teztale/bin_teztale_archiver/Proxford_machine.real.ml +++ b/teztale/bin_teztale_archiver/Proxford_machine.real.ml @@ -26,7 +26,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Data_encoding.uint16 (Data_encoding.Binary.to_bytes_exn Protocol.Alpha_context.Slot.encoding x) - let endorsing_rights cctxt ~reference_level level = + let attesting_rights cctxt ~reference_level level = let*? level = Environment.wrap_tzresult @@ Protocol.Alpha_context.Raw_level.of_int32 level diff --git a/teztale/bin_teztale_archiver/PsBabyM1_machine.real.ml b/teztale/bin_teztale_archiver/PsBabyM1_machine.real.ml index a1f55be3e55e4d7897c4c71d5fff35ac3933ca02..9f814b43c0ca49fe962f4eecc80fa51e00effe73 100644 --- a/teztale/bin_teztale_archiver/PsBabyM1_machine.real.ml +++ b/teztale/bin_teztale_archiver/PsBabyM1_machine.real.ml @@ -26,7 +26,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct let wrap_full cctxt = new Tezos_client_005_PsBabyM1.Protocol_client_context.wrap_full cctxt - let endorsing_rights cctxt ~reference_level level = + let attesting_rights cctxt ~reference_level level = let*? level = Environment.wrap_error @@ Protocol.Alpha_context.Raw_level.of_int32 level in diff --git a/teztale/bin_teztale_archiver/PsCARTHA_machine.real.ml b/teztale/bin_teztale_archiver/PsCARTHA_machine.real.ml index d0c91041013635f01eab604bc8bcdcb4389c451a..a6a45fd4e6df747a98ff3b50fe36ccd161f4c0f6 100644 --- a/teztale/bin_teztale_archiver/PsCARTHA_machine.real.ml +++ b/teztale/bin_teztale_archiver/PsCARTHA_machine.real.ml @@ -26,7 +26,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct let wrap_full cctxt = new Tezos_client_006_PsCARTHA.Protocol_client_context.wrap_full cctxt - let endorsing_rights cctxt ~reference_level block = + let attesting_rights cctxt ~reference_level block = let*? level = Environment.wrap_error @@ Protocol.Alpha_context.Raw_level.of_int32 block in diff --git a/teztale/bin_teztale_archiver/PsDELPH1_machine.real.ml b/teztale/bin_teztale_archiver/PsDELPH1_machine.real.ml index 17d001ef44057f688579852fcf37442c109f528e..1d68c2ee667dd7e37127b78d9a495a1fb07ef8c7 100644 --- a/teztale/bin_teztale_archiver/PsDELPH1_machine.real.ml +++ b/teztale/bin_teztale_archiver/PsDELPH1_machine.real.ml @@ -26,7 +26,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct let wrap_full cctxt = new Tezos_client_007_PsDELPH1.Protocol_client_context.wrap_full cctxt - let endorsing_rights cctxt ~reference_level level = + let attesting_rights cctxt ~reference_level level = let*? level = Environment.wrap_error @@ Protocol.Alpha_context.Raw_level.of_int32 level in diff --git a/teztale/bin_teztale_archiver/PsFLoren_machine.real.ml b/teztale/bin_teztale_archiver/PsFLoren_machine.real.ml index 7eca77b2757aef2d08de5a0b406f3ae03538e1f7..e9083c8845aa38676d5b8431e2b1e5ef649894bc 100644 --- a/teztale/bin_teztale_archiver/PsFLoren_machine.real.ml +++ b/teztale/bin_teztale_archiver/PsFLoren_machine.real.ml @@ -26,7 +26,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct let wrap_full cctxt = new Tezos_client_009_PsFLoren.Protocol_client_context.wrap_full cctxt - let endorsing_rights cctxt ~reference_level level = + let attesting_rights cctxt ~reference_level level = let*? level = Environment.wrap_tzresult @@ Protocol.Alpha_context.Raw_level.of_int32 level diff --git a/teztale/bin_teztale_archiver/PsParisC_machine.real.ml b/teztale/bin_teztale_archiver/PsParisC_machine.real.ml index 7cc4a1d402260cf87a69c0343e7e24402e339724..c1ffa4662766a7b7710ea69e0677127881b69d3f 100644 --- a/teztale/bin_teztale_archiver/PsParisC_machine.real.ml +++ b/teztale/bin_teztale_archiver/PsParisC_machine.real.ml @@ -26,7 +26,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Data_encoding.uint16 (Data_encoding.Binary.to_bytes_exn Protocol.Alpha_context.Slot.encoding x) - let endorsing_rights cctxt ~reference_level level = + let attesting_rights cctxt ~reference_level level = let*? level = Environment.wrap_tzresult @@ Protocol.Alpha_context.Raw_level.of_int32 level diff --git a/teztale/bin_teztale_archiver/PsYLVpVv_machine.real.ml b/teztale/bin_teztale_archiver/PsYLVpVv_machine.real.ml index 2e7d7fb11d21cbec38e3be289f3ac49cf8341d8c..08fe58d022f20b8184b0ea91410fa175c5e55151 100644 --- a/teztale/bin_teztale_archiver/PsYLVpVv_machine.real.ml +++ b/teztale/bin_teztale_archiver/PsYLVpVv_machine.real.ml @@ -26,7 +26,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct let wrap_full cctxt = new Tezos_client_002_PsYLVpVv.Alpha_client_context.wrap_full cctxt - let endorsing_rights cctxt ~reference_level level = + let attesting_rights cctxt ~reference_level level = let*? level = Environment.wrap_error @@ Protocol.Alpha_context.Raw_level.of_int32 level in diff --git a/teztale/bin_teztale_archiver/PsddFKi3_machine.real.ml b/teztale/bin_teztale_archiver/PsddFKi3_machine.real.ml index 07a9f2370d30a6ea46fc8faad22e85813fc5572c..88c78b1b532e1423a3bca1aed3c81b2edea4fb9c 100644 --- a/teztale/bin_teztale_archiver/PsddFKi3_machine.real.ml +++ b/teztale/bin_teztale_archiver/PsddFKi3_machine.real.ml @@ -26,7 +26,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct let wrap_full cctxt = new Tezos_client_003_PsddFKi3.Alpha_client_context.wrap_full cctxt - let endorsing_rights cctxt ~reference_level level = + let attesting_rights cctxt ~reference_level level = let*? level = Environment.wrap_error @@ Protocol.Alpha_context.Raw_level.of_int32 level in diff --git a/teztale/bin_teztale_archiver/Psithaca_machine.real.ml b/teztale/bin_teztale_archiver/Psithaca_machine.real.ml index 59b85cfddf8ca219da642b315a6c42de603b8aa3..c63bdd6490e617701ce742d11e14575bc481ccd3 100644 --- a/teztale/bin_teztale_archiver/Psithaca_machine.real.ml +++ b/teztale/bin_teztale_archiver/Psithaca_machine.real.ml @@ -33,7 +33,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Data_encoding.uint16 (Data_encoding.Binary.to_bytes_exn Protocol.Alpha_context.Slot.encoding x) - let endorsing_rights cctxt ~reference_level level = + let attesting_rights cctxt ~reference_level level = let*? level = Environment.wrap_tzresult @@ Protocol.Alpha_context.Raw_level.of_int32 level diff --git a/teztale/bin_teztale_archiver/PsquebeC_machine.real.ml b/teztale/bin_teztale_archiver/PsquebeC_machine.real.ml index 9431da2a96fb87563f5f08f3ad8f148098ab7f01..0f340453c81b913a0c7aea18582e0e37e100e39c 100644 --- a/teztale/bin_teztale_archiver/PsquebeC_machine.real.ml +++ b/teztale/bin_teztale_archiver/PsquebeC_machine.real.ml @@ -26,7 +26,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Data_encoding.uint16 (Data_encoding.Binary.to_bytes_exn Protocol.Alpha_context.Slot.encoding x) - let endorsing_rights cctxt ~reference_level level = + let attesting_rights cctxt ~reference_level level = let*? level = Environment.wrap_tzresult @@ Protocol.Alpha_context.Raw_level.of_int32 level diff --git a/teztale/bin_teztale_archiver/Pt24m4xi_machine.real.ml b/teztale/bin_teztale_archiver/Pt24m4xi_machine.real.ml index 71abaebcc3f62045c94ffffe724104278cf4e2b0..48555667e47130d397bc1fdfef621f999d74ca47 100644 --- a/teztale/bin_teztale_archiver/Pt24m4xi_machine.real.ml +++ b/teztale/bin_teztale_archiver/Pt24m4xi_machine.real.ml @@ -26,7 +26,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct let wrap_full cctxt = new Tezos_client_004_Pt24m4xi.Alpha_client_context.wrap_full cctxt - let endorsing_rights cctxt ~reference_level level = + let attesting_rights cctxt ~reference_level level = let*? level = Environment.wrap_error @@ Protocol.Alpha_context.Raw_level.of_int32 level in diff --git a/teztale/bin_teztale_archiver/PtCJ7pwo_machine.real.ml b/teztale/bin_teztale_archiver/PtCJ7pwo_machine.real.ml index fa18c2d493db1bc672c60aa08cf458c1d18d6375..39f88ec6e08d05f5e2b43cb41fae73faf67dd149 100644 --- a/teztale/bin_teztale_archiver/PtCJ7pwo_machine.real.ml +++ b/teztale/bin_teztale_archiver/PtCJ7pwo_machine.real.ml @@ -26,7 +26,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct let wrap_full cctxt = new Tezos_client_001_PtCJ7pwo.Alpha_client_context.wrap_full cctxt - let endorsing_rights cctxt ~reference_level level = + let attesting_rights cctxt ~reference_level level = let*? level = Environment.wrap_error @@ Protocol.Alpha_context.Raw_level.of_int32 level in diff --git a/teztale/bin_teztale_archiver/PtEdo2Zk_machine.real.ml b/teztale/bin_teztale_archiver/PtEdo2Zk_machine.real.ml index 891efdb8b783ce6bba64b9e37c8cf0f5eb740e35..9ac3d670db5c2f0e878d7ef4a9b446654618b2d3 100644 --- a/teztale/bin_teztale_archiver/PtEdo2Zk_machine.real.ml +++ b/teztale/bin_teztale_archiver/PtEdo2Zk_machine.real.ml @@ -26,7 +26,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct let wrap_full cctxt = new Tezos_client_008_PtEdo2Zk.Protocol_client_context.wrap_full cctxt - let endorsing_rights cctxt ~reference_level level = + let attesting_rights cctxt ~reference_level level = let*? level = Environment.wrap_error @@ Protocol.Alpha_context.Raw_level.of_int32 level in diff --git a/teztale/bin_teztale_archiver/PtGRANAD_machine.real.ml b/teztale/bin_teztale_archiver/PtGRANAD_machine.real.ml index 23d251391b95ffeccb7468e8765a768b1d193dbf..ba206067c682a08926e82eda0989606125c920ed 100644 --- a/teztale/bin_teztale_archiver/PtGRANAD_machine.real.ml +++ b/teztale/bin_teztale_archiver/PtGRANAD_machine.real.ml @@ -26,7 +26,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct let wrap_full cctxt = new Tezos_client_010_PtGRANAD.Protocol_client_context.wrap_full cctxt - let endorsing_rights cctxt ~reference_level level = + let attesting_rights cctxt ~reference_level level = let*? level = Environment.wrap_tzresult @@ Protocol.Alpha_context.Raw_level.of_int32 level diff --git a/teztale/bin_teztale_archiver/PtHangz2_machine.real.ml b/teztale/bin_teztale_archiver/PtHangz2_machine.real.ml index a32c5c14f53ab4890f6218138d1bd3dc6da30dea..d6509dd73ad7a23a6b27292d1de2ffdccdbc5dbb 100644 --- a/teztale/bin_teztale_archiver/PtHangz2_machine.real.ml +++ b/teztale/bin_teztale_archiver/PtHangz2_machine.real.ml @@ -27,7 +27,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct let wrap_full cctxt = new Tezos_client_011_PtHangz2.Protocol_client_context.wrap_full cctxt - let endorsing_rights cctxt ~reference_level level = + let attesting_rights cctxt ~reference_level level = let*? level = Environment.wrap_tzresult @@ Protocol.Alpha_context.Raw_level.of_int32 level diff --git a/teztale/bin_teztale_archiver/PtJakart_machine.real.ml b/teztale/bin_teztale_archiver/PtJakart_machine.real.ml index b40f12be777d328a656644fcc1648bfb607e5f14..751cefd63e6ad5a9c9637fa81f420fd98bcb6b2b 100644 --- a/teztale/bin_teztale_archiver/PtJakart_machine.real.ml +++ b/teztale/bin_teztale_archiver/PtJakart_machine.real.ml @@ -33,7 +33,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Data_encoding.uint16 (Data_encoding.Binary.to_bytes_exn Protocol.Alpha_context.Slot.encoding x) - let endorsing_rights cctxt ~reference_level level = + let attesting_rights cctxt ~reference_level level = let*? level = Environment.wrap_tzresult @@ Protocol.Alpha_context.Raw_level.of_int32 level diff --git a/teztale/bin_teztale_archiver/PtKathma_machine.real.ml b/teztale/bin_teztale_archiver/PtKathma_machine.real.ml index b3bf4e7dca6faf1dcd9fa864b450e5ed6e34d415..2da376ff4cc48e58da83c96d603a2dc166f80a24 100644 --- a/teztale/bin_teztale_archiver/PtKathma_machine.real.ml +++ b/teztale/bin_teztale_archiver/PtKathma_machine.real.ml @@ -33,7 +33,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Data_encoding.uint16 (Data_encoding.Binary.to_bytes_exn Protocol.Alpha_context.Slot.encoding x) - let endorsing_rights cctxt ~reference_level level = + let attesting_rights cctxt ~reference_level level = let*? level = Environment.wrap_tzresult @@ Protocol.Alpha_context.Raw_level.of_int32 level diff --git a/teztale/bin_teztale_archiver/PtLimaPt_machine.real.ml b/teztale/bin_teztale_archiver/PtLimaPt_machine.real.ml index 5a5caee9199a389ebdc91286a54dc948547ce7e3..a3186dded940708d7a6d73c08d9ad44a5cc87ca8 100644 --- a/teztale/bin_teztale_archiver/PtLimaPt_machine.real.ml +++ b/teztale/bin_teztale_archiver/PtLimaPt_machine.real.ml @@ -33,7 +33,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Data_encoding.uint16 (Data_encoding.Binary.to_bytes_exn Protocol.Alpha_context.Slot.encoding x) - let endorsing_rights cctxt ~reference_level level = + let attesting_rights cctxt ~reference_level level = let*? level = Environment.wrap_tzresult @@ Protocol.Alpha_context.Raw_level.of_int32 level diff --git a/teztale/bin_teztale_archiver/PtMumbai_machine.real.ml b/teztale/bin_teztale_archiver/PtMumbai_machine.real.ml index 8ff282391653d593771757bdb550576a8149f70d..b490e304d9c3ffc2466b3c5c63ba8e499833d825 100644 --- a/teztale/bin_teztale_archiver/PtMumbai_machine.real.ml +++ b/teztale/bin_teztale_archiver/PtMumbai_machine.real.ml @@ -26,7 +26,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Data_encoding.uint16 (Data_encoding.Binary.to_bytes_exn Protocol.Alpha_context.Slot.encoding x) - let endorsing_rights cctxt ~reference_level level = + let attesting_rights cctxt ~reference_level level = let*? level = Environment.wrap_tzresult @@ Protocol.Alpha_context.Raw_level.of_int32 level diff --git a/teztale/bin_teztale_archiver/PtNairob_machine.real.ml b/teztale/bin_teztale_archiver/PtNairob_machine.real.ml index 8d907831d2786a35495bcb46f532c1a426854c7f..e3acaf988e7570b86d3f63cc017134d0ff6a3142 100644 --- a/teztale/bin_teztale_archiver/PtNairob_machine.real.ml +++ b/teztale/bin_teztale_archiver/PtNairob_machine.real.ml @@ -26,7 +26,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Data_encoding.uint16 (Data_encoding.Binary.to_bytes_exn Protocol.Alpha_context.Slot.encoding x) - let endorsing_rights cctxt ~reference_level level = + let attesting_rights cctxt ~reference_level level = let*? level = Environment.wrap_tzresult @@ Protocol.Alpha_context.Raw_level.of_int32 level diff --git a/teztale/bin_teztale_archiver/PtParisB_machine.real.ml b/teztale/bin_teztale_archiver/PtParisB_machine.real.ml index cd87402201c312777c1df5af106d8801277990ae..72ddb8254d955d54e48efb7ca2d73f05c4789b5b 100644 --- a/teztale/bin_teztale_archiver/PtParisB_machine.real.ml +++ b/teztale/bin_teztale_archiver/PtParisB_machine.real.ml @@ -26,7 +26,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Data_encoding.uint16 (Data_encoding.Binary.to_bytes_exn Protocol.Alpha_context.Slot.encoding x) - let endorsing_rights cctxt ~reference_level level = + let attesting_rights cctxt ~reference_level level = let*? level = Environment.wrap_tzresult @@ Protocol.Alpha_context.Raw_level.of_int32 level diff --git a/teztale/bin_teztale_archiver/alpha_machine.real.ml b/teztale/bin_teztale_archiver/alpha_machine.real.ml index e6b6424356e2e253260be7d6be9f779f3efa4703..4c8fc182219168ee45fa9663961fc9e2ed9d8e55 100644 --- a/teztale/bin_teztale_archiver/alpha_machine.real.ml +++ b/teztale/bin_teztale_archiver/alpha_machine.real.ml @@ -26,7 +26,7 @@ module Services : Protocol_machinery.PROTOCOL_SERVICES = struct Data_encoding.uint16 (Data_encoding.Binary.to_bytes_exn Protocol.Alpha_context.Slot.encoding x) - let endorsing_rights cctxt ~reference_level level = + let attesting_rights cctxt ~reference_level level = let*? level = Environment.wrap_tzresult @@ Protocol.Alpha_context.Raw_level.of_int32 level diff --git a/teztale/bin_teztale_archiver/converter.ml b/teztale/bin_teztale_archiver/converter.ml index 68ffe9f8ae03545d18012b90921afa01fc3eebed..a94ea6d4cb04bbc79cf7f454f035e4d6b6cfbe1b 100644 --- a/teztale/bin_teztale_archiver/converter.ml +++ b/teztale/bin_teztale_archiver/converter.ml @@ -20,8 +20,8 @@ let to_received_ops ctx endpoint auth level data = let received_ops = List.map (fun Data.Delegate_operations. - {delegate; first_slot; endorsing_power; operations} -> - ( Consensus_ops.{address = delegate; first_slot; power = endorsing_power}, + {delegate; first_slot; attesting_power; operations} -> + ( Consensus_ops.{address = delegate; first_slot; power = attesting_power}, List.flatten (List.map (fun Data.Delegate_operations. @@ -83,7 +83,7 @@ let included_ops_map level data = List.fold_left (fun acc Data.Delegate_operations. - {delegate; first_slot = _; endorsing_power; operations} -> + {delegate; first_slot = _; attesting_power; operations} -> List.fold_left (fun acc Data.Delegate_operations. @@ -101,7 +101,7 @@ let included_ops_map level data = { op = {kind; round; hash = maybe_faked_hash}; delegate; - power = endorsing_power; + power = attesting_power; } acc) acc diff --git a/teztale/bin_teztale_archiver/general_archiver.ml b/teztale/bin_teztale_archiver/general_archiver.ml index bd2cdd569fa28371aa860a647ebb73b41443ddc6..63e3c7dba6d77adb532ff0146a95e6dec3fbfec3 100644 --- a/teztale/bin_teztale_archiver/general_archiver.ml +++ b/teztale/bin_teztale_archiver/general_archiver.ml @@ -72,7 +72,7 @@ module Define (Services : Protocol_machinery.PROTOCOL_SERVICES) = struct let rights_of ctxt level = let cctx = Services.wrap_full ctxt in - Services.endorsing_rights cctx ~reference_level:level level + Services.attesting_rights cctx ~reference_level:level level let () = Protocol_hash.Table.add rights_machine Services.hash rights_of @@ -193,7 +193,7 @@ module Define (Services : Protocol_machinery.PROTOCOL_SERVICES) = struct Services.BlockIdMap.iter_ep (fun _ (level, attestations) -> let* rights = - Services.endorsing_rights cctx' ~reference_level:current_level level + Services.attesting_rights cctx' ~reference_level:current_level level in let items, missing = couple_ops_to_rights attestations rights in let full = Compare.Int32.(current_level = level) in diff --git a/teztale/bin_teztale_archiver/json_archiver.ml b/teztale/bin_teztale_archiver/json_archiver.ml index 6b2f2ce1571fc8bcf598cebbc46c2903c6700a1e..c6c2c3a0dc467ff8427b5945b80b62e60a01150e 100644 --- a/teztale/bin_teztale_archiver/json_archiver.ml +++ b/teztale/bin_teztale_archiver/json_archiver.ml @@ -109,7 +109,7 @@ let add_inclusion_in_block block_hash validators delegate_operations = List.fold_left (fun (acc, missing) Data.Delegate_operations.( - {delegate; first_slot; endorsing_power; operations} as delegate_ops) -> + {delegate; first_slot; attesting_power; operations} as delegate_ops) -> match List.partition (fun op -> @@ -124,7 +124,7 @@ let add_inclusion_in_block block_hash validators delegate_operations = { delegate; first_slot; - endorsing_power; + attesting_power; operations = add_to_operations block_hash @@ -149,7 +149,7 @@ let add_inclusion_in_block block_hash validators delegate_operations = { delegate; first_slot = 0; - endorsing_power = op.Consensus_ops.power; + attesting_power = op.Consensus_ops.power; operations = [ { @@ -352,7 +352,7 @@ let dump_received logger path ?unaccurate level received_ops = List.fold_left (fun (acc, missing) Data.Delegate_operations.( - {delegate; first_slot; endorsing_power; operations} as + {delegate; first_slot; attesting_power; operations} as delegate_ops) -> match List.partition @@ -368,7 +368,7 @@ let dump_received logger path ?unaccurate level received_ops = { delegate; first_slot; - endorsing_power; + attesting_power; operations = merge_operations operations new_operations; } :: acc, @@ -388,7 +388,7 @@ let dump_received logger path ?unaccurate level received_ops = { delegate = right.Consensus_ops.address; first_slot = right.Consensus_ops.first_slot; - endorsing_power = right.Consensus_ops.power; + attesting_power = right.Consensus_ops.power; operations = List.rev_map (fun Consensus_ops. diff --git a/teztale/bin_teztale_archiver/protocol_machinery.ml b/teztale/bin_teztale_archiver/protocol_machinery.ml index 18922680a3c7eec0d5b25c1cddada94c7dfbb7a2..fd98bcb031fadecb4f42613bf02340c641d75bd5 100644 --- a/teztale/bin_teztale_archiver/protocol_machinery.ml +++ b/teztale/bin_teztale_archiver/protocol_machinery.ml @@ -12,7 +12,7 @@ module type PROTOCOL_SERVICES = sig val wrap_full : Tezos_client_base.Client_context.full -> wrap_full - val endorsing_rights : + val attesting_rights : wrap_full -> reference_level:Int32.t -> Int32.t -> diff --git a/teztale/bin_teztale_archiver/protocol_machinery.mli b/teztale/bin_teztale_archiver/protocol_machinery.mli index 18922680a3c7eec0d5b25c1cddada94c7dfbb7a2..fd98bcb031fadecb4f42613bf02340c641d75bd5 100644 --- a/teztale/bin_teztale_archiver/protocol_machinery.mli +++ b/teztale/bin_teztale_archiver/protocol_machinery.mli @@ -12,7 +12,7 @@ module type PROTOCOL_SERVICES = sig val wrap_full : Tezos_client_base.Client_context.full -> wrap_full - val endorsing_rights : + val attesting_rights : wrap_full -> reference_level:Int32.t -> Int32.t -> diff --git a/teztale/bin_teztale_server/exporter.ml b/teztale/bin_teztale_server/exporter.ml index 76d7266f1fdc6adc9c3b37d90c61ff222d07a08a..8c2f98905c1c3f799a041f81436fafbd4da7fc17 100644 --- a/teztale/bin_teztale_server/exporter.ml +++ b/teztale/bin_teztale_server/exporter.ml @@ -368,7 +368,7 @@ let translate_ops info = { delegate = pkh; first_slot; - endorsing_power = power; + attesting_power = power; operations = translate pkh_ops; } :: acc) diff --git a/teztale/bin_teztale_server/sql_requests.ml b/teztale/bin_teztale_server/sql_requests.ml index 766f60de90b31fccf5925406016e7c857254376d..b800728331e40dd7a452e2e842ac97302bb6b1ad 100644 --- a/teztale/bin_teztale_server/sql_requests.ml +++ b/teztale/bin_teztale_server/sql_requests.ml @@ -132,7 +132,7 @@ module Mutex = struct let operations_inclusion = Lwt_mutex.create () - let endorsing_rights = Lwt_mutex.create () + let attesting_rights = Lwt_mutex.create () let cycles = Lwt_mutex.create () @@ -291,7 +291,7 @@ let maybe_insert_delegate = Caqti_request.Infix.(Caqti_type.(Type.public_key_hash ->. unit)) "INSERT INTO delegates (address) VALUES (?) ON CONFLICT DO NOTHING" -let maybe_insert_endorsing_right = +let maybe_insert_attesting_right = Caqti_request.Infix.( Caqti_type.(t4 int32 int int Type.public_key_hash ->. unit)) "INSERT INTO endorsing_rights (level, delegate, first_slot, \ diff --git a/teztale/bin_teztale_server/sql_requests.mli b/teztale/bin_teztale_server/sql_requests.mli index 8c52bee6bbbabde602c77f32ee40be7f0abbca63..e9293af51ee30575c2b0ef812a487c03701fa929 100644 --- a/teztale/bin_teztale_server/sql_requests.mli +++ b/teztale/bin_teztale_server/sql_requests.mli @@ -36,7 +36,7 @@ module Mutex : sig val operations_inclusion : Lwt_mutex.t - val endorsing_rights : Lwt_mutex.t + val attesting_rights : Lwt_mutex.t val cycles : Lwt_mutex.t @@ -52,7 +52,7 @@ val maybe_insert_source : (string, unit, [`Zero]) Caqti_request.t val maybe_insert_delegate : (Tezos_crypto.Signature.public_key_hash, unit, [`Zero]) Caqti_request.t -val maybe_insert_endorsing_right : +val maybe_insert_attesting_right : ( int32 * int * int * Tezos_crypto.Signature.public_key_hash, unit, [`Zero] ) diff --git a/teztale/bin_teztale_server/teztale_server_main.ml b/teztale/bin_teztale_server/teztale_server_main.ml index 8d6d2889bbf56adef42285f60b70dee1fe083911..509037f9e0aec627893205497007277be7934db3 100644 --- a/teztale/bin_teztale_server/teztale_server_main.ml +++ b/teztale/bin_teztale_server/teztale_server_main.ml @@ -504,7 +504,7 @@ let format_block_op level delegate (op : Lib_teztale_base.Consensus_ops.operation) = ((level, op.hash, op.kind = Attestation, op.round), delegate) -let endorsing_rights_callback = +let attesting_rights_callback = let module Cache = Aches.Vache.Set (Aches.Vache.LRU_Precise) (Aches.Vache.Strong) (struct @@ -529,7 +529,7 @@ let endorsing_rights_callback = return_unit else let* () = - maybe_with_metrics conf "maybe_insert_endorsing_right__list" + maybe_with_metrics conf "maybe_insert_attesting_right__list" @@ fun () -> Caqti_lwt_unix.Pool.use (fun (module Db : Caqti_lwt.CONNECTION) -> @@ -550,8 +550,8 @@ let endorsing_rights_callback = rights in without_cache - Sql_requests.Mutex.endorsing_rights - Sql_requests.maybe_insert_endorsing_right + Sql_requests.Mutex.attesting_rights + Sql_requests.maybe_insert_attesting_right (module Db) conf rights) @@ -887,10 +887,10 @@ let import_callback ~logger conf db_pool g data = let* () = Tezos_lwt_result_stdlib.Lwtreslib.Bare.List.iter_es (fun Lib_teztale_base.Data.Delegate_operations. - {delegate; first_slot; endorsing_power; _} -> + {delegate; first_slot; attesting_power; _} -> Db.exec - Sql_requests.maybe_insert_endorsing_right - (level, first_slot, endorsing_power, delegate)) + Sql_requests.maybe_insert_attesting_right + (level, first_slot, attesting_power, delegate)) data.Lib_teztale_base.Data.delegate_operations in (* blocks *) @@ -1048,7 +1048,7 @@ let routes : with_data Lib_teztale_base.Consensus_ops.rights_encoding body - (endorsing_rights_callback ~logger conf db_pool g)) ); + (attesting_rights_callback ~logger conf db_pool g)) ); ( Re.seq [Re.str "/"; Re.group (Re.rep1 Re.digit); Re.str "/block"], fun g ~logger ~conf ~admins:_ ~users db_pool header meth body -> post_only_endpoint !users header meth (fun source -> diff --git a/teztale/lib_teztale_base/data.ml b/teztale/lib_teztale_base/data.ml index fada2bdd13547f564a25db13ece1d354aa6faa79..914c0bb4f365f0820461bba7140a900e54790336 100644 --- a/teztale/lib_teztale_base/data.ml +++ b/teztale/lib_teztale_base/data.ml @@ -99,7 +99,7 @@ module Delegate_operations = struct type t = { delegate : Tezos_crypto.Signature.public_key_hash; first_slot : int; - endorsing_power : int; + attesting_power : int; operations : operation list; } @@ -110,7 +110,7 @@ module Delegate_operations = struct (fun (delegate, reception_time, errors, block_inclusion) -> match (reception_time, block_inclusion) with | None, [] -> - {delegate; first_slot = 0; endorsing_power = 0; operations = []} + {delegate; first_slot = 0; attesting_power = 0; operations = []} | _, _ -> let mempool_inclusion = match reception_time with @@ -121,7 +121,7 @@ module Delegate_operations = struct { delegate; first_slot = 0; - endorsing_power = 0; + attesting_power = 0; operations = [ { @@ -142,10 +142,10 @@ module Delegate_operations = struct let encoding = let open Data_encoding in conv - (fun {delegate; first_slot; endorsing_power; operations} -> - (delegate, first_slot, endorsing_power, operations)) - (fun (delegate, first_slot, endorsing_power, operations) -> - {delegate; first_slot; endorsing_power; operations}) + (fun {delegate; first_slot; attesting_power; operations} -> + (delegate, first_slot, attesting_power, operations)) + (fun (delegate, first_slot, attesting_power, operations) -> + {delegate; first_slot; attesting_power; operations}) (obj4 (req "delegate" Tezos_crypto.Signature.Public_key_hash.encoding) (dft "first_slot" int16 0)