Skip to content

Commit

Permalink
5.0 and general upgrade guides (#219)
Browse files Browse the repository at this point in the history
* upgrade guides start

* 5.0 upgrade and general upgrade guides

* update max-tx-time defaults

* fix typo

* add missing configs

---------

Co-authored-by: nsjames <DENIED>
  • Loading branch information
nsjames authored Oct 5, 2023
1 parent f84c6d8 commit 634115e
Show file tree
Hide file tree
Showing 5 changed files with 171 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
---
title: General Upgrade Guide
---

This guide will walk you through the steps you need to take to upgrade your node.
Keep in mind that this is a general guide, and some releases might require additional steps that need
to be taken. If there is a specific upgrade guide for a release you should follow that guide instead (though it might
refer to this guide for general steps).

## Planning for the upgrade

- **Do not** test upgrades on your production node, use a test node first
- The supported operating systems are:
- **Ubuntu 20.04 Focal**
- **Ubuntu 22.04 Jammy**
- **Do not** use deprecated plugins
- **Enable all** new required plugins
- **Make a backup** of your node


## Upgrading your node

Follow these steps in order. If you have any questions, please ask in the [Telegram group](https://t.me/AntelopeIO).

**Warning**: The following installation uses snapshots.

Node operators who need to replay transactions for SHiP or block logs should know that a replay can take weeks to complete.

<details>
<summary>To lower the time required to replay, you can:</summary>

- Raise `-–sync-fetch-span` while replaying (revert back to default after replay for stability!)
- Use peers with a full `blocks.log` only
- Keep your `p2p-peer-address` list short, only with the closest nodes
- You can quickly sync from a single peer located in the same datacenter, even if it is not on the same version
- You can do the same on the same machine, but you will need new `/blocks` and `/state` directories + more NVMe space
- You can simply copy the `blocks.log` from another machine if it is compatible

#### List of peer nodes with blocks.log files extending to genesis:
```bash
EOS:
eos.seed.eosnation.io:9876
peer1.eosphere.io:9876
peer2.eosphere.io:9876
p2p.genereos.io:9876

EOS Jungle4 Testnet:
peer1-jungle4.eosphere.io:9876
jungle4.seed.eosnation.io:9876
jungle4.genereos.io:9876
jungle.p2p.eosusa.io:9883
```

</details>


### 1. Download / build binaries

If you want to build and install from source, you can follow the instructions in the [README](https://github.com/AntelopeIO/leap#build-and-install-from-source).

If you want to use the binaries, you can download them from the [releases page](https://github.com/AntelopeIO/leap/releases).

### 2. Make a snapshot

Before you install new binaries or stop your nodes, you should make a snapshot.
This will allow you to quickly recover in case something goes wrong, and use it to replay your node.

To make a snapshot, run the following command **on your producer node**:

```bash
curl -X POST http://127.0.0.1:8888/v1/producer/create_snapshot
```

You can also grab a snapshot from trusted sources like [EOS Nation](https://snapshots.eosnation.io/), but make
sure you have a snapshot for the right network, and snapshot version.


### 3. Stop your node

Now that you have created a snapshot, you can stop your node.

### 4. Update your binaries

First, remove your old binary:

```bash
sudo apt-get remove -y leap
# or
sudo dpkg --remove <old-pkg-name>
```

Then, install the new binaries:

```bash
sudo apt-get install -y ./leap[-_][0-9]*.deb
# or
sudo dpkg -i <filename>.deb
```

### 5. Remove old files

Make a backup and delete the `blocks/reversible` directory, `state-history` directory, and `state` directory
within the `data` directory.

### 6. Remove old configuration options and plugins and add any new ones

Each release could have deprecated, end-of-lifed, or new plugins.
With these changes you might need to remove old configuration options and plugins, or add new plugins which
generally include new configuration options.

If the release you are upgrading to has any of these changes, you will find them in the release notes or
in a guide specific to that release from the list on the left (or hamburger menu on mobile).

### 7. Start your node

Start your node with the snapshot you created/downloaded in step 2.

To learn how to start snapshots and more information about them read the [snapshots guide](../10_getting-started/50_snapshots.md).





Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
title: Leap 5.0 Upgrade Guide
---

The 5.0 upgrade follows the general upgrade guide. You can find it [here](./01_general-upgrade-guide.md).

The information below is specific to the 5.0 upgrade and outlines only configuration option changes.

## Configuration Options

### Transaction Time Windows Configuration Change

These updates are based on performance testing along with empirical data.
In production environments, we have noticed cases of transactions exceeding the 30ms limit, and recommend
increasing the time window. With the addition of read_only transaction
in Leap 4.0 the time limits should be increased to make full use of the read_only feature.


- Remove `max-transaction-time` (new defaults)
- Set `read-only-read-window-time-us` to 165,000 (165ms)


### Confirm `max-nonprivileged-inline-action-size` is not set
As of Leap `v5.0.0-rc1`, node operators MUST ensure the `max-nonprivileged-inline-action-size` parameter is not
set in the `config.ini` to allow `nodeos` to start.



### New config options
- `http-category-address` can be used to configure all addresses in command line and ini file. The option can be used multiple times as needed.
- `database-map-mode` now supports a `mapped_private` mode. See [the release notes](https://github.com/AntelopeIO/leap/releases/tag/v5.0.0-rc1) for more information.

### New commmand line options
- `sync-peer-limit` can limit the number of peers to sync from. The Default value is 3.
- `eos-vm-oc-enable` has a new mode `auto` which automatically uses OC when building blocks, applying blocks, executing transactions from HTTP or P2P, and executing contracts on eosio.* accounts (eosio, eosio.token, eosio.ibc, and eosio.evm). `eos-vm-oc-enable=auto` is the new default.

### Modified option behavior
- `max-transaction-time` now defaults to `499ms`
- Specify `--p2p-listen-endpoint` and `--p2p-server-address` multiple times
- `sync-fetch-span` default changed from `100` to `1000`
- `read-only-transaction-threads` can now be set to a max of 128
- `abi-serializer-max-time-ms` has been updated to limit time spent serializing object on the main thread, and deserializing single objects on the HTTP threads.
- `http-max-response-time-ms` default value has been changed from 30ms to 15ms
- `disable-replay-opts` is automatically set to true if state history plugin is enabled. Can be used as a CLI option as well.

4 changes: 3 additions & 1 deletion native/07_node-operation/100_migration-guides/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ title: Migration Guides

Learn about EOS History Alternatives:

- [V1 History Alternatives](01_v1-history-alternatives.md)
- [General Upgrade Guide](01_general-upgrade-guide.md)
- [V1 History Alternatives](02_v1-history-alternatives.md)
- [5.0 Upgrade Guide](03_5.0-upgrade-guide.md)
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ plugin = eosio::state_history_plugin
Below are some sites where you can download a recent snapshot:

- [EOS Nation](https://snapshots.eosnation.io/)
- [EOS Sweden](https://snapshots-main.eossweden.org/)

### Before you start

Expand Down

0 comments on commit 634115e

Please sign in to comment.