Skip to content
Open
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
13 changes: 10 additions & 3 deletions docs/architecture/database.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Database Configuration Guide

In the TRON Java implementation (**java-tron**), the node data storage engine offers two options: **LevelDB** and **RocksDB**. By default, **LevelDB is used on x86 platforms, while RocksDB is used on ARM platforms**. If LevelDB is manually configured on an ARM system, the system will print a warning and still enforce the use of RocksDB. Developers can flexibly choose the appropriate storage engine based on the platform environment, hardware conditions, and performance requirements.
In the TRON Java implementation (**java-tron**), the node data storage engine offers two options: **LevelDB** and **RocksDB**.

Database support varies by architecture:

- On x86 architecture, both LevelDB and RocksDB are supported, and the current version of RocksDB is v5.15.10.
- On ARM architecture, only RocksDB is supported, and the current version of RocksDB is v9.7.4.

Developers can flexibly choose the appropriate storage engine based on the platform environment, hardware conditions, and performance requirements.

In comparison, **RocksDB provides richer configuration parameters and generally offers higher storage efficiency**. This article will introduce how to enable RocksDB and how to convert from LevelDB to RocksDB on x86 platforms.

Expand Down Expand Up @@ -36,7 +43,7 @@ dbSettings = {
```

## Migrating from LevelDB to RocksDB on x86 Platforms
The data formats of LevelDB and RocksDB are not compatible, and direct switching of storage engines between nodes is not supported. To migrate from LevelDB to RocksDB, use the TRON Toolkit `Toolkit.jar`.
To migrate from LevelDB to RocksDB, use the TRON Toolkit `Toolkit.jar`.
### 1. Data Conversion Steps
```
cd java-tron # Source root directory
Expand Down Expand Up @@ -77,7 +84,7 @@ java -jar build/libs/Toolkit.jar db convert output-directory/database output-dir
> Note:
The entire data conversion process is expected to take approximately **10 hours**, depending on the data volume and disk performance.
## About LevelDB
LevelDB is the default data storage engine for java-tron on x86 platforms, suitable for resource-constrained or lightweight deployment scenarios. It has a simple structure and is easy to maintain, but it is less efficient than RocksDB in terms of data compression, backup capabilities, and performance for large-scale nodes.
LevelDB is the default data storage engine for java-tron nodes on x86 platforms, suitable for resource-constrained or lightweight deployment scenarios. It has a simple structure and is easy to maintain, but it is less efficient than RocksDB in terms of data compression, backup capabilities, and performance for large-scale nodes.

For a detailed comparison between the two, refer to the documentation:
📘 [RocksDB vs. LevelDB Comparison](https://github.com/tronprotocol/documentation/blob/master/TRX/Rocksdb_vs_Leveldb.md)
2 changes: 1 addition & 1 deletion docs/architecture/event.md
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ db.createUser({user:"<eventlog-username>",pwd:"<eventlog-password>",roles:[{role

The Event Query Service provides an HTTP interface for querying event data stored in MongoDB. This service requires a Java environment.

**Note**: Please ensure you are using **Oracle JDK 8**, not Open JDK 8.
**Note**: Please use Oracle JDK 8 on x86 architecture and JDK 17 on ARM architecture.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use Oracle JDK 8 on x86 architecture and JDK 17 on ARM architecture. >Please use Oracle JDK 8 "for" x86 architecture and JDK 17 "for" ARM architecture.


##### 1. Downloading the Source Code

Expand Down
11 changes: 6 additions & 5 deletions docs/developers/run-in-idea.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@ To simplify the Java development process and improve efficiency, selecting and c

java-tron nodes support deployment on `Linux` or `MacOS` operating systems. The JDK version requirements are as follows:

- **General Requirement**: **Oracle JDK 1.8**
- **For `v4.8.1` and later**: Support is also provided for JDK 17 on the ARM architecture
- On x86 architecture, currently only Oracle JDK 8 is supported.
Copy link

@GordonLtron GordonLtron Dec 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 7-8
On x86 architecture, currently only Oracle JDK 8 is supported.
On ARM architecture, currently only JDK 17 is supported.
->
On x86 architecture, java-tron currently supports only Oracle JDK 8.
On ARM architecture, java-tron currently supports only JDK 17.

- On ARM architecture, currently only JDK 17 is supported.

The following configuration uses x86 architecture and Oracle JDK 8 as an example.

## Prerequisites

Before you begin, please ensure your development environment meets the following requirements:

- Operating System: `Linux` or `MacOS`
- Oracle JDK 1.8 is installed
- Oracle JDK 8 is installed
- `git` is installed
- [IntelliJ IDEA](https://www.jetbrains.com/idea/download/) is installed

Expand All @@ -40,7 +41,7 @@ To ensure Lombok's annotations work correctly, you must enable the annotation pr

### Step 3: Verify and Unify the JDK Version

To ensure the project compiles and runs correctly, you must set the JDK version to Oracle JDK 1.8 in two key locations within IntelliJ IDEA.
To ensure the project compiles and runs correctly, you must set the JDK version to Oracle JDK 8 in two key locations within IntelliJ IDEA.


#### 1. Configure Project SDK
Expand All @@ -59,7 +60,7 @@ This is the JDK used to execute Gradle build tasks (e.g., build, clean).

![image](https://raw.githubusercontent.com/tronprotocol/documentation-en/master/images/IDE_JDK.png)

> **Important Note**: The **Project SDK** and **Gradle JVM** settings must match and both be set to Oracle JDK 1.8. Otherwise, you may encounter unexpected errors during the build process.
> **Important Note**: The **Project SDK** and **Gradle JVM** settings must match and both be set to Oracle JDK 8. Otherwise, you may encounter unexpected errors during the build process.


## Getting and Compiling the Source Code
Expand Down
5 changes: 4 additions & 1 deletion docs/using_javatron/installing_javatron.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

This document guides developers on how to deploy a TRON java-tron node on `Linux` or `macOS` operating systems.

**Important Note:** The java-tron node currently requires **Oracle JDK 1.8**. Other JDK versions are not supported.
Currently, a java-tron node supports running on both x86 and ARM architectures(Support for the ARM architecture starts from version 4.8.1). JDK support varies by architecture:

- On x86 architecture, currently only Oracle JDK 8 is supported.
Copy link

@GordonLtron GordonLtron Dec 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Line 7-8
On x86 architecture, currently only Oracle JDK 8 is supported.
On ARM architecture, currently only JDK 17 is supported.
->
On x86 architecture, java-tron currently supports only Oracle JDK 8.
On ARM architecture, java-tron currently supports only JDK 17.

- On ARM architecture, currently only JDK 17 is supported.


## Hardware Configuration Requirements
Expand Down
2 changes: 1 addition & 1 deletion docs/using_javatron/private_network.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This document will guide you through setting up a basic TRON private network. Th

Before you begin, please ensure your development environment meets the following requirements:

- **Java Development Kit (JDK)**: You must have Oracle JDK 1.8 installed.
- **Java Development Kit (JDK)**: On x86 architecture, Oracle JDK 8 must be installed; on ARM architecture, JDK 17 must be installed.
- **TRON Accounts**: You need to create at least two TRON network addresses in advance and securely store the addresses and their corresponding private keys. One address will serve as the initial SR node (Block Production), and the other will be a regular account.
- **Address Creation Tools**: You can use any of the following tools to generate and manage your TRON accounts:
- [Wallet-cli](https://github.com/tronprotocol/wallet-cli): An official command-line wallet tool, suitable for server environments.
Expand Down
6 changes: 2 additions & 4 deletions docs/using_javatron/toolkit.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +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 ARM architecture, tools designed for LevelDB such as `db convert` and `db archive` can only be used on x86 architecture.

## Obtaining the Toolkit

Expand Down Expand Up @@ -271,7 +272,7 @@ Use the `db convert` command to perform the data conversion:

```
# full command
java -jar Toolkit.jar db convert [-h] [--safe] <src> <dest>
java -jar Toolkit.jar db convert [-h] <src> <dest>
# examples
java -jar Toolkit.jar db convert output-directory/database /tmp/database
```
Expand All @@ -280,9 +281,6 @@ Use the `db convert` command to perform the data conversion:

* `<src>`: Specifies the source LevelDB data directory. Default: `output-directory/database`.
* `<dest>`: Specifies the output directory for the RocksDB data. Default: `output-directory-dst/database`.
* `--safe <boolean>`: Toggles safe mode for the conversion. The default is `false`, but we recommended setting this to `true` for better data compatibility.
* If safe mode is enabled, the tool reads all data from LevelDB and writes it to RocksDB. This process is slower but more thorough.
* If safe mode is disabled (default), the tool performs a much faster conversion. Because the current version of RocksDB is compatible with LevelDB, this mode simply changes the `engine.properties` file setting from `leveldb` to `rocksdb`.
* `-h | --help <boolean>`: Displays help information. Default: `false`.

> **Important Note**: Before performing any operation with this tool, you must stop the currently running node.
Expand Down