> ## 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 returns the Alpenglow genesis certificate, or null if the cluster still runs TowerBFT. Use it to check whether Alpenglow consensus is active.

<Note>
  Requires Agave v4.3 or later. Earlier versions do not recognize the method and
  return `Method not found` (-32601).
</Note>

## Detecting the migration

Use this method to check whether a cluster runs [Alpenglow](https://www.helius.dev/blog/alpenglow) consensus. The response takes three forms:

* **A certificate object.** The cluster has migrated. `result.block.slot` is the first slot produced under Alpenglow.
* **`null`.** The node runs Agave v4.3 or later, and the cluster has not migrated.
* **Error `-32601`.** The node predates v4.3. The cluster's consensus is unknown.

Treat `-32601` as unknown rather than as "not migrated". A node that cannot answer the question says nothing about the cluster.

The certificate does not change once a cluster migrates. Cache it after the first successful response instead of polling.

## Reading the certificate

`block` identifies the certified block. `slot` is its slot number. `blockId` is a 32-byte array, not the base-58 string used elsewhere in the RPC API.

`signature` holds the aggregate BLS signature of every validator that signed the certificate. `bitmap` records which validators those were, indexed by stake rank. Reading the bitmap requires the same stake-ordered validator list the cluster used.

`blockId` is always 32 bytes and `signature` always 192, both shown at full length in the example. `bitmap` has no fixed size: it carries one bit per validator, so it grows with the validator set, and the example shows a short one.

The Solana CLI returns the same data as `solana alpenglow-genesis-info`.


## OpenAPI

````yaml openapi/rpc-http/getAgGenesisCert.yaml POST /
openapi: 3.1.0
info:
  title: Solana RPC API
  version: 1.0.0
  description: >-
    Consensus migration API for retrieving the Alpenglow genesis certificate,
    the certificate over the first block produced under Alpenglow consensus,
    used to detect whether a cluster has migrated from TowerBFT.
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
servers:
  - url: https://mainnet.helius-rpc.com
    description: Mainnet RPC endpoint
  - url: https://devnet.helius-rpc.com
    description: Devnet RPC endpoint
security: []
paths:
  /:
    post:
      tags:
        - RPC
      summary: getAgGenesisCert
      description: >
        Retrieve the Alpenglow genesis certificate — the certificate over the
        first block a cluster

        produced under Alpenglow consensus — or `null` if the cluster is still
        running TowerBFT.

        This is the supported way to detect at runtime whether Alpenglow
        consensus is active, rather

        than inferring it from validator versions or slot numbers. The
        certificate carries the

        certified block (its slot and 32-byte block id) together with the
        aggregate BLS signature of

        the validators that signed it and a bitmap identifying which ones did,
        ordered by stake rank.

        Requires Agave v4.3 or later; earlier versions do not recognize the
        method and return

        `Method not found` (-32601) instead of `null`.
      operationId: getAgGenesisCert
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                jsonrpc:
                  type: string
                  description: The JSON-RPC protocol version.
                  enum:
                    - '2.0'
                  example: '2.0'
                  default: '2.0'
                id:
                  type: string
                  description: A unique identifier for the request.
                  example: '1'
                  default: '1'
                method:
                  type: string
                  description: The name of the RPC method to invoke.
                  enum:
                    - getAgGenesisCert
                  example: getAgGenesisCert
                  default: getAgGenesisCert
      responses:
        '200':
          description: >-
            Successfully retrieved the Alpenglow genesis certificate, or `null`
            if the cluster has not migrated.
          content:
            application/json:
              schema:
                type: object
                properties:
                  jsonrpc:
                    type: string
                    description: The JSON-RPC protocol version.
                    enum:
                      - '2.0'
                    example: '2.0'
                  id:
                    type: string
                    description: Identifier matching the request.
                    example: '1'
                  result:
                    type: object
                    nullable: true
                    description: >-
                      The Alpenglow genesis certificate, or `null` when the
                      cluster is still running TowerBFT.
                    properties:
                      block:
                        type: object
                        description: The certified first Alpenglow block.
                        properties:
                          slot:
                            type: integer
                            format: uint64
                            description: >-
                              The slot of the first block produced under
                              Alpenglow consensus.
                            example: 412300800
                          blockId:
                            type: array
                            description: >-
                              The block identifier, as an array of bytes. Always
                              32 bytes.
                            minItems: 32
                            maxItems: 32
                            items:
                              type: integer
                              minimum: 0
                              maximum: 255
                      signature:
                        type: object
                        description: >-
                          The aggregate validator signature over the certified
                          block.
                        properties:
                          signature:
                            type: array
                            description: >-
                              The aggregate BLS signature of every validator
                              that signed the certificate, as an array of bytes.
                              Always 192 bytes.
                            minItems: 192
                            maxItems: 192
                            items:
                              type: integer
                              minimum: 0
                              maximum: 255
                          bitmap:
                            type: array
                            description: >-
                              Bitmap marking which validators signed, indexed by
                              stake-ranked position. Variable length — one bit
                              per validator, so it grows with the validator set.
                            items:
                              type: integer
                              minimum: 0
                              maximum: 255
        '400':
          description: Bad Request - Invalid request parameters or malformed request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32602
                  message: Invalid params
        '401':
          description: Unauthorized - Invalid or missing API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32001
                  message: Unauthorized
                id: '1'
        '429':
          description: Too Many Requests - Rate limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32005
                  message: Too many requests
                id: '1'
        '500':
          description: Internal Server Error - An error occurred on the server.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32603
                  message: Internal error
                id: '1'
        '503':
          description: Service Unavailable - The service is temporarily unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                jsonrpc: '2.0'
                error:
                  code: -32002
                  message: Service unavailable
                id: '1'
        '504':
          description: Gateway Timeout - The request timed out.
          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: The JSON-RPC protocol version.
          enum:
            - '2.0'
          example: '2.0'
        error:
          type: object
          properties:
            code:
              type: integer
              description: The error code.
              example: -32602
            message:
              type: string
              description: The error message.
            data:
              type: object
              description: Additional data about the error.
        id:
          type: string
          description: Identifier matching the request.
          example: '1'
  securitySchemes:
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api-key
      description: >-
        Your Helius API key. You can get one for free in the
        [dashboard](https://dashboard.helius.dev/api-keys).

````