> ## 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.

# getBlockProduction

> Trả về thông tin sản xuất khối gần đây từ epoch hiện tại hoặc trước đó.

## Tham số yêu cầu

<ParamField body="commitment" type="string">
  Mức cam kết cho yêu cầu.

  * `processed`
  * `confirmed`
  * `finalized`
</ParamField>

<ParamField body="identity" type="string">
  Khóa công khai danh tính tùy chọn của trình xác thực (được mã hóa base-58) để lọc kết quả cho một trình xác thực cụ thể.
</ParamField>

<ParamField body="range" type="object">
  Các ranh giới phạm vi slot tùy chọn để giới hạn khoảng thời gian thống kê sản xuất khối.
</ParamField>

<ParamField body="range.firstSlot" type="number">
  Số slot bắt đầu để phân tích số liệu thống kê sản xuất khối (bao gồm slot này).
</ParamField>

<ParamField body="range.lastSlot" type="number">
  Số slot kết thúc để phân tích số liệu thống kê sản xuất khối (bao gồm slot này). Nếu bỏ qua, hệ thống sẽ sử dụng slot hiện tại.
</ParamField>


## OpenAPI

````yaml vi/openapi/rpc-http/getBlockProduction.yaml POST /
openapi: 3.1.0
info:
  title: Solana RPC API
  version: 1.0.0
  description: >-
    API phân tích hiệu suất trình xác thực để giám sát hiệu quả sản xuất khối
    Solana và so sánh các slot trong lịch trình leader với các khối thực tế đã
    được tạo.
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://mainnet.helius-rpc.com
    description: Điểm cuối RPC Mainnet
  - url: https://devnet.helius-rpc.com
    description: Điểm cuối RPC Devnet
security: []
paths:
  /:
    post:
      tags:
        - RPC
      summary: getBlockProduction
      description: >
        Truy xuất số liệu thống kê chi tiết về hoạt động sản xuất khối của các
        trình xác thực Solana trong một phạm vi slot được chỉ định.

        API phân tích hiệu suất này cung cấp các chỉ số chính xác về hiệu quả
        của từng trình xác thực trong

        việc sản xuất khối khi được lên lịch làm leader. API trả về cả số slot
        mà một trình xác thực

        được chỉ định làm leader và số khối thực tế mà trình xác thực đó đã sản
        xuất thành công, cho phép 

        tính toán tỷ lệ tin cậy. Đây là dữ liệu thiết yếu để giám sát hiệu suất
        trình xác thực, phân tích tình trạng

        mạng, xây dựng bảng điều khiển staking và các ứng dụng cần đánh giá độ
        tin cậy của trình xác thực khi

        đưa ra quyết định ủy quyền hoặc giám sát hiệu quả tham gia tổng thể của
        mạng Solana.
      operationId: getBlockProduction
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - jsonrpc
                - id
                - method
                - params
              properties:
                jsonrpc:
                  type: string
                  enum:
                    - '2.0'
                  description: Phiên bản giao thức JSON-RPC.
                  default: '2.0'
                id:
                  type: string
                  description: Mã định danh duy nhất cho yêu cầu.
                  example: '1'
                  default: '1'
                method:
                  type: string
                  enum:
                    - getBlockProduction
                  description: Tên của phương thức RPC cần gọi.
                  default: getBlockProduction
                params:
                  type: array
                  default: []
                  description: Các tham số cho yêu cầu.
                  items:
                    oneOf:
                      - type: object
                        description: Các tùy chọn cấu hình cho yêu cầu.
                        properties:
                          commitment:
                            type: string
                            description: Mức độ cam kết cho yêu cầu.
                            enum:
                              - processed
                              - confirmed
                              - finalized
                            example: finalized
                          identity:
                            type: string
                            description: >-
                              Khóa công khai định danh trình xác thực tùy chọn
                              (được mã hóa base-58) để lọc kết quả cho một trình
                              xác thực cụ thể.
                            example: 85iYT5RuzRTDgjyRa3cP8SYhM2j21fj7NhfJ3peu1DPr
                          range:
                            type: object
                            description: >-
                              Các giới hạn phạm vi slot tùy chọn để giới hạn
                              khoảng thời gian thống kê sản xuất khối.
                            properties:
                              firstSlot:
                                type: integer
                                description: >-
                                  Số slot bắt đầu để phân tích số liệu thống kê
                                  sản xuất khối (bao gồm slot này).
                                example: 0
                              lastSlot:
                                type: integer
                                description: >-
                                  Số slot kết thúc để phân tích số liệu thống kê
                                  sản xuất khối (bao gồm slot này). Nếu bỏ qua,
                                  hệ thống sẽ sử dụng slot hiện tại.
                                example: 9887
      responses:
        '200':
          description: Đã truy xuất thành công thông tin sản xuất khối.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                    enum:
                      - '2.0'
                  id:
                    type: string
                  result:
                    type: object
                    properties:
                      context:
                        type: object
                        properties:
                          slot:
                            type: integer
                            description: Slot tại thời điểm phản hồi.
                            example: 9887
                      value:
                        type: object
                        properties:
                          byIdentity:
                            type: object
                            additionalProperties:
                              type: array
                              items:
                                type: integer
                              description: >-
                                Mảng hai phần tử chứa số liệu thống kê
                                [leaderSlots, blocksProduced] cho trình xác thực
                                này.
                            description: >-
                              Ánh xạ từ khóa công khai định danh của trình xác
                              thực đến các chỉ số hiệu suất sản xuất khối tương
                              ứng.
                            example:
                              85iYT5RuzRTDgjyRa3cP8SYhM2j21fj7NhfJ3peu1DPr:
                                - 9888
                                - 9886
                          range:
                            type: object
                            properties:
                              firstSlot:
                                type: integer
                                description: >-
                                  Số slot bắt đầu của khoảng thời gian thống kê
                                  sản xuất khối được phân tích.
                                example: 0
                              lastSlot:
                                type: integer
                                description: >-
                                  Số slot kết thúc của khoảng thời gian thống kê
                                  sản xuất khối được phân tích.
                                example: 9887
        '400':
          description: >-
            Yêu cầu không hợp lệ - Tham số yêu cầu không hợp lệ hoặc yêu cầu
            không đúng định dạng.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32602
                  message: Invalid params
        '401':
          description: Không được phép - Khóa API không hợp lệ hoặc bị thiếu.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32001
                  message: Unauthorized
                id: '1'
        '429':
          description: Quá nhiều yêu cầu - Đã vượt quá giới hạn tốc độ.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32005
                  message: Too many requests
                id: '1'
        '500':
          description: Lỗi máy chủ nội bộ - Đã xảy ra lỗi trên máy chủ.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32603
                  message: Internal error
                id: '1'
        '503':
          description: Dịch vụ không khả dụng - Dịch vụ tạm thời không khả dụng.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32002
                  message: Service unavailable
                id: '1'
        '504':
          description: Hết thời gian chờ cổng kết nối - Yêu cầu đã hết thời gian chờ.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32003
                  message: Gateway timeout
                id: '1'
      security:
        - ApiKeyQuery: []
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        jsonrpc:
          type: string
          enum:
            - '2.0'
        error:
          type: object
          properties:
            code:
              type: integer
            message:
              type: string
  securitySchemes:
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api-key
      description: >-
        Khóa API Helius của bạn. Bạn có thể nhận khóa miễn phí trong [bảng điều
        khiển](https://dashboard.helius.dev/api-keys).

````