Module Evm_node_config.Configuration

type supported_network =
  1. | Mainnet
  2. | Testnet

A list of network officially supported by the EVM node.

val pp_supported_network : Stdlib.Format.formatter -> supported_network -> unit
type log_filter_config = {
  1. max_nb_blocks : int;
    (*

    Maximum block range for get_logs.

    *)
  2. max_nb_logs : int;
    (*

    Maximum number of logs that get_logs can return.

    *)
  3. chunk_size : int;
    (*

    Number of blocks that will be filtered in a batch before checking if the bound on produced logs has been reached. See get_logs for more details.

    *)
}
type time_between_blocks =
  1. | Nothing
    (*

    Does not produce any block if not forced by the private RPC

    *)
  2. | Time_between_blocks of float
    (*

    Maximum time interval between blocks. If transactions are present in the tx pool, blocks will be created as soon as possible. However, if there are no transactions to include, a block is produced after time_between_blocks.

    *)
type native_execution_policy =
  1. | Always
  2. | Rpcs_only
  3. | Never
type kernel_execution_config = {
  1. preimages : string;
    (*

    Path to the preimages directory.

    *)
  2. preimages_endpoint : Uri.t option;
    (*

    Endpoint where pre-images can be fetched individually when missing.

    *)
  3. native_execution_policy : native_execution_policy;
    (*

    Policy deciding when to use the native execution for supported kernels.

    *)
}
type blueprints_publisher_config = {
  1. max_blueprints_lag : int;
    (*

    The maximum advance (in blueprints) the Sequencer accepts to have before trying to send its backlog again.

    *)
  2. max_blueprints_ahead : int;
    (*

    The maximum advance (in blueprints) the Sequencer accepts.

    *)
  3. max_blueprints_catchup : int;
    (*

    The maximum number of blueprints the Sequencer resends at once.

    *)
  4. catchup_cooldown : int;
    (*

    The maximum number of Layer 1 blocks the Sequencer waits after resending its blueprints before trying to catch-up again.

    *)
  5. dal_slots : int list option;
    (*

    When set to Some l, l is the list of DAL slot indices to use to publish blueprints, when set to None the sequencer is not allowed to use the DAL.

    *)
}
type garbage_collector_parameters = {
  1. split_frequency_in_seconds : int;
  2. number_of_chunks : int;
}
type history_mode =
  1. | Archive
    (*

    Keeps all blocks, operations and states.

    *)
  2. | Rolling of garbage_collector_parameters
    (*

    Keep blocks, operations and states for a period defined by garbage_collector_parameters.

    *)
  3. | Full of garbage_collector_parameters
    (*

    Keep all blocks and transactions. Keep operations and states for a period defined by garbage_collector_parameters.

    *)
val history_mode_partial_eq : history_mode -> history_mode -> bool

Compare history modes and ignore garbage_collector_parameters

type rpc_server =
  1. | Resto
    (*

    Resto/Cohttp (default)

    *)
  2. | Dream
    (*

    Dream/httpun

    *)

RPC server implementation.

type profile_mode =
  1. | Minimal
  2. | Flamegraph

Profiling mode for PVM execution.

type monitor_websocket_heartbeat = {
  1. ping_interval : float;
  2. ping_timeout : float;
}

Parameters for monitoring websocket connection heartbeats.

type tx_queue = {
  1. max_size : int;
  2. max_transaction_batch_length : int option;
  3. max_lifespan_s : int;
  4. tx_per_addr_limit : int64;
}
type websocket_rate_limit = {
  1. max_frames : int;
  2. max_messages : int option;
  3. interval : int;
  4. strategy : [ `Wait | `Error | `Close ];
}
type websockets_config = {
  1. max_message_length : int;
  2. monitor_heartbeat : monitor_websocket_heartbeat option;
  3. rate_limit : websocket_rate_limit option;
}
type experimental_features = {
  1. drop_duplicate_on_injection : bool;
  2. blueprints_publisher_order_enabled : bool;
  3. enable_send_raw_transaction : bool;
  4. overwrite_simulation_tick_limit : bool;
  5. rpc_server : rpc_server;
  6. spawn_rpc : int option;
  7. l2_chains : l2_chain list option;
  8. enable_tx_queue : tx_queue option;
  9. periodic_snapshot_path : string option;
}

Configuration settings for experimental features, with no backward compatibility guarantees.

type gcp_key = {
  1. project : string;
  2. keyring : string;
  3. region : string;
  4. key : string;
  5. version : int;
}
type sequencer_key =
  1. | Wallet of Tezos_client_base.Client_keys.sk_uri
  2. | Gcp_key of gcp_key
type sequencer = {
  1. time_between_blocks : time_between_blocks;
  2. max_number_of_chunks : int;
    (*

    The maximum number of chunks per blueprints.

    *)
  3. sequencer : sequencer_key option;
    (*

    The key used to sign the blueprints.

    *)
  4. blueprints_publisher_config : blueprints_publisher_config;
  5. sunset_sec : int64;
}
type observer = {
  1. evm_node_endpoint : Uri.t;
  2. rollup_node_tracking : bool;
}
type proxy = {
  1. finalized_view : bool option;
    (*

    Provide a view on the latest final state of the rollup, not its current HEAD.

    *)
  2. evm_node_endpoint : Uri.t option;
    (*

    If provided, the EVM node will inject transactions to this endpoint instead of to its companian rollup node.

    *)
  3. ignore_block_param : bool;
}
type fee_history_max_count =
  1. | Unlimited
  2. | Limit of int
type fee_history = {
  1. max_count : fee_history_max_count;
  2. max_past : int option;
}
type restricted_rpcs =
  1. | Unrestricted
  2. | Pattern of {
    1. raw : string;
    2. regex : Re.re;
    }
  3. | Blacklist of string list
  4. | Whitelist of string list
type limit =
  1. | Unlimited
  2. | Limit of int
type rpc = {
  1. port : int;
  2. addr : string;
  3. cors_origins : string list;
  4. cors_headers : string list;
  5. max_active_connections : Tezos_rpc_http_server.RPC_server.Max_active_rpc_connections.t;
  6. batch_limit : limit;
  7. restricted_rpcs : restricted_rpcs;
}
type db = {
  1. pool_size : int;
    (*

    Size of the database connection pool

    *)
  2. max_conn_reuse_count : int option;
    (*

    Maximum number of times a connection can be reused

    *)
}
type gcp_authentication_method =
  1. | Gcloud_auth
  2. | Metadata_server
type gcp_kms = {
  1. pool_size : int;
  2. authentication_method : gcp_authentication_method;
  3. authentication_retries : int;
  4. authentication_frequency_min : int;
  5. authentication_retry_backoff_sec : int;
  6. authentication_timeout_sec : int;
  7. gcloud_path : string;
}
type t = {
  1. public_rpc : rpc;
  2. private_rpc : rpc option;
  3. websockets : websockets_config option;
  4. log_filter : log_filter_config;
  5. kernel_execution : kernel_execution_config;
  6. sequencer : sequencer;
  7. observer : observer option;
  8. proxy : proxy;
  9. gcp_kms : gcp_kms;
  10. tx_pool_timeout_limit : int64;
  11. tx_pool_addr_limit : int64;
  12. tx_pool_tx_per_addr_limit : int64;
  13. keep_alive : bool;
  14. rollup_node_endpoint : Uri.t;
  15. verbose : Tezos_base.TzPervasives.Internal_event.level;
  16. experimental_features : experimental_features;
  17. fee_history : fee_history;
  18. finalized_view : bool;
  19. history_mode : history_mode option;
  20. db : db;
  21. opentelemetry : Octez_telemetry.Opentelemetry_config.t;
}
val is_tx_queue_enabled : t -> bool
val retrieve_chain_family : l2_chains:l2_chain list option -> Evm_node_lib_dev_encoding.L2_types.ex_chain_family

chain_family_from_l2_chains t returns the chain_family in the experimental feature if there's only one chain.

This function will be removed when multichain is implemented

val pp_history_mode_debug : Stdlib.Format.formatter -> history_mode -> unit
val pp_history_mode_info : Stdlib.Format.formatter -> history_mode -> unit
val encoding : ?network:supported_network -> string -> t Tezos_base.TzPervasives.Data_encoding.t

encoding data_dir is the encoding of t based on data dir data_dir.

If encoding is passed, some default values are set according to the selected network, for a more straightforward UX.

Encoding for rpc_server.

val save : force:bool -> data_dir:string -> t -> string -> unit Tezos_base.TzPervasives.tzresult Lwt.t

save ~force ~data_dir configuration config_file writes the config_file file. If force is true, existing configurations are overwritten.

val load_file : ?network:supported_network -> data_dir:string -> string -> t Tezos_base.TzPervasives.tzresult Lwt.t
val load : ?network:supported_network -> data_dir:string -> string -> t Tezos_base.TzPervasives.tzresult Lwt.t

load ~data_dir config_file loads the configuration stored in config_file with preimage directory relative to data_dir.

sequencer_key config returns the key the sequencer should use, or fails.

val gcp_key_from_string_opt : string -> gcp_key option
val observer_config_exn : t -> observer Tezos_base.TzPervasives.tzresult

observer_config_exn config returns the observer config of config or fails

val observer_config_dft : evm_node_endpoint:Uri.t -> ?rollup_node_tracking:bool -> unit -> observer

observer_config_dft () returns the default observer config populated with given value.

val make_pattern_restricted_rpcs : string -> restricted_rpcs
val string_of_history_mode_debug : history_mode -> string
val string_of_history_mode_info : history_mode -> string
val history_mode_of_string_opt : string -> history_mode option
val gc_param_from_retention_period : days:int -> garbage_collector_parameters

retention ~days returns the GC parameters to retain days of history when provided or the default otherwise.

val default_history_mode : history_mode
module Cli : sig ... end
val pp_time_between_blocks : Stdlib.Format.formatter -> time_between_blocks -> unit
val describe : unit -> unit

describe () prints the JSON schema of the configuration file to the standard output.

val pp_print_json : data_dir:string -> Stdlib.Format.formatter -> t -> unit
val observer_evm_node_endpoint : supported_network -> string
val default_gcp_kms : gcp_kms