mirror of
https://github.com/luxfi/node.git
synced 2026-10-30 15:24:05 +00:00
The module already called itself github.com/luxfi/node while containing no node in Go: cmd/luxd was twenty-one lines that printed the size of a few types, and the Go column of the matrix measured a VM plugin. A repo that fetches the thing it claims to be has not replaced it, so the Go sources move in — 1515 files, the daemon and everything under it — and the build reaches outside this module for nothing. Rust and C++ sit beside it unchanged and are still measured against it by the differential. That is the point of one repo: the reference implementation and the two ports are the same checkout, so parity is a thing you can run rather than a thing you assert. Verified: builds, and the closure carries no lux-private — checked at build time rather than believed. The daemon starts twelve chains on a local network (P X C Q Z A B G K M F, plus D through its plugin) and reports healthy.
122 lines
7.9 KiB
Go
122 lines
7.9 KiB
Go
// Code generated by zipdoc; DO NOT EDIT.
|
|
|
|
package info
|
|
|
|
import (
|
|
"encoding/json"
|
|
|
|
"github.com/zap-proto/zip"
|
|
)
|
|
|
|
func init() {
|
|
zip.Describe("GET /chain/bootstrapped", zip.Doc{
|
|
Description: "Bootstrapped reports whether a chain has finished bootstrapping on this node.",
|
|
Fields: map[string]string{
|
|
"IsBootstrappedArgs.chain": "Chain is the alias or id of the chain to ask about.",
|
|
},
|
|
Example: json.RawMessage(`{"chain":"X"}`),
|
|
Response: json.RawMessage(`{"isBootstrapped":true}`),
|
|
})
|
|
zip.Describe("GET /chain/id", zip.Doc{
|
|
Description: "ChainID resolves a chain's alias to the id it names.",
|
|
Fields: map[string]string{
|
|
"GetBlockchainIDArgs.alias": "Alias is the name the chain answers to, such as \"X\".",
|
|
},
|
|
Example: json.RawMessage(`{"alias":"X"}`),
|
|
Response: json.RawMessage(`{"blockchainID":"2oYMBNV4eNHyqk2fjjV5nVQLDbtmNJzq5s3qs3Lo6ftnC6FByM"}`),
|
|
})
|
|
zip.Describe("GET /chains", zip.Doc{
|
|
Description: "Chains are the chains this node is running, which is a subset of the chains\nthe P-Chain knows about — platform.getBlockchains answers for those.",
|
|
Fields: map[string]string{
|
|
"GetChainsReply.chains": "Chains are the chains this node is running.",
|
|
},
|
|
Response: json.RawMessage(`{"chains":[{"id":"11111111111111111111111111111111LpoYY","name":"P-Chain","vmID":"11111111111111111111111111111111LpoYY","bootstrapped":true}]}`),
|
|
})
|
|
zip.Describe("GET /fees", zip.Doc{
|
|
Description: "Fees are the transaction fees this node charges, in nLUX. Deprecated: the\nP-Chain's fees are dynamic and platform.getFeeConfig is the live answer.",
|
|
Response: json.RawMessage(`{"txFee":"1000000","createAssetTxFee":"10000000","createNetworkTxFee":"1000000000","transformChainTxFee":"10000000000","createChainTxFee":"1000000000","addNetworkValidatorFee":"1000000","addNetworkDelegatorFee":"1000000"}`),
|
|
})
|
|
zip.Describe("GET /lps", zip.Doc{
|
|
Description: "LPs is where the network's stake stands on every current Lux Proposal.",
|
|
Fields: map[string]string{
|
|
"LP.objectors": "Objectors are the peers voting against it, ordered by node id.",
|
|
"LP.supporters": "Supporters are the peers voting for it, ordered by node id.",
|
|
"LPStatus.lp": "LP is the stake for, against and abstaining.",
|
|
"LPStatus.number": "Number is the LP's number, the key it appears under on the JSON wire.",
|
|
},
|
|
Response: json.RawMessage(`{"lps":{"23":{"supportWeight":"0","supporters":[],"objectWeight":"0","objectors":[],"abstainWeight":"1000000000000"}}}`),
|
|
})
|
|
zip.Describe("GET /network/id", zip.Doc{
|
|
Description: "NetworkID is the number of the network this node is on.",
|
|
Response: json.RawMessage(`{"networkID":"96369"}`),
|
|
})
|
|
zip.Describe("GET /network/name", zip.Doc{
|
|
Description: "NetworkName is the name of the network this node is on.",
|
|
Response: json.RawMessage(`{"networkName":"mainnet"}`),
|
|
})
|
|
zip.Describe("GET /node/id", zip.Doc{
|
|
Description: "Identity is this node's id, with the proof it holds the staking key that id is\nderived from.",
|
|
Response: json.RawMessage(`{"nodeID":"NodeID-7Xhw2mDxuDS44j42TCB6U5579esbSt3Lg","nodePOP":{"publicKey":"0x8f95423f7142d00a48e1014a3de8d28907d420dc33b3052a6dee03a3f2941a393c2351e354704ca66a3fc29870282e15","proofOfPossession":"0x86a3ab4c45cfe31cae34c1d06f212434ac71b1be6cfe046c80c162e057614a94a5bc9f1ded1a7029deb0ba4ca7c9b71411e293438691be79c2dbf19d1ca7c3eadb9c756246fc5de5b7b89511c7d7dda6"}}`),
|
|
})
|
|
zip.Describe("GET /node/ip", zip.Doc{
|
|
Description: "Address is where this node tells its peers to reach it.",
|
|
Fields: map[string]string{
|
|
"GetNodeIPReply.ip": "IP is the address this node tells peers to reach it at.",
|
|
},
|
|
Response: json.RawMessage(`{"ip":"203.0.113.9:9651"}`),
|
|
})
|
|
zip.Describe("GET /node/version", zip.Doc{
|
|
Description: "NodeVersion is what this node is running: its own release, the database format\nit reads, the VM protocol it speaks, and the consensus it is configured for.",
|
|
Fields: map[string]string{
|
|
"ConsensusInfo.bls": "BLS is always true for production Quasar nodes.",
|
|
"ConsensusInfo.corona": "Corona is true when the post-quantum lattice threshold path is wired.",
|
|
"ConsensusInfo.mlDSA": "MLDSA is true when ML-DSA-65 (FIPS 204) signature verification is wired.",
|
|
"ConsensusInfo.mode": "Mode is one of \"triple\" (BLS + Corona + ML-DSA), \"dual\" (BLS +\nCorona), or \"classical\" (BLS only). Free-form so future modes\ndon't bump the API version.",
|
|
"ConsensusInfo.platformVM": "PlatformVM is true when the production PlatformVM wiring is in use,\nfalse when running with the dev/stub PlatformVM.",
|
|
"GetNodeVersionReply.consensus": "Consensus describes the active consensus configuration. Populated\nfrom the in-memory consensus engine state at request time. Omitted\nfor legacy clients that don't wire it through.",
|
|
"VMVersion.version": "Version is the release of it this node runs.",
|
|
"VMVersion.vm": "VM is the VM's alias.",
|
|
},
|
|
Response: json.RawMessage(`{"version":"luxd/1.36.178","databaseVersion":"v1.4.5","rpcProtocolVersion":"39","gitCommit":"","vmVersions":{}}`),
|
|
})
|
|
zip.Describe("GET /peers", zip.Doc{
|
|
Description: "Peers are the nodes this one is connected to. A list of node ids narrows the\nanswer to those, and no list asks for all of them.",
|
|
Fields: map[string]string{
|
|
"PeerInfo.ip": "IP is the address this node reaches the peer at.",
|
|
"PeerInfo.lastReceived": "LastReceived is when this node last heard from the peer.",
|
|
"PeerInfo.lastSent": "LastSent is when this node last sent the peer a message.",
|
|
"PeerInfo.nodeID": "ID is the peer's node id.",
|
|
"PeerInfo.objectedLPs": "ObjectedLPs are the LPs the peer votes against, ascending.",
|
|
"PeerInfo.observedUptime": "ObservedUptime is the percentage of time this node has seen the peer up.",
|
|
"PeerInfo.publicIP": "PublicIP is the address the peer says it is reachable at.",
|
|
"PeerInfo.supportedLPs": "SupportedLPs are the LPs the peer votes for, ascending.",
|
|
"PeerInfo.trackedChains": "TrackedChains are the chains the peer serves, ordered by id.",
|
|
"PeerInfo.version": "Version is the node software the peer is running.",
|
|
"PeersArgs.nodeIDs": "NodeIDs narrows the answer to these peers. Empty asks for all of them.",
|
|
"Time.nanos": "Nanos is the nanosecond within that second.",
|
|
"Time.offset": "Offset is seconds east of UTC.",
|
|
"Time.seconds": "Seconds is seconds since the epoch.",
|
|
},
|
|
Example: json.RawMessage(`{"nodeIDs":[]}`),
|
|
Response: json.RawMessage(`{"numPeers":"1","peers":[{"ip":"203.0.113.9:9651","publicIP":"203.0.113.9:9651","nodeID":"NodeID-7Xhw2mDxuDS44j42TCB6U5579esbSt3Lg","version":"luxd/1.36.178","lastSent":"2026-08-29T00:00:00Z","lastReceived":"2026-08-29T00:00:00Z","observedUptime":"99","trackedChains":[],"supportedLPs":[],"objectedLPs":[],"benched":[]}]}`),
|
|
})
|
|
zip.Describe("GET /upgrades", zip.Doc{
|
|
Description: "Upgrades is the upgrade schedule this node runs.",
|
|
Response: json.RawMessage(`{"xChainStopVertexID":"jrGWDh5Po9FMj54depyunNixpia5PN4aAYxfmNzU8n752Rjga","epochDuration":300000000000}`),
|
|
})
|
|
zip.Describe("GET /uptime", zip.Doc{
|
|
Description: "Uptime is how much of the network, by stake, reports having seen this node up.",
|
|
Response: json.RawMessage(`{"rewardingStakePercentage":"100.0000","weightedAveragePercentage":"99.9999"}`),
|
|
})
|
|
zip.Describe("GET /vms", zip.Doc{
|
|
Description: "VMs are the virtual machines installed on this node, and the feature\nextensions its UTXO chains understand.",
|
|
Fields: map[string]string{
|
|
"FxName.fx": "Fx is the extension's id.",
|
|
"FxName.name": "Name is what it is called.",
|
|
"VMAlias.aliases": "Aliases are the names it also answers to.",
|
|
"VMAlias.vm": "VM is the VM's id.",
|
|
},
|
|
Response: json.RawMessage(`{"vms":{"mgj786NP7uDwBCcq6YwThhaN8FLyybkCa4zBWTQbNgmK6k9A6":["platformvm"]},"fxs":{"spqBHsy2UBGpjaQJezEywUy1AB98eVjJ3WQ38x1vpjsx4xPkY":"secp256k1fx"}}`),
|
|
})
|
|
}
|