Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Source file event.ml
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213(*****************************************************************************)(* *)(* Open Source License *)(* Copyright (c) 2023 Nomadic Labs, <contact@nomadic-labs.com> *)(* Copyright (c) 2023 Functori, <contact@functori.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. *)(* *)(*****************************************************************************)moduleSimple=structincludeInternal_event.Simpleletsection=["smart_rollup_node"]letstarting_node=declare_0~section~name:"starting_smart_rollup_node"~msg:"Starting the smart rollup node"~level:Notice()letshutdown_node=declare_1~section~name:"stopping_smart_rollup_node"~msg:"Stopping the smart rollup node"~level:Notice("exit_status",Data_encoding.int8)letnode_is_ready=declare_2~section~name:"smart_rollup_node_is_ready"~msg:"The smart rollup node is listening to {addr}:{port}"~level:Notice("addr",Data_encoding.string)("port",Data_encoding.uint16)letrollup_exists=declare_2~section~name:"smart_rollup_node_knows_its_rollup"~msg:"The smart rollup node is interacting with rollup {addr} of kind {kind}"~level:Notice("addr",Octez_smart_rollup.Address.encoding)("kind",Data_encoding.string)letconnection_lost=declare_0~section~name:"smart_rollup_daemon_connection_lost"~msg:"connection to the node has been lost"~level:Warning()letcannot_connect=declare_2~section~name:"smart_rollup_daemon_cannot_connect"~msg:"cannot connect to Tezos node ({count}) {error}"~level:Warning("count",Data_encoding.int31)("error",trace_encoding)~pp2:pp_print_traceletwait_reconnect=declare_1~section~name:"smart_rollup_daemon_wait_reconnect"~msg:"Retrying to connect in {delay}s"~level:Warning("delay",Data_encoding.float)letstarting_metrics_server=declare_2~section~name:"starting_metrics_server"~msg:"starting metrics server on {host}:{port}"~level:Notice("host",Data_encoding.string)("port",Data_encoding.uint16)letmetrics_ended=declare_1~section~name:"metrics_ended"~level:Error~msg:"metrics server ended with error {stacktrace}"("stacktrace",Data_encoding.string)letkernel_debug=declare_1~section~name:"kernel_debug"~level:Info~msg:"{log}"("log",Data_encoding.string)~pp1:Format.pp_print_stringletsimulation_kernel_debug=declare_1~section~name:"simulation_kernel_debug"~level:Info~msg:"[simulation] {log}"("log",Data_encoding.string)~pp1:Format.pp_print_stringletwarn_dal_enabled_no_node=declare_0~section~name:"dal_enabled_no_node"~level:Warning~msg:"Warning: DAL is enabled in the protocol but no DAL node was provided \
for the rollup node."()letwaiting_first_block=declare_1~section~name:"waiting_first_block"~level:Notice~msg:"Waiting for first block of protocol {protocol} to appear."("protocol",Protocol_hash.encoding)letreceived_first_block=declare_2~section~name:"received_first_block"~level:Notice~msg:"First block of protocol {protocol} received: {block}."("block",Block_hash.encoding)("protocol",Protocol_hash.encoding)letdetected_protocol_migration=declare_0~section~name:"detected_protocol_migration"~level:Notice~msg:"Detected protocol migration, the rollup node will now stop."()letacquiring_lock=declare_0~section~name:"acquiring_lock"~level:Notice~msg:"Acquiring lock on data directory."()endletstarting_node=Simple.(emitstarting_node)letshutdown_nodeexit_status=Simple.(emitshutdown_nodeexit_status)letnode_is_ready~rpc_addr~rpc_port=Simple.(emitnode_is_ready(rpc_addr,rpc_port))letrollup_exists~addr~kind=letkind=Octez_smart_rollup.Kind.to_stringkindinSimple.(emitrollup_exists(addr,kind))letconnection_lost()=Simple.(emitconnection_lost)()letcannot_connect~counterror=Simple.(emitcannot_connect)(count,error)letwait_reconnectdelay=Simple.(emitwait_reconnect)delayletstarting_metrics_server~host~port=Simple.(emitstarting_metrics_server)(host,port)letmetrics_endederror=Simple.(emitmetrics_ended)errorletmetrics_ended_dont_waiterror=Simple.(emit__dont_wait__use_with_caremetrics_ended)errorletkernel_debugmsg=Simple.(emitkernel_debug)msgletsimulation_kernel_debugmsg=Simple.(emitsimulation_kernel_debug)msgletkernel_debug_dont_waitmsg=Simple.(emit__dont_wait__use_with_carekernel_debug)msgletwarn_dal_enabled_no_node()=Simple.(emitwarn_dal_enabled_no_node)()letwaiting_first_blockp=Simple.(emitwaiting_first_block)pletreceived_first_blockbp=Simple.(emitreceived_first_block)(b,p)letdetected_protocol_migration()=Simple.(emitdetected_protocol_migration)()letacquiring_lock()=Simple.(emitacquiring_lock)()