From 9bb0b7b5e1d2dfee96e0e1f542c265f715da96f2 Mon Sep 17 00:00:00 2001 From: z Date: Thu, 23 Apr 2026 18:01:26 -0700 Subject: [PATCH 1/2] ci: migrate runners from lux-build to hanzo-build (ARC consolidation) (#104) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Consolidating to single canonical ARC fleet. Killing duplicate lux-build scale set. All callers → hanzo-build-linux-amd64 (max 30 on DO) and hanzo-build-linux-arm64 (max 30 on GKE T2A Ampere). One and only one ARC fleet across hanzo/lux/zoo/liquidity. Includes build-linux-binaries.yml (release tarball) in addition to the docker + debian package workflows. No behavior change. Co-authored-by: Hanzo AI --- .github/workflows/build-linux-binaries.yml | 2 +- .github/workflows/build-ubuntu-amd64-release.yml | 4 ++-- .github/workflows/docker.yml | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-linux-binaries.yml b/.github/workflows/build-linux-binaries.yml index b8cbbe7bc3..339d086ef9 100644 --- a/.github/workflows/build-linux-binaries.yml +++ b/.github/workflows/build-linux-binaries.yml @@ -18,7 +18,7 @@ on: jobs: build-x86_64-binaries-tarball: - runs-on: lux-build-linux-amd64 + runs-on: hanzo-build-linux-amd64 permissions: id-token: write contents: read diff --git a/.github/workflows/build-ubuntu-amd64-release.yml b/.github/workflows/build-ubuntu-amd64-release.yml index 38c7b8cd9f..70e9da2c04 100644 --- a/.github/workflows/build-ubuntu-amd64-release.yml +++ b/.github/workflows/build-ubuntu-amd64-release.yml @@ -18,7 +18,7 @@ on: jobs: build-jammy-amd64-package: - runs-on: lux-build-linux-amd64 + runs-on: hanzo-build-linux-amd64 permissions: id-token: write contents: read @@ -66,7 +66,7 @@ jobs: rm -rf /tmp/luxd build-focal-amd64-package: - runs-on: lux-build-linux-amd64 + runs-on: hanzo-build-linux-amd64 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index e3ec1a6104..96b11a9c18 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -15,8 +15,8 @@ jobs: uses: hanzoai/.github/.github/workflows/docker-build.yml@main with: image: ghcr.io/luxfi/node - runner-amd64: lux-build-linux-amd64 - runner-arm64: lux-build-arm64 + runner-amd64: hanzo-build-linux-amd64 + runner-arm64: hanzo-build-linux-arm64 secrets: inherit notify-universe: From d8ff77121493bfc4e56f605706a41b217894e0ff Mon Sep 17 00:00:00 2001 From: Antje Worring Date: Sun, 31 May 2026 23:10:41 -0700 Subject: [PATCH 2/2] fix: restore main/main.go entry point for luxd binary MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit main/ has been absent from `main`, so every build path targeting ./main — Makefile build/install/build-release, scripts/build.sh, .goreleaser.yml, and the release CI workflows — fails with 'stat main: no such file or directory'. This restores the entry point from clean-main (f2ff0199d); it still matches current APIs (config.BuildFlagSet/BuildViper/GetNodeConfig, node.New(*node.Config, log.Factory, log.Logger), version.CurrentApp). Verified: `go build -o build/luxd ./main` succeeds and the binary runs (`luxd --version` -> luxd/1.23.25). Co-Authored-By: Claude Opus 4.8 (1M context) --- main/main.go | 101 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 main/main.go diff --git a/main/main.go b/main/main.go new file mode 100644 index 0000000000..91c815813f --- /dev/null +++ b/main/main.go @@ -0,0 +1,101 @@ +// Copyright (C) 2019-2026, Lux Industries Inc. All rights reserved. +// See the file LICENSE for licensing terms. + +// luxd — Lux Network node daemon. +// +// Entry point for the Lux primary-network node binary. Loads configuration +// from CLI flags + config files via Viper, constructs a [node.Node], and +// dispatches the main event loop. +package main + +import ( + "context" + "errors" + "fmt" + "os" + "os/signal" + "syscall" + + "github.com/luxfi/log" + "github.com/luxfi/node/config" + "github.com/luxfi/node/node" + "github.com/luxfi/node/version" + "github.com/luxfi/sys/ulimit" +) + +const Header = ` +▼▼▼▼▼ + ▼▼▼ + ▼ +` + +func main() { + if exitCode := run(os.Args[1:]); exitCode != 0 { + os.Exit(exitCode) + } +} + +func run(args []string) int { + // --version short-circuit + for _, a := range args { + if a == "--version" || a == "-v" { + fmt.Println(version.CurrentApp.String()) + return 0 + } + } + + fmt.Print(Header) + + // Parse CLI + config file via Viper. + fs := config.BuildFlagSet() + v, err := config.BuildViper(fs, args) + if err != nil { + fmt.Fprintln(os.Stderr, "luxd: failed to parse config:", err) + return 1 + } + cfg, err := config.GetNodeConfig(v) + if err != nil { + fmt.Fprintln(os.Stderr, "luxd: failed to load node config:", err) + return 1 + } + + // Logger. + infoLevel, _ := log.ToLevel("info") + logFactory := log.NewFactoryWithConfig(log.Config{ + DisplayLevel: infoLevel, + LogLevel: infoLevel, + }) + logger, err := logFactory.Make("node") + if err != nil { + fmt.Fprintln(os.Stderr, "luxd: failed to construct logger:", err) + return 1 + } + + // Bump file descriptor limit early; node + its plugins open many sockets. + if err := ulimit.Set(ulimit.DefaultFDLimit, logger); err != nil { + logger.Error("failed to set fd limit", "error", err) + return 1 + } + + // Construct the node. + n, err := node.New(&cfg, logFactory, logger) + if err != nil { + logger.Error("failed to construct node", "error", err) + return 1 + } + + // Run dispatch loop with signal-driven shutdown. + ctx, cancel := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM) + defer cancel() + go func() { + <-ctx.Done() + logger.Info("received shutdown signal") + n.Shutdown(0) + }() + + if err := n.Dispatch(); err != nil && !errors.Is(err, context.Canceled) { + logger.Error("dispatch returned error", "error", err) + return 1 + } + return n.ExitCode() +}