Tron Node / DONE
Tron Node reconfiguring:
The documentation is described for installation on a pure VDS without any third-party software or other programmes, please take this into account when installing.
Install the necessary packages:
apt update && apt install -y git wget curl nano
Install Docker according to the official documentationhttps://docs.docker.com/engine/install/#server
Clone the repository with the docker image:
git clone https://github.com/boxexchanger/docker-java-tron.git
Go to the directory with the project
cd docker-java-tron/
Create a configuration file and set the required contract addresses and event tops: (not obligatory, but recommended so as not to process unnecessary transactions).
nano ~/docker-java-tron/tron.conf
configuration example for processing only USDT events
EVENT_PLUGIN_ADDRESS_FILTER=TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t
Create a folder for this node
mkdir -p ~/docker-java-tron/data/node
Download Lite version of node data from open source(http://34.143.247.77/) (documentation)
wget http://34.143.247.77/backup20240809/LiteFullNode_output-directory.tgz -O ~/LiteFullNode_output-directory.tgz
Unzip the archive (folder
output-directory)
в~/docker-java-tron/data/node/
tar xvf ~/LiteFullNode_output-directory.tgz -C ~/docker-java-tron/data/node/ --strip-components=1
Delete the archive with the Lite data
rm ~/LiteFullNode_output-directory.tgz
Now our Tron node is ready to go live
Launch Node
Go to the project directory:
cd ~/docker-java-tron/
Launch Tron node
./start.sh
How to add another contract address
You have to go into the configuration:
nano ~/docker-java-tron/tron.conf
Add another address to the
EVENT_PLUGIN_ADDRESS_FILTER
block by separating the contract addresses with a comma character , and do not use line breaks or spaces between addresses. USDT + USDC Example:EVENT_PLUGIN_ADDRESS_FILTER=TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t,TEkxiTehnzSmSe2XqrBj4w32RUN966rdz8
Clearing node data:
By default we have set 5 days of data storage which you can synchronise
If you want to change this parameter you need to add a different number of days to your configuration
You have to go into the configuration
nano ~/docker-java-tron/tron.conf
Add a line with your value:
MONGO_RETENTION_DAYS=5
How to get logs from node:
docker exec -it tron-node tail -f logs/tron.log
Opening an access port:
Create proxy from ports
- localhost:8080 to port 2080 for EventServer
- localhost:18090 to port 2090 for fullNode
- localhost:18091 to port 2091 for solidityNode
Accesses
EventServer: http://ip.host:2080
Node: http://ip.host:2090
Solidity: http://ip.host:2091
How to update a tron-node container.
Update the version in the .env file https://github.com/tronprotocol/java-tron/releases
JAVA_TRON_VERSION="GreatVoyage-v4.7.5"
Rebuild docker and restart the node:
docker compose build
./start.sh
Last updated