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

# getAgGenesisCert

> getAgGenesisCert는 Alpenglow 제네시스 인증서를 반환하며, 클러스터에서 여전히 TowerBFT가 실행 중이면 null을 반환합니다. Alpenglow 합의가 활성화되었는지 확인할 때 사용하세요.

<Note>
  Agave v4.3 이상이 필요합니다. 이전 버전에서는 이 메서드를 인식하지 못하며
  `Method not found`(-32601)를 반환합니다.
</Note>

## 마이그레이션 감지

이 메서드를 사용하여 클러스터가 [Alpenglow](https://www.helius.dev/blog/alpenglow) 합의를 실행하는지 확인하세요. 응답은 다음 세 가지 형태 중 하나입니다.

* **인증서 객체.** 클러스터가 마이그레이션되었습니다. `result.block.slot`은 Alpenglow에서 생성된 첫 번째 슬롯입니다.
* **`null`.** 노드에서 Agave v4.3 이상이 실행 중이며, 클러스터는 마이그레이션되지 않았습니다.
* **오류 `-32601`.** 노드 버전이 v4.3보다 이전입니다. 클러스터의 합의 상태는 알 수 없습니다.

`-32601`을 "마이그레이션되지 않음"이 아닌 알 수 없음으로 처리하세요. 이 질문에 답할 수 없는 노드로는 클러스터에 관해 아무것도 판단할 수 없습니다.

클러스터가 마이그레이션된 후에는 인증서가 변경되지 않습니다. 폴링하는 대신 첫 번째 성공 응답 후 캐시하세요.

## 인증서 읽기

`block`은 인증된 블록을 식별합니다. `slot`은 해당 블록의 슬롯 번호입니다. `blockId`은 32바이트 배열이며, RPC API의 다른 곳에서 사용하는 base-58 문자열이 아닙니다.

`signature`에는 인증서에 서명한 모든 검증자의 집계 BLS 서명이 들어 있습니다. `bitmap`은 해당 검증자들을 지분 순위로 인덱싱하여 기록합니다. 비트맵을 읽으려면 클러스터가 사용한 것과 동일하게 지분 순서로 정렬된 검증자 목록이 필요합니다.

`blockId`은 항상 32바이트이고 `signature`은 항상 192바이트이며, 예시에는 둘 다 전체 길이로 표시됩니다. `bitmap`의 크기는 고정되어 있지 않습니다. 검증자마다 1비트를 사용하므로 검증자 집합에 따라 커지며, 예시에서는 짧은 비트맵을 보여 줍니다.

Solana CLI는 `solana alpenglow-genesis-info`과 동일한 데이터를 반환합니다.


## OpenAPI

````yaml ko/openapi/rpc-http/getAgGenesisCert.yaml POST /
openapi: 3.1.0
info:
  title: Solana RPC API
  version: 1.0.0
  description: >-
    Alpenglow 합의에서 생성된 첫 번째 블록의 인증서인 Alpenglow 제네시스 인증서를 조회하기 위한 합의 마이그레이션
    API입니다. 클러스터가 TowerBFT에서 마이그레이션되었는지 감지하는 데 사용합니다.
  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: getAgGenesisCert
      description: |
        Alpenglow 제네시스 인증서, 즉 클러스터가 Alpenglow 합의에서 생성한 첫 번째 블록의
        인증서를 조회합니다. 클러스터에서 여전히 TowerBFT가 실행 중이면 `null`을 반환합니다.
        검증인 버전이나 슬롯 번호로 추론하는 대신, 런타임에 Alpenglow 합의가 활성 상태인지
        감지할 때 지원되는 방법입니다. 인증서에는 인증된 블록(슬롯 및 32바이트 블록 ID)과
        해당 블록에 서명한 검증인들의 집계 BLS 서명, 그리고 지분 순위에 따라 정렬되어 어떤
        검증인이 서명했는지 나타내는 비트맵이 포함됩니다. Agave v4.3 이상이 필요합니다.
        이전 버전은 이 메서드를 인식하지 못하며 `null` 대신 `Method not found` (-32601)를 반환합니다.
      operationId: getAgGenesisCert
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              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:
                    - getAgGenesisCert
                  example: getAgGenesisCert
                  default: getAgGenesisCert
      responses:
        '200':
          description: Alpenglow 제네시스 인증서를 성공적으로 조회했습니다. 클러스터가 마이그레이션되지 않았다면 `null`을 반환합니다.
          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: object
                    nullable: true
                    description: >-
                      Alpenglow 제네시스 인증서입니다. 클러스터에서 여전히 TowerBFT가 실행 중이면
                      `null`입니다.
                    properties:
                      block:
                        type: object
                        description: 인증된 첫 번째 Alpenglow 블록입니다.
                        properties:
                          slot:
                            type: integer
                            format: uint64
                            description: Alpenglow 합의에서 생성된 첫 번째 블록의 슬롯입니다.
                            example: 412300800
                          blockId:
                            type: array
                            description: 바이트 배열 형식의 블록 식별자입니다. 항상 32바이트입니다.
                            minItems: 32
                            maxItems: 32
                            items:
                              type: integer
                              minimum: 0
                              maximum: 255
                      signature:
                        type: object
                        description: 인증된 블록에 대한 검증인들의 집계 서명입니다.
                        properties:
                          signature:
                            type: array
                            description: >-
                              인증서에 서명한 모든 검증인의 집계 BLS 서명을 바이트 배열로 나타냅니다. 항상
                              192바이트입니다.
                            minItems: 192
                            maxItems: 192
                            items:
                              type: integer
                              minimum: 0
                              maximum: 255
                          bitmap:
                            type: array
                            description: >-
                              어떤 검증인이 서명했는지 표시하는 비트맵이며, 지분 순위에 따른 위치를 인덱스로
                              사용합니다. 길이는 가변적입니다. 검증인당 1비트이므로 검증인 집합에 따라 길이가
                              늘어납니다.
                            items:
                              type: integer
                              minimum: 0
                              maximum: 255
        '400':
          description: 잘못된 요청 - 요청 매개변수가 유효하지 않거나 요청 형식이 잘못되었습니다.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32602
                  message: Invalid params
        '401':
          description: 인증되지 않음 - API 키가 유효하지 않거나 누락되었습니다.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32001
                  message: Unauthorized
                id: '1'
        '429':
          description: 요청이 너무 많음 - 속도 제한을 초과했습니다.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32005
                  message: Too many requests
                id: '1'
        '500':
          description: 내부 서버 오류 - 서버에서 오류가 발생했습니다.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32603
                  message: Internal error
                id: '1'
        '503':
          description: 서비스를 사용할 수 없음 - 서비스를 일시적으로 사용할 수 없습니다.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32002
                  message: Service unavailable
                id: '1'
        '504':
          description: 게이트웨이 시간 초과 - 요청 시간이 초과되었습니다.
          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
          description: JSON-RPC 프로토콜 버전입니다.
          enum:
            - '2.0'
          example: '2.0'
        error:
          type: object
          properties:
            code:
              type: integer
              description: 오류 코드입니다.
              example: -32602
            message:
              type: string
              description: 오류 메시지입니다.
            data:
              type: object
              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)에서 무료로
        발급받을 수 있습니다.

````