Skip to content

Commit

Permalink
Added Lite Node V2 documentation update
Browse files Browse the repository at this point in the history
  • Loading branch information
mukundS0ni committed Jul 17, 2024
1 parent a0e5816 commit 8f75772
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 64 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ For users running the node on Virtual Private Servers (VPS), the minimum specifi
- **RAM:** At least 4 GB.
- **CPU Core**: Minimum of 2 Cores
- **Disk Space:** A minimum of 40 GB.
- **Python:** Ensure Python 3.11 is installed.


<h3>Step 1: Creating Your VPS </h3>

Expand All @@ -83,7 +83,7 @@ For users running the node on Virtual Private Servers (VPS), the minimum specifi
- **SSH into Your VPS**: Use the following command from your terminal/command prompt, replacing `your_vps_ip` with the IP address of your VPS.

```bash
ssh root@your_vps_ip
ssh root@your_vps_ip
```

- If you set up SSH keys, you should be logged in without needing a password. Otherwise, you can also set your password for the VPS.
Expand All @@ -93,39 +93,39 @@ For users running the node on Virtual Private Servers (VPS), the minimum specifi
1. **Update and Upgrade Your VPS**:

```bash
sudo apt-get update && sudo apt-get upgrade -y
sudo apt-get update && sudo apt-get upgrade -y
```

2. **Install Git**:
Git is necessary for cloning the Snapshotter Lite repository. Install it using:

```bash
sudo apt-get install git -y
sudo apt-get install git -y
```

3. **Install Docker and Docker Compose:**
Ensure Docker and Docker Compose are installed. You can install docker on Ubuntu using the following commands:

```bash
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

# Add the repository to Apt sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
# Add the repository to Apt sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
```

Once the Docker repository is added successfully, let’s install Docker and necessary components by using the below command:

```bash
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
```

<h3>Step 4: Cloning the Repository and Setting Up the Node</h3>
Expand All @@ -134,14 +134,14 @@ Once the Docker repository is added successfully, let’s install Docker and nec
Navigate to the directory where you want to install the node and clone the repository:

```bash
git clone https://github.com/PowerLoom/snapshotter-lite-v2.git powerloom-pre-mainnet
git clone https://github.com/PowerLoom/snapshotter-lite-v2.git powerloom-pre-mainnet-simulation
```

2. **Navigate to the Directory**:
Change to the directory of the cloned repository:

```bash
cd powerloom-pre-mainnet
cd powerloom-pre-mainnet-simulation
```

<h3>Step 5: Running the Node </h3>
Expand All @@ -152,7 +152,7 @@ The Screen utility allows you to run processes in the background, enabling you t
Enter the following command to create a new Screen session named "powerloom":

```bash
screen -S powerloom
screen -S powerloom-pre-mainnet-simulation
```

- This command opens a new Screen session, where you can start the Snapshotter Lite Node V2.
Expand All @@ -164,7 +164,7 @@ This approach ensures your node can continue running in the background, even if
Initiate the snapshotter lite node v2 setup by typing the command in the terminal:

```bash
./build.sh
./build.sh
```

Follow the prompts to enter the required information.
Expand Down Expand Up @@ -237,7 +237,7 @@ For users running the node on personal hardware, the minimum specifications are:
- **RAM:** At least 4 GB.
- **CPU Core**: Minimum of 2 Cores
- **Disk Space:** A minimum of 40 GB.
- **Python:** Ensure Python 3.11 is installed.



<h3> Pre-requisitie tools </h3>
Expand All @@ -252,15 +252,15 @@ For users running the node on personal hardware, the minimum specifications are:
- Clone the snapshotter lite repository using the following command in the terminal:

```bash
git clone https://github.com/PowerLoom/snapshotter-lite-v2.git powerloom-pre-mainnet
git clone https://github.com/PowerLoom/snapshotter-lite-v2.git powerloom-pre-mainnet-simulation
```

This will clone the repository into a directory named `powerloom-pre-mainnet`.

- Change your working directory to the powerloom directory:

```bash
cd powerloom-pre-mainnet
cd powerloom-pre-mainnet-simulation
```

** 1. Setting up Screen**
Expand All @@ -270,7 +270,7 @@ The Screen utility allows you to run processes in the background, enabling you t
Enter the following command to create a new Screen session named "powerloom":

```bash
screen -S powerloom
screen -S powerloom-pre-mainnet-simulation
```

- This command opens a new Screen session, where you can start the Snapshotter Lite Node V2.
Expand Down Expand Up @@ -387,19 +387,19 @@ Once python3 is installed, we can go ahead and run the lite node:-

1. Clone this repository using the following command in the terminal:
```bash
git clone https://github.com/PowerLoom/snapshotter-lite-v2.git powerloom-pre-mainnet
git clone https://github.com/PowerLoom/snapshotter-lite-v2.git powerloom-pre-mainnet-simulation
```
This will clone the repository into a directory named `powerloom-pre-mainnet`.

2. Change your working directory to the `powerloom-pre-mainnet` directory, open the terminal, and type:

```bash
cd powerloom-pre-mainnet
cd powerloom-pre-mainnet-simulation
```

3. Run `init.sh` command in the terminal to start the snapshotter lite node v2:
```bash
./init.sh
./init.sh
```
:::tip
Please do not use your NFT minting wallet to run the snapshotter lite node v2. The safest approach is to generate and assign a burner wallet. You can generate a burner wallet through any of the tools listed below:
Expand Down Expand Up @@ -468,7 +468,6 @@ For users running the node on a personal Windows system, the minimum specificati
- **RAM:** At least 4 GB.
- **CPU Core**: Minimum of 2 Cores
- **Disk Space:** A minimum of 40 GB.
- **Python:** Ensure Python 3.11 is installed.

Setting up the snapshotter node on Windows requires a few additional steps. We suggest using Docker for its ease and speed of setup. To begin with Docker, you must have the Windows Subsystem for Linux (WSL) installed. Please follow the guide provided below for detailed instructions.

Expand Down Expand Up @@ -519,14 +518,14 @@ Setting up the snapshotter node on Windows requires a few additional steps. We s
- Use the following command in WSL terminal to clone the Snapshotter Lite Node v2 repository:

```bash
git clone https://github.com/PowerLoom/snapshotter-lite-v2.git powerloom-pre-mainnet
git clone https://github.com/PowerLoom/snapshotter-lite-v2.git powerloom-pre-mainnet-simulation
```

- **Navigate to the Repository Directory:**
- Change to the cloned repository's directory:
```bash
cd powerloom-pre-mainnet
cd powerloom-pre-mainnet-simulation
```
- **Run the Build Script:**
Expand All @@ -543,7 +542,7 @@ Once generated, make sure you assign your burner wallet on your [snapshotter das
- Execute the build script with:
```bash
./build.sh
./build.sh
```
- During the setup, you'll be prompted to enter the following values:
- `$SOURCE_RPC_URL`: Use any Ethereum Mainnet RPC, such as Ankr, Infura, or Alchemy.
Expand Down Expand Up @@ -591,14 +590,9 @@ First, clone our multi-node script to get started:

```bash
git clone https://github.com/PowerLoom/snapshotter-lite-multi-setup
cd snapshotter-lite-multi-setup
```

Navigate to the directory & type the below command on your terminal:

```bash
cd snapshotter-lite-multi-setup
```

### Setting Up the Environment

It is imperative to create an isolated virtual environment that includes the necessary Python version and modules. This approach ensures that the global Python installations on the VPS or your local machine are not altered.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,34 +9,38 @@ This section will guide you through the process of Monitoring and Troubleshootin

## Steps to Confirm and Monitor Node Snapshotting Process

1. **Terminal Status Check:**
- The primary method to verify node status is through the terminal, which displays log responses from the node.
1. **Simulation run logs**

- Monitor these logs to assess the health and activity of your node.

- A healthy snapshotter node will produce logs similar to the provided example screenshot. These logs indicate normal operation and successful snapshotting.
![Snapshotter-node-running](/images/snapshotter-node-running-terminal.png)
While running this node for the first time, it performs a couple of dummy submissions to simulate its connections to the relayer and sequencer network. If you notice logs similar to the lines below in the node run logs, your node's simulation run was successful.

2. **Monitoring Node Activity with the Snapshotter Dashboard**
Our Snapshotter Dashboard enables you to verify if your node slot is actively submitting snapshots.
![Snapshotter-First-Simulation](/images/snapshot-lite-v2-node-simulation-first-time.png)

## Simulation run logs
2. **Verifying success of simulation run**

While running this node for the first time, it performs a couple of dummy submissions to simulate its connections to the relayer and sequencer network. If you notice logs similar to the lines below in the node run logs, your node's simulation run was successful.
![Snapshotter-First-Simulation](/images/snapshot-lite-v2-node-simulation-first-time.png)
- To verify the success of the same, make use of the utility script bundled within here by running the following on a MacOS/Linux command line terminal.

## Verifying success of simulation run
- This will work only after you have set up the node correctly with the right `.env` variables and run it successfully.
```bash
./check_simulation.sh
```
![Snapshotter-check-simulation](/images/snapshot-lite-v2-check-submission.png)

To verify the success of the same, make use of the utility script bundled within here by running the following on a MacOS/Linux command line terminal.
If you observe `submissionCount` and `lastPing` in the above response to be greater than 0, your node's simulation run was successful.
This will work only after you have set up the node correctly with the right `.env` variables and run it successfully.
```bash
./check_simulation.sh
```
![Snapshotter-check-simulation](/images/snapshot-lite-v2-check-submission.png)
If you observe `submissionCount` and `lastPing` in the above response to be greater than 0, your node's simulation run was successful.
3. **Terminal Status Check:**
- The primary method to verify node status is through the terminal, which displays log responses from the node.
- Monitor these logs to assess the health and activity of your node.
- A healthy snapshotter node will produce logs similar to the provided example screenshot. These logs indicate normal operation and successful snapshotting.
![Snapshotter-node-running](/images/snapshotter-node-running-terminal.png)
4. **Monitoring Node Activity with the Snapshotter Dashboard**
Our Snapshotter Dashboard enables you to verify if your node slot is actively submitting snapshots.
![Snapshotter-node-dashboard](/images/snapshot-lite-v2-dashboard.png)
## Troubleshooting and Support
Expand Down Expand Up @@ -74,7 +78,7 @@ The `.env` file contains essential configuration details such as `SOURCE_RPC_URL
Change to the directory where your Powerloom Snapshotter Lite Node V2 is located:

```bash
cd powerloom-pre-mainnet
cd powerloom-pre-mainnet-simulation
```

3. **Editing the .env File:**
Expand All @@ -85,7 +89,7 @@ The `.env` file contains essential configuration details such as `SOURCE_RPC_URL
```

Inside, you will find configurations similar to those shown in the provided screenshot.
![EnvScreen](/images/env-screen.png)
![EnvScreen](/images/snapshot-lite-v2-env.png)

4. **Modifying Variables:**
Update the variables as needed. To save and exit, press `CTRL+X`.
Expand Down Expand Up @@ -115,24 +119,24 @@ For your RPC provider, you have several reliable options, including:
If you wish to perform a complete reset of your node or start afresh with the Snapshotter Lite Node V2, the following steps will guide you through the process:

1. **Locate the Existing Directory:**
Begin by opening your terminal. Locate the `powerloom-pre-mainnet` directory by entering the following command:
Begin by opening your terminal. Locate the `powerloom-pre-mainnet-simulation` directory by entering the following command:

```bash
ls
```

This command lists all files and directories, allowing you to confirm the presence of the `powerloom-pre-mainnet` directory.
This command lists all files and directories, allowing you to confirm the presence of the `powerloom-pre-mainnet-simulation` directory.


:::warning Warning
Before proceeding with the directory deletion, it is crucial to ensure that you have securely backed up the private key of your burner wallet.
:::

2. **Remove the Directory:**
To delete the `powerloom-pre-mainnet` directory and all its contents, use the command:
To delete the `powerloom-pre-mainnet-simulation` directory and all its contents, use the command:

```bash
rm -rf powerloom-pre-mainnet
rm -rf powerloom-pre-mainnet-simulation
```

This action cannot be undone, so ensure that you wish to proceed with the reset.
Expand All @@ -149,7 +153,7 @@ If you're experiencing issues or simply wish to restart your node, the process i
Open a terminal window and navigate to the directory of your Powerloom Snapshotter Node by executing:

```bash
cd powerloom-pre-mainnet
cd powerloom-pre-mainnet-simulation
```

2. **Execute the Build Script:**
Expand Down
Binary file added static/images/snapshot-lite-v2-dashboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/images/snapshot-lite-v2-env.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 8f75772

Please sign in to comment.