-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Summary Adds documentation on how to deploy a Validator and a Full Node using Cosmovisor. ## Issue - #526 ## Type of change Select one or more: - [ ] New feature, functionality or library - [ ] Bug fix - [ ] Code health or cleanup - [x] Documentation - [ ] Other (specify) ## Testing - [ ] **Documentation**: `make docusaurus_start`; only needed if you make doc changes - [ ] **Unit Tests**: `make go_develop_and_test` - [ ] **LocalNet E2E Tests**: `make test_e2e` - [ ] **DevNet E2E Tests**: Add the `devnet-test-e2e` label to the PR. ## Sanity Checklist - [ ] I have tested my changes using the available tooling - [ ] I have commented my code - [ ] I have performed a self-review of my own code; both comments & source code - [ ] I create and reference any new tickets, if applicable - [ ] I have left TODOs throughout the codebase, if applicable --------- Co-authored-by: Daniel Olshansky <[email protected]>
- Loading branch information
Showing
14 changed files
with
493 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
111 changes: 89 additions & 22 deletions
111
docusaurus/docs/operate/run_a_node/full_node_cosmovisor.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,108 @@ | ||
--- | ||
title: Full Node - Cosmovisor | ||
sidebar_position: 1 | ||
sidebar_position: 2 | ||
--- | ||
|
||
# Run a Full Node using Cosmovisor <!-- omit in toc --> | ||
## Run a Full Node using Cosmovisor <!-- omit in toc --> | ||
|
||
This document provides instructions on using the official Cosmos SDK [Cosmosvisor](https://docs.cosmos.network/v0.45/run-node/cosmovisor.html) to run a full Pocket Network node. | ||
|
||
- [What is a Full Node](#what-is-a-full-node) | ||
- [What is Cosmovisor](#what-is-cosmovisor) | ||
- [Setting up Cosmovisor](#setting-up-cosmovisor) | ||
- [Upgrading with Cosmovisor](#upgrading-with-cosmovisor) | ||
- [Installation Instructions](#installation-instructions) | ||
- [Prerequisites](#prerequisites) | ||
- [Installation Steps](#installation-steps) | ||
- [Useful Command Cheat Sheet](#useful-command-cheat-sheet) | ||
- [Check the status of your node](#check-the-status-of-your-node) | ||
- [View the logs](#view-the-logs) | ||
- [Stop the node](#stop-the-node) | ||
- [Start the node](#start-the-node) | ||
- [Restart the node](#restart-the-node) | ||
|
||
### What is a Full Node | ||
|
||
In blockchain networks, a full node retains continuous synchs and updates the latest copy of the ledger. It may either be a pruned full node (the latest data only) or an archival full node (including complete and historical data). | ||
|
||
You can visit the [Cosmos SDK documentation](https://docs.cosmos.network/main/user/run-node/run-node) for more information on Full Nodes. | ||
|
||
### What is Cosmovisor | ||
|
||
[Cosmovisor](https://docs.cosmos.network/main/build/tooling/cosmovisor) is a tool that automates the version management for our blockchain. It allows operators to automatically upgrade their full nodes and validators without downtime and reduce maintenance overhead. | ||
|
||
### Installation Instructions | ||
|
||
To install and set up a Poktroll Full Node using Cosmovisor, we provide a comprehensive installation script. This script will handle all the necessary steps, including user creation, dependency installation, Cosmovisor and Poktrolld setup, and system configuration. | ||
|
||
#### Prerequisites | ||
|
||
- A Linux-based system (Debian-based distributions are fully supported, others may work as well) | ||
- Root or sudo access | ||
- A dedicated server or a virtual machine (any provider should work, Vultr and Hetzner have been tested) | ||
|
||
#### Installation Steps | ||
|
||
## What is a Full Node | ||
1. Download the installation script: | ||
|
||
In blockchain networks, a full node retains continuous synchs and updates the latest copy of the | ||
ledger. It may either be pruned full node (the latest data only) or an archival full node (including | ||
complete and historical data). | ||
```bash | ||
curl -O https://raw.githubusercontent.com/pokt-network/poktroll/main/tools/installer/full-node.sh | ||
``` | ||
|
||
You can visit the [Cosmos SDK documentation](https://docs.cosmos.network/main/user/run-node/run-node) | ||
for more information on Full Nodes. | ||
2. Make the script executable: | ||
|
||
## What is Cosmovisor | ||
```bash | ||
chmod +x full-node.sh | ||
``` | ||
|
||
As an alternative to our [Full Node - Docker](./full_node_docker.md) guide, we also provide documentation on how to deploy | ||
a Full Node using Cosmovisor. | ||
3. Run the script with sudo privileges: | ||
|
||
[Cosmovisor](https://docs.cosmos.network/main/build/tooling/cosmovisor) is a tool that automates the version management | ||
for our blockchain. It allows operators to automatically upgrade their full nodes and validators without downtime and | ||
reduce maintenance overhead. | ||
```bash | ||
sudo ./full-node.sh | ||
``` | ||
|
||
:::info | ||
TODO(@okdas): finish this tutorial as a part of [#526](https://github.com/pokt-network/poktroll/issues/526). | ||
4. Follow the prompts to provide the necessary information: | ||
- Desired username to run poktrolld (`default: poktroll`) | ||
- Node moniker (`default: hostname`) | ||
- Seeds (`default: fetched` [from the official source](https://github.com/pokt-network/pocket-network-genesis/tree/master/poktrolld)) | ||
- Chain ID (`default: poktroll-testnet`) | ||
|
||
The script will then proceed with the installation and setup process. | ||
|
||
### Useful Command Cheat Sheet | ||
|
||
After the installation is complete, your Poktroll Full Node should be up and running. | ||
|
||
:::tip | ||
Remember to keep your system updated and monitor your node regularly to ensure its proper functioning and security. | ||
::: | ||
|
||
## Setting up Cosmovisor | ||
Here are some useful commands for managing your node: | ||
|
||
#### Check the status of your node | ||
|
||
```bash | ||
sudo systemctl status cosmovisor.service | ||
``` | ||
|
||
#### View the logs | ||
|
||
```bash | ||
sudo journalctl -u cosmovisor.service -f | ||
``` | ||
|
||
#### Stop the node | ||
|
||
```bash | ||
sudo systemctl stop cosmovisor.service | ||
``` | ||
|
||
#### Start the node | ||
|
||
[Content to be added] | ||
```bash | ||
sudo systemctl start cosmovisor.service | ||
``` | ||
|
||
## Upgrading with Cosmovisor | ||
#### Restart the node | ||
|
||
[Content to be added] | ||
```bash | ||
sudo systemctl restart cosmovisor.service | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.