> For the complete documentation index, see [llms.txt](https://docs.chiliz.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.chiliz.com/learn/glossary/epoch.md).

# Epoch

## What is an epoch?

An epoch is a fixed period of time on a blockchain, measured in blocks rather than hours or minutes.

On Chiliz Chain:

* **Chiliz Mainnet**: 1 epoch = 28,800 blocks, or approximately **1 day**.
* **Spicy Testnet**: 1 epoch = 7,200 blocks, or approximately **6 hours**.

{% hint style="info" %}
Block production time can vary slightly, which is why epoch durations are approximate. The block count is the source of truth, not the clock.
{% endhint %}

## What happens at the end of an epoch?

Epochs act as the heartbeat of Chiliz Chain's Proof of Staked Authority (PoSA) consensus. Epoch boundaries are when the chain updates its validator-related state, including:

* **Refreshing the active validator set**, taking into account each validator's total staked CHZ.
* **Distributing staking rewards** to validators and their delegators.

## Why do epochs matter to me?

If you stake CHZ, epochs determine when you can claim unstaked tokens: after unstaking on Chiliz Mainnet, you must wait for the remainder of the current epoch plus 2 full epochs (roughly 3 days) before claiming.

Learn more:

{% content-ref url="/pages/eSRJkSJDtouV2AkxaJwW" %}
[Unstake your CHZ](/learn/about-staking/unstake-your-chz.md)
{% endcontent-ref %}

{% content-ref url="/pages/Wb9wAJtwJOttSCvK39G4" %}
[Defining Validators and Delegators](/learn/about-validators/defining-validators-and-delegators.md)
{% endcontent-ref %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.chiliz.com/learn/glossary/epoch.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
