# Manual Upgrades

### Manual Upgrade Procedure for BitNet Nodes

This section provides instructions for BitNet validators and node operators who prefer to perform **manual upgrades** instead of using automation tools like Cosmovisor. Manual upgrades are also necessary when handling **emergency forks**, **state resets**, or **custom genesis updates**.

***

#### 1. Stop the Node

Before beginning any upgrade, **gracefully shut down** your node:

```bash
Ctrl + C
```

***

#### 2. Install the New BitNet Version

Switch to the correct GitHub release and compile the updated binary:

```bash
cd bitnet
git fetch --all && git checkout <new_version>
make install
```

Confirm the new binary is installed:

```bash
bitnetd version --long
```

{% hint style="danger" %}
Ensure the binary version matches the expected upgrade version for your environment (mainnet or testnet). Use the correct Go version as specified in the release notes.
{% endhint %}

***

#### 3. Replace the Genesis File (If Required)

If the upgrade requires a **genesis change**, download the latest `genesis.json` from the appropriate BitNet repository and verify it:

```bash
cd $HOME/.bitnetd/config
cp -f genesis.json new_genesis.json
mv new_genesis.json genesis.json

echo "<expected_sha256_hash>  genesis.json" | sha256sum -c
```

***

#### 4. Reset Node Data (If Required)

If the upgrade is a **breaking change** that requires a full data reset:

```bash
rm $HOME/.bitnetd/config/addrbook.json
bitnetd tendermint unsafe-reset-all --home $HOME/.bitnetd
```

{% hint style="warning" %}
Never reuse the same `priv_validator_key.json` across multiple nodes. Doing so can result in **double-signing** and slashing.
{% endhint %}

***

#### 5. Restart the Node

Once the upgrade and optional reset are complete:

```bash
bitnetd start
```

Your node will resync from the latest height or from scratch (if reset), and join the network using the new software version.

***

*This completes the manual upgrade process. BitNet node operators should monitor network announcements, upgrade proposals, and release timelines to avoid downtime or consensus errors.*


---

# 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://bitnet-whitepaper.gitbook.io/developer-docs/upgrades-overview/manual-upgrades.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.
