# Обновления

Все обновления ПО блокчейна можно найти на этой странице.&#x20;

<details>

<summary>sei-devnet-1 (устарел)</summary>

</details>

<details>

<summary>sei-testnet-2 (устарел)</summary>

* 1.0.2beta->1.0.3beta:&#x20;
  * 06/10/2022\
    16:00 UTC

    Блок: 153759
  * Тестирование возможности обновления ПО
* 1.0.3beta->1.0.4beta:&#x20;
  * 06/22/2022 \
    14:30 UTC\
    Блок: 681000
  * Изменение модуля Oracle
* 1.0.4beta->1.0.5beta:&#x20;
  * 06/30/2022 \
    16:30 UTC\
    Блок: 1075040
  * Изменения модуля Oracle, модуля отказа, программных настроек Tendermint
* 1.0.5beta->1.0.6beta:
  * 07/04/2022\
    16:30 UTC\
    Блок: 1217302
  * Исправление в модуле Oracle при получении неверных номеров транзакций

</details>

<details>

<summary>sei-devnet-1 (активный тестнет)</summary>

* 1.0.6beta->1.0.7beta-postfix
  * Время: 07/22/2022 15:00 UTC&#x20;
  * Блок: 1133762

</details>

<details>

<summary>atlantic-1 (активный инцентив тестнет)</summary>

* 1.0.6beta-val-count-fix-->1.0.7beta-postfix
  * Время: 07/22/2022 16:00 UTC&#x20;
  * Блок: 836963
* 1.1.0beta-->1.0.7beta-postfix
  * Время: 08/03/2022 15:30 UTC&#x20;
  * Блок: 1862331

</details>

## Инструкции по обновлению

Здесь вы можете найти различные инструкции по обновлению ПО. Документы, представленные ниже подходят к обновлению 1.0.3beta.

### Способ 1. Ручное обновление

Как только блокчейн достигает блока, на котором должно произойти обновление, вам будет отправлено следующее сообщение с ошибкой:

```
ERR UPGRADE "1.0.3beta" NEEDED at height: 153759
```

После этого вам следует остановить работу программы и выполнить следующие команды:

```
# Checkout the binary for 1.0.3beta
git clone https://github.com/sei-protocol/sei-chain.git
cd sei-chain/
git fetch --tags -f
git checkout 1.0.3beta
# Build the new tool
make install
# Restart the chain process. Ensure that your GOPATH is in your PATH 
seid start --home ~/.sei
```

### Метод 2. Космовизор

[Космовизор](https://github.com/cosmos/cosmos-sdk/tree/main/cosmovisor) - специализированная программа, входящая в состав Cosmos SDK, которая может выполнять обновления за вас. На странице Космовизора находится исчерпывающая информация по его установке и настройке, поэтому в примере будет только код, необходимый для обновления ПО Sei

Сперва вам нужно установить Космовизор:

```
go install github.com/cosmos/cosmos-sdk/cosmovisor/cmd/cosmovisor@latest
```

{% hint style="info" %}
У некоторых пользователей возникают проблемы с установкой. Если у вас не получается установить, вы может воспользоваться следующей ссылкой [Инструкция](https://github.com/cosmos/cosmos-sdk/issues/11305#issuecomment-1056611418)
{% endhint %}

Космовизор использует файл upgrade-info.json символические ссылки на различные бинарные файлы seid для проведения обновления. Структура программы выглядит следующим образом:

```
~/.sei/cosmovisor
├── current -> genesis or upgrades/<name>
├── genesis
│   └── bin
│       └── seid
└── upgrades
    └── 1.0.3beta
        ├── bin
        │   └── seid
        └── upgrade-info.json

6 directories, 3 files
```

До начала работы обратите внимание, что `current` это символьная ссылка на текущую версию seid (при первоначальной установке это `genesis/`, после `1.0.3beta`). Директория `upgrades/` содержит различные бинарные файлы, включая и 1.0.3beta. Чтобы создать текущую структур файла, необходимо использовать команды:

```
# Export environment variables
DAEMON_RESTART_AFTER_UPGRADE=true 
DAEMON_NAME=seid 
DAEMON_HOME=~/.sei
# Create cosmovisor folder
mkdir -p $DAEMON_HOME/cosmovisor/genesis/bin
# Copy 1.0.0beta seid binary into the genesis folder
cp build/seid $DAEMON_HOME/cosmovisor/genesis/bin
# Instead of running 1.0.0beta with ./build/seid start, you would run it with cosmovisor
cosmovisor run start --home ~/.sei
# Checkout 1.0.1beta branch, build the new seid binary and move it into the upgrade folder
mkdir -p $DAEMON_HOME/cosmovisor/upgrades/1.0.3beta/bin
# Checkout the binary for 1.0.1beta
git clone --depth 1 --branch 1.0.3beta https://github.com/sei-protocol/sei-chain.git
# Build the new tool
cd sei-chain/
make install
cp $(which seid) $DAEMON_HOME/cosmovisor/upgrades/1.0.3beta/bin
```


---

# 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://seinetwork.gitbook.io/docs/nodes-and-validators/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.
