Skip to content
Merged
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
18 changes: 9 additions & 9 deletions docs/using_javatron/toolkit.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Toolkit: A Java-tron Node Maintenance Suite

The TRON Toolkit is a comprehensive utility that integrates various ecosystem tools for `java-tron`, designed to streamline node maintenance and management operations. We are committed to expanding its functionality in future releases to improve the developer experience. The Toolkit currently offers the following core features:
The TRON Toolkit is a comprehensive utility that integrates various ecosystem tools for `java-tron`, designed to streamline node maintenance and management operations. We are continuously expanding its functionality in future releases to improve the developer experience. The Toolkit currently offers the following core features:

* [Database Partitioning](#database-partitioning-tool): Alleviates storage pressure caused by on-chain data growth.
* [Lite Fullnode Data Pruning](#lite-fullnode-data-pruning): Enables periodic pruning of Lite Fullnode data.
Expand All @@ -10,7 +10,7 @@ The TRON Toolkit is a comprehensive utility that integrates various ecosystem to

This document provides a detailed guide on how to acquire and use the TRON Toolkit.

**Note**: Because only RocksDB is supported on arm64 architecture, tools designed for LevelDB such as `db convert` and `db archive` can only be used on x86_64 architecture.
**Note**: Because only RocksDB is supported on the arm64 architecture, LevelDB-specific tools like `db convert` and `db archive` can only be used on x86_64 architectures.

## Obtaining the Toolkit

Expand All @@ -34,7 +34,7 @@ Upon successful compilation, the `Toolkit.jar` artifact will be located in the `

## Database Partitioning Tool

The continuous growth of TRON's on-chain data (Mainnet Fullnode database currently exceeds 2TB and grows by approximately 1.2GB daily) places increasing storage demands on nodes. To address the limitations of single-disk capacity, the TRON Toolkit includes a **database storage partitioning tool**. This tool enables you to migrate specific database components to different storage disks based on a configuration file. This allows you to expand storage capacity by adding new devices rather than replacing existing ones when disk space becomes insufficient.
The continuous growth of TRON's on-chain data (Mainnet Fullnode database currently exceeds 2TB and grows by approximately 1.2GB daily) places increasing storage demands on nodes. To address single-disk capacity limitations, the TRON Toolkit includes a **database storage partitioning tool**. This tool enables you to migrate specific database components to different storage disks based on a configuration file. This allows you to expand storage capacity by adding new devices rather than replacing existing ones when disk space becomes insufficient.

### Command and Parameters

Expand All @@ -48,9 +48,9 @@ java -jar build/libs/Toolkit.jar db mv -c framework/src/main/resources/config.co

**Optional Parameters**:

* `-c | --config <string>`: Specifies the FullNode configuration file path. Default: `config.conf`
* `-d | --database-directory <string>`: Specifies the FullNode database directory. Default: `output-directory`
* `-h | --help <boolean>`: Displays help information. Default: `false`
* `-c | --config <string>`: Specifies the FullNode configuration file path. Default: `config.conf`.
* `-d | --database-directory <string>`: Specifies the FullNode database directory. Default: `output-directory`.
* `-h | --help <boolean>`: Displays help information. Default: `false`.

### Usage Instructions

Expand Down Expand Up @@ -99,7 +99,7 @@ storage {
* `name`:The name of the database to be migrated.
* `path`:The target directory for the database migration.

The tool will move the database specified by `name` to the `path` directory and create a soft link in the original location pointing to the new directory. After the Fullnode restart, it will use this link to locate the data.
The tool will move the database specified by `name` to the `path` directory and create a soft link in the original location pointing to the new directory. Upon restarting, the FullNode will use this link to locate the data.


#### 3. Execute the Database Migration
Expand All @@ -122,12 +122,12 @@ Once the migration is complete, restart your `java-tron` node.

The TRON Toolkit provides a **data pruning tool** primarily used for generating and managing lite FullNode data.

A FullNode's complete data can be split into two parts: a snapshot dataset (Snapshot Dataset) or a historical dataset (History Dataset).
A FullNode's complete data can be split into two parts: a Snapshot Dataset or a History Dataset.

* **Snapshot Dataset**: Used to start a lite FullNode. It does not contain historical data prior to the block height at the time of pruning.
* **History Dataset**: Used for querying historical data.

The snapshot dataset contains all account state data plus the history of the most recent 65,536 blocks. It occupies a small amount of space (approximately 3% of a FullNode's data). Since a Lite Fullnode starts using only the snapshot dataset, it has the advantages of low disk usage and fast startup speeds.
The Snapshot Dataset contains all account state data plus the history of the most recent 65,536 blocks. It occupies a small amount of space (approximately 3% of a FullNode's data). Since a Lite Fullnode starts using only the Snapshot Dataset, it benefits from low disk usage and fast startup speeds.

The data pruning tool can split a FullNode's data into a **Snapshot Dataset** or a **History Dataset**. It also supports merging a history dataset back with a snapshot dataset. This enables the following use cases:
* **Convert FullNode Data into Lite Fullnode Data**: Split the full node data to generate a snapshot dataset, which is all that's needed to run a light node.
Expand Down