Module Simulator.Make

Parameters

Signature

val call_simulation : ?state_override:Evm_node_lib_dev_encoding.Ethereum_types.state_override -> log_file:string -> input_encoder: ('a -> (string list, Tezos_base.TzPervasives.tztrace) Stdlib.result) -> input:'a -> SimulationBackend.state -> (bytes, Tezos_base.TzPervasives.tztrace) Stdlib.result Lwt.t
val simulation_input : simulation_version:[< `V0 | `V1 | `V2 ] -> with_da_fees:bool -> timestamp:Tezos_base.TzPervasives.Time.Protocol.t -> Evm_node_lib_dev_encoding.Ethereum_types.call -> Simulation.estimate_gas_input
val simulation_version : SimulationBackend.state -> ([> `V0 | `V1 | `V2 ], Tezos_base.TzPervasives.tztrace) Stdlib.result Lwt.t
val da_fees_gas_limit_overhead : SimulationBackend.state -> bytes -> (Z.t, Tezos_base.TzPervasives.tztrace) Stdlib.result Lwt.t

gas_for_fees simulation_state tx_data returns the DA fees, i.e. the gas unit necessary for the data availability.

The gas for fees must be computed based on a context, to retrieve the base fee per gas and da_fee_per_byte, these information are taken from simulation_state.

/!\ This function must return enough gas for fees. Therefore it must be synchronised to fee model in the kernel. /!\

The whole point of this function is to avoid an unncessary call to the WASM PVM to improve the performances.