mirror of
https://github.com/luxfi/dex.git
synced 2026-08-07 20:36:12 +00:00
luxd serves exactly one HTTP prefix. server/http/server.go:33 sets
baseURL = "/v1"; addRoute and AddAliases derive every path from it and
router.go mounts chains at baseURL+"/bc/C/rpc". /ext/* 404s everywhere.
The pkg/dchain package comments were the load-bearing part: ingest.go,
read.go, vm.go, read_test.go, ingest_test.go and zapingest.go all told
the reader that luxd mounts the DEX handlers at /ext/bc/<chainID>/dex/<m>.
That is the URL an integrator would build, and it 404s. The handlers are
at /v1/bc/<chainID>/dex/<m>.
zapingest.go said "/ext/bc route" with no trailing slash, so it does not
match an /ext/bc/ search -- searching for the whole prefix found it.
Also covers /ext/info, /ext/health and /ext/admin in the two local-network
scripts and in docs/source/node.mdx: baseURL applies to those routes too,
so swapping only the /bc/ ones would leave the scripts half broken.
Measured, positive and negative control on one host:
api.lux.network/v1/bc/C/rpc -> 200 {"result":"0x17871"} /ext -> 404
api.lux.network/v1/info -> 200 {"networkID":"1"} /ext -> 404
api.lux.network/v1/health -> 405 (exists, GET-only) /ext -> 404
go build + go vet clean on pkg/dchain, pkg/price, internal/standalone.
go test ./pkg/dchain/... ok 5.855s; go test ./pkg/price -run QChain ok 1.950s.
bash -n clean on both scripts. The repo-wide `go build ./...` was already
failing before this change on cgo packages that need luxcpp and libresolv.
Co-authored-by: Hanzo Dev <dev@hanzo.ai>