You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tools/trond/README.md
+36-8Lines changed: 36 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,16 @@
5
5
6
6
## Prerequisites
7
7
- Shell Environment: Required for running shell scripts.
8
-
- Golang Build Environment: The [build_trond.sh](../../build_trond.sh) script will attempt to install the necessary Golang environment.
8
+
-**Go Language (v1.21.4+)**
9
+
- Official download: <https://go.dev/dl>
10
+
- Note: If Go is not installed, the [build_trond.sh](../../build_trond.sh) script will attempt to install it automatically, but it is recommended to configure it manually in advance.
11
+
-**Docker and Docker Compose**
12
+
- Minimum version requirements:
13
+
- Docker Engine ≥ 20.10.13
14
+
- Docker Compose ≥ 1.29.2
15
+
- Official installation guides: Check [prerequiesites](../../README.md#prerequisites)
16
+
-**Python 3.11.0+**
17
+
- Official download: <https://www.python.org/downloads/release/python-3110/>
9
18
10
19
## Installation
11
20
@@ -41,7 +50,7 @@ Now it supports the following commands:
41
50
### Examples
42
51
43
52
Here we show examples of downloading the mainnet database snapshot, then deploy a java-tron node based on it.
44
-
It is recommended to run these commands in `tron-docker` root directory.
53
+
You need to run these commands in `tron-docker` root directory.
45
54
46
55
#### 1. Download the Mainnet database snapshot
47
56
@@ -56,22 +65,41 @@ After the download completes, the database will be extracted to `./output-direct
56
65
Notice: The snapshot is large(46G on 24-Jan-2025). It may take above 1 hour to finish. You could add `nohup` to make it continue running even after you log out of your terminal session.
57
66
The full command will be `nohup ./trond snapshot download default-main &`
58
67
59
-
#### 2. Deploy a java-tron node on Mainnet
68
+
#### 2. Check configure files
69
+
Next, check the configuration files and Docker compose files required for deploying a node:
70
+
```
71
+
./trond node env
72
+
```
73
+
As running a mainnet node,
74
+
you need file [docker-compose.fullnode.main.yml](../../single_node/docker-compose.fullnode.main.yml) and [main_net_config.conf](../../conf/main_net_config.conf).
75
+
76
+
#### 3. Deploy a java-tron node on Mainnet
60
77
61
-
Next, start a node connecting to the Mainnet:
78
+
Then, start a node connecting to the Mainnet:
62
79
63
80
```
64
81
./trond node run-single -t full-main
65
82
```
66
83
67
-
This command will trigger execution of the [docker-compose](../../single_node/docker-compose.fullnode.main.yml). It will use the database at `./output-directory/mainnet/database`.
84
+
This command will trigger execution of the [docker-compose](../../single_node/docker-compose.fullnode.main.yml).
85
+
It will use the database at `./output-directory/mainnet/database` of the command trigger directory.
68
86
If the directory is empty, the node will sync transaction data from the genesis block. If you don’t need the snapshot, you can skip the download step.
69
87
70
88
To view the node logs, you can access them at `./logs/mainnet`, or you can use the command `docker exec tron-node tail -f ./logs/tron.log`.
71
89
72
-
For more detailed usage instructions, refer to the help command or the [command documentation](./docs/trond.md).
90
+
#### 4. Stop the java-tron node
91
+
As java-tron service supports application shutdown with `kill -15`, which sends a `SIGTERM` signal to the application, allowing it to gracefully shut down. java-tron is also compatible with force shutdown using `kill -9`, which sends a `SIGKILL` signal.
92
+
You could stop the node in multiple ways.
73
93
94
+
Here is an example of stopping the node using `trond`:
95
+
```
96
+
./trond node run-single stop -t full-main
97
+
```
98
+
99
+
100
+
For more detailed usage instructions, refer to the help command or the [command documentation](./docs/trond.md).
74
101
75
-
## Note
102
+
## TroubleShooting
103
+
If you have any issues starting a java-tron node, please refer to the corresponding [TroubleShooting](../../single_node/README.md#troubleshot) guide.
76
104
77
-
This tool has been tested on **macOS** and **Linux** only. If you encounter any issues, please report them on [GitHub](https://github.com/tronprotocol/tron-docker/issues).
105
+
This tool has been tested on **macOS** and **Linux** only. If you encounter any other issues, please report them on [GitHub](https://github.com/tronprotocol/tron-docker/issues).
0 commit comments