The TRON Developer Hub

Welcome to the TRON developer hub. You'll find comprehensive guides and documentation to help you start working with TRON as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

Full Node

Building nodes on TRON MainNet

Test environment:

Operating system: macOs Mojave 10.14.2 8G 256G SSD
JDK 1.8 (Recommend using Oracle jdk version)

Recommended configuration:

  • CPU: 16 cores
  • Memory: 32G
  • Bandwidth: 100M
  • SSD: 500G or more

Deployment guide

1. Obtain FullNode.jar, Soliditynode.jar through compiling or release.

a. Compile by downloading the source code

1). Create the code directory

mkdir -p  /project/tron/

2). Download java tron ​​source code

cd   /project/tron/
git clone -b master https://github.com/tronprotocol/java-tron.git

3). Compile the java-tron project

cd ./java-tron 
./gradlew build

b. Get the latest version of the jar package directly through release
https://github.com/tronprotocol/java-tron/releases

2. Configuration file
https://github.com/tronprotocol/tron-deployment/blob/master/main_net_config.conf

3. Deploy Node

a. Start the node

nohup java -Xmx6g -XX:+HeapDumpOnOutOfMemoryError -jar FullNode.jar -c main_net_config.conf

To start the super representative node, the command is as follows:

nohup java  -XX:+UseConcMarkSweepGC -jar FullNode.jar  -p  private key --witness -c main_net_config.conf

After the node is started, logs and output-directory will be generated on the sibling directory of java-tron.jar
logs: node log files
output-directory: node data storage directory

Command line parameter description:
--witness: enable the witness function, i.e .: --witness.
--log-config: Specify the log configuration file path, i.e .: --log-config logback.xml.
-c: Specify the configuration file path, i.e .: -c config.conf.

The use of log file:
You can modify the level of the module to control the output of the log. The default level of each module is INFO. For example, printing only the information above the warn level of the network module, you can modify it as follows.
<logger name = "net" level = "WARN" />

Note:

1) Fullnode already supports the query of solidified blocks. By default, the solidity data can be queried through the walletsolidty / interface of port 8091, so there is no need to build a solidity node.

2) You can use the latest data for synchronization.
https://backups.trongrid.io/

b. Stop the node
Use Kill -15 to close the fullnode.jar or soliditynode.jar process.

Updated about a month ago

Full Node


Building nodes on TRON MainNet

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.