chore: migrate luxd HTTP routes /ext -> /v1

Drop the Avalanche-heritage /ext prefix; /v1 is the single canonical route
surface (one way, no backward compat). The node's baseURL is the source of
truth; clients, SDKs, CLI, indexer, maker, genesis, netrunner, and the
k8s/compose/gateway/explorer configs are updated to match.

Co-authored-by: Hanzo Dev <dev@hanzo.ai>
This commit is contained in:
zeekay
2026-07-01 11:40:13 -07:00
co-authored by Hanzo Dev
parent d254dccc8a
commit 51a304804c
64 changed files with 386 additions and 381 deletions
+1 -1
View File
@@ -346,7 +346,7 @@ export default function HomePage() {
</p>
<pre className="mt-4 overflow-x-auto rounded-lg bg-black/50 p-4">
<code className="text-sm text-green-400">
curl -X POST --data &#39;&#123;&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;health.health&quot;,&quot;id&quot;:1&#125;&#39; \{"\n"} -H &#39;content-type:application/json&#39; \{"\n"} 127.0.0.1:9650/ext/health
curl -X POST --data &#39;&#123;&quot;jsonrpc&quot;:&quot;2.0&quot;,&quot;method&quot;:&quot;health.health&quot;,&quot;id&quot;:1&#125;&#39; \{"\n"} -H &#39;content-type:application/json&#39; \{"\n"} 127.0.0.1:9650/v1/health
</code>
</pre>
</div>
+20 -20
View File
@@ -31,7 +31,7 @@ Or in configuration:
## Endpoint
```
http://localhost:9630/ext/admin
http://localhost:9630/v1/admin
```
## Methods
@@ -54,7 +54,7 @@ curl -X POST --data '{
"chain":"2S53R2ub94CV5vmSRAjqPYmRxvuiFunCb1gN2CAw3DQBfPWghX"
},
"id":1
}' -H 'content-type:application/json;' http://localhost:9630/ext/admin
}' -H 'content-type:application/json;' http://localhost:9630/v1/admin
```
---
@@ -85,7 +85,7 @@ curl -X POST --data '{
"chain":"2S53R2ub94CV5vmSRAjqPYmRxvuiFunCb1gN2CAw3DQBfPWghX"
},
"id":1
}' -H 'content-type:application/json;' http://localhost:9630/ext/admin
}' -H 'content-type:application/json;' http://localhost:9630/v1/admin
```
**Response:**
@@ -114,7 +114,7 @@ curl -X POST --data '{
"method":"admin.getLogLevel",
"params":{},
"id":1
}' -H 'content-type:application/json;' http://localhost:9630/ext/admin
}' -H 'content-type:application/json;' http://localhost:9630/v1/admin
```
**Response:**
@@ -146,7 +146,7 @@ curl -X POST --data '{
"logLevel":"debug"
},
"id":1
}' -H 'content-type:application/json;' http://localhost:9630/ext/admin
}' -H 'content-type:application/json;' http://localhost:9630/v1/admin
```
---
@@ -181,7 +181,7 @@ curl -X POST --data '{
"method":"admin.loadVMs",
"params":{},
"id":1
}' -H 'content-type:application/json;' http://localhost:9630/ext/admin
}' -H 'content-type:application/json;' http://localhost:9630/v1/admin
```
**Response:**
@@ -214,7 +214,7 @@ curl -X POST --data '{
"method":"admin.startCPUProfiler",
"params":{},
"id":1
}' -H 'content-type:application/json;' http://localhost:9630/ext/admin
}' -H 'content-type:application/json;' http://localhost:9630/v1/admin
```
---
@@ -232,7 +232,7 @@ curl -X POST --data '{
"method":"admin.stopCPUProfiler",
"params":{},
"id":1
}' -H 'content-type:application/json;' http://localhost:9630/ext/admin
}' -H 'content-type:application/json;' http://localhost:9630/v1/admin
```
---
@@ -250,7 +250,7 @@ curl -X POST --data '{
"method":"admin.memoryProfile",
"params":{},
"id":1
}' -H 'content-type:application/json;' http://localhost:9630/ext/admin
}' -H 'content-type:application/json;' http://localhost:9630/v1/admin
```
---
@@ -276,7 +276,7 @@ curl -X POST --data '{
"method":"admin.getConfig",
"params":{},
"id":1
}' -H 'content-type:application/json;' http://localhost:9630/ext/admin
}' -H 'content-type:application/json;' http://localhost:9630/v1/admin
```
**Response:**
@@ -311,7 +311,7 @@ curl -X POST --data '{
"method":"admin.shutdown",
"params":{},
"id":1
}' -H 'content-type:application/json;' http://localhost:9630/ext/admin
}' -H 'content-type:application/json;' http://localhost:9630/v1/admin
```
---
@@ -330,7 +330,7 @@ curl -X POST --data '{
"method":"admin.db.commit",
"params":{},
"id":1
}' -H 'content-type:application/json;' http://localhost:9630/ext/admin
}' -H 'content-type:application/json;' http://localhost:9630/v1/admin
```
## Profiling and Debugging
@@ -344,7 +344,7 @@ curl -X POST --data '{
"method":"admin.startCPUProfiler",
"params":{},
"id":1
}' http://localhost:9630/ext/admin
}' http://localhost:9630/v1/admin
# Let it run for 30 seconds
sleep 30
@@ -355,7 +355,7 @@ curl -X POST --data '{
"method":"admin.stopCPUProfiler",
"params":{},
"id":2
}' http://localhost:9630/ext/admin
}' http://localhost:9630/v1/admin
# Analyze profile
go tool pprof cpu.prof
@@ -370,7 +370,7 @@ curl -X POST --data '{
"method":"admin.memoryProfile",
"params":{},
"id":1
}' http://localhost:9630/ext/admin
}' http://localhost:9630/v1/admin
# Analyze
go tool pprof mem.prof
@@ -401,7 +401,7 @@ set_log_level() {
\"method\":\"admin.setLogLevel\",
\"params\":{\"logLevel\":\"$LEVEL\"},
\"id\":1
}" http://localhost:9630/ext/admin
}" http://localhost:9630/v1/admin
}
# Increase verbosity for debugging
@@ -476,7 +476,7 @@ Enable audit logging for admin operations:
# auto_restart.sh
check_health() {
curl -s http://localhost:9630/ext/health | jq -r '.healthy'
curl -s http://localhost:9630/v1/health | jq -r '.healthy'
}
restart_node() {
@@ -488,7 +488,7 @@ restart_node() {
"method":"admin.shutdown",
"params":{},
"id":1
}' http://localhost:9630/ext/admin
}' http://localhost:9630/v1/admin
sleep 10
@@ -514,7 +514,7 @@ CURRENT=$(curl -s -X POST --data '{
"method":"admin.getConfig",
"params":{},
"id":1
}' http://localhost:9630/ext/admin)
}' http://localhost:9630/v1/admin)
echo "Current configuration:"
echo $CURRENT | jq .
@@ -525,7 +525,7 @@ curl -X POST --data '{
"method":"admin.setLogLevel",
"params":{"logLevel":"debug"},
"id":2
}' http://localhost:9630/ext/admin
}' http://localhost:9630/v1/admin
```
## Troubleshooting
+12 -12
View File
@@ -10,7 +10,7 @@ The Health API provides endpoints to monitor the health and readiness of your Lu
## Endpoint
```
http://localhost:9630/ext/health
http://localhost:9630/v1/health
```
## Health Check Types
@@ -20,7 +20,7 @@ http://localhost:9630/ext/health
Get the overall health status of the node:
```bash
curl http://localhost:9630/ext/health
curl http://localhost:9630/v1/health
```
**Response:**
@@ -61,7 +61,7 @@ curl http://localhost:9630/ext/health
Check if the node is ready to serve requests:
```bash
curl http://localhost:9630/ext/health/readiness
curl http://localhost:9630/v1/health/readiness
```
Returns:
@@ -73,7 +73,7 @@ Returns:
Check if the node is alive and running:
```bash
curl http://localhost:9630/ext/health/liveness
curl http://localhost:9630/v1/health/liveness
```
Returns:
@@ -92,7 +92,7 @@ curl -X POST --data '{
"id": 1,
"method": "health.health",
"params": {}
}' -H 'content-type:application/json;' http://localhost:9630/ext/health
}' -H 'content-type:application/json;' http://localhost:9630/v1/health
```
**Response:**
@@ -175,7 +175,7 @@ Configure per-chain health parameters:
Export health metrics in Prometheus format:
```bash
curl http://localhost:9630/ext/metrics | grep health
curl http://localhost:9630/v1/metrics | grep health
```
Metrics:
@@ -208,13 +208,13 @@ spec:
image: luxfi/node:latest
livenessProbe:
httpGet:
path: /ext/health/liveness
path: /v1/health/liveness
port: 9630
initialDelaySeconds: 30
periodSeconds: 10
readinessProbe:
httpGet:
path: /ext/health/readiness
path: /v1/health/readiness
port: 9630
initialDelaySeconds: 60
periodSeconds: 5
@@ -229,7 +229,7 @@ spec:
# health_monitor.sh
while true; do
HEALTH=$(curl -s http://localhost:9630/ext/health | jq -r '.healthy')
HEALTH=$(curl -s http://localhost:9630/v1/health | jq -r '.healthy')
if [ "$HEALTH" != "true" ]; then
echo "ALERT: Node unhealthy at $(date)"
@@ -248,7 +248,7 @@ done
# health_analysis.sh
# Get detailed health
RESPONSE=$(curl -s http://localhost:9630/ext/health)
RESPONSE=$(curl -s http://localhost:9630/v1/health)
# Parse each chain
for CHAIN in P X C Q; do
@@ -271,7 +271,7 @@ done
```
backend lux_nodes
option httpchk GET /ext/health
option httpchk GET /v1/health
http-check expect status 200
server node1 192.168.1.10:9630 check
@@ -289,7 +289,7 @@ upstream lux_nodes {
}
location /health_check {
proxy_pass http://lux_nodes/ext/health;
proxy_pass http://lux_nodes/v1/health;
proxy_connect_timeout 1s;
proxy_read_timeout 1s;
}
+23 -23
View File
@@ -10,7 +10,7 @@ The Info API provides general information about the node and network status. Thi
## Endpoint
```
http://localhost:9630/ext/info
http://localhost:9630/v1/info
```
## Format
@@ -23,7 +23,7 @@ curl -X POST --data '{
"method": "info.<method>",
"params": {...},
"id": 1
}' -H 'content-type:application/json;' http://localhost:9630/ext/info
}' -H 'content-type:application/json;' http://localhost:9630/v1/info
```
## Methods
@@ -41,7 +41,7 @@ curl -X POST --data '{
"method": "info.getNodeVersion",
"params": {},
"id": 1
}' -H 'content-type:application/json;' http://localhost:9630/ext/info
}' -H 'content-type:application/json;' http://localhost:9630/v1/info
```
**Example Response:**
@@ -78,7 +78,7 @@ curl -X POST --data '{
"method": "info.getNodeID",
"params": {},
"id": 1
}' -H 'content-type:application/json;' http://localhost:9630/ext/info
}' -H 'content-type:application/json;' http://localhost:9630/v1/info
```
**Example Response:**
@@ -111,7 +111,7 @@ curl -X POST --data '{
"method": "info.getNodeIP",
"params": {},
"id": 1
}' -H 'content-type:application/json;' http://localhost:9630/ext/info
}' -H 'content-type:application/json;' http://localhost:9630/v1/info
```
**Example Response:**
@@ -140,7 +140,7 @@ curl -X POST --data '{
"method": "info.getNetworkID",
"params": {},
"id": 1
}' -H 'content-type:application/json;' http://localhost:9630/ext/info
}' -H 'content-type:application/json;' http://localhost:9630/v1/info
```
**Example Response:**
@@ -175,7 +175,7 @@ curl -X POST --data '{
"method": "info.getNetworkName",
"params": {},
"id": 1
}' -H 'content-type:application/json;' http://localhost:9630/ext/info
}' -H 'content-type:application/json;' http://localhost:9630/v1/info
```
**Example Response:**
@@ -207,7 +207,7 @@ curl -X POST --data '{
"alias": "P"
},
"id": 1
}' -H 'content-type:application/json;' http://localhost:9630/ext/info
}' -H 'content-type:application/json;' http://localhost:9630/v1/info
```
**Example Response:**
@@ -239,7 +239,7 @@ curl -X POST --data '{
"chain": "P"
},
"id": 1
}' -H 'content-type:application/json;' http://localhost:9630/ext/info
}' -H 'content-type:application/json;' http://localhost:9630/v1/info
```
**Example Response:**
@@ -269,7 +269,7 @@ curl -X POST --data '{
"method": "info.peers",
"params": {},
"id": 1
}' -H 'content-type:application/json;' http://localhost:9630/ext/info
}' -H 'content-type:application/json;' http://localhost:9630/v1/info
```
**Example Response:**
@@ -313,7 +313,7 @@ curl -X POST --data '{
"method": "info.getTxFee",
"params": {},
"id": 1
}' -H 'content-type:application/json;' http://localhost:9630/ext/info
}' -H 'content-type:application/json;' http://localhost:9630/v1/info
```
**Example Response:**
@@ -348,7 +348,7 @@ curl -X POST --data '{
"method": "info.uptime",
"params": {},
"id": 1
}' -H 'content-type:application/json;' http://localhost:9630/ext/info
}' -H 'content-type:application/json;' http://localhost:9630/v1/info
```
**Example Response (Validator):**
@@ -390,7 +390,7 @@ curl -X POST --data '{
"method": "info.getVMs",
"params": {},
"id": 1
}' -H 'content-type:application/json;' http://localhost:9630/ext/info
}' -H 'content-type:application/json;' http://localhost:9630/v1/info
```
**Example Response:**
@@ -424,7 +424,7 @@ curl -X POST --data '{
"method": "info.getUpgrades",
"params": {},
"id": 1
}' -H 'content-type:application/json;' http://localhost:9630/ext/info
}' -H 'content-type:application/json;' http://localhost:9630/v1/info
```
**Example Response:**
@@ -468,7 +468,7 @@ VERSION=$(curl -s -X POST --data '{
"method": "info.getNodeVersion",
"params": {},
"id": 1
}' -H 'content-type:application/json;' $NODE_URL/ext/info | jq -r '.result.version')
}' -H 'content-type:application/json;' $NODE_URL/v1/info | jq -r '.result.version')
echo "Version: $VERSION"
@@ -478,7 +478,7 @@ NODE_ID=$(curl -s -X POST --data '{
"method": "info.getNodeID",
"params": {},
"id": 1
}' -H 'content-type:application/json;' $NODE_URL/ext/info | jq -r '.result.nodeID')
}' -H 'content-type:application/json;' $NODE_URL/v1/info | jq -r '.result.nodeID')
echo "Node ID: $NODE_ID"
@@ -488,7 +488,7 @@ PEERS=$(curl -s -X POST --data '{
"method": "info.peers",
"params": {},
"id": 1
}' -H 'content-type:application/json;' $NODE_URL/ext/info | jq -r '.result.numPeers')
}' -H 'content-type:application/json;' $NODE_URL/v1/info | jq -r '.result.numPeers')
echo "Connected Peers: $PEERS"
@@ -499,7 +499,7 @@ for CHAIN in P X C Q; do
\"method\": \"info.isBootstrapped\",
\"params\": {\"chain\": \"$CHAIN\"},
\"id\": 1
}" -H 'content-type:application/json;' $NODE_URL/ext/info | jq -r '.result.isBootstrapped')
}" -H 'content-type:application/json;' $NODE_URL/v1/info | jq -r '.result.isBootstrapped')
echo "$CHAIN-Chain Bootstrapped: $STATUS"
done
@@ -510,7 +510,7 @@ UPTIME=$(curl -s -X POST --data '{
"method": "info.uptime",
"params": {},
"id": 1
}' -H 'content-type:application/json;' $NODE_URL/ext/info 2>/dev/null | jq -r '.result.rewardingStakePercentage' 2>/dev/null)
}' -H 'content-type:application/json;' $NODE_URL/v1/info 2>/dev/null | jq -r '.result.rewardingStakePercentage' 2>/dev/null)
if [ "$UPTIME" != "null" ] && [ -n "$UPTIME" ]; then
echo "Validator Uptime: $UPTIME%"
@@ -531,7 +531,7 @@ PEERS=$(curl -s -X POST --data '{
"method": "info.peers",
"params": {},
"id": 1
}' -H 'content-type:application/json;' $NODE_URL/ext/info | jq -r '.result.peers[]')
}' -H 'content-type:application/json;' $NODE_URL/v1/info | jq -r '.result.peers[]')
echo "=== Peer Connection Quality ==="
echo "Node ID | Latency (ms) | Uptime % | Version"
@@ -560,7 +560,7 @@ while true; do
\"method\": \"info.isBootstrapped\",
\"params\": {\"chain\": \"$CHAIN\"},
\"id\": 1
}" -H 'content-type:application/json;' $NODE_URL/ext/info | jq -r '.result.isBootstrapped')
}" -H 'content-type:application/json;' $NODE_URL/v1/info | jq -r '.result.isBootstrapped')
if [ "$STATUS" == "true" ]; then
echo "✅ $CHAIN-Chain: Bootstrapped"
@@ -575,7 +575,7 @@ while true; do
"method": "info.peers",
"params": {},
"id": 1
}' -H 'content-type:application/json;' $NODE_URL/ext/info | jq -r '.result.numPeers')
}' -H 'content-type:application/json;' $NODE_URL/v1/info | jq -r '.result.numPeers')
echo ""
echo "Connected Peers: $PEERS"
@@ -588,7 +588,7 @@ while true; do
\"method\": \"info.isBootstrapped\",
\"params\": {\"chain\": \"$CHAIN\"},
\"id\": 1
}" -H 'content-type:application/json;' $NODE_URL/ext/info | jq -r '.result.isBootstrapped')
}" -H 'content-type:application/json;' $NODE_URL/v1/info | jq -r '.result.isBootstrapped')
if [ "$STATUS" != "true" ]; then
ALL_BOOTSTRAPPED=false
+23 -23
View File
@@ -10,7 +10,7 @@ The Platform Chain (P-Chain) is responsible for staking, validators, and chain m
## Endpoint
```
http://localhost:9630/ext/bc/P
http://localhost:9630/v1/bc/P
```
## Format
@@ -23,7 +23,7 @@ curl -X POST --data '{
"method": "platform.<method>",
"params": {...},
"id": 1
}' -H 'content-type:application/json;' http://localhost:9630/ext/bc/P
}' -H 'content-type:application/json;' http://localhost:9630/v1/bc/P
```
## Methods
@@ -41,7 +41,7 @@ curl -X POST --data '{
"method": "platform.getHeight",
"params": {},
"id": 1
}' -H 'content-type:application/json;' http://localhost:9630/ext/bc/P
}' -H 'content-type:application/json;' http://localhost:9630/v1/bc/P
```
**Example Response:**
@@ -73,7 +73,7 @@ curl -X POST --data '{
"addresses": ["P-lux1q8tgunsf7sxpl2qp9fz0xjs36kstm7vdjvpzcc"]
},
"id": 1
}' -H 'content-type:application/json;' http://localhost:9630/ext/bc/P
}' -H 'content-type:application/json;' http://localhost:9630/v1/bc/P
```
**Example Response:**
@@ -114,7 +114,7 @@ curl -X POST --data '{
"limit": 100
},
"id": 1
}' -H 'content-type:application/json;' http://localhost:9630/ext/bc/P
}' -H 'content-type:application/json;' http://localhost:9630/v1/bc/P
```
---
@@ -134,7 +134,7 @@ curl -X POST --data '{
"method": "platform.getCurrentValidators",
"params": {},
"id": 1
}' -H 'content-type:application/json;' http://localhost:9630/ext/bc/P
}' -H 'content-type:application/json;' http://localhost:9630/v1/bc/P
```
**Example Response:**
@@ -190,7 +190,7 @@ curl -X POST --data '{
"method": "platform.getPendingValidators",
"params": {},
"id": 1
}' -H 'content-type:application/json;' http://localhost:9630/ext/bc/P
}' -H 'content-type:application/json;' http://localhost:9630/v1/bc/P
```
---
@@ -212,7 +212,7 @@ curl -X POST --data '{
"height": 365000
},
"id": 1
}' -H 'content-type:application/json;' http://localhost:9630/ext/bc/P
}' -H 'content-type:application/json;' http://localhost:9630/v1/bc/P
```
---
@@ -233,7 +233,7 @@ curl -X POST --data '{
"height": 365000
},
"id": 1
}' -H 'content-type:application/json;' http://localhost:9630/ext/bc/P
}' -H 'content-type:application/json;' http://localhost:9630/v1/bc/P
```
---
@@ -255,7 +255,7 @@ curl -X POST --data '{
"addresses": ["P-lux1q8tgunsf7sxpl2qp9fz0xjs36kstm7vdjvpzcc"]
},
"id": 1
}' -H 'content-type:application/json;' http://localhost:9630/ext/bc/P
}' -H 'content-type:application/json;' http://localhost:9630/v1/bc/P
```
---
@@ -274,7 +274,7 @@ curl -X POST --data '{
"method": "platform.getMinStake",
"params": {},
"id": 1
}' -H 'content-type:application/json;' http://localhost:9630/ext/bc/P
}' -H 'content-type:application/json;' http://localhost:9630/v1/bc/P
```
**Example Response:**
@@ -305,7 +305,7 @@ curl -X POST --data '{
"method": "platform.getTotalStake",
"params": {},
"id": 1
}' -H 'content-type:application/json;' http://localhost:9630/ext/bc/P
}' -H 'content-type:application/json;' http://localhost:9630/v1/bc/P
```
---
@@ -327,7 +327,7 @@ curl -X POST --data '{
"txID": "2nmH8LithVbdjaXsxVQCQfXtzN9hBbmebrsaEYnLM9T32Uy3Y5"
},
"id": 1
}' -H 'content-type:application/json;' http://localhost:9630/ext/bc/P
}' -H 'content-type:application/json;' http://localhost:9630/v1/bc/P
```
---
@@ -345,7 +345,7 @@ curl -X POST --data '{
"method": "platform.getTimestamp",
"params": {},
"id": 1
}' -H 'content-type:application/json;' http://localhost:9630/ext/bc/P
}' -H 'content-type:application/json;' http://localhost:9630/v1/bc/P
```
---
@@ -363,7 +363,7 @@ curl -X POST --data '{
"method": "platform.getBlockchains",
"params": {},
"id": 1
}' -H 'content-type:application/json;' http://localhost:9630/ext/bc/P
}' -H 'content-type:application/json;' http://localhost:9630/v1/bc/P
```
**Example Response:**
@@ -409,7 +409,7 @@ curl -X POST --data '{
"blockID": "vXSY7FK7NR65Y8BrJDKQH4a6vBdJuqAMvVzWj3Zxcap5J4ZE3"
},
"id": 1
}' -H 'content-type:application/json;' http://localhost:9630/ext/bc/P
}' -H 'content-type:application/json;' http://localhost:9630/v1/bc/P
```
---
@@ -431,7 +431,7 @@ curl -X POST --data '{
"txID": "2nmH8LithVbdjaXsxVQCQfXtzN9hBbmebrsaEYnLM9T32Uy3Y5"
},
"id": 1
}' -H 'content-type:application/json;' http://localhost:9630/ext/bc/P
}' -H 'content-type:application/json;' http://localhost:9630/v1/bc/P
```
---
@@ -452,7 +452,7 @@ curl -X POST --data '{
"txID": "2nmH8LithVbdjaXsxVQCQfXtzN9hBbmebrsaEYnLM9T32Uy3Y5"
},
"id": 1
}' -H 'content-type:application/json;' http://localhost:9630/ext/bc/P
}' -H 'content-type:application/json;' http://localhost:9630/v1/bc/P
```
**Example Response:**
@@ -488,7 +488,7 @@ curl -X POST --data '{
"method": "platform.getCurrentSupply",
"params": {},
"id": 1
}' -H 'content-type:application/json;' http://localhost:9630/ext/bc/P
}' -H 'content-type:application/json;' http://localhost:9630/v1/bc/P
```
---
@@ -507,7 +507,7 @@ curl -X POST --data '{
"method": "platform.getChains",
"params": {},
"id": 1
}' -H 'content-type:application/json;' http://localhost:9630/ext/bc/P
}' -H 'content-type:application/json;' http://localhost:9630/v1/bc/P
```
---
@@ -544,7 +544,7 @@ curl -X POST --data '{
"password": "mypassword"
},
"id": 1
}' -H 'content-type:application/json;' http://localhost:9630/ext/bc/P
}' -H 'content-type:application/json;' http://localhost:9630/v1/bc/P
```
---
@@ -694,7 +694,7 @@ curl -s -X POST --data "{
\"nodeIDs\": [\"$NODE_ID\"]
},
\"id\": 1
}" -H 'content-type:application/json;' http://localhost:9630/ext/bc/P | jq '.result.validators[0]'
}" -H 'content-type:application/json;' http://localhost:9630/v1/bc/P | jq '.result.validators[0]'
```
### Monitor Staking Rewards
@@ -711,7 +711,7 @@ STAKE=$(curl -s -X POST --data "{
\"addresses\": [\"$ADDRESS\"]
},
\"id\": 1
}" -H 'content-type:application/json;' http://localhost:9630/ext/bc/P)
}" -H 'content-type:application/json;' http://localhost:9630/v1/bc/P)
echo "Current stake: $(echo $STAKE | jq -r '.result.staked')"
echo "Stakeable: $(echo $STAKE | jq -r '.result.stakeable')"
@@ -210,14 +210,14 @@ curl -X POST --data '{
"jsonrpc":"2.0",
"id": 1,
"method": "health.health"
}' -H 'content-type:application/json;' http://localhost:9630/ext/health
}' -H 'content-type:application/json;' http://localhost:9630/v1/health
# Get node info
curl -X POST --data '{
"jsonrpc":"2.0",
"id": 1,
"method": "info.getNodeVersion"
}' -H 'content-type:application/json;' http://localhost:9630/ext/info
}' -H 'content-type:application/json;' http://localhost:9630/v1/info
# Check bootstrap status
curl -X POST --data '{
@@ -227,7 +227,7 @@ curl -X POST --data '{
"params": {
"chain": "P"
}
}' -H 'content-type:application/json;' http://localhost:9630/ext/info
}' -H 'content-type:application/json;' http://localhost:9630/v1/info
```
## Troubleshooting
@@ -308,7 +308,7 @@ curl -X POST --data '{
"jsonrpc":"2.0",
"id": 1,
"method": "health.health"
}' -H 'content-type:application/json;' http://localhost:9630/ext/health
}' -H 'content-type:application/json;' http://localhost:9630/v1/health
```
### Bootstrap Status
@@ -320,7 +320,7 @@ curl -X POST --data '{
"id": 1,
"method": "info.isBootstrapped",
"params": {"chain": "P"}
}' -H 'content-type:application/json;' http://localhost:9630/ext/info
}' -H 'content-type:application/json;' http://localhost:9630/v1/info
```
### Metrics
@@ -328,7 +328,7 @@ curl -X POST --data '{
Access Prometheus metrics:
```bash
curl http://localhost:9630/ext/metrics
curl http://localhost:9630/v1/metrics
```
Key metrics to monitor:
+17 -17
View File
@@ -58,7 +58,7 @@ curl -X POST --data '{
"jsonrpc":"2.0",
"id": 1,
"method": "platform.getHeight"
}' -H 'content-type:application/json;' http://localhost:9630/ext/bc/P
}' -H 'content-type:application/json;' http://localhost:9630/v1/bc/P
# Check bootstrap status for all chains
curl -X POST --data '{
@@ -66,7 +66,7 @@ curl -X POST --data '{
"id": 1,
"method": "info.isBootstrapped",
"params": {"chain": "P"}
}' -H 'content-type:application/json;' http://localhost:9630/ext/info
}' -H 'content-type:application/json;' http://localhost:9630/v1/info
```
### Configure Public IP
@@ -90,7 +90,7 @@ curl -X POST --data '{
"jsonrpc":"2.0",
"id": 1,
"method": "info.getNodeID"
}' -H 'content-type:application/json;' http://localhost:9630/ext/info
}' -H 'content-type:application/json;' http://localhost:9630/v1/info
```
Response:
@@ -155,7 +155,7 @@ curl -X POST --data '{
"password": "mypassword"
},
"id": 1
}' -H 'content-type:application/json;' http://localhost:9630/ext/keystore
}' -H 'content-type:application/json;' http://localhost:9630/v1/keystore
# Create P-Chain address
curl -X POST --data '{
@@ -166,7 +166,7 @@ curl -X POST --data '{
"password": "mypassword"
},
"id": 1
}' -H 'content-type:application/json;' http://localhost:9630/ext/bc/P
}' -H 'content-type:application/json;' http://localhost:9630/v1/bc/P
```
### Transfer LUX to P-Chain
@@ -185,7 +185,7 @@ curl -X POST --data '{
"amount": 2000000000000
},
"id": 1
}' -H 'content-type:application/json;' http://localhost:9630/ext/bc/X
}' -H 'content-type:application/json;' http://localhost:9630/v1/bc/X
# Import to P-Chain
curl -X POST --data '{
@@ -197,7 +197,7 @@ curl -X POST --data '{
"sourceChain": "X"
},
"id": 1
}' -H 'content-type:application/json;' http://localhost:9630/ext/bc/P
}' -H 'content-type:application/json;' http://localhost:9630/v1/bc/P
```
## Step 4: Add as Validator
@@ -221,7 +221,7 @@ curl -X POST --data '{
"delegationFeeRate": 10
},
"id": 1
}' -H 'content-type:application/json;' http://localhost:9630/ext/bc/P
}' -H 'content-type:application/json;' http://localhost:9630/v1/bc/P
```
Parameters:
@@ -243,7 +243,7 @@ curl -X POST --data '{
"method": "platform.getPendingValidators",
"params": {},
"id": 1
}' -H 'content-type:application/json;' http://localhost:9630/ext/bc/P
}' -H 'content-type:application/json;' http://localhost:9630/v1/bc/P
# Get current validators
curl -X POST --data '{
@@ -251,7 +251,7 @@ curl -X POST --data '{
"method": "platform.getCurrentValidators",
"params": {},
"id": 1
}' -H 'content-type:application/json;' http://localhost:9630/ext/bc/P
}' -H 'content-type:application/json;' http://localhost:9630/v1/bc/P
```
## Step 5: Monitor Your Validator
@@ -268,7 +268,7 @@ curl -X POST --data '{
"nodeID": "NodeID-5KqnQfaFQxY9rsFBAa68377qWSherYLQ7"
},
"id": 1
}' -H 'content-type:application/json;' http://localhost:9630/ext/bc/P
}' -H 'content-type:application/json;' http://localhost:9630/v1/bc/P
```
### Monitor Performance Metrics
@@ -277,10 +277,10 @@ Key metrics to track:
```bash
# Node health
curl http://localhost:9630/ext/health
curl http://localhost:9630/v1/health
# Prometheus metrics
curl http://localhost:9630/ext/metrics | grep -E "uptime|stake|validator"
curl http://localhost:9630/v1/metrics | grep -E "uptime|stake|validator"
```
Important metrics:
@@ -308,7 +308,7 @@ NODE_URL="http://localhost:9630"
WEBHOOK_URL="your-webhook-url"
# Check if node is responsive
if ! curl -s "$NODE_URL/ext/health" > /dev/null; then
if ! curl -s "$NODE_URL/v1/health" > /dev/null; then
curl -X POST "$WEBHOOK_URL" -d '{"text":"ALERT: Node is not responding!"}'
fi
@@ -318,7 +318,7 @@ UPTIME=$(curl -s -X POST --data '{
"method":"platform.getValidator",
"params":{"nodeID":"NodeID-xxx"},
"id":1
}' "$NODE_URL/ext/bc/P" | jq -r '.result.uptime')
}' "$NODE_URL/v1/bc/P" | jq -r '.result.uptime')
if [ "$UPTIME" -lt "80" ]; then
curl -X POST "$WEBHOOK_URL" -d "{\"text\":\"WARNING: Uptime is $UPTIME%\"}"
@@ -349,7 +349,7 @@ curl -X POST --data '{
"nodeID": "NodeID-5KqnQfaFQxY9rsFBAa68377qWSherYLQ7"
},
"id": 1
}' -H 'content-type:application/json;' http://localhost:9630/ext/bc/P
}' -H 'content-type:application/json;' http://localhost:9630/v1/bc/P
```
## Chain Validation
@@ -373,7 +373,7 @@ curl -X POST --data '{
"weight": 1000
},
"id": 1
}' -H 'content-type:application/json;' http://localhost:9630/ext/bc/P
}' -H 'content-type:application/json;' http://localhost:9630/v1/bc/P
```
### Chain Requirements
+7 -7
View File
@@ -104,14 +104,14 @@ curl -X POST --data '{
"jsonrpc":"2.0",
"id": 1,
"method": "info.getNetworkInfo"
}' -H 'content-type:application/json;' http://localhost:9650/ext/info
}' -H 'content-type:application/json;' http://localhost:9650/v1/info
# Get node ID
curl -X POST --data '{
"jsonrpc":"2.0",
"id": 1,
"method": "info.getNodeID"
}' -H 'content-type:application/json;' http://localhost:9650/ext/info
}' -H 'content-type:application/json;' http://localhost:9650/v1/info
```
## Chain Management
@@ -130,7 +130,7 @@ curl -X POST --data '{
"genesisData": "...",
"netID": "network-id"
}
}' -H 'content-type:application/json;' http://localhost:9650/ext/P
}' -H 'content-type:application/json;' http://localhost:9650/v1/P
```
### Validator Management
@@ -147,7 +147,7 @@ curl -X POST --data '{
"endTime": ...,
"stakeAmount": ...
}
}' -H 'content-type:application/json;' http://localhost:9650/ext/P
}' -H 'content-type:application/json;' http://localhost:9650/v1/P
```
## Configuration Reference
@@ -175,10 +175,10 @@ curl -X POST --data '{
```bash
# Prometheus metrics endpoint
curl http://localhost:9650/ext/metrics
curl http://localhost:9650/v1/metrics
# Health check
curl http://localhost:9650/ext/health
curl http://localhost:9650/v1/health
```
### Logs
@@ -193,7 +193,7 @@ curl -X POST --data '{
"id": 1,
"method": "admin.setLogLevel",
"params": {"logLevel": "debug"}
}' http://localhost:9650/ext/admin
}' http://localhost:9650/v1/admin
```
## Testing
@@ -595,10 +595,10 @@ curl -X POST --data '{
"jsonrpc":"2.0",
"method":"info.peers",
"id":1
}' http://localhost:9630/ext/info
}' http://localhost:9630/v1/info
# Check network metrics
curl http://localhost:9630/ext/metrics | grep network
curl http://localhost:9630/v1/metrics | grep network
# Monitor connections
netstat -an | grep 9631
+9 -9
View File
@@ -39,7 +39,7 @@ scrape_configs:
- job_name: 'lux-node'
static_configs:
- targets: ['localhost:9630']
metrics_path: '/ext/metrics'
metrics_path: '/v1/metrics'
- job_name: 'node-exporter'
static_configs:
@@ -56,7 +56,7 @@ alerting:
### Available Metrics
The Lux node exposes 400+ Prometheus metrics at `http://localhost:9630/ext/metrics`.
The Lux node exposes 400+ Prometheus metrics at `http://localhost:9630/v1/metrics`.
#### Key Metric Categories
@@ -419,11 +419,11 @@ groups:
```bash
# Basic health check
curl http://localhost:9630/ext/health
curl http://localhost:9630/v1/health
# Detailed health with readiness/liveness
curl http://localhost:9630/ext/health/readiness
curl http://localhost:9630/ext/health/liveness
curl http://localhost:9630/v1/health/readiness
curl http://localhost:9630/v1/health/liveness
```
### Custom Health Script
@@ -443,7 +443,7 @@ send_alert() {
}
# Check if node is responsive
if ! curl -s "$NODE_URL/ext/health" > /dev/null; then
if ! curl -s "$NODE_URL/v1/health" > /dev/null; then
send_alert "Node is not responding!"
exit 1
fi
@@ -455,7 +455,7 @@ for CHAIN in P X C Q; do
\"method\": \"info.isBootstrapped\",
\"params\": {\"chain\": \"$CHAIN\"},
\"id\": 1
}" -H 'content-type:application/json;' $NODE_URL/ext/info | jq -r '.result.isBootstrapped')
}" -H 'content-type:application/json;' $NODE_URL/v1/info | jq -r '.result.isBootstrapped')
if [ "$STATUS" != "true" ]; then
send_alert "$CHAIN-Chain is not bootstrapped!"
@@ -468,7 +468,7 @@ PEERS=$(curl -s -X POST --data '{
"method": "info.peers",
"params": {},
"id": 1
}' -H 'content-type:application/json;' $NODE_URL/ext/info | jq -r '.result.numPeers')
}' -H 'content-type:application/json;' $NODE_URL/v1/info | jq -r '.result.numPeers')
if [ "$PEERS" -lt 4 ]; then
send_alert "Low peer count: $PEERS"
@@ -619,7 +619,7 @@ Create runbooks for common issues:
```bash
# Real-time metrics
watch -n 1 'curl -s http://localhost:9630/ext/metrics | grep -E "chain_height|network_peers"'
watch -n 1 'curl -s http://localhost:9630/v1/metrics | grep -E "chain_height|network_peers"'
# Log streaming
tail -f ~/.luxd/logs/*.log | grep --line-buffered ERROR
@@ -26,7 +26,7 @@ else
fi
# Check API responsiveness
if curl -s http://localhost:9630/ext/health > /dev/null 2>&1; then
if curl -s http://localhost:9630/v1/health > /dev/null 2>&1; then
echo "✅ API is responsive"
else
echo "❌ API is NOT responsive"
@@ -53,7 +53,7 @@ PEERS=$(curl -s -X POST --data '{
"jsonrpc":"2.0",
"method":"info.peers",
"id":1
}' -H 'content-type:application/json;' http://localhost:9630/ext/info 2>/dev/null | jq -r '.result.numPeers')
}' -H 'content-type:application/json;' http://localhost:9630/v1/info 2>/dev/null | jq -r '.result.numPeers')
if [ -n "$PEERS" ] && [ "$PEERS" -gt 0 ]; then
echo "✅ Connected peers: $PEERS"
@@ -225,7 +225,7 @@ curl -X POST --data '{
"method":"platform.getCurrentValidators",
"params":{"nodeIDs":["<your-node-id>"]},
"id":1
}' -H 'content-type:application/json;' http://localhost:9630/ext/bc/P
}' -H 'content-type:application/json;' http://localhost:9630/v1/bc/P
# Verify staking transaction
curl -X POST --data '{
@@ -233,7 +233,7 @@ curl -X POST --data '{
"method":"platform.getTx",
"params":{"txID":"<staking-tx-id>"},
"id":1
}' -H 'content-type:application/json;' http://localhost:9630/ext/bc/P
}' -H 'content-type:application/json;' http://localhost:9630/v1/bc/P
```
#### Issue: Low uptime percentage
@@ -275,7 +275,7 @@ curl -X POST --data '{
"jsonrpc":"2.0",
"method":"platform.getHeight",
"id":1
}' -H 'content-type:application/json;' http://localhost:9630/ext/bc/P
}' -H 'content-type:application/json;' http://localhost:9630/v1/bc/P
# Reduce consensus participation
./build/node --consensus-gossip-concurrent=2
@@ -334,7 +334,7 @@ grep "api" ~/.luxd/configs/node-config.json
./build/node --http-host=0.0.0.0
# Check for rate limiting
curl -I http://localhost:9630/ext/info
curl -I http://localhost:9630/v1/info
```
### Staking Issues
@@ -369,7 +369,7 @@ curl -X POST --data '{
"method":"platform.getBalance",
"params":{"addresses":["P-lux1..."]},
"id":1
}' -H 'content-type:application/json;' http://localhost:9630/ext/bc/P
}' -H 'content-type:application/json;' http://localhost:9630/v1/bc/P
# Import funds from X-Chain
curl -X POST --data '{
@@ -381,7 +381,7 @@ curl -X POST --data '{
"sourceChain":"X"
},
"id":1
}' -H 'content-type:application/json;' http://localhost:9630/ext/bc/P
}' -H 'content-type:application/json;' http://localhost:9630/v1/bc/P
```
## Log Analysis
@@ -518,7 +518,7 @@ curl -X POST --data '{
"jsonrpc":"2.0",
"method":"info.getNodeID",
"id":1
}' http://localhost:9630/ext/info
}' http://localhost:9630/v1/info
```
### Support Channels