> For the complete documentation index, see [llms.txt](https://docs.extrachain.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.extrachain.io/exconsensus/state-snapshot-algorithm-ssa-aka-genesis-algorithm.md).

# State Snapshot Algorithm (SSA) aka “Genesis Algorithm”

State Snapshot Algorithm (SSA) aka “Genesis Algorithm”:

State Snapshot Algorithm produces Genesis Blocks each 100 blocks. Genesis Blocks hold Actors’ balances data and serves as state backup and foothold for devices in “Fast Blockchain” mode.

Genesis block production algorithm:

1. Find last Genesis Block and load IDs and balances;
2. Collect all new balances and make all changes from last Genesis Block to current block;
3. Merge collected data with loaded data;
4. Distribute new Genesis Block;

If device receives new Genesis Block, then BPA starts, but only for previous and new Genesis Block.

![SSA Scheme](/files/-Ma2y034d2zd8vfs3W9D)


---

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

```
GET https://docs.extrachain.io/exconsensus/state-snapshot-algorithm-ssa-aka-genesis-algorithm.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
