---
title: getAgGenesisCert
description: >-
  Returns the Alpenglow genesis certificate, or null if the cluster has not
  migrated to Alpenglow consensus.
url: /docs/rpc/http/getaggenesiscert
type: reference
hideTableOfContents: true
---

Returns the Alpenglow genesis certificate: the certificate over the first block
produced under Alpenglow consensus. Returns `null` while the cluster is still
running TowerBFT, which makes this the way to detect whether Alpenglow is active
on a cluster.

<Callout type="info" title="Source">
  [`get_ag_genesis_cert`](https://github.com/anza-xyz/agave/blob/722c8f4b5b008cd3967e46bd9683df464a9d8cb8/rpc/src/rpc.rs#L931)
</Callout>

<Callout type="warn">
  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`.
</Callout>

<APIMethod>

```jsonc !!request curl
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "getAgGenesisCert"
}
```

```ts !!request title="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 !!request title="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(())
}
```

### !params

### !!result migrated

```jsonc !response
{
  "jsonrpc": "2.0",
  // !hover(1:17) result
  "result": {
    // !hover(1:7) block
    "block": {
      // !hover slot
      "slot": 412300800,
      // !hover blockId
      "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
      ]
    },
    // !hover(1:8) signature
    "signature": {
      // !hover signature
      "signature": [/* 192 bytes */],
      // !hover bitmap
      "bitmap": [/* variable length */]
    }
  },
  "id": 1
}
```

!type object

The Alpenglow genesis certificate, as gossiped between validators. Present once
the cluster has migrated to Alpenglow consensus.

##### !! block

!type object

The block the certificate certifies: the first block produced under Alpenglow.

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

##### !! 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/722c8f4b5b008cd3967e46bd9683df464a9d8cb8/runtime/src/epoch_stakes.rs#L44).

### !!result not migrated

```jsonc !response
{
  "jsonrpc": "2.0",
  // !hover result
  "result": null,
  "id": 1
}
```

!type null

The node supports the method, but the cluster is still running TowerBFT.

</APIMethod>
