Files
zeekayandHanzo Dev f618b63b86 feat(chains/rust): the X-Chain in Rust, byte-identical to Go
Ports luxfi/node/vms/xvm — the UTXO ledger and asset transfers — into
chains/rust/xvm, against the object-safe VM seam of lux-rs/node.

The whole chain: the ZAP object format, the (family, shape) wire envelopes,
the secp256k1 / nft / property feature extensions and their spend rules, all
five transactions with their encoding, signing and parsing, the syntactic,
semantic and execution passes, the committed store and the diff stack a fork
is made of, the block with its builder and its verify/accept/reject machine,
the execution root and the owner root, and the VM behind the seam.

What makes it the same chain rather than a similar one: twelve vectors
printed by the Go X-chain and pasted in unchanged, asserting the bytes a
signature is computed over, the bytes that go on the wire, and the id — which
is the hash of those bytes, so one byte of difference is two names for one
transaction. The execution-root KAT comes over verbatim from xvmroot_test.go
and matches the value Go and every GPU backend produce.

Five dependencies, no C library, no path dependency on the node. 239 tests,
clippy and rustfmt clean.

Left out, and none of it is ledger behaviour: the node's transaction indexer,
p2p gossip and the RPC path, the op registry and its generators, the
genesis-building static service, config parsing, the strict-post-quantum
mempool profile (chains/fee policy over a chain, not a rule of this one), and
Go's parallel Merkle fold — there is one fold here, so the property that it
equals the serial one has nothing to compare against. Storage is in memory
behind the same Chain trait a persistent layer would implement.

Co-authored-by: Hanzo Dev <[email protected]>
2026-09-04 02:07:11 -07:00

644 B

chains/rust

The chain suite in Rust, behind the VM seam of ~/work/lux-rs/node (src/vm.rs). runtime/rust already runs a C-Chain there via revm; this is the rest of the suite.

chain crate state
X — the UTXO ledger xvm/ ported, 239 tests green, byte-identical to Go
P, Q, Z — not started

xvm

cd xvm && PATH=~/.cargo/bin:$PATH cargo test

Five dependencies, no C library, no path dependency on the node. See xvm/LLM.md for what was ported, what was deliberately left, and the Go golden vectors that prove the wire and the state root are the same bytes in both languages.