Skip to content

Commit

Permalink
Merge pull request #633 from lukso-network/remove-node-ip
Browse files Browse the repository at this point in the history
Improve nodes articles
  • Loading branch information
Hugoo authored Sep 20, 2023
2 parents 00ab589 + 412a8a3 commit 3cb4b21
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 189 deletions.
115 changes: 30 additions & 85 deletions docs/networks/mainnet/running-a-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,18 @@ sidebar_position: 2
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Running a Node
# Running a mainnet Node

Anyone is welcome to participate in the LUKSO network by running her/his own node. On this page, you will find the relevant information to configure and start your node. If you wish to stake LYX and run a validator node, you can check the [Become a Validator page](./become-a-validator.md).
Anyone is welcome to participate in the LUKSO network by running her/his own node. On this page, you will find the relevant information to configure and start your node. If you wish to [stake LYX](https://deposit.mainnet.lukso.network/en/) and run a validator node, you can check the [Become a Validator page](./become-a-validator.md).

<div style={{textAlign: 'center'}}>
<img
width="600px"
src="/img/lukso-mainnet-genesis-nodes.png"
alt="A map fo the LUKSO mainnet network with genesis validators."
/><br/>
<i>Map of the LUKSO genesis validators from the <a href="https://stats.execution.mainnet.lukso.network/">execution stats website</a> - 19.09.23</i>.
</div>

## System Requirements

Expand Down Expand Up @@ -39,9 +48,9 @@ LUKSO has partnered with [Dappnode](https://dappnode.com/) ([announcement](https

Difficulty: Medium 🌶️🌶️

The [LUKSO CLI](https://github.com/lukso-network/tools-lukso-cli) is a command line tool to install, manage and set up nodes and validators of different clients for the LUKSO blockchain. It provides simple and unified commands to interact with your node and runs natively on your operating system. We recommend this as default for anyone beginning to get into the topic of running a node himself. The LUKSO CLI is officially supported for Ubuntu, Debian, and Mac running on either x86 Intel and AMD Processors or Single Board ARM Computers.
The [LUKSO CLI](https://github.com/lukso-network/tools-lukso-cli) is a command line tool to install, manage and set up nodes and validators of different clients for the LUKSO blockchain. It provides simple and unified commands to interact with your node and runs natively on your operating system. The LUKSO CLI is officially supported for Ubuntu, Debian and macOS running on either x86 Intel and AMD Processors or Single Board ARM Computers.

You can use the [LUKSO CLI](https://github.com/lukso-network/tools-lukso-cli) to prepare and run your LUKSO node. For further information, you can check out the official [LUKSO CLI Documentation](https://github.com/lukso-network/tools-lukso-cli/). It is not limiting yourself to running any supported clients, as all configurations and flags can be passed down.
For further information, you can check out the official [LUKSO CLI Documentation](https://github.com/lukso-network/tools-lukso-cli/). It is not limiting yourself to running any supported clients, as all configurations and flags can be passed down.

#### Install the LUKSO CLI

Expand All @@ -51,7 +60,7 @@ First, install the `lukso` command globally on your node machine.
curl https://install.lukso.network | sh
```

#### Create a Working Directory
#### Create a working directory

:::tip

Expand All @@ -71,85 +80,21 @@ Initialize the working folder, which will download the LUKSO network configurati
lukso init
```

#### Install the Clients

After the initialization is successful, we must download the blockchain clients, which will be managed from the CLI under the hood. They will install globally, need superuser permissions, and are set as default clients within your working directories configuration file. You will be asked which clients you want to download and install during the setup.

```bash
lukso install
```

#### Setting your Public IP Address

To find other nodes in the network, your public IP should be exposed to build solid peer connections and download data more quickly. This public IP value must be set within the consensus client configuration file that the CLI downloads from the [LUKSO Network Configuration](https://github.com/lukso-network/network-configs) repository.
:::tip Sudo mode

Within the node's working directory, open up the related configuration file with an editor of your choice:

:::info

If you are setting up a node for the testnet, make sure to modify the configuration file within the testnet folder `[PATH_TO_NODE_WORKING_DIRECTORY]/configs/testnet/...` instead.
Depending on your configuration and permissions, you might need to run the commands as super user with the `sudo` command.

:::

<Tabs>
<TabItem value="prysm-config" label="Prysm">

There are two ways the IP can be configured within Prysm: Regular Host IPs or by using a Dynamic DNS address. Choose what address you are going to use within your setup. If you need further information, please have a look at the [Further Reads](#further-reads) section.

<Tabs>
<TabItem value="host-ip" label="Host IP">

Exchange the following sample IP address:

```text title="[PATH_TO_NODE_WORKING_DIRECTORY]/configs/mainnet/prysm/prysm.yaml"
p2p-host-ip: '0.0.0.0'
```

With your public IP address:

```text title="[PATH_TO_NODE_WORKING_DIRECTORY]/configs/mainnet/prysm/prysm.yaml"
p2p-host-ip: '<your-public-ip-address>'
```

</TabItem>
<TabItem value="host-dns" label="Host DNS">

Exchange the following sample IP address:

```text
p2p-host-ip: '0.0.0.0'
```

With the hostname property and address:
#### Install the clients

```text
p2p-host-dns: '<your-hostname-address>'
```

</TabItem>
</Tabs>

</TabItem>
<TabItem value="lighthouse-config" label="Lighthouse">

Exchange the following sample addresses:

```text title="[PATH_TO_NODE_WORKING_DIRECTORY]/configs/mainnet/lighthouse/lighthouse.toml"
listen-address = "0.0.0.0"
enr-address = "0.0.0.0"
```

With your own public IP addresses:
After the initialization is successful, we must download the blockchain clients, which will be managed from the CLI under the hood. They will install globally, need superuser permissions, and are set as default clients within your working directories configuration file. You will be asked which clients you want to download and install during the setup.

```text title="[PATH_TO_NODE_WORKING_DIRECTORY]/configs/mainnet/lighthouse/lighthouse.toml"
listen-address = "<your-public-ip-address>"
enr-address = "<your-public-ip-address>"
```bash
lukso install
```

</TabItem>
</Tabs>

#### Start the Clients
#### Start the clients

The following command will spin up your execution and consensus client and connect to the mainnet.

Expand Down Expand Up @@ -181,12 +126,6 @@ The shortcut is ideal for making installation, validator migration, or recovery

:::

:::info

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

:::

:::note

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, please pass down the checkpoint flag as described in the [LUKSO CLI Documentation](https://github.com/lukso-network/tools-lukso-cli/tree/main#using-checkpoint-syncing).
Expand All @@ -200,6 +139,12 @@ lukso start --checkpoint-sync
</TabItem>
</Tabs>

:::info

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

:::

#### Checking Processes

To check that everything is running correctly, you can see the status of all your clients using the status command. By default, the validator is not enabled. If you want to run your validator node, please have a look at the [validator page](./become-a-validator.md).
Expand Down Expand Up @@ -228,7 +173,7 @@ To enable more advanced monitoring for your node, you can check the official [`n

### 🚢 With Docker

Difficulty: Hard 🌶️🌶️
Difficulty: Hard 🌶️🌶️🌶️

We provide a basic repository with examples of `docker-compose.yml` files to run the LUKSO network.

Expand All @@ -254,7 +199,7 @@ You are in no way limited to the tools we provide. If you are a pro user, you ca

:::info LUKSO Network configuration

👉 <https://github.com/lukso-network/network-configs/>
👉 <https://github.com/lukso-network/network-configs>

:::

Expand All @@ -272,7 +217,7 @@ Ask your question in the validators channel on the [official LUKSO Discord serve
- [Genesis Validators Deposit and Testnet Launch](https://medium.com/lukso/genesis-validators-deposit-smart-contract-freeze-and-testnet-launch-c5f7b568b1fc)
- [Genesis Validators, start your clients!](https://medium.com/lukso/genesis-validators-start-your-clients-fe01db8f3fba)

You can check out the following links for extended help or advice for setting up your node beyond the LUKSO CLI.
You can check out the following links for extended help or advice for setting up your node:

- [Extended Wiki and LUKSO Node Guide](https://github.com/fhildeb/lukso-node-guide) by Felix Hildebrandt
- [LUKSO Community Guides](https://docs.luksoverse.io/) by Luksoverse
Expand Down
135 changes: 31 additions & 104 deletions docs/networks/testnet/running-a-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,131 +3,66 @@ title: Running a Node
sidebar_position: 2
---

## System Requirements
# Running a testnet node

| Settings | Value |
| ------------------- | -------------- |
| Operating System | Linux or MacOS |
| Number of CPU cores | 4 |
| RAM | 16 GB |
| SSD | 100 GB |
:::info

## Ports

| Port | Protocol | Client | Description |
| ----- | -------- | ------------------- | ----------------- |
| 30303 | TCP | execution syncing | port must be open |
| 30303 | UDP | execution discovery | port must be open |
| 13000 | TCP | consensus syncing | port must be open |
| 12000 | UDP | consensus discovery | port must be open |

## Supported Clients

LUKSO runs the Ethereum protocol, meaning most Ethereum clients will run the LUKSO Blockchain. The currently tested and supported clients are the following:

- **Execution Clients**: [Geth](https://geth.ethereum.org/), [Erigon](https://github.com/ledgerwatch/erigon)
- **Consensus Clients**: [Prysm](https://github.com/prysmaticlabs/prysm), [Lighthouse](https://github.com/sigp/lighthouse)
- **Validator Clients**: [Prysm](https://docs.prylabs.network/docs/how-prysm-works/prysm-validator-client), [Lighthouse](https://github.com/sigp/lighthouse)

:::info CLI Development

You can follow the latest development process on the official [LUKSO CLI repository](https://github.com/lukso-network/tools-lukso-cli/).
Running a testnet node is very similar to running a mainnet node. Therefore, we recommand you to read the [mainnet version](../mainnet/running-a-node.md) first and to adjust the commands with the instructions provided here.

:::

## Starting Node

To start your clients and contribute to the LUKSO Testnet, you have 3 options:
## Starting a Node

- **Install the LUKSO CLI**: The [LUKSO CLI](https://github.com/lukso-network/tools-lukso-cli) is a command line tool to install, manage and set up nodes and validators of different clients for the LUKSO blockchain. It provides simple and unified commands to interact with your node and runs natively on your operating system. We recommend this as default for anyone beginning to get into the topic of running a node himself. The LUKSO CLI is officially supported for Ubuntu, Debian, and Mac running on either x86 Intel and AMD Processors or Single Board ARM Computers.
- **Use Docker Compose**: The official [Docker Containers](https://github.com/lukso-network/network-docker-containers) can make it easy for you if you're already experienced with the Docker ecosystem. Different configurations can be started in the blink of an eye and work in encapsulated containers. The versatility makes it especially useful if you want to run multiple networks on your node at once. The repository features extended documentation. By default, the Docker setup will run as a validator for the mainnet but can be modified.
- **Configure a LUKSO Compatible Client**: You are in no way limited to the tools we provide for easy onboarding. If you are a pro user, you can download and run the Erigon, Geth, Lighthouse, or Prysm clients in your preferred setup. You can either [download](https://deposit.mainnet.lukso.network/) or [generate](https://github.com/lukso-network/tools-lodestar-genesis-ssz-generator/blob/spike/pos-from-the-start/packages/beacon-node/test/utils/README.md) the genesis files of the LUKSO network and configure your clients manually. Please refer to the respective [clients installation instructions](https://github.com/lukso-network/network-configs#binary-applications) and use the LUKSO [network configuration](https://github.com/lukso-network/network-configs/) repository to start your node.
To start your clients and contribute to the LUKSO testnet network, you have 3 options.

### LUKSO CLI Node Setup

For further information, you can check out the official [LUKSO CLI Documentation](https://github.com/lukso-network/tools-lukso-cli/). It is not limiting yourself to running any supported clients, as all configurations and flags can be passed down. The guide will give you a brief introduction.

#### Install the LUKSO CLI

First, install the `lukso` command globally on your node machine.

```bash
curl https://install.lukso.network | sh
```
### 📟 With the LUKSO CLI

#### Create a Working Directory
Difficulty: Medium 🌶️🌶️

:::tip
For the main information, please refer to the [mainnet version](../mainnet/running-a-node.md#-with-the-lukso-cli) of this article. The only difference to run a testnet node with the CLI is to append the `--testnet` flag to the commands:

The name of the directory `myLUKSOnode/` in the commands below can be changed according to your preferences.

:::

Next, create a working directory for your node's data and move into it. The directory is where everything regarding your blockchain node will be stored. Make sure to choose a proper name for your node folder. If you plan on running a validator later, this folder will also contain your validator key files by default.

```bash
mkdir myLUKSOnode && cd myLUKSOnode
```sh
lukso start --testnet
```

Initialize the working folder, which will download the LUKSO network configuration and genesis files needed to sync with the LUKSO network.
For the logs:

```bash
lukso init
```

#### Install the Clients

After the initialization is successful, we have to download the blockchain clients, which will be managed from the CLI under the hood. They will install globally, need superuser permissions, and are set as default clients within your working directories configuration file. You will be asked which clients you want to download and install during the setup.
# Viewing the logs of the execution client
lukso logs execution --testnet

```bash
sudo lukso install
# Viewing the logs of the consensus client
lukso logs consensus --testnet
```

#### Setting your Public IP Address

Your public IP address is a unique identifier assigned to your internet connection by your service provider. Every device connected to the public internet is set as an IP address, used for communication to other devices.

In order to find other nodes in the network, your public IP should be exposed to build strong connections and download data more quickly. This Public IP value has to be set within the consensus client configuration file that the CLI is downloading from the [LUKSO Network Configuration](https://github.com/lukso-network/network-configs) repository.

The instructions for setting the Public IP Address are the same as for mainnet nodes. Please refer to the [Mainnet Node Guide](../mainnet/running-a-node.md).
For more options, check the [LUKSO CLI documentation](https://github.com/lukso-network/tools-lukso-cli).

#### Start the Clients
### 🚢 With Docker

The following command will spin up your execution and consensus client and connect to the testnet.

Without specifying any further flags, the node is starting it's regular synchronization process.

If you want more convenience and your validator to operate quickly, you can also use checkpoints. The instructions are the same as for mainnet nodes. Please refer to the [Mainnet Node Guide](../mainnet/running-a-node.md).

```sh
lukso start --testnet
```
Difficulty: Hard 🌶️🌶️🌶️

#### Checking Processes
The process is similar to the [mainnet version](../mainnet/running-a-node.md#-with-docker). You will simply need to use the [testnet genesis files](https://github.com/lukso-network/network-configs/tree/main/testnet/shared) instead of the mainnet ones.

To check that everything is running correctly, you can see the status of all your clients using the status command. By default, the validator is not enabled. If you want to run your validator node, please have a look at the [validator page](./become-a-validator.md).
So, when fetching the genesis files, the command should look like this (`main` is replaced by `testnet`):

```bash
lukso status

# INFO[0000] PID 39424 - Execution (geth): Running 🟢
# INFO[0000] PID 39430 - Consensus (prysm): Running 🟢
# INFO[0000] PID 39432 - Validator (validator): Stopped 🔘
mkdir configs
wget -O ./configs/genesis.ssz https://raw.githubusercontent.com/lukso-network/network-configs/main/testnet/shared/genesis.ssz
wget -O ./configs/genesis.json https://raw.githubusercontent.com/lukso-network/network-configs/main/testnet/shared/genesis.json
wget -O ./configs/config.yaml https://raw.githubusercontent.com/lukso-network/network-configs/main/testnet/shared/config.yaml
```

If you want to check any of the running clients in more detail, you can use the built-in logging command of the CLI. It will print out the current log messages of one client to the terminal screen.
### 📄 With your own clients

```bash
# Viewing the logs of the execution client
lukso logs execution --testnet
Difficulty: Advanced 🌶️🌶️🌶️🌶️

# Viewing the logs of the consensus client
lukso logs consensus --testnet
```
The process is similar to the [mainnet version](../mainnet/running-a-node.md#-with-your-own-clients). You will have to use the files in the `testnet` folder instead of the `mainnet` folder.

:::info LUKSO Network configuration

For more options, please check the [LUKSO CLI Documentation](https://github.com/lukso-network/tools-lukso-cli).
👉 <https://github.com/lukso-network/network-configs/tree/main/testnet>

To enable more advanced monitoring for your node, you can check the official [`network-docker-monitoring`](https://github.com/lukso-network/network-docker-monitoring) repository with a step-by-step guide.
:::

## Need Help?

Expand All @@ -137,13 +72,5 @@ Ask your question in the validators channel on the [official LUKSO Discord serve

## Further Reads

For extended help or advise for setting up your node beyond the LUKSO CLI, you can check out the following links.

- [Extended Wiki and LUKSO Node Guide](https://github.com/fhildeb/lukso-node-guide) by Felix Hildebrandt
- [LUKSO Community Guides](https://docs.luksoverse.io/) by Luksoverse
- [ETHStaker Community Discord](https://discord.com/invite/ucsTcA2wTq) for running EVM Clients

## Further Network Information

- [Genesis Validators Deposit and Testnet Launch](https://medium.com/lukso/genesis-validators-deposit-smart-contract-freeze-and-testnet-launch-c5f7b568b1fc)
- [Genesis Validators, start your clients!](https://medium.com/lukso/genesis-validators-start-your-clients-fe01db8f3fba)
Binary file added static/img/lukso-mainnet-genesis-nodes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3cb4b21

Please sign in to comment.