cevm: drop LUX_ prefix from env var — CEVM_STRICT

Per "no LUX_ in front of shit for no reason" — the strict-mode knob is
cevm-specific, not Lux-specific.

  LUX_CEVM_STRICT → CEVM_STRICT

Default unchanged (strict=on). Docs updated.
This commit is contained in:
2026-05-24 18:51:42 -07:00
parent d084e4a839
commit 223b307569
2 changed files with 12 additions and 12 deletions
+5 -5
View File
@@ -147,7 +147,7 @@ Expected (NVIDIA box, CUDA available):
backend{default=auto resolved=gpu cgo=true gpu=true gpu_backend=cuda devices=N accel=<ver>}
```
## 7. LUX_GPU_DISABLE kill switch
## 7. GPU_DISABLE kill switch
```bash
cd ~/work/lx/dex
@@ -156,14 +156,14 @@ cd ~/work/lx/dex
go run /tmp/probe.go
# Forced CPU
LUX_GPU_DISABLE=1 go run /tmp/probe.go
GPU_DISABLE=1 go run /tmp/probe.go
```
Second run should report `gpu=false disabled=true`. Re-run the parity test
under the kill switch and it must still pass (CPU oracle on both paths).
```bash
LUX_GPU_DISABLE=1 go test -count=1 -v -run TestMatchOrder_GPUMatchesCPU ./pkg/lx/
GPU_DISABLE=1 go test -count=1 -v -run TestMatchOrder_GPUMatchesCPU ./pkg/lx/
```
Expected single log line:
@@ -185,7 +185,7 @@ go test -count=1 ./evm/cevm/parallel/
To re-enable the legacy fallback during V5 transition (emergency rollback):
```bash
LUX_CEVM_STRICT=0 go test -count=1 ./evm/cevm/parallel/
CEVM_STRICT=0 go test -count=1 ./evm/cevm/parallel/
```
V5 kernel work tracked at `chains/evm/cevm/V5_ABI.md`. Until that lands,
@@ -244,7 +244,7 @@ overhead dominates and CPU wins.
- **cevm V5 kernel**: CALL/CREATE on device per `chains/evm/cevm/V5_ABI.md`.
Without V5, strict-mode cevm refuses any CALL-containing block. Operators
needing the legacy fallback during the V5 transition set
`LUX_CEVM_STRICT=0`.
`CEVM_STRICT=0`.
- **Precompile-engine → MatchOrderGPU bridge**: the `lux/precompile/dex`
engine's matching path uses its own embedded path today. Hooking it to
`MatchOrderGPU` is one small Go change in `engine_embedded.go::Swap` /
+7 -7
View File
@@ -65,13 +65,13 @@ import (
// caller falls through.
//
// Strict mode is the production target. The legacy fallback exists only
// for the V4→V5 cevm transition window; flip LUX_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.
var ErrGPUEVMRequired = errors.New("cevm: GPU EVM cannot execute this block (V4 ABI); waiting for V5 kernel — Go EVM fallback disabled by LUX_CEVM_STRICT")
// 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.
var ErrGPUEVMRequired = errors.New("cevm: GPU EVM cannot execute this block (V4 ABI); waiting for V5 kernel — Go EVM fallback disabled by CEVM_STRICT")
const envCEVMStrict = "LUX_CEVM_STRICT"
const envCEVMStrict = "CEVM_STRICT"
var (
strictOnce sync.Once
@@ -105,7 +105,7 @@ func declineBlock(reason string, blockNumber, txIndex uint64) ([]*types.Receipt,
return nil, fmt.Errorf("%w: reason=%s block=%d tx_index=%d",
ErrGPUEVMRequired, reason, blockNumber, txIndex)
}
log.Debug("cevm: declining block to Go EVM (LUX_CEVM_STRICT=0)",
log.Debug("cevm: declining block to Go EVM (CEVM_STRICT=0)",
"reason", reason, "block", blockNumber, "tx_index", txIndex)
return nil, nil
}