parallel

package
v1.2.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 22, 2026 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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) Backend

func (e *Executor) Backend() cevm.Backend

Backend returns the cevm backend lane this Executor dispatches to.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL