Module Evm_node_config.Configuration

type supported_network =
  1. | Mainnet
  2. | Testnet
  3. | Shadownet
  4. | Previewnet

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 option;
    (*

    Path to the preimages directory. if none, it uses a default path under the data_dir

    *)
  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.

    *)
  4. | Seed of garbage_collector_parameters
    (*

    Keep all blueprints. Prune blocks, transactions, and states for a period defined by garbage_collector_parameters. Intended for nodes that only need to serve blueprints with events to consumers.

    *)
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 sqlite_compression_config = {
  1. compression_level : int;
    (*

    zstd compression level used at INSERT time.

    *)
  2. batch_size : int;
    (*

    Maximum number of rows processed in a single migration batch UPDATE.

    *)
}

Optional zstd compression of the large BLOB columns in Evm_store.Transactions.store, Evm_store.Blocks.store, and Evm_store.Blueprints.store. All fields have sensible defaults. Because this sits under experimental_features the shape is allowed to evolve without a backward-compatibility promise.

Note: a disable→re-enable cycle does not re-migrate. Any rows written while the flag was off remain uncompressed, the cursor table's fast path skips the migration on next startup, and the storage savings on those rows are only realized when they are rewritten.

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. periodic_snapshot_path : string option;
  9. preconfirmation_stream_enabled : bool;
  10. compact_receipt_encoding : bool;
  11. sqlite_compression : sqlite_compression_config option;
}

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

val default_sqlite_compression_config : sqlite_compression_config

Default zstd compression configuration (compression level 3, 10000-row batch size).

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 list;
    (*

    The keys 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;
  3. fail_on_divergence : 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 performance_profile =
  1. | Default
  2. | Performance
type telemetry_config = {
  1. config : Octez_telemetry.Opentelemetry_config.t;
  2. trace_host_functions : bool;
}
type t = {
  1. data_dir : string;
  2. public_rpc : rpc;
  3. private_rpc : rpc option;
  4. websockets : websockets_config option;
  5. log_filter : log_filter_config;
  6. kernel_execution : kernel_execution_config;
  7. sequencer : sequencer;
  8. observer : observer option;
  9. gcp_kms : gcp_kms;
  10. keep_alive : bool;
  11. rollup_node_endpoint : Uri.t;
  12. rpc_timeout : float;
  13. verbose : Tezos_base.TzPervasives.Internal_event.level;
  14. experimental_features : experimental_features;
  15. fee_history : fee_history;
  16. finalized_view : bool;
  17. history_mode : history_mode option;
  18. db : db;
  19. opentelemetry : telemetry_config;
  20. tx_queue : tx_queue;
  21. performance_profile : performance_profile;
}
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

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 -> t -> string -> unit Tezos_base.TzPervasives.tzresult Lwt.t

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

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

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

val sequencer_keys : t -> sequencer_key list Tezos_base.TzPervasives.tzresult

sequencer_keys config returns the keys 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 -> ?fail_on_divergence: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
val default_data_dir : string
val get_data_dir : data_dir:string option -> string
val config_filename : data_dir:string option -> ?config_file:string -> unit -> string
val preimages_path : t -> string
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 : Stdlib.Format.formatter -> t -> unit
val observer_evm_node_endpoint : supported_network -> string
val default_gcp_kms : gcp_kms