Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrGPUEVMRequired = errors.New("cevm: GPU EVM cannot execute this block (V4 ABI); waiting for V5 kernel — Go EVM fallback disabled by CEVM_STRICT")
ErrGPUEVMRequired is the sentinel ExecuteBlock returns when the cevm V4 path cannot complete a block on-device and the caller must NOT silently shadow-execute it on the Go EVM. Strict mode (the default) propagates this error; legacy mode collapses it to (nil, nil) so the caller falls through.
Strict mode is the production target. The legacy fallback exists only for the V4→V5 cevm transition window; flip CEVM_STRICT=0 to re-enable it for emergency rollback. Once the V5 kernel implements CALL/CREATE on device, the strict path becomes unconditional and the env var is retired.
Functions ¶
This section is empty.
Types ¶
type Executor ¶
type Executor struct {
// CevmBackend selects the cevm execution lane:
// cevm.CPUSequential — single-threaded CPU baseline (parity reference)
// cevm.CPUParallel — Block-STM on CPU
// cevm.GPUMetal — Metal kernel dispatch (M1/M2/M3)
// cevm.GPUCUDA — CUDA kernel dispatch (NVIDIA)
CevmBackend cevm.Backend
// Threads is the worker count for parallel backends. Ignored by
// CPUSequential; defaults to 1 when zero.
Threads uint32
}
Executor is a luxfi/evm/core/parallel.BlockExecutor that dispatches every block to cevm.ExecuteBlockV3 in one cgo call.
Compile-time interface check; the var line below ensures Executor satisfies BlockExecutor.
func (*Executor) ExecuteBlock ¶
func (e *Executor) ExecuteBlock( config *ethparams.ChainConfig, header *types.Header, txs types.Transactions, statedb *state.StateDB, vmCfg vm.Config, ) ([]*types.Receipt, error)
ExecuteBlock implements evmparallel.BlockExecutor. Dispatches the whole block in one cgo call to cevm.ExecuteBlockV3 and reconstructs receipts.
Returns (nil, nil) — the documented "fall through to sequential" signal — when the block contains opcodes cevm GPU can't handle yet (CALL/CREATE family) or non-trivial tx (Data/Code) for which cevm's V2 ABI doesn't yet expose per-tx logs. On hard errors it returns the error.