Evm_node_lib_dev.Prevalidator
type Tezos_base.TzPervasives.error +=
type mode =
| Minimal
Minimal validation, includes:
| Full
Full validation, is minimal validation plus:
type prevalidation_result = {
next_nonce : Evm_node_lib_dev_encoding.Ethereum_types.quantity;
The next nonce expected for the given caller, which is lesser than or equal to the nonce of the prevalidated transaction.
*)transaction_object : Evm_node_lib_dev_encoding.Ethereum_types.legacy_transaction_object;
Decoded informations about the prevalidated transaction.
*)}
val start :
?max_number_of_chunks:int ->
chain_family:'a Evm_node_lib_dev_encoding.L2_types.chain_family ->
mode ->
(module Services_backend_sig.S with type Reader.state = 'state) ->
unit Tezos_base.TzPervasives.tzresult Lwt.t
start ~chain_family mode backend
will attempt to start the worker.
val prevalidate_raw_transaction :
string ->
(prevalidation_result, string) Stdlib.result Tezos_base.TzPervasives.tzresult
Lwt.t
prevalidate_raw_transaction raw_txn
sends a prevalidation request to the worker, and waits for the result.
If the worker failed to start, a new initialization attempt will be performed.
val refresh_state : unit -> unit Tezos_base.TzPervasives.tzresult Lwt.t
refresh_state ()
sends a refresh request to the worker, to be processed in the background.
If the worker failed to start, a new initialization attempt will be performed.
type validation_config = {
minimum_base_fee_per_gas : Evm_node_lib_dev_encoding.Ethereum_types.quantity;
base_fee_per_gas : Evm_node_lib_dev_encoding.Ethereum_types.quantity;
maximum_gas_limit : Evm_node_lib_dev_encoding.Ethereum_types.quantity;
da_fee_per_byte : Evm_node_lib_dev_encoding.Ethereum_types.quantity;
next_nonce : Evm_node_lib_dev_encoding.Ethereum_types.address ->
Evm_node_lib_dev_encoding.Ethereum_types.quantity option
Tezos_base.TzPervasives.tzresult
Lwt.t;
balance : Evm_node_lib_dev_encoding.Ethereum_types.address ->
Evm_node_lib_dev_encoding.Ethereum_types.quantity
Tezos_base.TzPervasives.tzresult
Lwt.t;
}
type validation_state = {
config : validation_config;
addr_balance : Z.t Tezos_base.TzPervasives.String.Map.t;
addr_nonce : Z.t Tezos_base.TzPervasives.String.Map.t;
}
val validate_balance_gas_nonce_with_validation_state :
validation_state ->
caller:Evm_node_lib_dev_encoding.Ethereum_types.address ->
Evm_node_lib_dev_encoding.Transaction.transaction ->
(validation_state, string) Stdlib.result Tezos_base.TzPervasives.tzresult
Lwt.t