Skip to main content

Crate ethrex_vm

Crate ethrex_vm 

Source

Re-exports§

pub use backends::levm::check_2d_gas_allowance;
pub use backends::BlockExecutionResult;
pub use backends::Evm;
pub use backends::TxGasBreakdown;
pub use backends::TxStatus;
pub use backends::compute_burned_fees;
pub use backends::log_gas_used_mismatch;

Modules§

backends
system_contracts
tracing

Structs§

GuestProgramStateWrapper
PrecompileCache
Per-block cache for precompile results shared between warmer and executor.

Enums§

EvmError
ExecutionResult
InternalError
PrecompileError
VMError

Traits§

StatelessValidator
Trait for stateless block validation, used by the EXECUTE precompile.
VmDatabase

Functions§

intrinsic_gas_dimensions
EIP-8037 intrinsic gas split (regular, state) for a transaction. Re-exported for mempool / payload-builder use. Compute (regular, state) intrinsic gas for a transaction without needing a full VM instance. Mirrors VM::get_intrinsic_gas but operates on the raw transaction and fork. Amsterdam+ intrinsic state gas is 0 — CREATE/value NEW_ACCOUNT and all EIP-7702 auth state charges are levied in the atomic prepare region, not at intrinsic time — so this returns (regular, 0) for every fork.
intrinsic_gas_floor
EIP-7623/7976/7981 floor gas for a transaction. Re-exported so the mempool can match the VM’s validate_min_gas_limit check at admission time. Standalone EIP-7623/7976/7981 floor gas for a transaction. Mirrors VM::get_min_gas_used but operates on the raw transaction + fork, so it can be called by mempool admission / the payload builder without needing a VM instance. Returns TX_BASE_COST + floor_rate * total_floor_tokens.
precompiles_for_fork
validate_frame_signatures
Validate every EIP-8141 outer signature against the canonical sig_hash. Returns false if any signature is malformed or invalid. Verification gas is intrinsic (already in standard_gas_limit), so a scratch budget is used for the crypto precompiles and their deduction is ignored.

Type Aliases§

DynVmDatabase