Files
zeekayandHanzo Dev 654f9c4a87 chain letters are lowercase
The primary-network chains answer to either case; one spelling beats two.
/v1/chain/c/rpc, /v1/chain/p, /v1/chain/x across the estate.

Co-authored-by: Hanzo Dev <[email protected]>
2026-09-08 15:21:35 -07:00

102 lines
3.5 KiB
YAML

name: CI
# Gate A — the green-first gate for the DEX real-assets-only model, on the
# native runners (git.hanzo.ai → git-runner).
#
# Every entry in every per-network asset manifest MUST resolve to a real
# on-chain asset on its target network, and the fail-closed registry gate MUST
# hold. This proves both before a change to the manifests or the registry can
# merge:
#
# 1. registry unit + gate tests (structural: no synthetic asset or market can
# register, AssetID binds the real token address / UTXO assetID, the
# consensus-mode value guard holds, and the startup gate refuses synthetic
# flags / Liquidity / mock / ticker references).
# 2. LIVE validation: for each net, dex-assets-validate proves every manifest
# entry real against that net's public RPC (eth_chainId, C-Chain consensus
# id, code>0 + decimals() for ERC-20, UTXO assetID on X-Chain) and that the
# gate passes.
#
# Any failure stops the job, and thus the merge. The live step is read-only.
#
# This replaces .github/workflows/validate-asset-manifests.yml, whose two jobs
# named the bare `['self-hosted', 'linux', 'amd64']` triple. The pool on this
# forge is `linux-amd64`; nothing answers to the triple, and a job
# naming a label no runner carries does not fail — it waits. So this gate has
# not actually been gating anything.
on:
push:
branches: [main]
paths:
- 'dexvm/registry/**'
- 'cmd/dex-assets-validate/**'
- '.hanzo/workflows/ci.yml'
pull_request:
branches: [main]
paths:
- 'dexvm/registry/**'
- 'cmd/dex-assets-validate/**'
- '.hanzo/workflows/ci.yml'
workflow_dispatch:
permissions:
contents: read
# A newer commit makes the older run irrelevant.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
GOFLAGS: -mod=mod
jobs:
registry-tests:
runs-on: [linux-amd64]
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: false
- name: registry structural + gate tests
run: CGO_ENABLED=0 go test -count=1 -race=false ./dexvm/registry/...
live-validation:
needs: registry-tests
runs-on: [linux-amd64]
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
include:
- net: mainnet
manifest: dexvm/registry/manifests/assets.mainnet.json
evm_rpc: https://api.lux.network/v1/chain/c/rpc
api_base: https://api.lux.network
- net: testnet
manifest: dexvm/registry/manifests/assets.testnet.json
evm_rpc: https://api.lux-test.network/v1/chain/c/rpc
api_base: https://api.lux-test.network
- net: devnet
manifest: dexvm/registry/manifests/assets.devnet.json
evm_rpc: https://api.lux-dev.network/v1/chain/c/rpc
api_base: https://api.lux-dev.network
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: false
- name: build validator
run: CGO_ENABLED=0 go build -trimpath -o build/dex-assets-validate ./cmd/dex-assets-validate
- name: validate ${{ matrix.net }} manifest against live RPC
run: |
./build/dex-assets-validate \
-manifest '${{ matrix.manifest }}' \
-evm-rpc '${{ matrix.evm_rpc }}' \
-api-base '${{ matrix.api_base }}' \
-timeout 90s