> ## Documentation Index
> Fetch the complete documentation index at: https://www.helius.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# getClusterNodes

> 返回有关参与集群的所有节点的信息。



## OpenAPI

````yaml zh/openapi/rpc-http/getClusterNodes.yaml POST /
openapi: 3.1.0
info:
  title: Solana RPC API
  version: 1.0.0
  description: 用于检索活跃的 Solana 验证器节点及其网络地址、版本和连接端点的网络发现 API。
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://mainnet.helius-rpc.com
    description: 主网 RPC 端点
  - url: https://devnet.helius-rpc.com
    description: 开发网 RPC 端点
security: []
paths:
  /:
    post:
      tags:
        - RPC
      summary: getClusterNodes
      description: >-
        检索 Solana 网络中所有活跃验证器节点的详细信息。此网络拓扑 API
        提供当前验证器布局的完整映射，返回每个参与节点的基本连接详细信息。信息包括验证器公钥、不同协议（gossip、TPU、RPC）的网络地址、软件版本和功能集。对于网络监控工具、验证器统计仪表板、实现智能节点选择的客户端库、需要与验证器直接通信的网络工具以及希望了解
        Solana 验证器网络的地理和版本分布的应用程序来说，这些信息至关重要。
      operationId: getClusterNodes
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - jsonrpc
                - id
                - method
              properties:
                jsonrpc:
                  type: string
                  description: JSON-RPC 协议版本。
                  enum:
                    - '2.0'
                  example: '2.0'
                  default: '2.0'
                id:
                  type: string
                  description: 请求的唯一标识符。
                  example: '1'
                  default: '1'
                method:
                  type: string
                  description: 要调用的 RPC 方法名称。
                  enum:
                    - getClusterNodes
                  example: getClusterNodes
                  default: getClusterNodes
      responses:
        '200':
          description: 成功检索集群节点信息。
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                    description: JSON-RPC 协议版本。
                    enum:
                      - '2.0'
                    example: '2.0'
                  id:
                    type: string
                    description: 与请求匹配的标识符。
                    example: '1'
                  result:
                    type: array
                    description: 当前参与网络的所有可发现的Solana验证器节点的综合列表。
                    items:
                      type: object
                      properties:
                        pubkey:
                          type: string
                          description: 在Solana网络上标识此节点的唯一验证器身份公钥（base-58编码）。
                          example: 9QzsJf7LPLj8GkXbYT3LFDKqsj2hHG7TA3xinJHu8epQ
                        gossip:
                          type: string
                          nullable: true
                          description: 用于连接到此验证器的gossip协议端点以进行对等发现的IP地址和端口。
                          example: 10.239.6.48:8001
                        tpu:
                          type: string
                          nullable: true
                          description: 事务处理单元地址，客户端可以直接向此验证器提交事务。
                          example: 10.239.6.48:8856
                        rpc:
                          type: string
                          nullable: true
                          description: 如果此验证器提供公共RPC服务，则为JSON-RPC API端点地址；如果不公开，则为null。
                          example: 10.239.6.48:8899
                        version:
                          type: string
                          nullable: true
                          description: 在此验证器节点上运行的Solana软件版本和构建标识符。
                          example: 1.0.0 c375ce1f
                        featureSet:
                          type: integer
                          nullable: true
                          description: 在此验证器上启用的功能集的数字标识符，用于跟踪协议兼容性。
                        shredVersion:
                          type: integer
                          nullable: true
                          description: 用于验证器节点之间的shred处理和路由的网络兼容性版本号。
        '400':
          description: 错误请求 - 请求参数无效或请求格式错误。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32602
                  message: 参数无效
                id: '1'
        '401':
          description: 未授权 - API 密钥无效或缺失。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32001
                  message: 未授权
                id: '1'
        '429':
          description: 请求过多 - 超出速率限制。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32005
                  message: 请求过多
                id: '1'
        '500':
          description: 内部服务器错误 - 服务器发生错误。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32603
                  message: 内部错误
                id: '1'
        '503':
          description: 服务不可用 - 服务暂时不可用。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32002
                  message: 服务不可用
                id: '1'
        '504':
          description: 网关超时 - 请求超时。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32003
                  message: 网关超时
                id: '1'
      security:
        - ApiKeyQuery: []
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        jsonrpc:
          type: string
          description: JSON-RPC 协议版本。
          enum:
            - '2.0'
          example: '2.0'
        error:
          type: object
          properties:
            code:
              type: integer
              description: 错误代码。
            message:
              type: string
              description: 错误信息。
        id:
          type: string
          description: 与请求匹配的标识符。
          example: '1'
  securitySchemes:
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api-key
      description: >-
        您的 Helius API
        密钥。您可以在[仪表板](https://dashboard.helius.dev/api-keys)中免费获取一个。

````