121 Commits
Author SHA1 Message Date
zeekay ce7bc9830e ci(docker): inline multi-arch build, drop cross-org reusable 2026-05-05 21:00:17 -07:00
zeekay 8508374fbf refactor: rename cmd/graph → cmd/graphd, hanzo runners
Daemon naming convention: standalone binary is graphd. The library
package (engine, indexer, storage, resolvers) keeps the import path
github.com/luxfi/graph for use by the unified luxfi/explorer binary
and external consumers.

- cmd/graphd/                        renamed (was cmd/graph/)
- Dockerfile                         builds /usr/local/bin/graphd
- Makefile                           bin/graphd target
- .github/workflows/docker.yml       multi-arch + hanzo ARC runners
- .github/workflows/ci.yml           hanzo runner
- .github/actionlint.yaml            register custom runner labels
2026-05-05 20:45:54 -07:00
zeekayandGitHub 2b5501c5db feat: /ql alias for /graphql (POST + GET GraphiQL) (#2)
Less-typing canonical short path. With GRAPH_PREFIX=/v1/graph the
binary now serves both /v1/graph/graphql and /v1/graph/ql. Same
handlers, same payload shape.
2026-05-04 10:29:18 -07:00
zeekay 39371f8812 feat: /ql alias for /graphql (POST + GET GraphiQL)
Less-typing canonical short path. With GRAPH_PREFIX=/v1/graph the
binary now serves both /v1/graph/graphql and /v1/graph/ql. Same
handlers, same payload shape.
2026-05-04 10:28:57 -07:00
zeekay 3c955dcb34 indexer: full ERC-3643 + ONCHAINID event ingestion
Adds the missing topic0 signatures + handlers so the resolvers under
resolvers/securities/ + resolvers/identity/ are actually fed live data:

  events.go (new constants):
    - IToken: AddressFrozen, TokensFrozen, TokensUnfrozen, Paused, Unpaused,
              RecoverySuccess, UpdatedTokenInformation,
              IdentityRegistryAdded, ComplianceAdded
    - IdentityRegistry / IdentityRegistryStorage:
              IdentityRegistered/Removed/Updated, CountryUpdated, IdentityStored
    - ONCHAINID (ERC-734/735):
              ClaimAdded/Removed/Changed, KeyAdded/Removed,
              Approved (exec), Executed (exec)
    - TrustedIssuersRegistry / ClaimTopicsRegistry:
              TrustedIssuerAdded/Removed, ClaimTopicsUpdated,
              ClaimTopicAdded/Removed
    - ModularCompliance + IModule:
              ModuleAdded/Removed, TokenBound/Unbound, ModuleInteraction
    - SecuritiesTopics() returns the full set, appended into knownTopics().

  indexer_securities.go (new):
    - Per-event handlers writing structured entities through Store.SetEntity.
    - Entity types match the resolver expectations:
        SecurityTransfer, TransferAgentAction, FrozenAccount, FrozenTokens,
        IdentityRegistryAction, OnchainIdClaim, OnchainIdKey, ComplianceAction,
        TrustedIssuerAction, ClaimTopicAction, SecuritiesEvent.
    - Decoders for indexed bool / uint256 / address topics.

  indexer.go (processLog dispatch):
    - Adds case branches for each new topic0 to the appropriate handler.

Result: any deployed @luxfi/contracts SecurityToken (T-REX), IdentityRegistry,
ONCHAINID, TrustedIssuersRegistry, ClaimTopicsRegistry, or ModularCompliance
contract is now indexed by `graph` out of the box, queryable via the existing
GraphQL resolvers — no per-deployment manifest needed.

Build: go build ./indexer/... → exit 0
2026-04-28 18:32:01 -07:00
zeekay ee2deb21c4 merge: lux-graph-subgraphs-update-2026-04-28 (fhe+securities resolver upgrades) 2026-04-28 13:37:18 -07:00
zeekay f455dd6e78 feat(resolvers): add ERC-3643 + ONCHAINID + FHE policy surfaces
- securities: add OnchainIdClaim, TransferAgentAction, FrozenAccount,
  FrozenTokens, IdentityRegistryAction resolvers covering ERC-3643 transfer-
  agent / compliance / identity-registry workflow plus ONCHAINID claim
  lifecycle (ClaimAdded/Removed/Changed). Wires #258.
- fhe: add FHEPolicy and FHEPolicyBinding resolvers so the indexer can expose
  encrypted-policy descriptors anchored on M-Chain and their bindings to on-
  chain resources per LP-114 M-Chain × F-Chain integration.
- STATE.md: per-subgraph inventory + status, sibling subgraph repo state,
  build/deploy notes, follow-on work (event-signature constants, storage
  type registration, erc3643 alias, LoadConfig TODO).
2026-04-28 13:31:26 -07:00
zeekayandGitHub 92e99d924a 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:18 -07:00
zeekay 92ae685826 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.
2026-04-23 19:09:16 -07:00
zeekay 971593e47d ci: docker multi-arch build + semver release workflow 2026-04-16 14:15:33 -07:00
zeekay e7e1a95cf8 docs: update comment reference node/vms/graphvm → chains/graphvm 2026-04-13 05:27:19 -07:00
zeekay f0a5411f10 fix: cap GraphQL pagination to 1000 items per page
Prevents OOM from unbounded first:999999999 queries.
All 24 resolver pl() functions + engine.resolveBlocks capped via min(limit, 1000).
2026-04-13 03:11:36 -07:00
zeekay 6498b67284 fix: default prefix /v1/explorer (not /v1/graph) 2026-04-13 01:24:22 -07:00
zeekay 1005133987 feat: configurable prefix — standalone /v1/graph, unified /v1/explorer/graphql 2026-04-13 01:16:38 -07:00
zeekay cfb7f3ee6f graph: add utxo + zk + mpc resolvers for full 15-chain coverage
graph had resolvers for 10 of 15 platform chains. This adds the three
missing ones:

- resolvers/utxo/: X-Chain (XVM) — UTXO, Asset, AssetCreateTx, UTXOBalance
- resolvers/zk/:   Z-Chain (ZKVM) — ZKProof, Verifier, CircuitHash, ProofBatch, ZKSession
- resolvers/mpc/:  M-Chain (MPC)  — SigningSession, KeygenSession, SignerSet, Presignature, SignRequest

Registered in engine.go under "utxo", "zk"/"zchain", "mpc"/"mchain"
selectors and added to the "all" batch. Removed the duplicate
"zchain" alias from "privacy" (privacy is a cross-chain protocol, not
Z-Chain — Z-Chain is ZK proofs, now correctly wired to zk.Register).

Now graph supports the same 15 platform chains as indexer:
P, X, C, A, B, D, G, I, K, M, O, Q, R, T, Z.
2026-04-12 22:42:05 -07:00
zeekay 1c5f1f2568 feat: Liquidity Protocol + Liquid Protocol graph resolvers
Liquidity Protocol resolvers:
- CrossChainSwap, LimitOrder, Arbitrage
- OMAPool, OMASwap, PriceUpdate
- StrategyOrder, MarketMaker, BridgeTransfer

Liquid Protocol resolvers:
- LiquidFee, ValidatorReward, SlashingEvent
- DepositMint, YieldMint, WithdrawBurn
- BackingUpdate, VaultStrategy, YieldHarvest

Both registered in engine under 'liquidity', 'liquid-protocol', and 'all'.
2026-04-12 11:48:05 -07:00
zeekay 72147a0672 feat: 8 new graph resolvers — governance, DAO, treasury, liquid, DID, prediction, securities, derivatives (84 tests) 2026-04-12 11:34:18 -07:00
zeekay f85d32cd62 test: comprehensive resolver tests for all 18 VM schema types (1354 lines) 2026-04-12 10:33:55 -07:00
zeekay ecbb1588cc ci: trigger image rebuild 2026-04-12 09:21:22 -07:00
zeekay 6aeee65a92 Add CI/CD pipelines, unit tests, release workflow
CI:
- ci.yml: build, vet, unit tests, e2e (SQLite + in-memory), benchmarks
  on ubuntu + macos matrix
- release.yml: cross-compile binaries (linux/darwin x amd64/arm64),
  multi-platform Docker image to ghcr.io/luxfi/graph, GitHub Release

Tests:
- engine/engine_test.go: parser (fields, args, where filters, aliases,
  depth, paren matching, limit clamping)
- indexer/indexer_test.go: hex parsing, uint256 decoding, topic address
  extraction, event signature coverage
- storage/store_test.go: FilterResults (exact, gte, lt, empty, no-match),
  sortResults (numeric, asc, string fallback), compareValues (numeric
  strings, mixed types)
2026-04-11 14:25:57 -07:00
zeekay de2e43e606 Initial commit: Lux Graph Engine
Single-binary GraphQL query layer replacing The Graph's Graph Node.
SQLite WAL + hanzoai/replicate S3 streaming + luxfi/age PQ encryption.

- 18 schemas: AMM V2/V3/V4, DEX, FHE, Platform, XChain, Bridge,
  Privacy, Quantum, Key, AI, Identity, Oracle, Relay, ServiceNode,
  Precompile, ERC20, ERC721
- WASM subgraph loader (uni-v2/v3/v4 build/ dirs)
- EVM indexer: eth_blockNumber + eth_getLogs + V2/V3/V4 event decoding
- Production hardened: rate limiter, query depth/field caps,
  MaxBytesReader, structured logging, /ready, /metrics
- 32 e2e tests, 13 benchmarks, 775 qps @ 100 clients on SQLite
- Dockerfile (multi-stage CGO, non-root, healthcheck)
2026-04-11 13:47:05 -07:00