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 common_transaction =
  1. | Evm of string
  2. | Michelson of string

Preconfirmed transaction can either be internal or coming from the delayed inbox

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;
    }
  3. | Next_block_info of {
    1. timestamp : Tezos_base.TzPervasives.Time.Protocol.t;
    2. number : Evm_node_lib_dev_encoding.Ethereum_types.quantity;
    }
  4. | Included_transaction of {
    1. tx : transaction;
    2. hash : Evm_node_lib_dev_encoding.Ethereum_types.hash;
    }
  5. | Dropped_transaction of {
    1. hash : Evm_node_lib_dev_encoding.Ethereum_types.hash;
    2. reason : string;
    }

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.

notify_next_block_info timestamp number advertizes the next block timestamp and number to the broadcast stream

notify_inclusion tx advertizes tx as the latest transaction to be included in the next block to the broadcast stream

val notify_dropped : hash:Evm_node_lib_dev_encoding.Ethereum_types.hash -> reason:string -> unit

notify_dropped ~hash ~reason advertizes a dropped transaction with its hash and reason to the broadcast stream

type transaction_result = {
  1. hash : Evm_node_lib_dev_encoding.Ethereum_types.hash;
  2. result : (Evm_node_lib_dev_encoding.Transaction_receipt.t, string) Stdlib.result;
}

Type representing the result of a transaction pre-confirmed execution.

val create_transaction_result_stream : unit -> transaction_result Lwt_stream.t * Lwt_watcher.stopper

create_transaction_result_stream () returns a new stream that can be used to be notified of pre-confirmed results after transactions are executed individually.

val notify_transaction_result : transaction_result -> unit

notify_transaction_result tx advertizes tx as the latest pre-confirmed result _only_ to the transaction result stream