# Releases

## Züs Mainnet Release Documentation

### Prerequisites

{% hint style="warning" %}

* Always create a snapshot for recovery before doing any release. This is non-negotiable.
* Weekly snapshots for miners and sharders must also be maintained for general fault tolerance.
  {% endhint %}

### Miner and Sharder Mainnet Release

> **Assumption:** This release has been well tested on dev. Demo release steps are excluded due to deprecation.

1. **Snapshot Creation**
   * Create a full system snapshot (miners and sharders) to enable quick recovery in case of failure. [Refer to deployment and snapshot guide](https://docs.zus.network/as-onboarding)
2. **Update a Single Miner and Sharder**
   * Select **one** miner and **one** sharder from the mainnet.
   * Update the `0chain` binary for both.
3. **Initial Health Check (1 Day Observation)**
   * Ensure the updated miner and sharder are **running for at least 24 hours**.
   * Confirm:
     * Rounds are progressing.
     * No suspicious entries in logs.
     * Updated miner is producing blocks.
4. **Announce and Update All Sharders**
   * Broadcast to the network: instruct all operators to update their **sharders**.
   * Wait for full sharder update completion.
5. **Announce and Update All Miners**
   * Broadcast to the network: instruct all operators to update their **miners**.
   * Wait for full miner update completion.
6. **Coordinate with @saswata for Hardfork Activation**
   * Ensure all updates are complete.
   * Confirm readiness to activate the [hardfork](/zus-docs/releases/hardfork.md).
7. **Activate the Hardfork**

   * Run command:

   ```bash
   ./zwallet add-hardfork -n <hardfork_name> -r <round_in_future>
   ```

   * Verify hardfork is registered:

   ```bash
   https://sharder1.0chain.net/sharder01/v1/scstate/get?key=hardfork:<hardfork_name>
   ```

   * Wait for the **trigger round** to be reached.
   * Post-activation checks:
     * Ensure chain is progressing.
     * Confirm miner/sharder logs are free from anomalies.

{% hint style="success" %}
**Notes**

* **Repeat Snapshot Reminder**: Always take a snapshot before any release.
* **Config Management:** All config updates must be made using a blockchain transaction from the smart contract owner wallet. Manual file changes will not apply.
* **Weekly Snapshot Strategy:** Maintain weekly snapshots of all miners and sharders to recover from potential data loss or node failure.
  {% endhint %}

## 0box Mainnet Release

> **Assumption:** This release has been well tested on dev. Demo steps are deprecated.

1. **Backup Postgres Database**
   * Perform a full backup of the **0box Postgres DB** hosted on **AWS RDS**.
2. **Update First 0box Instance**
   * Pull and deploy the new Docker image.
   * Run health checks:
     * Ensure service is running.
     * Review recent logs for any errors or anomalies.
3. **Update Second 0box Instance**
   * Deploy the updated image to the second instance.
   * Run the same health and log checks.
4. **Web App Testing**
   * Perform functional tests across **all connected web applications**.
     * Manual tests or
     * Automated Cypress tests

{% hint style="success" %}
**Notes**

* The steps above pertain only to updating the **0box image**.
* 0box is interconnected with other services: **Postgres, Kafka, Redis, Elasticsearch**
* Any release that introduces changes affecting these components must include additional steps.\
  Current setup does not require any updates to these dependencies.
  {% endhint %}


---

# Agent Instructions: 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.zus.network/zus-docs/releases.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.
