# Namada SE 2 Patch 5
previous: [Namada SE 2 Patch 4](https://hackmd.io/ndrz7LOwRYyWAUwQ0BfgQw)
---
* TLDR; There was a bug where IBC events were not dropped properly after a failed tx which, when combined with a second bug where gas-metering differed between versions, lead to divergence in state.
The current network has progressed to block 90044, which halted due to the aformentioned problem. In order to fix it a majority of validator voting power must upgrade to [v0.31.9](https://github.com/anoma/namada/releases/tag/v0.31.9).
## Steps to upgrade
:warning:**ABOVE ALL ELSE, DON'T DELETE PRE-GENESIS DIR OR THE PRIV_VALIDATOR_STATE.JSON**:warning:
We suggest the following steps to upgrade:
1. Stop the validator node
2. Backup your `pre-genesis` folder and `priv_validator_state.json` if you haven't done so already
3. Upgrade to [v0.31.9](https://github.com/anoma/namada/releases/tag/v0.31.9)
4. Assuming your validator has already committed block 90044, your db will be divergent. **The rollback command in the cli will not be able to help here; you will have to re-sync using `v0.31.9` from an earlier block.**
You have three options:
a) resync from block 0 (this will take like 10+ hours)
b) use the snapshot at height 90044 created from `v0.31.9` node (this will be very fast)
c) use an earlier snapshot from a `v0.31.6` node and sync the rest of the way after upgrading to `v0.31.9`
5. Assuming you're using a snapshot, the steps are:
5.1 Move your old `namada` folder to a new location (you will need your pre-genesis keys and priv_validator_state.json in the next steps) and re-run `join-network` with `v0.31.9`
5.2 Start the node and sync a few blocks (from height 0) just to initialize it and shut it down with `Ctrl+C` (or stop the service).
5.3 Delete the `db` and `cometbft/data` folders
5.4 Download a snapshot from the list below, using it to replace the `db` and `cometbft/data` folders. Don't forget to replace the `priv_validator_state.json` file with the one you backed up earlier
7. Make sure that `timeout_precommit_delta` is set to `"0ms"` in`vim <base_dir>/shielded-expedition.88f17d1d14/config.toml`
- this helps in case we progress to a bunch of higher rounds
8. Start the node and sync
## Restart tracking
- Please add your status under the column "Restart 5" on the [Shielded Expedition Restart Tracker](https://docs.google.com/spreadsheets/d/1zGORcIVoRND491cjCEvvbzerGjrAblCMhEYxr29rgmE/edit#gid=0) we need at least 2/3 of the voting power
## List of Snapshots
- Knowable `v0.31.9`, height 90044: https://testnet.luminara.icu/snap_90044.tar.lz4
- CitadelOne, `v0.31.6`, height 90000: https://namada-se-rpc.citadel.one/snap/namada-se-90000.tar.lz4
- CitadelOne, `v0.31.6`, height 90000 **with indexing**: https://namada-se-rpc.citadel.one/snap/namada-se-90000-tx_index.tar.lz4
- Alternate mirror of above snapshot, provided by lankou: https://namada.lankou.org/namada-se-90000-tx_index.tar.lz4
Example usage:
```bash
sudo apt install lz4
mkdir ~/namada-temp
curl -L https://namada-se-rpc.citadel.one/snap/namada-se-90000.tar.lz4 | tar -Ilz4 -xf - -C ~/namada-temp
rm -rf ~/.local/share/namada/shielded-expedition.88f17d1d14/db
rm -rf ~/.local/share/namada/shielded-expedition.88f17d1d14/cometbft/data
cp -a ~/namada-temp/db ~/.local/share/namada/shielded-expedition.88f17d1d14/
cp -a ~/namada-temp/data ~/.local/share/namada/shielded-expedition.88f17d1d14/cometbft
mv <your priv_validator_state.json> ~/.local/share/namada/shielded-expedition.88f17d1d14/cometbft/data/
```
## Docker Image
Docker image has been updated for `v0.31.9`:
https://github.com/anoma/namada/pkgs/container/namada/188506632?tag=namada-main
## Notes
- Coordinate with the other validators and voting power on Discord and help each other.
- Make sure to change the config.toml in `<chain_id>/config.toml` and not `<chain_id>/cometbft/config.toml` - the latter gets overriden
- No need to change the `.masp-params`.
- If you have peering issues, please check the seeds and peers [here](https://github.com/anoma/namada-shielded-expedition)