Module Evm_node_lib_dev.Broadcast

val create_blueprint_stream : unit -> Blueprint_types.Legacy.with_events Lwt_stream.t * Lwt_watcher.stopper

create_blueprint_stream () returns a new stream that can be used to be notified when a new blueprint is being successfully applied on top of the local state.

type message =
  1. | Blueprint of Blueprint_types.with_events
  2. | Finalized_levels of {
    1. l1_level : int32;
    2. start_l2_level : Evm_node_lib_dev_encoding.Ethereum_types.quantity;
    3. end_l2_level : Evm_node_lib_dev_encoding.Ethereum_types.quantity;
    }

Type of messages that are broadcasted to all evm nodes.

val create_broadcast_stream : unit -> message Lwt_stream.t * Lwt_watcher.stopper

create_broadcast_stream () returns a new stream that can be used to be notified of all messages, including a new blueprint being successfully applied on top of the local state.

val notify_blueprint : Blueprint_types.with_events -> unit

notify_blueprint blueprint advertizes blueprint to both the blueprint stream and the broadcast stream.

val notify_finalized_levels : l1_level:int32 -> start_l2_level:Evm_node_lib_dev_encoding.Ethereum_types.quantity -> end_l2_level:Evm_node_lib_dev_encoding.Ethereum_types.quantity -> unit

notify_finalized_levels ~l1_level ~start_l2_level ~end_l2_level advertizes the L1/L2 finalized levels to the broadcast stream.