123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194(*****************************************************************************)(* *)(* Open Source License *)(* Copyright (c) 2020 Nomadic Labs. <contact@nomadic-labs.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. *)(* *)(*****************************************************************************)includeInternal_event.Simpleletsection=["node";"validator";"bootstrap_pipeline"](* notice level events *)letfetching_locator=declare_2~section~name:"fetching_locator"~msg:"fetching branch of {locator_length} blocks from peer {peer_id}"~level:Notice("locator_length",Data_encoding.int31)("peer_id",P2p_peer.Id.encoding)letstill_fetching_large_step_from_peer=declare_3~section~name:"still_fetching_block_header_from_peer"~msg:"still fetching headers from peer {peer_id}: \
{block_fetched}/{step_length}"~level:Info("peer_id",P2p_peer.Id.encoding)("block_fetched",Data_encoding.int31)("step_length",Data_encoding.int31)(* info level events *)letfetching_step_from_peer=declare_6~section~name:"fetching_step_from_peer"~msg:"fetching step {step_number}/{number_of_steps} (step length \
{step_length}) from {block} to {predecessor} from peer {peer_id}"~level:Info("step_number",Data_encoding.int31)("number_of_steps",Data_encoding.int31)("step_length",Data_encoding.int31)("block",Block_hash.encoding)("predecessor",Block_hash.encoding)("peer_id",P2p_peer.Id.encoding)letfetching_block_header_from_peer=declare_4~section~name:"fetching_block_header_from_peer"~msg:"fetched header {block} from {peer_id} {block_fetched}/{step_length}"~level:Debug("block",Block_hash.encoding)("peer_id",P2p_peer.Id.encoding)("block_fetched",Data_encoding.int31)("step_length",Data_encoding.int31)(* debug level events *)letfetching_all_steps_from_peer=declare_1~section~name:"fetching_all_steps_from_peer"~msg:"fetched all steps from peer {peer_id}"~level:Debug("peer_id",P2p_peer.Id.encoding)letfetching_operations=declare_2~section~name:"fetching_operations"~msg:"fetching operations of block {block_hash} from peer {peer_id}"~level:Debug("block_hash",Block_hash.encoding)("peer_id",P2p_peer.Id.encoding)letfetched_operations=declare_2~section~name:"fetched_operations"~msg:"fetched operations of block {block_hash} from peer {peer_id}"~level:Debug("block_hash",Block_hash.encoding)("peer_id",P2p_peer.Id.encoding)letrequesting_validation=declare_2~section~name:"requesting_validation"~msg:"requesting validation for block {block_hash} from peer {peer_id}"~level:Debug("block_hash",Block_hash.encoding)("peer_id",P2p_peer.Id.encoding)letvalidated_block=declare_2~section~name:"validated_block"~msg:"validated block {block_hash} from peer {peer_id}"~level:Debug("block_hash",Block_hash.encoding)("peer_id",P2p_peer.Id.encoding)(* warning level events *)letrequest_operations_timeout=declare_3~section~name:"request_operations_timeout"~msg:"request for operations {block_hash}:{operations_index_tag} from peer \
{peer_id} timed out"~level:Warning("block_hash",Block_hash.encoding)("operations_index_tag",Data_encoding.int31)("peer_id",P2p_peer.Id.encoding)letstep_too_long=declare_1~section~name:"step_too_long"~msg:"invalid step from peer {peer_id} (too long)"~level:Warning("peer_id",P2p_peer.Id.encoding)letstep_too_short=declare_1~section~name:"step_too_short"~msg:"invalid step from peer {peer_id} (too short)"~level:Warning("peer_id",P2p_peer.Id.encoding)letheader_request_timeout=declare_2~section~name:"header_request_timeout"~msg:"request for header {block_hash} from peer {peer_id} timed out"~level:Warning("block_hash",Block_hash.encoding)("peer_id",P2p_peer.Id.encoding)letlocator_contains_future_block=declare_4~section~name:"locator_contains_future_block"~msg:"block locator {block_hash} from peer {peer_id} contains future blocks"~level:Warning("block_hash",Block_hash.encoding)("peer_id",P2p_peer.Id.encoding)("time",Time.System.encoding)("block_time",Time.Protocol.encoding)letlocator_too_short=declare_0~section~name:"locator_too_short"~msg:"received a locator that is too short"~level:Warning()(* error level events *)letunexpected_error_while_fetching_headers=declare_1~section~name:"unexpected_error_while_fetching_headers"~msg:"unexpected error while fetching headers: {trace}"~level:Error~pp1:pp_print_top_error_of_trace("trace",Error_monad.trace_encoding)