Tron Node / DONE

Tron Node reconfiguring:

  1. Install the necessary packages:

    apt update && apt install -y git wget curl nano
  2. Install Docker according to the official documentationhttps://docs.docker.com/engine/install/#server

  3. Clone the repository with the docker image:

    git clone https://github.com/boxexchanger/docker-java-tron.git
  4. Go to the directory with the project

    cd docker-java-tron/
  5. 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
  6. Create a folder for this node

    mkdir -p ~/docker-java-tron/data/node
  7. 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
  8. Unzip the archive (folderoutput-directory) в ~/docker-java-tron/data/node/

    tar xvf ~/LiteFullNode_output-directory.tgz -C ~/docker-java-tron/data/node/ --strip-components=1
  9. Delete the archive with the Lite data

    rm ~/LiteFullNode_output-directory.tgz

    Now our Tron node is ready to go live

Launch Node

  1. Go to the project directory:

  2. Launch Tron node

How to add another contract address

  1. You have to go into the configuration:

  2. 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:

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

  1. You have to go into the configuration

  2. Add a line with your value:

How to get logs from node:

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

Setting up a proxy on caddy

Installing caddy https://caddyserver.com/docs/install

Documentation prepared for Debian 11 and 12.

configuring caddy for proxy

8080,18090,18091 to ports 2080,2090,2091 for the external network

Caddyfile will be overwritten completely!

launch caddy

or restart if necessarysystemctl restart caddy

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

Rebuild docker and restart the node:

Last updated