rpc: finish the /v1/ sweep, and stop sending Avalanche to /v1/

luxd serves exactly one HTTP prefix -- server/http/server.go:33 sets
baseURL = "/v1" and every route derives from it -- so /ext/* 404s on any
luxd. Avalanche is the mirror image: api.avax.network really does serve
/ext/bc/C/rpc, and pointing it at /v1/ breaks it.

31a1ee7 converted README.md only. This finishes the job and corrects the
overshoot in the same pass:

  config/chains.yaml     sparklepony, testnet.sparklepony, pars,
                         testnet.pars  ->  /v1/   (luxd hosts)
                         avax stays on /ext/
  chains.example.yaml    avax stays on /ext/
  docs/configuration.mdx LUX_{C,P,X}_RPC and the c/p/x_chain block, all
                         127.0.0.1:9630 and :9650 luxd  ->  /v1/
  docs/index.mdx         localhost:9650 and api.lux.network  ->  /v1/

Measured, positive and negative control per host:
  api.lux.network/v1/bc/C/rpc  -> 200 0x17871    /ext -> 404
  api.pars.network/v1/bc/C/rpc -> 200 0x78d65    /ext -> 404
  api.lux-test.network/v1/...  -> 200 0x17870    /ext -> 404

evm/transport/transport_test.go is deliberately left at HEAD. Its
isLuxdEndpoint gate is literally strings.Contains(endpoint, "/v1/"), so
the table is /v1/ throughout by design.

go test ./evm/transport/... ok 15.429s. Both YAML files parse. This repo
does NOT build before this change -- cmd/indexerd fails at link with
duplicate sqlite3 symbols, verified identical with these changes stashed
-- so nothing here is tagged.

Co-authored-by: Hanzo Dev <[email protected]>
This commit is contained in:
2026-08-06 18:35:56 -07:00
co-authored by Hanzo Dev
parent 31a1ee7d6e
commit f4d8b7a114
4 changed files with 11 additions and 11 deletions
+1 -1
View File
@@ -202,7 +202,7 @@ chains:
name: Avalanche
chain_id: 43114
type: evm
rpc: ${AVAX_RPC:-https://api.avax.network/v1/bc/C/rpc}
rpc: ${AVAX_RPC:-https://api.avax.network/ext/bc/C/rpc}
coin: AVAX
enabled: true
+1 -1
View File
@@ -589,7 +589,7 @@ ethereum:
name: "Avalanche C-Chain"
symbol: "AVAX"
type: evm
rpc: "${AVAX_RPC_URL:-https://api.avax.network/v1/bc/C/rpc}"
rpc: "${AVAX_RPC_URL:-https://api.avax.network/ext/bc/C/rpc}"
explorer: "https://snowtrace.io"
enabled: true
protocols:
+7 -7
View File
@@ -13,9 +13,9 @@ The Lux Indexer can be configured through environment variables, configuration f
```bash
# RPC endpoints for each chain
LUX_C_RPC=http://127.0.0.1:9630/ext/bc/C/rpc
LUX_P_RPC=http://127.0.0.1:9630/ext/bc/P
LUX_X_RPC=http://127.0.0.1:9630/ext/bc/X
LUX_C_RPC=http://127.0.0.1:9630/v1/bc/C/rpc
LUX_P_RPC=http://127.0.0.1:9630/v1/bc/P
LUX_X_RPC=http://127.0.0.1:9630/v1/bc/X
# Database configuration
LUX_DB_BACKEND=sqlite # sqlite, postgres, or memory
@@ -45,9 +45,9 @@ Create a `config.yaml` file:
```yaml
rpc:
c_chain: http://127.0.0.1:9630/ext/bc/C/rpc
p_chain: http://127.0.0.1:9630/ext/bc/P
x_chain: http://127.0.0.1:9630/ext/bc/X
c_chain: http://127.0.0.1:9630/v1/bc/C/rpc
p_chain: http://127.0.0.1:9630/v1/bc/P
x_chain: http://127.0.0.1:9630/v1/bc/X
storage:
backend: sqlite
@@ -131,7 +131,7 @@ LUX_NETWORK=testnet
```bash
LUX_NETWORK=local
LUX_C_RPC=http://127.0.0.1:9650/ext/bc/C/rpc
LUX_C_RPC=http://127.0.0.1:9650/v1/bc/C/rpc
```
## Performance Tuning
+2 -2
View File
@@ -22,10 +22,10 @@ A Go-based unified indexer for all Lux Network chains. Clean-room implementation
go install github.com/luxfi/indexer/cmd/indexer@latest
# Run against local node
indexer -chain evm -rpc http://localhost:9650/ext/bc/C/rpc
indexer -chain evm -rpc http://localhost:9650/v1/bc/C/rpc
# Run against mainnet
indexer -chain evm -rpc https://api.lux.network/ext/bc/C/rpc
indexer -chain evm -rpc https://api.lux.network/v1/bc/C/rpc
```
## Chain Support