123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167(*****************************************************************************)(* *)(* Open Source License *)(* Copyright (c) 2018 Dynamic Ledger Solutions, Inc. <contact@tezos.com> *)(* *)(* Permission is hereby granted, free of charge, to any person obtaining a *)(* copy of this software and associated documentation files (the "Software"),*)(* to deal in the Software without restriction, including without limitation *)(* the rights to use, copy, modify, merge, publish, distribute, sublicense, *)(* and/or sell copies of the Software, and to permit persons to whom the *)(* Software is furnished to do so, subject to the following conditions: *)(* *)(* The above copyright notice and this permission notice shall be included *)(* in all copies or substantial portions of the Software. *)(* *)(* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR*)(* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *)(* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL *)(* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER*)(* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING *)(* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER *)(* DEALINGS IN THE SOFTWARE. *)(* *)(*****************************************************************************)openProtocolopenAlpha_contextlettimestamp_tag=Tag.def~doc:"Timestamp when event occurred""timestamp"Time.System.pp_humletvalid_ops=Tag.def~doc:"Valid Operations""valid_ops"Format.pp_print_intletop_count=Tag.def~doc:"Number of operations""op_count"Format.pp_print_intletrefused_ops=Tag.def~doc:"Refused Operations""refused_ops"Format.pp_print_intletbake_priority_tag=Tag.def~doc:"Baking priority""bake_priority"Format.pp_print_intletfitness_tag=Tag.def~doc:"Fitness""fitness"Fitness.ppletcurrent_slots_tag=Tag.def~doc:"Number of baking slots that can be baked at this time""current_slots"Format.pp_print_intletfuture_slots_tag=Tag.def~doc:"Number of baking slots in the foreseeable future but not yet bakeable""future_slots"Format.pp_print_intlettimespan_tag=Tag.def~doc:"Timespan in seconds""timespan"Ptime.Span.ppletfilename_tag=Tag.def~doc:"Filename""filename"Format.pp_print_textletsigned_header_tag=Tag.def~doc:"Signed header""signed_header"(funfmtx->Hex.ppfmt(Hex.of_bytesx))letsigned_operation_tag=Tag.def~doc:"Signed operation""signed_operation"(funfmtx->Hex.ppfmt(Hex.of_bytesx))letoperations_tag=Tag.def~doc:"Block Operations""operations"(Format.pp_print_list~pp_sep:(funppf()->Format.fprintfppf"+")(funppfoperations->Format.fprintfppf"%d"(List.lengthoperations)))letraw_operations_tag=Tag.def~doc:"Raw operations""raw_operations"(funfmtraw_ops->letpp_opfmtop=letjson=Data_encoding.Json.constructOperation.raw_encodingopinFormat.fprintffmt"%a"Data_encoding.Json.ppjsoninFormat.fprintffmt"@[<v>%a@]"(Format.pp_print_list~pp_sep:Format.pp_print_cutpp_op)raw_ops)letbake_op_count_tag=Tag.def~doc:"Bake Operation Count""operation_count"Format.pp_print_intletendorsement_slot_tag=Tag.def~doc:"Endorsement Slot""endorsement_slot"Format.pp_print_intletendorsement_slots_tag=Tag.def~doc:"Endorsement Slots""endorsement_slots"Format.(funppfv->pp_print_intppf(List.lengthv))letdenounced_endorsements_slots_tag=Tag.def~doc:"Endorsement Slots""denounced_endorsement_slots"Format.(pp_print_listpp_print_int)letdenouncement_source_tag=Tag.def~doc:"Denounce Source""source"Format.pp_print_textletlevel_tag=Tag.def~doc:"Level""level"Raw_level.ppletnonce_tag=Tag.def~doc:"Nonce""nonce"Data_encoding.Json.(funppfnonce->ppppf(constructNonce.encodingnonce))letchain_tag=Tag.def~doc:"Chain selector""chain"Format.(funppfchain->pp_print_stringppf@@Block_services.chain_to_stringchain)letblock_tag=Tag.def~doc:"Block selector""block"Format.(funppfblock->pp_print_stringppf@@Block_services.to_stringblock)letworker_tag=Tag.def~doc:"Worker in which event occurred""worker"Format.pp_print_textletblock_header_tag=Tag.def~doc:"Raw block header""block_header"(funppf_->Format.fprintfppf"[raw block header]")letconflicting_endorsements_tag=Tag.def~doc:"Two conflicting endorsements signed by the same key""conflicting_endorsements"Format.(funppf(a,b)->fprintfppf"%a / %a"Operation_hash.pp(Operation.hasha)Operation_hash.pp(Operation.hashb))letconflicting_preendorsements_tag=Tag.def~doc:"Two conflicting preendorsements signed by the same key""conflicting_preendorsements"Format.(funppf(a,b)->fprintfppf"%a / %a"Operation_hash.pp(Operation.hasha)Operation_hash.pp(Operation.hashb))