Files
zeekay 7cf87b230b node-unified is the node
The module already called itself github.com/luxfi/node while containing no node
in Go: cmd/luxd was twenty-one lines that printed the size of a few types, and
the Go column of the matrix measured a VM plugin. A repo that fetches the thing
it claims to be has not replaced it, so the Go sources move in — 1515 files,
the daemon and everything under it — and the build reaches outside this module
for nothing.

Rust and C++ sit beside it unchanged and are still measured against it by the
differential. That is the point of one repo: the reference implementation and
the two ports are the same checkout, so parity is a thing you can run rather
than a thing you assert.

Verified: builds, and the closure carries no lux-private — checked at build time
rather than believed. The daemon starts twelve chains on a local network
(P X C Q Z A B G K M F, plus D through its plugin) and reports healthy.
2026-09-07 16:15:25 -07:00

42 lines
1.5 KiB
Docker

# The version is supplied as a build argument rather than hard-coded
# to minimize the cost of version changes.
ARG GO_VERSION=INVALID # This value is not intended to be used but silences a warning
# LUXD_NODE_IMAGE needs to identify an existing node image and should include the tag
ARG LUXD_NODE_IMAGE="invalid-image" # This value is not intended to be used but silences a warning
# ============= Compilation Stage ================
FROM golang:$GO_VERSION-bookworm AS builder
# GO_VERSION tracks the main module's `go` directive (build_xsvm_image.sh reads
# it from `go list -m -f {{.GoVersion}}`), so this base can never be below the
# main module's floor -- but a *dependency* can require a newer toolchain than
# the main module does. The golang images set GOTOOLCHAIN=local, which turns
# that into a hard build failure; `auto` fetches the required toolchain
# (checksum-verified via sum.golang.org) instead.
ENV GOTOOLCHAIN=auto
WORKDIR /build
# Copy and download lux dependencies using go mod
COPY go.mod .
COPY go.sum .
RUN go mod download
# Copy the code into the container
COPY . .
# Build xsvm
RUN ./scripts/build_xsvm.sh
# ============= Cleanup Stage ================
FROM $LUXD_NODE_IMAGE AS execution
# Configure the node with the location of the xsvm plugin
ENV LUXD_PLUGIN_DIR=/node/build/plugins
# Copy the xsvm binary to the default plugin dir for images
COPY --from=builder /build/build/xsvm $LUXD_PLUGIN_DIR/v3m4wPxaHpvGr8qfMeyK6PRW3idZrPHmYcMTt7oXdK47yurVH
# The node image's entrypoint will be reused.