Skip to content

Commit

Permalink
Merge pull request #716 from lukso-network/update-node-guides
Browse files Browse the repository at this point in the history
Update node guides
  • Loading branch information
Hugoo authored Nov 8, 2023
2 parents 8f33440 + a7b2091 commit 44ac152
Show file tree
Hide file tree
Showing 8 changed files with 63 additions and 324 deletions.
44 changes: 3 additions & 41 deletions docs/networks/advanced-guides/switch-consensus-clients.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ sidebar_label: 'Switch Consensus Clients'
sidebar_position: 3
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Switching Consensus Clients

Having a variety of clients in a blockchain network and improving our client diversity is critically important.
Expand Down Expand Up @@ -142,45 +139,13 @@ Wait 10 minutes after stopping your node so the network does not accuse you of s

:::

Start up your node using checkpoint synchronization to reduce your downtime while synchronizing with the network significantly. Fast synchronization speeds are essential if you run a validator node to avoid losing stake.

Your node will begin syncing from a recently finalized consensus checkpoint instead of genesis. It will then download the rest of the blockchain data while your consensus is already running. After the synchronization is finalized, you will end up with the equal blockchain data.

> You can use the flag on every startup. However, it shows the most significant effect when synchronizing from scratch or after an extended downtime.
<Tabs>
<TabItem value="checkpoint-sync" label="Checkpoint Synchronization">

:::info

If you are setting up a node for the testnet, add the `--testnet` flag to the start command.
If you are starting your node in a fresh working directory or after being offline for a while, make sure to [add checkpoint synchronization](../mainnet/running-a-node.md#start-the-clients) to significantly speed up the synchronization during the startup.

:::

:::info

You will need the LUKSO CLI Version 0.8.0 or above in order to use the `--checkpoint-sync` command. If you are using an older version or run into issues, please pass down the checkpoint flag manually, as described in the [LUKSO CLI Checkpoint Documentation](https://github.com/lukso-network/tools-lukso-cli/tree/main#using-checkpoint-syncing).

:::

```sh
# Starting the Mainnet Node
lukso start --checkpoint-sync

# Starting the Mainnet Validator
lukso start --validator --transaction-fee-recipient "0x1234" --checkpoint-sync
```

</TabItem>
<TabItem value="regular-sync" label="Regular Synchronization">

:::caution

The normal synchronization process will take multiple hours for the node to finalize. It is not recommended if you are running a validator.

:::

:::info
:::note

If you are setting up a node for the testnet, add the `--testnet` flag to the start command.

Expand All @@ -194,10 +159,7 @@ lukso start
lukso start --validator --transaction-fee-recipient "0x1234"
```

</TabItem>
</Tabs>

:::info
:::note

After your node finalizes the synchronization with the network, you can remove the validator key folder and the old working directory.

Expand Down
56 changes: 2 additions & 54 deletions docs/networks/advanced-guides/update-clients.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ sidebar_label: 'Update the Clients'
sidebar_position: 2
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Update the Clients

If you already use the **latest LUKSO CLI version** and **network configuration** but want to check for new blockchain client versions, you can update them separately.
Expand Down Expand Up @@ -74,59 +71,10 @@ lukso install ---teku-tag v23.10.0

## Restart your Node

You can start your node as regular. If you run a validator, please adjust your flags or the recipient address.

Start up your node using checkpoint synchronization to reduce your downtime while synchronizing with the network significantly. Fast synchronization speeds are essential if you run a validator node to avoid losing stake.

Your node will begin syncing from a recently finalized consensus checkpoint instead of genesis. It will then download the rest of the blockchain data while your consensus is already running. After the synchronization is finalized, you will end up with the equal blockchain data.

> You can use the flag on every startup. However, it shows the most significant effect when synchronizing from scratch or after an extended downtime.
<Tabs>
<TabItem value="checkpoint-sync" label="Checkpoint Synchronization">
You can [start your node as regular](../mainnet/running-a-node.md#start-the-clients).

:::info

If you are setting up a node for the testnet, add the `--testnet` flag to the start command.
If you are starting your node in a fresh working directory or after being offline for a while, make sure to [add checkpoint synchronization](../mainnet/running-a-node.md#start-the-clients) to significantly speed up the synchronization during the startup.

:::

:::info

You will need the LUKSO CLI Version 0.8.0 or above in order to use the `--checkpoint-sync` command. If you are using an older version or run into issues, please pass down the checkpoint flag manually, as described in the [LUKSO CLI Checkpoint Documentation](https://github.com/lukso-network/tools-lukso-cli/tree/main#using-checkpoint-syncing).

:::

```sh
# Starting the Mainnet Node
lukso start --checkpoint-sync

# Starting the Mainnet Validator
lukso start --validator --transaction-fee-recipient "0x1234" --checkpoint-sync
```

</TabItem>
<TabItem value="regular-sync" label="Regular Synchronization">

:::caution

The normal synchronization process will take multiple hours for the node to finalize. It is not recommended if you are running a validator.

:::

:::info

If you are setting up a node for the testnet, add the `--testnet` flag to the start command.

:::

```bash
# Starting the Mainnet Node
lukso start

# Starting the Mainnet Validator
lukso start --validator --transaction-fee-recipient "0x1234"
```

</TabItem>
</Tabs>
188 changes: 35 additions & 153 deletions docs/networks/advanced-guides/update-the-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,12 @@ Updating your node and blockchain clients is of utmost importance. It is not jus

## Check your LUKSO CLI Version

:::info Breaking Changes
:::caution Breaking Changes

Since the mainnet launch occurred, the LUKSO CLI had breaking changes from version `0.6` to `0.7`.
Since the mainnet launch occurred, the LUKSO CLI had breaking changes. Please check your current LUKSO CLI version to determine your update process.

:::

Please check your current LUKSO CLI version to determine your update process.

```bash
lukso version
```
Expand All @@ -28,7 +26,7 @@ This guide will lead you through updating the LUKSO CLI to the **latest version*

## Update the LUKSO CLI

Updating your node is similar to the installing process, while keeping your previous keystore data. If you already have the **latest LUKSO CLI version** and **network configs**, you can also just update your [blockchain clients](./update-clients.md).
Updating your node is similar to the installing process, while keeping your previous keystore data. If you already have the **latest LUKSO CLI version** and **network configs**, you can just [Update the Blockchain Clients](./update-clients.md).

#### Stop your Node

Expand Down Expand Up @@ -90,7 +88,36 @@ sudo pkill teku
</details>

<Tabs>
<TabItem value="update-v6" label="Update from Version 0.6 or below">
<TabItem value="update-v08" label="Update from Version 0.8 or above">

#### Update the LUKSO CLI

Re-install the LUKSO CLI to your system. You will be asked to overwrite the current version.

```bash
curl https://install.lukso.network | sh
```

Make sure to check the downloaded version again to ensure that the update was successful.

```bash
lukso version
```

Then continue to download the latest network configurations.

:::info

The `lukso init` command will not overwrite any personal configurations.

:::

```bash
lukso init
```

</TabItem>
<TabItem value="update-v07" label="Update from Version 0.7 or below">

#### Create a new Working Directory

Expand Down Expand Up @@ -181,160 +208,15 @@ Keep your old working directory on your system until the new node setup fully sy

:::

</TabItem>
<TabItem value="update-v7" label="Update from Version 0.7">

#### Remove outdated Blockchain Data

If the processes have been stopped successfully, you can continue to remove the old network data.

```bash
# Remove Mainnet Data
rm -rf mainnet-data

# Remove Testnet Data
rm -rf testnet-data
```

#### Backup outdated Configuration

Next, you can rename your configuration folder to reload the latest network files later on.

```bash
mv configs/ configs-backup
```

#### Update the LUKSO CLI

Re-install the LUKSO CLI to your system. You will be asked to overwrite the current version.

```bash
curl https://install.lukso.network | sh
```

Make sure to check the downloaded version again to ensure that the update was successful.

```bash
lukso version
```

#### Re-initialize the Working Directory

Next, you can re-download the latest network configurations and genesis files.

```bash
lukso init
```

#### Install the Latest Clients

After updating the LUKSO CLI, we must install the updated blockchain clients.

```bash
lukso install
```

#### Apply Configurations

In case you did any modifications to your configuration files, such as:

- configuring a Dynamic DNS
- connecting the blockchain explorer page
- adding a node name or graffiti
- adjusting your peer count

Please add them once again and make sure that these are in the correct format before starting your node.

You can follow the [extended node guide](https://github.com/fhildeb/lukso-node-guide/blob/main/6-blockchain-clients/README.md) or list of [further reads](../mainnet/running-a-node.md#further-reads) for more information.

:::caution

Wait 10 minutes after stopping your node so the network does not accuse you of slashing while using updated configurations.

:::

:::danger Backup

Keep your old working directory on your system until the new node setup fully synchronizes within the next step. It will reference your previous configuration in case something goes wrong.

:::

</TabItem>

<TabItem value="update-v8-or-above" label="Update from Version 0.8 or above">

#### Update the LUKSO CLI

Re-install the LUKSO CLI to your system. You will be asked to overwrite the current version.

```bash
curl https://install.lukso.network | sh
```

Make sure to check the downloaded version again to ensure that the update was successful.

```bash
lukso version
```

</TabItem>
</Tabs>

#### Restart your Node

You can start your node as regular. If you run a validator, please adjust your flags or the recipient address.

Start up your node using checkpoint synchronization to reduce your downtime while synchronizing with the network significantly. Fast synchronization speeds are essential if you run a validator node to avoid losing stake.

Your node will begin syncing from a recently finalized consensus checkpoint instead of genesis. It will then download the rest of the blockchain data while your consensus is already running. After the synchronization is finalized, you will end up with the equal blockchain data.

> You can use the flag on every startup. However, it shows the most significant effect when synchronizing from scratch or after an extended downtime.
<Tabs>
<TabItem value="checkpoint-sync" label="Checkpoint Synchronization">

:::info

If you are setting up a node for the testnet, add the `--testnet` flag to the start command.

:::
You can [start your node as regular](../mainnet/running-a-node.md#start-the-clients).

:::info

You will need the LUKSO CLI Version 0.8.0 or above in order to use the `--checkpoint-sync` command. If you are using an older version or run into issues, please pass down the checkpoint flag manually, as described in the [LUKSO CLI Checkpoint Documentation](https://github.com/lukso-network/tools-lukso-cli/tree/main#using-checkpoint-syncing).
If you are starting your node in a fresh working directory or after being offline for a while, make sure to [add checkpoint synchronization](../mainnet/running-a-node.md#start-the-clients) to significantly speed up the synchronization during the startup.

:::

```sh
# Starting the Mainnet Node
lukso start --checkpoint-sync

# Starting the Mainnet Validator
lukso start --validator --transaction-fee-recipient "0x1234" --checkpoint-sync
```

</TabItem>
<TabItem value="regular-sync" label="Regular Synchronization">

:::caution

The normal synchronization process will take multiple hours for the node to finalize. It is not recommended if you are running a validator.

:::

:::info

If you are setting up a node for the testnet, add the `--testnet` flag to the start command.

:::

```bash
# Starting the Mainnet Node
lukso start

# Starting the Mainnet Validator
lukso start --validator --transaction-fee-recipient "0x1234"
```

</TabItem>
</Tabs>
Loading

0 comments on commit 44ac152

Please sign in to comment.