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

> ## Agent Instructions
> This page is part of the Solana developer documentation at https://solana.com/developers/docs. Append `.md` to any docs URL, or send `Accept: text/markdown`, to get the page as Markdown.
> Index of all pages: https://solana.com/llms.txt. Per-section indexes such as https://solana.com/developers/docs/payments/llms.txt are smaller; prefer them when working on one task.
> Coding agents: install the official Solana skill for current APIs and conventions with `npx skills add https://github.com/solana-foundation/solana-dev-skill` (also served at https://solana.com/SKILL.md).
> Code in the cookbook and task pages comes from tested example files. Prefer it over writing API calls from memory.

# getAgGenesisCert

> Returns the Alpenglow genesis certificate, or null if the cluster has not migrated to Alpenglow consensus.

Returns the Alpenglow genesis certificate: the certificate over the genesis
block, the block the cluster switched to Alpenglow consensus from. Blocks after
it are finalized by Alpenglow. Returns `null` on a cluster that is still running
TowerBFT. On mainnet the genesis block is slot 459,652,999 (epoch 1064, 21
October 2026); see
[the Alpenglow upgrade page](https://solana.com/upgrades/alpenglow).

<Info>
  **Source**

  [`get_ag_genesis_cert`](https://github.com/anza-xyz/agave/blob/v4.3.2/rpc/src/rpc.rs#L931)
</Info>

<Warning>
  Available from Agave v4.3. A node running an earlier version answers with a
  `Method not found` error (`-32601`), which is different from `null`: `null`
  means the node supports the method and the cluster has not migrated. The
  Solana CLI exposes the same call as `solana alpenglow-genesis-info`.
</Warning>

<RequestExample>
  ```bash cURL
  curl https://api.devnet.solana.com -s -X POST \
    -H "Content-Type: application/json" \
    -d '
    {
      "jsonrpc": "2.0",
      "id": 1,
      "method": "getAgGenesisCert"
    }
  '
  ```

  ```ts Kit
  import { createSolanaRpc } from "@solana/kit";

  // Requires @solana/kit 8.3.0 or later
  const rpc_url = "https://api.devnet.solana.com";
  const rpc = createSolanaRpc(rpc_url);

  let cert = await rpc.getAgGenesisCert().send();

  if (cert === null) {
    console.log("Cluster is still running TowerBFT");
  } else {
    console.log("Alpenglow active since slot", cert.block.slot);
  }
  ```

  ```rs Rust
  use anyhow::Result;
  use solana_client::nonblocking::rpc_client::RpcClient;
  use solana_commitment_config::CommitmentConfig;

  #[tokio::main]
  async fn main() -> Result<()> {
      let client = RpcClient::new_with_commitment(
          String::from("https://api.devnet.solana.com"),
          CommitmentConfig::confirmed(),
      );

      match client.get_ag_genesis_cert().await? {
          None => println!("Cluster is still running TowerBFT"),
          Some(cert) => println!("Alpenglow active since slot {}", cert.block.slot),
      }

      Ok(())
  }
  ```
</RequestExample>

<ResponseExample>
  ```jsonc migrated
  {
    "jsonrpc": "2.0",
    "result": {
      "block": {
        "slot": 412300800,
        "blockId": [
          143, 27, 209, 4, 88, 176, 61, 230, 12, 99, 174, 41, 7, 182, 250, 33,
          118, 65, 201, 90, 16, 133, 244, 58, 71, 190, 2, 155, 108, 223, 46, 137
        ]
      },
      "signature": {
        "signature": [/* 192 bytes */],
        "bitmap": [/* variable length */]
      }
    },
    "id": 1
  }
  ```

  ```json title="not migrated"
  {
    "jsonrpc": "2.0",
    "result": null,
    "id": 1
  }
  ```
</ResponseExample>

## Parameters

None

## Result

<ResponseField name="result" type="object" post={["migrated"]}>
  The Alpenglow genesis certificate, as gossiped between validators. Present once
  the cluster has migrated to Alpenglow consensus.

  <Expandable title="properties" defaultOpen>
    <ResponseField name="block" type="object">
      The block the certificate certifies: the Alpenglow genesis block.

      - `slot: <u64>` - Slot of the certified block.
      - `blockId: <array>` - Block ID of the certified block, as a 32-byte array.
    </ResponseField>

    <ResponseField name="signature" type="object">
      The aggregate signature over the certified block.

      - `signature: <array>` - The 192-byte aggregate BLS signature: the signatures of
        every participating validator combined into one.
      - `bitmap: <array>` - Which validators are in that aggregate. Each validator has
        a rank for the epoch, assigned by sorting the validator set by stake (rank 0
        is the largest stake); bit `i` set means the validator with rank `i` signed. A
        verifier uses it to rebuild the aggregate public key. Encoded per the
        [`solana-signer-store`](https://github.com/anza-xyz/solana-sdk) crate; ranks
        are defined by
        [`BLSPubkeyToRankMap`](https://github.com/anza-xyz/agave/blob/v4.3.2/runtime/src/epoch_stakes.rs#L44).
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="result" type="null" post={["not migrated"]}>
  The node supports the method, but the cluster is still running TowerBFT.
</ResponseField>
