Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: adding pruned nodes page #48

Merged
merged 1 commit into from
Aug 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions content/tutorials/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ next: /tutorials/pactus-wallet
{{< card link="reduce-network" title="How to reduce the network usage?">}}
{{< card link="pactus-metrics" title="How to run Pactus Metrics?">}}
{{< card link="linux-systemd" title="How to run Pactus with systemd linux?">}}
{{< card link="linux-systemd" title="How to Prune Node?">}}
{{< /cards >}}
85 changes: 85 additions & 0 deletions content/tutorials/pruned-nodes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
---
title: How to use Prune Node?
weight: 3
---

## Preface

The Pactus Blockchain supports pruned nodes to help users manage storage efficiently by retaining only
the most recent and relevant data. This tutorial will guide you step-by-step on how to prune your node,
whether using the command line or the graphical interface.

## What is a Pruned Node?

In the context of blockchain, a "pruned node" refers to a type of node that retains
only a certain portion of the blockchain history, rather than the entire ledger.
This is achieved by deleting old transaction data while maintaining the most recent and relevant blocks,
often referred to as the "head" of the blockchain. This selective data retention allows nodes to
operate without the need for extensive storage, enabling more participants to run nodes and contribute
to network security and decentralization.

## Key Features of Pruned Nodes

1. **Storage Efficiency**: A primary advantage of pruned nodes is their reduced storage footprint.
This makes it feasible for users with limited hardware resources to run a node, thus increasing
the overall accessibility and decentralization of the network.

2. **Faster Synchronization**: Because pruned nodes do not require the entire blockchain history,
they can sync with the Pactus network faster than full nodes. This facilitates quicker participation
in consensus and transaction validation.

3. **Maintained Security**: Despite lacking full transaction history, pruned nodes still maintain enough
data to validate current transactions effectively. Therefore, they can participate in consensus
mechanisms without compromising network security.

4. **Increased Participation**: By lowering the barriers to entry, pruned nodes can significantly
encourage more users to participate in staking and validating transactions, contributing to
a more robust and decentralized network.

## Benefits of Pruned Solid State Proof of Stake Nodes

1. **Scalability**: As the Pactus network grows, the size of the blockchain can become cumbersome.
Pruned nodes help mitigate this issue, allowing Pactus to scale efficiently without overwhelming infrastructure.

2. **Energy Efficiency**: Coupled with the inherent efficiencies of Solid State Proof Of Stake, pruned nodes further
3. reduce the environmental impact of Pactus operations. With fewer resources required for storage and data processing,
the Pactus network can operate more sustainably.

4. **Enhanced Decentralization**: The ability for more participants to run nodes increases the decentralization of the network.
A more decentralized network is generally more resilient to attacks and manipulation, which bolsters the integrity
of the blockchain.

5. **User Empowerment**: Pruned nodes empower users by making it easier for them to participate actively in the Pactus
ecosystem without needing significant technical expertise or substantial hardware investment.

## How to Use a Pruned Node in Pactus?

### Prune Your Full Node

1. Stop your running full node with `CTRL+C`.
2. Run the command

```cmd
./pactus-daemon prune -w <PATH-TO-WORKING-DIR>
```

3. Restart your pruned node with

```cmd
./pactus-daemon start -w <PATH-TO-WORKING-DIR>
```

### Initiate and Import New Pruned Node

1. Download the Pactus CLI from [Pactus Downloads](https://pactus.org/download/).
2. Open the Pactus directory (adapt the version as needed)

```cmd
cd pactus-cli_1.4.0
```

3. Import the pruned node with

```cmd
./pactus-daemon import -w <PATH-TO-WORKING-DIR>
```
Loading