diff --git a/docs/architecture/database.md b/docs/architecture/database.md index 7db135b0..ab16c58a 100644 --- a/docs/architecture/database.md +++ b/docs/architecture/database.md @@ -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. @@ -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 @@ -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) diff --git a/docs/architecture/event.md b/docs/architecture/event.md index 80365a7e..e820d5aa 100644 --- a/docs/architecture/event.md +++ b/docs/architecture/event.md @@ -625,7 +625,7 @@ db.createUser({user:"",pwd:"",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. ##### 1. Downloading the Source Code diff --git a/docs/developers/run-in-idea.md b/docs/developers/run-in-idea.md index f63e825b..22710bd2 100644 --- a/docs/developers/run-in-idea.md +++ b/docs/developers/run-in-idea.md @@ -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. +- 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 @@ -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 @@ -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 diff --git a/docs/using_javatron/installing_javatron.md b/docs/using_javatron/installing_javatron.md index 0e548c41..7f60b086 100644 --- a/docs/using_javatron/installing_javatron.md +++ b/docs/using_javatron/installing_javatron.md @@ -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. +- On ARM architecture, currently only JDK 17 is supported. ## Hardware Configuration Requirements diff --git a/docs/using_javatron/private_network.md b/docs/using_javatron/private_network.md index fd9bbafb..215a884d 100644 --- a/docs/using_javatron/private_network.md +++ b/docs/using_javatron/private_network.md @@ -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. diff --git a/docs/using_javatron/toolkit.md b/docs/using_javatron/toolkit.md index e353a7cc..482c0788 100644 --- a/docs/using_javatron/toolkit.md +++ b/docs/using_javatron/toolkit.md @@ -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 @@ -271,7 +272,7 @@ Use the `db convert` command to perform the data conversion: ``` # full command - java -jar Toolkit.jar db convert [-h] [--safe] + java -jar Toolkit.jar db convert [-h] # examples java -jar Toolkit.jar db convert output-directory/database /tmp/database ``` @@ -280,9 +281,6 @@ Use the `db convert` command to perform the data conversion: * ``: Specifies the source LevelDB data directory. Default: `output-directory/database`. * ``: Specifies the output directory for the RocksDB data. Default: `output-directory-dst/database`. -* `--safe `: 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 `: Displays help information. Default: `false`. > **Important Note**: Before performing any operation with this tool, you must stop the currently running node.