TRON Developer Guide — TRON-CLI

Introduction

Dependencies

  • Python 3.6+
  • JDK 1.8
  • MongoDB (for event server)
  • MacOS or Linux

Installation

python3 -m venv venv    // Optional step. ./venv/bin/activate   // Optional steppip install troncli

Why Python Virtual Environments?

TRON-CLI Interactive Mode

tron-cli i

TRON-CLI Quickstart

tron-cli quick
  • You can also type --nettype main to set up a Full Node that syncs to the Mainnet.
  • Type --reset True to reset all.

TRON-CLI Mainnet

Initialization

tron-cli init

Configuration

Run Node

Check Logs

Stop Node

tron-cli stop --node NODENUMBER

Common Use Cases

1. Private Net Nodes Setup

tron-cli quick
tron-cli run --nodetype sol

2. Mainnet Nodes Setup

tron-cli init
tron-cli config --nettype main
tron-cli run

3. Advanced Config to Start Nodes

tron-cli init --version latest --reset True
tron-cli config --nettype private --fullhttpport 8500 --solhttpport 8600 --eventhttpport 8400 --fullrpcport 58500 --solrpcport 58600 --eventrpcport 58400 --enablememdb True --dbsyncmode async --saveintertx False --savehistorytx False --gridport 18891 --dbname Null --dbusername Null --dbpassword Null
tron-cli run --nodetype full

4. Private Full Node + Event Node + Tron-Grid

tron-cli init
tron-cli config --nettype private --fullhttpport 8500 --solhttpport 8600 --eventhttpport 8400 --fullrpcport 58500 --solrpcport 58600 --eventrpcport 58400 --enablememdb True --dbsyncmode async --saveintertx False --savehistorytx False --gridport 18891 --dbname events --dbusername tron --dbpassword 12345678
tron-cli run
tron-cli run --nodetype event
tron-cli run --nodetype grid

5. Mainnet Event Node + Tron-Grid

tron-cli init
tron-cli config --nettype main --fullhttpport 8500 --solhttpport 8600 --eventhttpport 8400 --fullrpcport 58500 --solrpcport 58600 --eventrpcport 58400 --enablememdb True --dbsyncmode async --saveintertx False --savehistorytx False --gridport 18891 --dbname events --dbusername tron --dbpassword 12345678
tron-cli run --nodetype event
tron-cli run --nodetype grid

Commands Overview

Installation FAQs

  1. How to fix “fail to build a wheel for psutil” error?
brew install --with-toolchain llvm
  1. How to test in a virtual environment?
python3 -m venv venv
. ./venv/bin/activate
pip install troncli
deactivate

GitHub Link

--

--

The official Medium of TRON DAO.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store