Commit Graph
68 Commits
Author SHA1 Message Date
zeekay 5e45f61254 ci: drop build.yml — Docker workflow handles cgo build via alpine 2026-05-05 21:51:05 -07:00
zeekay baef68894b ci: ARC has no_new_privs (no sudo); copy . . before mod download 2026-05-05 21:43:58 -07:00
zeekay 7ff22b0f57 ci: regenerate go.sum at build time (proxy cache inconsistency) 2026-05-05 21:34:05 -07:00
zeekay bcc185c186 ci: refresh go.sum (proxy hash drift), drop dead e2e tests
Three CI fixes for the lux-build ARC pool to actually pass:

- go.sum: hanzoai/[email protected] hash refreshed via go mod tidy
  against the live proxy (was 5Rl3…, now YxjIyn…). proxy.golang.org
  serves the current zip; sum.golang.org's stale record was rejecting
  on every build.
- e2e/pchain_test.go, e2e/xchain_test.go: deleted. They imported
  luxfi/indexer/{pchain,xchain} which were renamed long ago to
  platform/, dag/, etc. Tests have been failing since.
- build.yml: install gcc + libsqlite3-dev on the ARC runner so cgo
  works (mattn/go-sqlite3 needs it).
2026-05-05 21:12:27 -07:00
zeekay 39d3b7ab07 ci: align with luxfi org's actual ARC pool (lux-build-linux-amd64) 2026-05-05 21:04:03 -07:00
zeekay df82696d59 ci(docker): inline multi-arch build, drop cross-org reusable 2026-05-05 21:00:07 -07:00
zeekay d53353c17c docs(chains.example): point default to :8091, clarify shared schema 2026-05-05 20:52:42 -07:00
zeekay 0b8a01a244 ci: hanzo runner labels everywhere, drop duplicate ci.yml 2026-05-05 20:43:53 -07:00
zeekay 826c3d03da refactor: standalone indexerd, drop dead bundles
luxfi/indexer is now a single-purpose repo: the standalone indexerd
chain-indexer daemon. The unified Go binary (indexer + graph + embedded
SPA) lives in luxfi/explorer; the standalone graph daemon lives in
luxfi/graph. One way to do everything.

Changes:
- cmd/indexerd/    new entrypoint (replaces broken cmd/indexer/)
- daemon/          public package: Config, RunIndexers, MountIndexerAPI,
                   MountHealth, ListenAndServe — importable by
                   luxfi/explorer for the unified binary
- Dockerfile       builds only /usr/local/bin/indexerd (port 8091)
- Makefile         single target

Removed:
- cmd/explorer/, cmd/explorerd/  — moved to luxfi/explorer
- cmd/indexer/                   — broken (imports nonexistent
                                    {a,b,k,p,q,t,x,z}chain packages)
- cmd/multichain/, multichain/   — outdated multi-chain manager
- cmd/evmchains/                 — outdated EVM chain registry tool
- cmd/graphd/                    — moved to luxfi/graph
- Dockerfile.{indexer,orig,simple} — pre-canonical leftovers

Indexer config (daemon.Config) is intentionally minimal: data_dir,
http_addr, chains[]. Brand, networks, graph, token, and subgraph
customization is the unified-explorer concern (per-chain in chains.yaml,
read by luxfi/explorer). Extra YAML fields are silently ignored here.
2026-05-05 20:42:41 -07:00
zeekay e98acb1e9d chore(.gitignore): drop trailing rebuild-trigger comment, add logs/ 2026-05-05 20:07:59 -07:00
zeekayandGitHub 9b7c7a2882 Merge pull request #2 from luxfi/ci/multi-arch-native
ci: build multi-arch (amd64 + arm64) on native runners
2026-05-05 19:22:09 -07:00
zeekay 9ed3c09bfa ci: build multi-arch (amd64 + arm64) on native runners 2026-05-05 19:08:39 -07:00
zeekay 46acdccae3 scrub: remove explorer .env.liquidity (lux repo hard rule)
Tenant env files belong in the tenant ops repo, not in upstream lux/indexer.
2026-05-05 17:22:45 -07:00
zeekay 95c1f0f091 indexer: scrub Avalabs IP brand refs 2026-05-05 16:23:12 -07:00
zeekay 828aeddc14 fix(cmd/explorer): wait for evm_blocks before mounting API (race fix)
The standalone API server's detectTables() runs once on construction and
caches the table name (evm_blocks vs blocks). If main.go mounts the API
before runChain has called idx.Init() on the EVM indexer, detectTables
sees no evm_blocks and falls back to the bare 'blocks' default — which
never exists, so every query returns empty.

Verified locally: with the table-wait fix, multi-chain mode indexes all
five mainnet chains correctly. After ~50s of run time:
  cchain  blocks=845 max=844 txs=1
  zoo     blocks=833 max=832 txs=52   (fully synced)
  hanzo   blocks=47  max=46  txs=58   (fully synced)
  spc     blocks=11  max=10  txs=2    (fully synced)
  pars    blocks=29  max=28  txs=42   (fully synced)

/v1/indexer/{slug}/blocks returns chain-specific data; /v1/explorer/*
legacy alias works; /v1/indexer/cchain/* default-chain alias works.
2026-05-02 17:08:02 -07:00
zeekay 0ca18e0436 deploy: per-network rollout script for unified explorer
Runs the per-network manifests in universe/k8s/lux-explorer, pins the
freshly built ghcr.io/luxfi/indexer:main image, restarts each deployment,
and patches IngressRoutes so testnet/devnet hostnames stop sharing the
mainnet pod's data.

Idempotent — safe to rerun whenever a new image is published.
2026-05-02 09:36:15 -07:00
zeekay 67ab48f053 fix(Dockerfile): drop legacy cmd/indexer build, build only cmd/explorer
cmd/indexer was kept around as the per-chain legacy entrypoint; cmd/explorer
is now the unified single-binary entrypoint that subsumes it. The legacy
build step was failing in CI because cmd/indexer hasn't been kept compiling
through recent refactors. Drop it — the unified binary covers single-chain
mode via --rpc as well as multi-chain via --config.
2026-05-02 09:31:14 -07:00
zeekay 3d065443f3 fix(go.sum): keep upstream replicate hash (proxy.golang.org canonical)
Local re-download went via GitHub directly and got a different commit
content for the v0.6.0 tag. Restore the proxy.golang.org-canonical hash
so CI builds (which fetch via the module proxy) succeed.
2026-05-02 09:29:41 -07:00
zeekay 9049904013 ci(docker): build directly on ubuntu-24.04 (skip ARC reusable workflow)
Reusable workflow at hanzoai/.github expects lux-* ARC runners that
aren't provisioned for the luxfi org, so every push fails with a
startup_failure. Drop the indirection and build amd64 with QEMU on a
hosted runner. Pushes ghcr.io/luxfi/indexer:{sha,branch,latest}.

Trade-off: amd64-only for now. Can re-add arm64 once the per-org ARC
scale-set is provisioned.
2026-05-02 09:28:22 -07:00
zeekay f1110b6895 fix(cmd/explorer): mount API after DB+schema ready, surface init errors
The 30-second mount cap was firing before the EVM indexer wrote its first
block — for chains whose RPC was slow or whose subnet had only a handful of
blocks, the standalone API never mounted and requests fell through to the
SPA placeholder. Three fixes:

1. Pre-init the EVM schema in runChain *before* starting the indexing loop.
   Run() also calls Init(), so this is idempotent — but doing it eagerly
   means the API server can detect tables on its first probe instead of
   waiting on a slow first GetLatestBlock RPC roundtrip.

2. Replace the 30-attempt cap with retry-until-ctx-done and log the actual
   failure reason every five minutes. Bad RPC URLs and missing data dirs
   are now visible in the log instead of silently disappearing.

3. Mount each chain at both /v1/indexer/* and /v1/explorer/* (legacy alias)
   so existing Blockscout-fork frontends keep working without an ingress
   middleware. Default chain also gets a /v1/indexer/{slug}/* alias for
   hostname-based routing.

Also: PORT env (K8s convention) now feeds HTTP_ADDR if set, and
CHAIN_RPC_URL (LiquidExplorer operator) joins RPC_ENDPOINT as a single-chain
RPC source.
2026-05-02 09:26:39 -07:00
zeekay efa91b80d9 multichain: register ERC-3643 / ONCHAINID / OP_NET protocol types
Lets chain configs declare these protocols natively. Per-event decoding
already happens generically via evm/contracts/abi.go (any ABI uploaded to
verifier surfaces); the structured GraphQL ingestion for ERC-3643 lives in
luxfi/graph and is fed automatically once SecurityToken/IdentityRegistry/
ONCHAINID/etc. emit events on the indexed chain.
2026-04-28 18:34:08 -07:00
zeekayandGitHub 7f27efe556 ci: migrate to canonical docker-build reusable (#1)
- 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.
2026-04-23 19:12:19 -07:00
zeekay b526b54c67 fix: WebSocket OOM + I-Chain indexer RPC method
- chain/dag/evm subscribers: add 1024-client semaphore, 64KB read limit,
  60s deadline, pong handler, default origin check (was open)
- platform_indexer: identity.Health → identity.getLatestBlock
2026-03-02 03:11:27 -07:00
zeekay 7d2c025b5b feat: unified explorer — chi refactor, graph merge, slug validation, /v1/explorer 2026-03-01 18:00:00 -08:00
zeekay f754b9af32 style: fix gofmt alignment in ChainDef struct 2026-03-02 11:03:00 -08:00
zeekay f54b337f2c fix: ensure EVM chain tables exist on evmchains startup
The evmchains process creates API servers but never created the
database tables they query. Add EnsureTables() that runs CREATE TABLE
IF NOT EXISTS for all 9 required tables (blocks, transactions,
addresses, tokens, token_transfers, logs, internal_transactions,
token_balances, extended_stats) with proper indexes and seeds the
stats row. Called on each chain startup before serving API requests.

Fixes: pq: relation "cchain_extended_stats" does not exist
2026-03-02 10:57:04 -08:00
zeekay 088d285887 feat: multi-chain EVM indexer with table prefix support
- Replace all hardcoded cchain_ table references with Tbl() prefix pattern
- Add chainSlug parameter to Repository, Adapter, Search, Stats, Charts
- New cmd/evmchains binary: runs all EVM chains in single process
- Config-driven via YAML (configs/evmchains.yaml)
- Management HTTP server on :9000 (/health, /chains)
- Shared PostgreSQL with per-chain table prefixes
- Update Dockerfile for multi-binary support
2026-03-02 10:57:04 -08:00
zeekay aca3b359bd chore: update Go to 1.26 in Dockerfile 2026-03-02 05:04:20 -08:00
zeekay ba02ee5eb6 chore: update Go to 1.26 2026-03-02 05:04:18 -08:00
zeekay 3bfbedda21 unify all sql images to :latest (PG18)
Single version policy: ghcr.io/hanzoai/sql:latest everywhere.
No version pinning, no backwards compat, always latest stable.
2026-03-01 21:09:00 -08:00
zeekay 3819d53b00 unify on hanzoai/sql:17-alpine, IngressClass ingress
Standardize all postgres images to ghcr.io/hanzoai/sql:17-alpine
and IngressClass to 'ingress' for white-label portability.
2026-03-01 20:54:38 -08:00
zeekay 767b39bb14 fix: PostgreSQL compatibility for all chain adapters
- AUTOINCREMENT → SERIAL (bchain, qchain, zchain)
- INSERT OR IGNORE → ON CONFLICT DO NOTHING (all chains)
- INSERT OR REPLACE → ON CONFLICT DO UPDATE (qchain, tchain)
- datetime('now') → NOW() (pchain)
- datetime(?, 'unixepoch') → to_timestamp(?) (pchain)
- Add K-chain to DAG indexer and CLI
2026-02-27 10:47:28 -08:00
zooqueen 1a1d7a3eb1 feat(auth): add IAM OIDC authentication via hanzo.id
Add JWT validation middleware using OIDC discovery and JWKS from
hanzo.id. The middleware is optional (IAM_ENABLED=true to activate)
for backward compatibility.

- iam.go: OIDC JWT validation with JWKS caching (1h TTL), RS256
  signature verification, issuer validation, and automatic user
  provisioning from IAM claims
- account_handlers.go: REST API handlers for user info, API keys,
  watchlists, address tags, and custom ABIs
- server.go: wire IAM middleware into /api/account/v2 subrouter
  with RequireAuth on all account endpoints; public endpoints
  (blocks, transactions, search) remain unauthenticated
2026-02-22 15:15:07 -08:00
zeekay b1ff299a80 feat: update EVM indexer and Dockerfile 2026-02-21 11:57:17 -08:00
zeekay 08e478e4b8 fix: update go.sum with missing dependency checksums 2026-02-13 15:56:26 -08:00
zeekay 175dbe00aa chore: update go module dependencies 2026-02-13 15:10:48 -08:00
zeekay 858123ba76 chore: sync dependencies and format code 2026-02-04 15:45:25 -08:00
zeekay 18d0d7aab3 feat(multichain): add TON NFT marketplace indexer
- Implement full TON indexer with NFT marketplace support
- Support GetGems, TON Diamonds, Fragment marketplaces
- Parse TEP-62 NFT transfer and ownership messages
- Add TONNFTSale struct for sale tracking
- Implement BOC/Cell parsing helpers
- Add TON address and coin parsing
- Remove stub from other_indexers.go
2026-01-24 13:27:25 -08:00
zeekay 615a855c8e feat(multichain): add EVM ABI decoding helpers for NFT marketplaces
- Add abiDecodeAddress, abiDecodeUint256, abiDecodeBytes32 helpers
- Add abiDecodeDynamicOffset for dynamic type parsing
- Add abiDecodeUint256Array and abiDecodeAddressArray for arrays
- Add SeaportOfferItem and SeaportConsiderationItem structs
- Add Seaport item decoders for proper order parsing
- Proper bounds checking and error handling
2026-01-24 13:24:38 -08:00
zeekay daabaa98e9 test(multichain): add Solana NFT indexer tests
- Test SolanaNFTSale struct initialization
- Test transaction processing (skip failed txs)
- Test indexer name method
2026-01-24 13:19:36 -08:00
zeekay 161dd29bc7 feat(multichain): implement Solana NFT marketplace indexing
- Add Borsh deserialization for Solana instruction data
- Implement Metaplex metadata parsing (name, symbol, URI, creators)
- Implement Magic Eden V2 sale parsing (buyer, seller, price)
- Implement Tensor swap parsing (buyer, seller, mint, price)
- Add SolanaNFTSale struct with marketplace, mint, price, royalties
- Add base58 encode/decode (Bitcoin/Solana alphabet)
- Route transactions to protocol indexers by program ID
2026-01-24 13:17:29 -08:00
zeekay ddc7e4fc6b test(multichain): add NFT metadata service tests
- Test metadata parsing (OpenSea format, IPFS URLs, animation URLs)
- Test trait extraction (attributes, properties)
- Test URI resolution (IPFS, Arweave, HTTP, data URIs)
- Test cache operations
2026-01-24 13:15:51 -08:00
zeekay 30ca2b743f feat(multichain): add NFT metadata service with IPFS/Arweave support
- Add NFTMetadataService with caching and rate limiting
- Support IPFS gateways (ipfs.io, cloudflare-ipfs, pinata)
- Support Arweave (arweave.net)
- Parse OpenSea/ERC721 metadata JSON format
- Extract traits with type, value, display type, max value
- Add configurable TTL cache for metadata
2026-01-24 13:14:51 -08:00
zeekay 1c1c463039 feat(evm): add NFT marketplace indexer with full protocol support
- Add comprehensive NFT marketplace indexing (Seaport, LooksRare, Blur, Rarible, X2Y2, Zora)
- Support OpenSea Seaport v1.1-1.6 with all order types
- Parse LooksRare v1/v2 TakerBid/TakerAsk events
- Track Blur OrdersMatched with sell/buy order details
- Add database migration for NFT sales, listings, bids, collections
- Integrate with unified DeFi indexer
2026-01-24 13:13:16 -08:00
zeekay 6217693f77 feat(multichain): add parallel multi-chain indexer with 94+ chains
- Add unified multi-chain indexer supporting EVM, Solana, Bitcoin, Cosmos, Move chains
- Implement Bitcoin Ordinals/Runes/BRC-20 protocol parsing
- Add Lux native chain indexers (A, B, D, G, I, K, T, Z chains)
- Support NFT marketplaces: Seaport, Blur, LooksRare, X2Y2, Sudoswap
- Support DeFi protocols across all chains
- Add YAML configuration for chain management
- Include HTTP stats API for monitoring
2026-01-24 13:13:09 -08:00
zeekay 1134d23e65 Fix PostgreSQL compatibility for P-Chain and X-Chain indexers
- Replace AUTOINCREMENT with BIGSERIAL for PostgreSQL
- Replace INSERT OR IGNORE with ON CONFLICT DO NOTHING
- Add DATABASE_URL environment variable support in unified storage
- Add schema helper functions to postgres.go query backend
2026-01-23 17:53:20 -08:00
zeekay cc58393bdf feat: update docs app 2025-12-31 22:21:34 -08:00
zeekay 6fa12867f5 chore(docs): update config files after fumadocs build
- Update next-env.d.ts types
- Update tsconfig.json jsx setting to react-jsx
- Add postcss.config.mjs for Tailwind CSS v4
2025-12-25 21:58:53 -08:00
zeekay b5827d574b feat(docs): migrate to fumadocs-ui with Tailwind CSS v4
- Replace @hanzo/mdx with fumadocs-core, fumadocs-mdx, fumadocs-ui
- Update all components to use fumadocs imports
- Upgrade to Tailwind CSS v4 with @tailwindcss/postcss
- Update Next.js to 15.5.9 (patched version)
- Add fumadocs-ui CSS imports and theme configuration
2025-12-25 21:22:33 -08:00
zeekay dec78bb41e fix: update CI workflow to use Go 1.25.5
The go.mod requires Go 1.25.5 but CI was set to 1.23.5. Updated
CI workflow to use the correct version matching go.mod.
2025-12-25 21:02:39 -08:00