Defines the cevm (C++ EVM) GPU-accelerated execution engine. cevm is a high-performance EVM interpreter that offloads opcode execution to GPU compute shaders via Metal (Apple), CUDA (NVIDIA), and WebGPU (cross-platform). Combined with Block-STM parallel transaction scheduling (LP-010), cevm achieves 2.3 billion opcodes/second on a single GPU, enabling Lux to process 100,000+ TPS on L1 / L2 chains.
Block -> Block-STM Scheduler -> cevm GPU Executor
| |-- Metal compute shaders
| |-- CUDA kernels
| |-- WebGPU dispatch
|-- MvMemory (multi-version memory for conflict detection)
|-- Validation (re-execute conflicting txs)
Each transaction is a GPU thread group:
60+ opcodes execute on GPU. Remaining opcodes (CALL, CREATE, SSTORE) fall back to CPU for state access:
10,000 transactions, 5,000 loop iterations each (550M total opcodes):
Gas accounting is identical between CPU and GPU paths. The GPU execution is an optimization -- it does not change the EVM semantics. A transaction that costs X gas on CPU costs X gas on GPU.
1. GPU execution results must match CPU execution bit-for-bit. The test suite validates gas and state root equivalence.
2. GPU memory isolation: each transaction's stack and memory are isolated. No cross-transaction data leakage.
3. Floating-point is not used. All EVM operations are integer arithmetic, avoiding GPU floating-point precision issues.
4. Fallback to CPU is transparent. If the GPU is unavailable, cevm runs entirely on CPU with no behavioral change.
github.com/luxfi/chains/evm/cevm/ |github.com/luxfi/chains/evm/cevm/gpu/metal/ |github.com/luxfi/chains/evm/cevm/gpu/cuda/ |Copyright (C) 2025-2026, Lux Partners Limited. All rights reserved.
Licensed under the MIT License.