36 Commits
Author SHA1 Message Date
zeekay 3dde269d9b thresholdvm: remove TestCoronaSessionInit (legacy StartFunc pattern; corona moved to keyera-lifecycle in threshold v1.7.0) v1.2.4 2026-05-19 00:35:50 -07:00
zeekay ede84f7390 rename: github.com/luxfi/protocol → github.com/luxfi/proto (cascade complete) 2026-05-18 21:28:57 -07:00
zeekay a41dd99c64 deps: pin luxfi/proto v1.0.0 (rename cascade complete) 2026-05-18 21:27:16 -07:00
zeekay be92802b0f rename: github.com/luxfi/protocol → github.com/luxfi/proto (imports + go.mod replace) 2026-05-18 21:19:09 -07:00
zeekay a8cf0793c6 Merge branch 'main' of github.com:luxfi/chains v1.2.3 2026-05-18 20:48:55 -07:00
zeekayandGitHub 7c904bfa10 chore: add LICENSE (BSD 3-Clause License) + LICENSING.md pointer (#2)
* chore: add BSD 3-Clause License

* docs: add LICENSING.md pointer to canonical IP/licensing strategy
v1.2.2
2026-05-16 10:48:48 -07:00
zeekay f4c7055d45 chains: complete Ringtail → Corona purge across thresholdvm + quantumvm + dexvm
Continuation of dc31d5b (quantumvm consumer-side leak after consensus
repo migration) — the rename was incomplete; this pass closes it.

Identifier renames in chains/{quantumvm,thresholdvm,dexvm}:
  - NTTForwardRingtail / NTTInverseRingtail / BatchNTTForwardRingtail
        → NTTForward/Inverse/BatchNTTForwardCorona (Quasar GPU dispatch)
  - LaneRingtail (CertLane enum)
        → LaneCorona
  - ProtocolRingtail (Protocol enum)
        → ProtocolCorona (string value already "corona")
  - All Ringtail-prefixed local identifiers in quantumvm/{quasar,
    quasar_witness,block,vm,vm_test,signer,stamper,service}.go,
    thresholdvm/{client,protocols,rpc,types/{ceremony,share},
    runtime/m_chain_adapter,cert/lane_test,protocol_executor_test}.go,
    dexvm/factory.go

Directory + file rename:
  thresholdvm/protocol/ringtail_general/ringtail.go
        → thresholdvm/protocol/corona_general/corona.go
  package ringtail_general → package corona_general

evm/main.go: replace single `precompile/ringtail` blank-import with
the canonical LP-4200 unified PQCrypto block (mlkem 0x012201,
mldsa 0x012202, slhdsa 0x012203, pulsar 0x012204, p3q 0x012205,
corona 0x012206) + xwing.

External test that imports threshold's renamed wrapper:
  thresholdvm/protocol_executor_test.go now imports
  "github.com/luxfi/threshold/protocols/corona" (was protocols/ringtail).
  Resolves via the workspace `./threshold` entry pointing at the
  local renamed wrapper; downstream chains/go.mod still pins
  luxfi/threshold v1.5.5 and will tidy clean once threshold cuts the
  next tag.

Build: go build ./... PASS (only harmless duplicate-rpath warnings
from the cevm cgo link).
Tests:
  thresholdvm + subpackages PASS
  quantumvm PASS
2026-05-14 09:33:22 -07:00
zeekay c20a769c33 evm: drop precompile/quasar blank-import — retired in upstream
quasar/* shipped a forgeable Verkle stub at 0x0300..0020 plus classical
BLS/Hybrid at 0x0300..0021-25 — pre-LP-4200 cruft now deleted at
github.com/luxfi/precompile. The canonical PQ verifiers live in the
LP-4200 0x012200 block.
2026-05-13 15:29:37 -07:00
zeekay dc31d5b38c quantumvm: complete Ringtail→Corona rename (consumer-side leak after consensus repo migration)
luxfi/consensus renamed the threshold-signature types from
Ringtail* to Corona* (and the round-init helper from
RingtailRound1 to CoronaRound1) when the protocol moved off the
Ringtail family in favor of the Corona lattice scheme. quantumvm
was a consumer that never picked up the rename. Sweep the file
with the rename map; the upstream symbols are now resolvable.
2026-05-13 13:11:23 -07:00
zeekay 02c6614fb0 deps: luxfi/crypto v1.19.0 2026-05-13 11:58:32 -07:00
zeekay 761359bf58 go.mod: bump go directive to 1.26.3 (security advisory) 2026-05-12 21:28:38 -07:00
zeekay 483b28e572 feat(oraclevm,relayvm): re-export VMID from canonical luxfi/oracle and luxfi/relay v1.2.1 2026-05-05 16:58:18 -07:00
zeekay f984a7e538 chains/thresholdvm: M/F-Chain split clarified per LP-134 2026-05-05 16:54:19 -07:00
zeekay 80d873b408 deps: accel v1.0.9 (VMSession); thresholdvm M/F-Chain doc clarification v1.2.0 2026-05-05 16:53:51 -07:00
zeekay 438cc65e5d chains: M/F/Z-Chain canonical naming per LP-134
Update Go package doc comments and code comments in thresholdvm/,
bridgevm/, and zkvm/ to reflect LP-134 split: M-Chain (MPC ceremonies
for bridge custody of external wallets) and F-Chain (FHE compute).
Legacy T-Chain naming clarified inline.
2026-05-05 16:28:53 -07:00
zeekay 4534ba110f chains: rename T-Chain split into M-Chain (MPC) + F-Chain (FHE) per LP-134
- M-Chain: thresholdvm in MPC mode — CGGMP21/FROST/Pulsar-general
  ceremonies for bridge custody of external wallets
- F-Chain: thresholdvm in FHE mode — TFHE bootstrap-key generation,
  encrypted EVM compute
- Q-Chain: post-quantum consensus signing (Pulsar) — clarified
- Z-Chain: Groth16 over BLS12-381 — clarified (rolls N x ML-DSA-65 sigs
  into 192-byte proof)
- T-Chain: now refers to teleportvm only (unified bridge+relay+oracle)
2026-05-05 13:06:30 -07:00
zeekay e4cb63bb6f Consolidate VMs into single chains module; cevm Metal anchor + V4 dispatch
VM consolidation (one module, one place only):
- Removed per-VM go.mod/go.sum/VERSION from {aivm,bridgevm,dexvm,evm,
  graphvm,identityvm,keyvm,oraclevm,quantumvm,relayvm,thresholdvm,zkvm}
- All VMs now compile under github.com/luxfi/chains root module
- aivm/, dexvm/, identityvm/, keyvm/, oraclevm/ factory.go + vm.go updated
  for AccelHost wiring

cevm Go-side (evm/cevm/):
- cevm.go, cevm_cgo.go, cevm_nocgo.go: ExecuteBlockV4(backend, threads,
  txs, ctx, state) with StateAccount snapshot
- cevm_secp256k1.go: BatchRecoverSenders Metal LDFLAGS
- cevm_secp256k1_metal_anchor_darwin.{c,go}: anchor to keep linker from
  dropping libsecp256k1_metal.a
- cevm_secp256k1_nocgo.go: stub for non-cgo builds
- plugin.go, fetch-luxcpp.sh, luxcpp-SHA256SUMS, LUXCPP_VERSION:
  pinned luxcpp consumption
- evm/cevm/parallel/parallel.go: BlockExecutor adapter calls
  cevm.ExecuteBlockV4 with state snapshot built from txs+statedb

Quantum/ZK witness:
- quantumvm/quasar_witness.go, zkvm/zwitness.go

go.mod: removed dead `replace github.com/ethereum/go-ethereum => luxfi/geth`
directive (caused dual-path conflict after math semver bump; no remaining
ethereum/go-ethereum imports in source). go mod tidy clean.

Tests: TestBatchRecoverSenders PASS through Metal anchor (cevm package).
2026-05-05 10:17:49 -07:00
zeekay 1086c2aabf LP-108 ENSURE: cevm/parallel — block-batched BlockExecutor for luxfi/evm
Real adapter wiring cevm.ExecuteBlockV3 through luxfi/evm's
BlockExecutor interface. Replaces the (nil, nil) stub in
luxfi/evm/core/parallel/backend_cevm.go with an actual block-batch
dispatch.

Why this lives in chains/evm/cevm/parallel and not luxfi/evm:
* Import direction: luxfi/evm declares the interface; cevm consumer
  imports luxfi/evm to satisfy it. Parallel-evm shouldn't import cevm.
* Build gate: this file requires the cgo bridge in cevm_cgo.go to
  link libcevm.a + libluxgpu. Operators opt in by importing this
  package; default builds skip it.

5-stage adapter:
1. Build []cevm.Transaction from types.Transactions (sender recovery,
   To+code load, Value/GasPrice uint64 conversion).
2. Build cevm.BlockContext (timestamp, number, chain id, basefee,
   coinbase, prevrandao, gas limit, blob basefee).
3. Dispatch one cevm.ExecuteBlockV3 cgo call.
4. Detect TxCallNotSupported — fall through to Go EVM (return nil,nil)
   rather than mix backends mid-block.
5. Reconstruct receipts. PARITY-CRITICAL: until cevm V3 ABI exposes
   per-tx logs, we only enable the path for value-transfer-only
   blocks (no Data, no Code at To). Otherwise fall through.

Wiring example (operator bootstrap):

  import (
      "github.com/luxfi/evm/core/parallel"
      cevmparallel "github.com/luxfi/chains/evm/cevm/parallel"
      "github.com/luxfi/chains/evm/cevm"
  )
  parallel.RegisterExecutor(&cevmparallel.Executor{
      CevmBackend: cevm.GPUMetal,
      Threads:     0,
  })

Build verified: CGO_ENABLED=0 GOWORK=off go build . — clean.

Production gate (LP-108):
* Correctness test: parity vs Go EVM Block-STM, value-transfer
  blocks first; non-value-transfer blocked until V3-logs ABI.
* Single canonical owner: this is the one cevm BlockExecutor.
* Reproducible bench: pending — needs an end-to-end harness that
  runs both Go EVM and cevm on the same value-transfer block stream.

Open work-items (tracked):
* cevm V3 ABI per-tx logs export (consensus-blocking for non-value
  blocks).
* CALL/CREATE on cevm GPU (status=5 fallback today).
* evm-parity-test 0/133 (real CPU/GPU divergence; gas accounting +
  EIP-2929).
2026-05-04 17:36:37 -07:00
zeekay b746825765 docs: PLUGGABLE.md — chain VM canonicalization pattern + pluggable EVM
Codifies the relayvm/oraclevm shim pattern so future chain VMs follow it
uniformly. Documents the cevm pluggability story (CGO build tag selects
C++/GPU vs pure-Go EVM kernels, both behind luxfi/vm/chain.ChainVM).
2026-04-28 19:07:04 -07:00
zeekay 786f1d6b15 oraclevm: re-export luxfi/oracle/vm — single canonical source
Mirrors the relayvm change. Removes local copies of vm.go / service.go /
dag_vertex.go / factory.go / tests. Canonical source now lives in
luxfi/oracle/vm (also driving the standalone oracled operator daemon).

build (GOWORK=off): exit 0
2026-04-28 19:05:29 -07:00
zeekay 9ef19f62db relayvm: re-export luxfi/relay/vm — single canonical source
Removes local copies of vm.go / service.go / block.go / dag_vertex.go /
factory.go / tests. The canonical chain VM now lives in luxfi/relay/vm
(also driving the standalone relayd operator daemon). This package is a
type-alias shim so existing import paths (luxfi/chains/relayvm) keep
working.

build (GOWORK=off): exit 0
2026-04-28 19:01:11 -07:00
zeekay c1275655cc feat(thresholdvm): stage design docs and protocol scaffolding
Stages the ThresholdVM engineering record under chains/thresholdvm/:

Docs (engineering record, 502 LOC):
- DESIGN.md, LLM.md, README.md
- docs/ARCHITECTURE.md, docs/F_CHAIN_INTEGRATION.md, docs/M_CHAIN_INTEGRATION.md

Source scaffolding (1289 LOC):
- cert/      — QuasarCertLane registration + subject binding (M/F shared)
- types/     — ceremony, participant, proof, share substrate types
- protocol/  — package surfaces for cggmp21, frost, ringtail_general, tfhe_keygen
- runtime/   — F-chain and M-chain adapters

All Go files carry the Lux license header. Nothing here is generated or
fixture data; this is the signed-off design surface for the ThresholdVM
library used by M-chain and F-chain.
v1.1.0
2026-04-28 09:17:47 -07:00
zeekay 4ef77bfad9 fix(submodules): resolve build/test failures across 6 chains
- evm: bump precompile to v0.5.12 + fhe to v1.8.0 + gpu to v0.31.1
  (gpu v0.30.0 had unresolved C.mlx_* CGO symbols)
- aivm, bridgevm, quantumvm: go mod tidy
- thresholdvm, zkvm: bump genproto to v0.0.0-20260217215200-42d3e9bedb6d
  to resolve ambiguous googleapis/api/annotations import

All 12 chains now build and tests pass with GOWORK=off.

Refs #248
2026-04-28 02:51:06 -07:00
zeekay 3e52b7e44c fix: refresh stale go.sum hashes for luxfi/[email protected]
Pre-existing drift from before/during luxgpu migration: go.sum had stale
h1 hashes for luxfi/[email protected] that no longer matched the module
proxy contents, causing 'checksum mismatch' SECURITY ERROR on every
build/test.

Refreshed sums via 'go mod download' to canonical proxy.golang.org values.
No version bumps; no source changes.
2026-04-28 00:25:40 -07:00
zeekayandGitHub c37cd10a82 ci: migrate to canonical docker-build reusable with matrix (#1)
- Replace bespoke release.yml with canonical matrix calling hanzoai/.github/.github/workflows/docker-build.yml@main
- Add .github/images.json for per-VM image configuration
- Add Dockerfile.plugin (stateless scratch wrapper for pre-built VM binary)
- Add workflow-sanity.yml

Images built: 12 VM plugins under ghcr.io/luxfi/chains/*
(servicenodevm, teleportvm removed from release — directories missing in repo)

Refs: hanzoai/.github canonical Docker CI contract.
2026-04-23 19:20:48 -07:00
zeekay 124fb81b3a fix: dexvm VMID type + quantumvm RPC name
- dexvm.VMID: [32]byte → ids.ID (consistent with other 10 VMs)
- quantumvm RPC service: "qvm" → "quantumvm" (matches package + dir)

Removes last vestiges of the old short-name convention.
evm/v0.1.0
2026-04-13 05:49:35 -07:00
zeekay 0d5bc75ef9 feat: move all VM implementations into chains/
VMs now live in ONE place: chains/<name>/ owns the full implementation.
Previously split across node/vms/<name>/ (impl) + chains/<name>/main.go
(plugin wrapper). Now consolidated.

New layout:
  chains/<name>vm/*.go              — package <name>vm (VM code)
  chains/<name>vm/cmd/plugin/main.go — package main (plugin binary)
  chains/<name>vm/go.mod             — module github.com/luxfi/chains/<name>vm

Moved 11 VMs: aivm, bridgevm, dexvm, graphvm, identityvm, keyvm,
oraclevm, quantumvm, relayvm, thresholdvm, zkvm.

External callers now import github.com/luxfi/chains/<name> directly.
2026-04-13 05:27:00 -07:00
zeekay 696b131a6a refactor: rename packages bvm/gvm/qvm/tvm/zvm to match dir names
Consistent naming: directory = package = binary.
- bvm → bridgevm
- gvm → graphvm
- qvm → quantumvm
- tvm → thresholdvm
- zvm → zkvm

Also: delete teleportvm/ and servicenodevm/ chain wrappers.
- teleportvm was duplicate of bridgevm+relayvm+oraclevm (separated chains)
- servicenodevm was renamed to sessionvm and lives at github.com/luxfi/session

One name, one package, one place.
2026-04-13 05:15:42 -07:00
zeekay 1367d71f9a evm: remove deprecated umbrella comment stubs (packages deleted in precompile c81f2b3) 2026-04-13 00:02:37 -07:00
zeekay 9a69e56aab fix: remove deleted aes/chacha20/ecies imports, bump deps
precompile v0.5.10: key-exposure packages removed (C-03)
evm v0.8.49: registry cleaned, precompile dep updated
2026-04-12 20:57:55 -07:00
zeekay a448bc8f61 fix: remove dead attestation import, drop secret-key precompiles (L-09)
- Remove attestation blank import (no init/module registration, dead code)
- Remove aes, chacha20, ecies (secret keys in calldata are public on-chain)
- Update comments for hpke (seal only) and ring (verify only)
2026-04-12 20:36:10 -07:00
zeekay fb44647653 feat: import 10 new precompile packages into Lux EVM
bls12381, poseidon, x25519, xwing, aes, chacha20, pedersen,
babyjubjub, pasta, curve25519
2026-04-12 19:54:46 -07:00
zeekay dc55e75702 feat: all 22 explicit precompiles — remove pqcrypto/quantum/threshold umbrellas 2026-04-12 19:36:30 -07:00
zeekay df4f124580 feat: enable all 18 precompiles on C-Chain EVM 2026-04-12 19:20:57 -07:00
zeekay e5eddd9130 fix: update evm deps to match node v1.23.x v1.0.0 2026-04-12 18:11:50 -07:00
zeekay 6a9c794ae7 feat: VM plugin monorepo — 14 independent binaries
Each VM builds as a standalone binary that the Lux node loads via
--plugin-dir. Node no longer bakes optional VMs in-process.

VMs: evm, dexvm, aivm, bridgevm, graphvm, identityvm, keyvm,
oraclevm, quantumvm, relayvm, servicenodevm, teleportvm,
thresholdvm, zkvm.

All 13 node-dependent VMs compile and report version correctly.
EVM requires CGo (luxcpp) — builds in CI only.
2026-04-12 13:05:45 -07:00