From f6e9500145d1b2d6ffee010b84ee4d893d1d90a2 Mon Sep 17 00:00:00 2001 From: zach Date: Thu, 23 Apr 2026 19:15:45 -0700 Subject: [PATCH 1/3] ci: migrate to canonical docker-build reusable - Add docker.yml using hanzoai/.github/.github/workflows/docker-build.yml@main - Add workflow-sanity.yml to enforce canonical CI contract - Remove bespoke docker build steps from existing workflows Refs: hanzoai/.github canonical Docker CI contract. --- .github/workflows/build-binaries.yml | 256 ++++++++------------ .github/workflows/build-docker.yml | 51 ---- .github/workflows/deploy-libp2p-relayer.yml | 54 ----- .github/workflows/docker.yml | 17 ++ .github/workflows/workflow-sanity.yml | 9 + 5 files changed, 129 insertions(+), 258 deletions(-) delete mode 100644 .github/workflows/build-docker.yml delete mode 100644 .github/workflows/deploy-libp2p-relayer.yml create mode 100644 .github/workflows/docker.yml create mode 100644 .github/workflows/workflow-sanity.yml diff --git a/.github/workflows/build-binaries.yml b/.github/workflows/build-binaries.yml index cc99b64d7..6632632d5 100644 --- a/.github/workflows/build-binaries.yml +++ b/.github/workflows/build-binaries.yml @@ -1,10 +1,8 @@ name: Build hanzo-node binaries - on: push: tags: - - "v[0-9]+.[0-9]+.[0-9]+" - + - v[0-9]+.[0-9]+.[0-9]+ jobs: build-binaries: name: Build binary @@ -12,155 +10,107 @@ jobs: fail-fast: false matrix: include: - # Linux - - arch: x86_64-unknown-linux-gnu - os: ubuntu-22.04 - target: x86_64-unknown-linux-gnu - - arch: aarch64-unknown-linux-gnu - os: ubuntu-22.04 - target: aarch64-unknown-linux-gnu - cross: true - # macOS - - arch: aarch64-apple-darwin - os: macos-14 - target: aarch64-apple-darwin - - arch: x86_64-apple-darwin - os: macos-14 - target: x86_64-apple-darwin - cross_mac: true - # Windows - - arch: x86_64-pc-windows-msvc - os: windows-2022 - target: x86_64-pc-windows-msvc + - arch: x86_64-unknown-linux-gnu + os: ubuntu-22.04 + target: x86_64-unknown-linux-gnu + - arch: aarch64-unknown-linux-gnu + os: ubuntu-22.04 + target: aarch64-unknown-linux-gnu + cross: true + - arch: aarch64-apple-darwin + os: macos-14 + target: aarch64-apple-darwin + - arch: x86_64-apple-darwin + os: macos-14 + target: x86_64-apple-darwin + cross_mac: true + - arch: x86_64-pc-windows-msvc + os: windows-2022 + target: x86_64-pc-windows-msvc runs-on: ${{ matrix.os }} steps: - - name: Checkout sources - uses: actions/checkout@v4 - - - name: Configure rust-lld linker for Windows - if: matrix.os == 'windows-2022' - run: | - if (-Not (Test-Path ".cargo")) { mkdir .cargo } - echo '[target.x86_64-pc-windows-msvc]' > .cargo/config.toml - echo 'linker = "rust-lld"' >> .cargo/config.toml - - - name: Install protobuf compiler (Linux) - if: runner.os == 'Linux' - run: sudo apt-get update && sudo apt-get install -y protobuf-compiler - - - name: Install cross-compilation tools (Linux ARM64) - if: matrix.cross == true - run: | - sudo apt-get update - sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu - rustup target add aarch64-unknown-linux-gnu - - - name: Install protobuf compiler (macOS) - if: runner.os == 'macOS' - run: brew install protobuf - - - name: Install cross-compilation target (macOS x64) - if: matrix.cross_mac == true - run: rustup target add x86_64-apple-darwin - - - name: Cache cargo assets - id: cache - uses: actions/cache@v4 - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - target/ - key: ${{ matrix.arch }}-build-cargo-v2 - restore-keys: | - ${{ matrix.arch }}-build-cargo- - - - - name: Configure cross-compilation (Linux ARM64) - if: matrix.cross == true - run: | - mkdir -p .cargo - echo '' >> .cargo/config.toml - echo '[target.aarch64-unknown-linux-gnu]' >> .cargo/config.toml - echo 'linker = "aarch64-linux-gnu-gcc"' >> .cargo/config.toml - - - name: Build - env: - AI_MODEL_CATALOG_BUILD: 1 - run: cargo build --release --bin hanzo-node --target ${{ matrix.target }} - - - name: Move binary to expected location - shell: bash - run: | - mkdir -p target/release - if [ -f "target/${{ matrix.target }}/release/hanzo-node${{ matrix.arch == 'x86_64-pc-windows-msvc' && '.exe' || '' }}" ]; then - cp "target/${{ matrix.target }}/release/hanzo-node${{ matrix.arch == 'x86_64-pc-windows-msvc' && '.exe' || '' }}" target/release/ - fi - - - name: Prepare bundle files - env: - ZIP_FILE_NAME: ${{ github.ref_name }}.zip - EXTENSION: ${{ matrix.arch == 'x86_64-pc-windows-msvc' && '.exe' || '' }} - run: | - mkdir files-to-r2 - cp target/release/hanzo-node${{ env.EXTENSION }} files-to-r2/hanzo-node${{ env.EXTENSION }} - cp -r target/release/hanzo-tools-runner-resources files-to-r2/ - cd ./files-to-r2 - 7z a -tzip ${{ env.ZIP_FILE_NAME}} . -sdel - cp ${{ env.ZIP_FILE_NAME}} latest.zip - - - name: Upload bundle to R2 bucket - continue-on-error: true - uses: shallwefootball/s3-upload-action@master - with: - endpoint: https://94a3e3f299092abb1feda2a7481ea845.r2.cloudflarestorage.com - aws_key_id: ${{ secrets.R2_ACCESS_KEY_ID }} - aws_secret_access_key: ${{ secrets.R2_SECRET_ACCESS_KEY }} - aws_bucket: hanzoai - source_dir: files-to-r2 - destination_dir: ./hanzo-node/binaries/production/${{ matrix.arch }}/ - - - name: Upload bundle to release - uses: svenstaro/upload-release-action@v2 - env: - EXTENSION: ${{ matrix.arch == 'x86_64-pc-windows-msvc' && '.exe' || '' }} - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - file: files-to-r2/${{ github.ref_name }}.zip - asset_name: hanzo-node-${{ matrix.arch }}.zip - tag: ${{ github.ref }} - overwrite: true - build-docker-image: - name: Build and push Docker image to Docker Hub - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Download tools from store to pre-install folder - run: | - ./scripts/update_tools.sh - - - name: Log in to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Build and push Docker image - uses: docker/build-push-action@v5 - with: - context: . - file: ./docker/Dockerfile - push: true - build-args: | - BUILD_TYPE=release - AI_MODEL_CATALOG_BUILD=1 - tags: | - hanzoai/hanzo-node:${{ github.ref_name }} - hanzoai/hanzo-node:release-latest + - name: Checkout sources + uses: actions/checkout@v4 + - name: Configure rust-lld linker for Windows + if: matrix.os == 'windows-2022' + run: | + if (-Not (Test-Path ".cargo")) { mkdir .cargo } + echo '[target.x86_64-pc-windows-msvc]' > .cargo/config.toml + echo 'linker = "rust-lld"' >> .cargo/config.toml + - name: Install protobuf compiler (Linux) + if: runner.os == 'Linux' + run: sudo apt-get update && sudo apt-get install -y protobuf-compiler + - name: Install cross-compilation tools (Linux ARM64) + if: matrix.cross == true + run: | + sudo apt-get update + sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu + rustup target add aarch64-unknown-linux-gnu + - name: Install protobuf compiler (macOS) + if: runner.os == 'macOS' + run: brew install protobuf + - name: Install cross-compilation target (macOS x64) + if: matrix.cross_mac == true + run: rustup target add x86_64-apple-darwin + - name: Cache cargo assets + id: cache + uses: actions/cache@v4 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ matrix.arch }}-build-cargo-v2 + restore-keys: | + ${{ matrix.arch }}-build-cargo- + - name: Configure cross-compilation (Linux ARM64) + if: matrix.cross == true + run: | + mkdir -p .cargo + echo '' >> .cargo/config.toml + echo '[target.aarch64-unknown-linux-gnu]' >> .cargo/config.toml + echo 'linker = "aarch64-linux-gnu-gcc"' >> .cargo/config.toml + - name: Build + env: + AI_MODEL_CATALOG_BUILD: 1 + run: cargo build --release --bin hanzo-node --target ${{ matrix.target }} + - name: Move binary to expected location + shell: bash + run: | + mkdir -p target/release + if [ -f "target/${{ matrix.target }}/release/hanzo-node${{ matrix.arch == 'x86_64-pc-windows-msvc' && '.exe' || '' }}" ]; then + cp "target/${{ matrix.target }}/release/hanzo-node${{ matrix.arch == 'x86_64-pc-windows-msvc' && '.exe' || '' }}" target/release/ + fi + - name: Prepare bundle files + env: + ZIP_FILE_NAME: ${{ github.ref_name }}.zip + EXTENSION: ${{ matrix.arch == 'x86_64-pc-windows-msvc' && '.exe' || '' }} + run: | + mkdir files-to-r2 + cp target/release/hanzo-node${{ env.EXTENSION }} files-to-r2/hanzo-node${{ env.EXTENSION }} + cp -r target/release/hanzo-tools-runner-resources files-to-r2/ + cd ./files-to-r2 + 7z a -tzip ${{ env.ZIP_FILE_NAME}} . -sdel + cp ${{ env.ZIP_FILE_NAME}} latest.zip + - name: Upload bundle to R2 bucket + continue-on-error: true + uses: shallwefootball/s3-upload-action@master + with: + endpoint: https://94a3e3f299092abb1feda2a7481ea845.r2.cloudflarestorage.com + aws_key_id: ${{ secrets.R2_ACCESS_KEY_ID }} + aws_secret_access_key: ${{ secrets.R2_SECRET_ACCESS_KEY }} + aws_bucket: hanzoai + source_dir: files-to-r2 + destination_dir: ./hanzo-node/binaries/production/${{ matrix.arch }}/ + - name: Upload bundle to release + uses: svenstaro/upload-release-action@v2 + env: + EXTENSION: ${{ matrix.arch == 'x86_64-pc-windows-msvc' && '.exe' || '' }} + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: files-to-r2/${{ github.ref_name }}.zip + asset_name: hanzo-node-${{ matrix.arch }}.zip + tag: ${{ github.ref }} + overwrite: true diff --git a/.github/workflows/build-docker.yml b/.github/workflows/build-docker.yml deleted file mode 100644 index 21ad81f68..000000000 --- a/.github/workflows/build-docker.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: Build Docker Image - -on: - workflow_dispatch: - inputs: - build_type: - description: 'Build type (debug/release)' - required: true - default: 'debug' - type: choice - options: - - debug - - release - tag: - description: 'Docker image tag (e.g. v0.9.10)' - required: true - type: string - default: 'latest' - -jobs: - build-docker-image: - runs-on: ubuntu-latest - name: Build Docker image - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Download tools from store to pre-install folder - run: | - ./scripts/update_tools.sh - - - name: Log in to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Build and push Docker image - uses: docker/build-push-action@v5 - with: - context: . - file: ./docker/Dockerfile - push: true - build-args: | - BUILD_TYPE=${{ inputs.build_type }} - tags: | - hanzoai/hanzo-node:${{ inputs.tag }} - hanzoai/hanzo-node:${{ inputs.build_type }}-latest diff --git a/.github/workflows/deploy-libp2p-relayer.yml b/.github/workflows/deploy-libp2p-relayer.yml deleted file mode 100644 index 47b51d42d..000000000 --- a/.github/workflows/deploy-libp2p-relayer.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: Deploy LibP2P Relayer - -on: - workflow_dispatch: - inputs: - build_type: - description: 'Build type (debug/release)' - required: true - default: 'release' - type: choice - options: - - debug - - release - tag: - description: 'Docker image tag (e.g. v0.9.10)' - required: true - type: string - default: 'latest' - -jobs: - build-and-deploy: - runs-on: ubuntu-latest - name: Build and Deploy LibP2P Relayer - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Log in to Docker Hub - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 - - - name: Build and push Docker image - uses: docker/build-push-action@v5 - with: - context: . - file: ./hanzo-libs/hanzo-libp2p-relayer/Dockerfile - push: true - build-args: | - BUILD_TYPE=${{ inputs.build_type }} - tags: | - hanzoai/hanzo-libp2p-relayer:${{ inputs.tag }} - hanzoai/hanzo-libp2p-relayer:${{ inputs.build_type }}-latest - cache-from: type=gha - cache-to: type=gha,mode=max - - - name: Summary - run: | - echo "๐Ÿš€ Deployment completed successfully!" - echo "๐Ÿ“ฆ Image: hanzoai/hanzo-libp2p-relayer:${{ inputs.tag }}" \ No newline at end of file diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml new file mode 100644 index 000000000..f419f4478 --- /dev/null +++ b/.github/workflows/docker.yml @@ -0,0 +1,17 @@ +name: Docker +on: + workflow_dispatch: + push: + branches: [main, dev, test] + tags: ['v*'] + +permissions: + contents: read + packages: write + +jobs: + docker: + uses: hanzoai/.github/.github/workflows/docker-build.yml@main + with: + image: ghcr.io/zooai/node + secrets: inherit diff --git a/.github/workflows/workflow-sanity.yml b/.github/workflows/workflow-sanity.yml new file mode 100644 index 000000000..7ea88e7ae --- /dev/null +++ b/.github/workflows/workflow-sanity.yml @@ -0,0 +1,9 @@ +name: Workflow Sanity +on: + pull_request: + push: + branches: [main] + +jobs: + sanity: + uses: hanzoai/.github/.github/workflows/workflow-sanity.yml@main From 19d0590eb5c6bf32ffc87dfece033c0001f89e84 Mon Sep 17 00:00:00 2001 From: zach Date: Sun, 26 Apr 2026 14:08:13 -0700 Subject: [PATCH 2/3] zood: gate bootstrap behind build tag, add 'vms' subcommand Bootstrap subcommand pulls in luxfi/sdk wallet packages that are heavier and currently mid-migration. Gate bootstrap.go behind the 'bootstrap' build tag so the default zood binary builds cleanly against the standard module set. Default build: go build -o zood . Bootstrap-capable: go build -tags=bootstrap -o zood-boot . Adds 'zood vms' subcommand listing the 3-VM triumvirate (zoo-evm, zoo-dex, zoo-fhe) plus the 8 inherited optional VMs from luxfi/node. Pin luxfi/fhe to local clone (upstream LFS budget exhausted) and patch go.sum hash for republished luxfi/precompile v0.5.6. --- bootstrap.go | 3 +++ bootstrap_dispatch.go | 23 +++++++++++++++++++++++ bootstrap_dispatch_tag.go | 13 +++++++++++++ bootstrap_test.go | 3 +++ go.mod | 10 ++++++---- go.sum | 20 +++++++++----------- main.go | 26 +++++++++++++++++++++++++- 7 files changed, 82 insertions(+), 16 deletions(-) create mode 100644 bootstrap_dispatch.go create mode 100644 bootstrap_dispatch_tag.go diff --git a/bootstrap.go b/bootstrap.go index 6b47e9848..7afd1a647 100644 --- a/bootstrap.go +++ b/bootstrap.go @@ -1,6 +1,9 @@ // Copyright (C) 2026, Zoo Labs Foundation. All rights reserved. // See the file LICENSE for licensing terms. +//go:build bootstrap +// +build bootstrap + package main import ( diff --git a/bootstrap_dispatch.go b/bootstrap_dispatch.go new file mode 100644 index 000000000..75f11df59 --- /dev/null +++ b/bootstrap_dispatch.go @@ -0,0 +1,23 @@ +// Copyright (C) 2026, Zoo Labs Foundation. All rights reserved. +// See the file LICENSE for licensing terms. + +//go:build !bootstrap +// +build !bootstrap + +package main + +import ( + "fmt" + "os" +) + +// runBootstrapDispatch is the default no-op bootstrap entry point. +// The full bootstrap implementation lives in bootstrap.go behind the +// "bootstrap" build tag because it pulls in luxfi/sdk wallet packages +// that are heavier (and currently in flux). Build the bootstrap-capable +// binary with: go build -tags=bootstrap -o zood-boot . +func runBootstrapDispatch(args []string) { + fmt.Fprintln(os.Stderr, "zood: bootstrap subcommand not built into this binary") + fmt.Fprintln(os.Stderr, " rebuild with: go build -tags=bootstrap") + os.Exit(2) +} diff --git a/bootstrap_dispatch_tag.go b/bootstrap_dispatch_tag.go new file mode 100644 index 000000000..18671a4c9 --- /dev/null +++ b/bootstrap_dispatch_tag.go @@ -0,0 +1,13 @@ +// Copyright (C) 2026, Zoo Labs Foundation. All rights reserved. +// See the file LICENSE for licensing terms. + +//go:build bootstrap +// +build bootstrap + +package main + +// runBootstrapDispatch routes to the full bootstrap implementation +// when built with -tags=bootstrap. See bootstrap.go. +func runBootstrapDispatch(args []string) { + runBootstrap(args) +} diff --git a/bootstrap_test.go b/bootstrap_test.go index 9cc288cea..c6d78b821 100644 --- a/bootstrap_test.go +++ b/bootstrap_test.go @@ -1,6 +1,9 @@ // Copyright (C) 2026, Zoo Labs Foundation. All rights reserved. // See the file LICENSE for licensing terms. +//go:build bootstrap +// +build bootstrap + package main import ( diff --git a/go.mod b/go.mod index e8db6df9c..de5cde9a6 100644 --- a/go.mod +++ b/go.mod @@ -155,7 +155,7 @@ require ( github.com/luxfi/zapdb v1.8.0 // indirect github.com/mattn/go-colorable v0.1.14 // indirect github.com/mattn/go-isatty v0.0.20 // indirect - github.com/miekg/dns v1.1.66 // indirect + github.com/miekg/dns v1.1.72 // indirect github.com/mimoo/StrobeGo v0.0.0-20220103164710-9a04d6ca976b // indirect github.com/minio/crc64nvme v1.1.1 // indirect github.com/minio/md5-simd v1.1.2 // indirect @@ -230,9 +230,9 @@ require ( golang.org/x/time v0.15.0 // indirect golang.org/x/tools v0.43.0 // indirect gonum.org/v1/gonum v0.17.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20260217215200-42d3e9bedb6d // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20260217215200-42d3e9bedb6d // indirect - google.golang.org/grpc v1.79.1 // indirect + google.golang.org/genproto/googleapis/api v0.0.0-20260401024825-9d38bb4040a9 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20260401024825-9d38bb4040a9 // indirect + google.golang.org/grpc v1.80.0 // indirect google.golang.org/protobuf v1.36.11 // indirect gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect @@ -245,3 +245,5 @@ require ( // Fix merged in luxfi/log โ€” bump to v1.4.5+ when released. // replace github.com/luxfi/precompile => /Users/z/work/lux/precompile + +replace github.com/luxfi/fhe => /Users/z/work/lux/fhe diff --git a/go.sum b/go.sum index d654a7d4d..3cf50ba82 100644 --- a/go.sum +++ b/go.sum @@ -288,8 +288,6 @@ github.com/luxfi/database v1.18.1 h1:Bvovo6MW3XSdUd1DkGNluB2tyvyiT/+N5d3QVwtoNo8 github.com/luxfi/database v1.18.1/go.mod h1:PW0oGujt165mYg7j/lctVbnfsUW6QLfIAgjyQdS66SM= github.com/luxfi/evm v0.8.42 h1:QX3oVJ+C0DXz0Z5XbukKU+HoaRgKi1NGKZ7knP0dil4= github.com/luxfi/evm v0.8.42/go.mod h1:m1LIXkK2Tu41oQzqEJ5bNW9c/Qy7jJ7xN3eo7TiW2iE= -github.com/luxfi/fhe v1.7.6 h1:H2WqsWa/YoeVjDa2EjMtLMyep3MqJgS/rnBwjZSGMcw= -github.com/luxfi/fhe v1.7.6/go.mod h1:evKiXq9Kf7d1SttKZt7ItBAhZ1fQ6O3+iXsD1lw/RYo= github.com/luxfi/filesystem v0.0.1 h1:VZ6xMFKaAPBW/ddlMsDnI2G0VU1lV5rYaVcW5d+KwEY= github.com/luxfi/filesystem v0.0.1/go.mod h1:OQVSU6XNwqrr1AI+MqkID2taHUclx7NYmmr3svgttec= github.com/luxfi/formatting v1.0.1 h1:ZnE1rAdEUds9yAegdVdGDOBGN6hLMPOv6E03Fp8IEYo= @@ -328,7 +326,7 @@ github.com/luxfi/node v1.24.29 h1:tgU1T7qTotckscE2r29lK8akVziQ2cSZtRu7XDpgB8Y= github.com/luxfi/node v1.24.29/go.mod h1:0b5M2qAjpnWkuvhLqVpQioSiK8rPqyevKk35FOaqkEA= github.com/luxfi/p2p v1.19.2 h1:uqZq7ofmEDbXlTkv1QThtci01Q+dmDkNmAPeORIyP8E= github.com/luxfi/p2p v1.19.2/go.mod h1:tI9Bt1R0ouvVtJvXG4e20GlGeV4AR230k4mFF9Vglzk= -github.com/luxfi/precompile v0.5.6 h1:d6qHVpRV1Nct97BxRpLuBQvlYmlg53sleGtq+iRWtyc= +github.com/luxfi/precompile v0.5.6 h1:aP1Il3vS6px1D4DtD0ub+uoLxdfxMu3cl1WCZjLhLYg= github.com/luxfi/precompile v0.5.6/go.mod h1:Jz14VhQrU90mVgm/nTStQHdq8cLSOBHMF9UpJQjPFec= github.com/luxfi/protocol v0.0.3 h1:Teytlu6Gbd0HqJXuDvV84ArqRabEFR40yDNNQUOCpVE= github.com/luxfi/protocol v0.0.3/go.mod h1:ZSA1i7f2SlN129UG7rUZ+doHvf5/mtiurJMqRwGB4M8= @@ -381,8 +379,8 @@ github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stg github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= github.com/miekg/dns v1.1.27/go.mod h1:KNUDUusw/aVsxyTYZM1oqvCicbwhgbNgztCETuNZ7xM= -github.com/miekg/dns v1.1.66 h1:FeZXOS3VCVsKnEAd+wBkjMC3D2K+ww66Cq3VnCINuJE= -github.com/miekg/dns v1.1.66/go.mod h1:jGFzBsSNbJw6z1HYut1RKBKHA9PBdxeHrZG8J+gC2WE= +github.com/miekg/dns v1.1.72 h1:vhmr+TF2A3tuoGNkLDFK9zi36F2LS+hKTRW0Uf8kbzI= +github.com/miekg/dns v1.1.72/go.mod h1:+EuEPhdHOsfk6Wk5TT2CzssZdqkmFhf8r+aVyDEToIs= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= github.com/mimoo/StrobeGo v0.0.0-20220103164710-9a04d6ca976b h1:QrHweqAtyJ9EwCaGHBu1fghwxIPiopAHV06JlXrMHjk= github.com/mimoo/StrobeGo v0.0.0-20220103164710-9a04d6ca976b/go.mod h1:xxLb2ip6sSUts3g1irPVHyk/DGslwQsNOo9I7smJfNU= @@ -705,12 +703,12 @@ golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8= gonum.org/v1/gonum v0.17.0 h1:VbpOemQlsSMrYmn7T2OUvQ4dqxQXU+ouZFQsZOx50z4= gonum.org/v1/gonum v0.17.0/go.mod h1:El3tOrEuMpv2UdMrbNlKEh9vd86bmQ6vqIcDwxEOc1E= -google.golang.org/genproto/googleapis/api v0.0.0-20260217215200-42d3e9bedb6d h1:EocjzKLywydp5uZ5tJ79iP6Q0UjDnyiHkGRWxuPBP8s= -google.golang.org/genproto/googleapis/api v0.0.0-20260217215200-42d3e9bedb6d/go.mod h1:48U2I+QQUYhsFrg2SY6r+nJzeOtjey7j//WBESw+qyQ= -google.golang.org/genproto/googleapis/rpc v0.0.0-20260217215200-42d3e9bedb6d h1:t/LOSXPJ9R0B6fnZNyALBRfZBH0Uy0gT+uR+SJ6syqQ= -google.golang.org/genproto/googleapis/rpc v0.0.0-20260217215200-42d3e9bedb6d/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8= -google.golang.org/grpc v1.79.1 h1:zGhSi45ODB9/p3VAawt9a+O/MULLl9dpizzNNpq7flY= -google.golang.org/grpc v1.79.1/go.mod h1:KmT0Kjez+0dde/v2j9vzwoAScgEPx/Bw1CYChhHLrHQ= +google.golang.org/genproto/googleapis/api v0.0.0-20260401024825-9d38bb4040a9 h1:VPWxll4HlMw1Vs/qXtN7BvhZqsS9cdAittCNvVENElA= +google.golang.org/genproto/googleapis/api v0.0.0-20260401024825-9d38bb4040a9/go.mod h1:7QBABkRtR8z+TEnmXTqIqwJLlzrZKVfAUm7tY3yGv0M= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260401024825-9d38bb4040a9 h1:m8qni9SQFH0tJc1X0vmnpw/0t+AImlSvp30sEupozUg= +google.golang.org/genproto/googleapis/rpc v0.0.0-20260401024825-9d38bb4040a9/go.mod h1:4Hqkh8ycfw05ld/3BWL7rJOSfebL2Q+DVDeRgYgxUU8= +google.golang.org/grpc v1.80.0 h1:Xr6m2WmWZLETvUNvIUmeD5OAagMw3FiKmMlTdViWsHM= +google.golang.org/grpc v1.80.0/go.mod h1:ho/dLnxwi3EDJA4Zghp7k2Ec1+c2jqup0bFkw07bwF4= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= diff --git a/main.go b/main.go index 18930c25e..63d76be4f 100644 --- a/main.go +++ b/main.go @@ -56,11 +56,14 @@ func main() { if len(os.Args) > 1 { switch os.Args[1] { case "bootstrap": - runBootstrap(os.Args[2:]) + runBootstrapDispatch(os.Args[2:]) return case "version", "--version", "-v": printVersion() return + case "vms": + printVMs() + return } } @@ -83,6 +86,27 @@ func printVersion() { fmt.Printf("zood %s (luxd %s)\n", "0.2.0", versions.String()) } +// printVMs lists the native and inherited VMs registered into zood. +// The 3-VM triumvirate (Zoo EVM, Zoo DEX, Zoo FHE) is wired locally; +// the 8 other Lux optional VMs come via github.com/luxfi/node. +func printVMs() { + fmt.Println("zood registered VMs:") + fmt.Printf(" zoo-evm %s GPU EVM with Zoo precompiles luxfi/cevm + luxcpp/cevm\n", vm.EVMID.String()) + fmt.Printf(" zoo-dex %s CLOB matching engine luxcpp/dex bindings\n", vm.DEXVMID.String()) + fmt.Printf(" zoo-fhe %s CKKS/TFHE encrypted compute luxcpp/fhe bindings\n", vm.FHEVMID.String()) + fmt.Println(" --- inherited from luxfi/node ---") + fmt.Println(" aivm (A-Chain) AI inference") + fmt.Println(" bridgevm (B-Chain) Cross-chain bridge") + fmt.Println(" graphvm (G-Chain) Graph database") + fmt.Println(" identityvm (I-Chain) DID/VC") + fmt.Println(" keyvm (K-Chain) PQ key management") + fmt.Println(" oraclevm (O-Chain) Oracle feeds") + fmt.Println(" quantumvm (Q-Chain) PQ consensus coordination") + fmt.Println(" relayvm (R-Chain) Cross-chain message relay") + fmt.Println(" thresholdvm(T-Chain) Threshold MPC + FHE") + fmt.Println(" zkvm (Z-Chain) Zero-knowledge proofs") +} + func runNode() { fs := config.BuildFlagSet() fs.Int("zap-port", defaultZAPPort, "TCP port for ZAP binary protocol listener (0 to disable)") From 82d6bc60cdd5885ba4e81c9e01dde18863376469 Mon Sep 17 00:00:00 2001 From: zach Date: Tue, 19 May 2026 12:35:03 -0700 Subject: [PATCH 3/3] build(node): GOEXPERIMENT=jsonv2 in Dockerfile per SCALE_STANDARD MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Per SCALE_STANDARD.md ยง2 (~/work/hanzo/hips/docs/SCALE_STANDARD.md) โ€” every Go production Dockerfile that emits JSON to a client builds with GOEXPERIMENT=jsonv2. Verified on hanzoai/zip's json_bench_test.go: - Edge POST roundtrip: -12% time, -23% allocs - Marshal-only: -22% time - Unmarshal-only: -19% time, -25% allocs --- Dockerfile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Dockerfile b/Dockerfile index 8d0db7169..a326b67fd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,6 +19,14 @@ RUN sed -i '/luxfi\//d; /liquidityio\//d' go.sum && go mod download COPY . . RUN sed -i '/luxfi\//d; /liquidityio\//d' go.sum + +# Per SCALE_STANDARD.md ยง2 (https://github.com/hanzoai/hips/blob/main/docs/SCALE_STANDARD.md) +# โ€” every Go production Dockerfile that emits JSON to a client builds +# with GOEXPERIMENT=jsonv2. Verified -12% time / -23% allocs on the +# edge POST roundtrip vs encoding/json v1. +ARG GO_EXPERIMENT=jsonv2 +ENV GOEXPERIMENT=${GO_EXPERIMENT} + RUN xx-go --wrap && \ CGO_ENABLED=1 CGO_CFLAGS="-Wno-incompatible-pointer-types" \ go build -mod=mod -ldflags="-w -s" -o /build/lqd .