Skip to content

Commit 28fa454

Browse files
authored
fix(doc/gradle): update readme and gradle task setting (#28)
1 parent fad09d8 commit 28fa454

16 files changed

+106
-132
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ Here is an example:
155155
```
156156
fix(private_net): update docker-compose
157157
158-
1. fix docker-compose container tron_node1 command paramters, add more JVM GC flags
158+
1. fix docker-compose container tron-node1 command paramters, add more JVM GC flags
159159
2. update the corresponding JVM flags explanation in README.md
160160
161161
Closes #1234

README.md

Lines changed: 27 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,54 @@
11
# TRON Docker
22

3-
This repository provides guidance and tools for the community to quickly get started with TRON network and development.
3+
This repository provides tools and guidance to help the community quickly get started with the TRON network and development.
44

55
## Features
66

7-
### Quick start for single FullNode
7+
### 🚀 Quick start for single FullNode
8+
Easily deploy a single TRON FullNode connected to **Mainnet** or **Nile testnet** using Docker. Follow the instructions to get your node up and running in minutes.
89

9-
This repository includes Docker configurations to quickly start a single TRON FullNode connected to the Mainnet or NileNet. Simply follow the instructions to get your node up and running in no time.
10+
### 🔗 Private chain setup
11+
Set up your own private TRON blockchain network for development and testing. The provided configurations simplify deployment and management, making it ideal for custom use cases.
1012

11-
### Private chain setup
12-
13-
You can also use this repository to set up a private TRON blockchain network. This is useful for development and testing purposes. The provided configurations make it straightforward to deploy and manage your own private chain.
14-
15-
### Node monitoring with Prometheus and Grafana
16-
17-
Monitoring the health and performance of your TRON nodes is made easy with integrated Prometheus and Grafana services. The repository includes configurations to set up these monitoring tools, allowing you to visualize and track various metrics in real time.
18-
19-
### Tools
13+
### 📊 Node monitoring with Prometheus and Grafana
14+
Monitor the health and performance of your TRON nodes with integrated **Prometheus** and **Grafana** services. Real-time metrics and visualizations are just a few steps away.
2015

16+
### 🛠️ Tools
2117
We also provide tools to facilitate the CI and testing process:
22-
- Gradle Docker: Using Gradle to automate the build and test processes for java-tron image.
23-
- DB Fork: This tool helps launch a private Java-Tron network based on the state of the Mainnet database to support shadow fork testing.
18+
- **Gradle Docker**: Automate the build and testing of the `java-tron` Docker image using Gradle.
19+
- **DBFork**: Launch a private java-tron network based on the Mainnet database state, enabling shadow fork testing.
2420

2521
## Getting Started
2622

2723
### Prerequisites
28-
2924
- Docker
3025
- Docker Compose
3126

32-
### Installation
27+
### Start the services
28+
First clone the repository:
29+
30+
```sh
31+
git clone https://github.com/tronprotocol/tron-docker.git
32+
cd tron-docker
33+
```
3334

34-
1. **Clone the repository:**
35-
```sh
36-
git clone https://github.com/tronprotocol/tron-docker.git
37-
cd tron-docker
38-
```
35+
Then, navigate to the relevant directory and follow the instructions in the respective README to start the services:
36+
- **TRON network deployment related:**
37+
- **Single FullNode**: Use the [single_node](./single_node) folder.
38+
- **Private TRON network**: Use the [private_net](./private_net) folder.
39+
- **Node monitoring**: Use the [metric_monitor](./metric_monitor) folder.
3940

40-
2. **Start the services:**
41-
Navigate to the corresponding directory and follow the instructions in the respective README. Then you can easily start the services.
42-
- To start a single FullNode, use the folder [single_node](./single_node).
43-
- To set up a private TRON network, use the folder [private_net](./private_net).
44-
- To monitor the TRON node, use the folder [metric_monitor](./metric_monitor).
45-
- To use Gradle with Docker, check [gradle docker](./tools/docker/README.md).
46-
- To do shadow fork testing, check [db fork guidance](./tools/dbfork/README.md).
41+
- **Tools**:
42+
- **Gradle Docker**: Automate Docker image builds and testing. Check the [gradle docker](./tools/docker/README.md) documentation.
43+
- **DBFork**: Perform shadow fork testing. Follow the [DBFork guidance](./tools/dbfork/README.md).
4744

4845
## Troubleshooting
4946
If you encounter any difficulties, please refer to the [Issue Work Flow](https://tronprotocol.github.io/documentation-en/developers/issue-workflow/#issue-work-flow), then raise an issue on [GitHub](https://github.com/tronprotocol/tron-docker/issues). For general questions, please use [Discord](https://discord.gg/cGKSsRVCGm) or [Telegram](https://t.me/TronOfficialDevelopersGroupEn).
5047

51-
# Contributing
48+
## Contributing
5249

5350
All contributions are welcome. Check [contribution](CONTRIBUTING.md) for more details.
5451

55-
# License
52+
## License
5653

5754
This repository is released under the [LGPLv3 license](https://github.com/tronprotocol/tron-docker/blob/main/LICENSE).

conf/main_net_config.conf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ node {
174174
isOpenFullTcpDisconnect = false
175175

176176
p2p {
177-
version = 11111 # 11111: mainnet; 20180622: testnet
177+
version = 11111 # 11111: Mainnet; 20180622: Nile testnet
178178
}
179179

180180
active = [
@@ -660,8 +660,8 @@ vm = {
660660
}
661661

662662
committee = {
663-
allowCreationOfContracts = 0 //mainnet:0 (reset by committee),test:1
664-
allowAdaptiveEnergy = 0 //mainnet:0 (reset by committee),test:1
663+
allowCreationOfContracts = 0 //Mainnet:0 (reset by committee),test:1
664+
allowAdaptiveEnergy = 0 //Mainnet:0 (reset by committee),test:1
665665
}
666666

667667
event.subscribe = {

conf/nile_net_config.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -516,8 +516,8 @@ vm = {
516516
}
517517

518518
committee = {
519-
allowCreationOfContracts = 0 //mainnet:0 (reset by committee),test:1
520-
allowAdaptiveEnergy = 0 //mainnet:0 (reset by committee),test:1
519+
allowCreationOfContracts = 0 //Mainnet:0 (reset by committee),test:1
520+
allowAdaptiveEnergy = 0 //Mainnet:0 (reset by committee),test:1
521521
}
522522

523523
event.subscribe = {

conf/private_net_config_others.conf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ node {
9696
isOpenFullTcpDisconnect = true
9797

9898
p2p {
99-
version = 1 # 11111: mainnet; 20180622: testnet; you can set other number when you deploy one private net, but the node must have the same number in some private net.
99+
version = 1 # 11111: Mainnet; 20180622: Nile testnet; you can set other number when you deploy one private net, but the node must have the same number in some private net.
100100
}
101101

102102
active = [
@@ -198,9 +198,9 @@ seed.node = {
198198
# "ip:port",
199199
# ]
200200
ip.list = [
201-
# used for docker deployment, to connect container named in tron_witness, defined in docker-compose.yml
202-
"tron_witness1:18888",
203-
#"tron_witness2:18888",
201+
# used for docker deployment, to connect container named in tron-witness, defined in docker-compose.yml
202+
"tron-witness1:18888",
203+
#"tron-witness2:18888",
204204

205205
# used for local deployment
206206
"127.0.0.1:18888"

conf/private_net_config_witness1.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ node {
9696
isOpenFullTcpDisconnect = true
9797

9898
p2p {
99-
version = 1 # 11111: mainnet; 20180622: testnet; you can set other number when you deploy one private net, but the node must have the same number in some private net.
99+
version = 1 # 11111: Mainnet; 20180622: Nile testnet; you can set other number when you deploy one private net, but the node must have the same number in some private net.
100100
}
101101

102102
active = [

conf/private_net_config_witness2.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ node {
9696
isOpenFullTcpDisconnect = true
9797

9898
p2p {
99-
version = 1 # 11111: mainnet; 20180622: testnet; you can set other number when you deploy one private net, but the node must have the same number in some private net.
99+
version = 1 # 11111: Mainnet; 20180622: Nile testnet; you can set other number when you deploy one private net, but the node must have the same number in some private net.
100100
}
101101

102102
active = [
@@ -196,7 +196,7 @@ seed.node = {
196196
# "ip:port"
197197
# ]
198198
ip.list = [
199-
"tron_witness1:18888",
199+
"tron-witness1:18888",
200200
]
201201
}
202202

metric_monitor/README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ Download the `tron-docker` repository, enter the `metric` directory, and start t
1919
```sh
2020
docker-compose up -d
2121
```
22-
Then check the Docker resource settings to ensure it has at least 16GB of memory.
2322
It will start a TRON FullNode that connects to the Mainnet, along with Prometheus and Grafana services. Note that in [main_net_config.conf](../conf/main_net_config.conf), it contains the configuration below to enable metrics.
2423
```
2524
metrics{
@@ -34,7 +33,7 @@ metrics{
3433
The Prometheus service will use the configuration file [prometheus.yml](metric_conf/prometheus.yml). It uses the configuration below to add targets for monitoring.
3534
```
3635
- targets:
37-
- tron_node1:9527 # use container name
36+
- tron-node1:9527 # use container name
3837
labels:
3938
group: group-tron
4039
instance: fullnode-01
@@ -45,7 +44,7 @@ You can view the running status of the Prometheus service at `http://localhost:9
4544

4645
If you want to monitor more nodes, simply add more targets following the same format. Click on "Status" -> "Targets" to view the status of each monitored java-tron node.
4746
![image](../images/prometheus_targets.png)
48-
**Notice**: If you want to check metrics, please use `http://localhost:9527/metrics` on host machine instead of `http://tron_node1:9527/metrics`, as the latter is used for container access inside Docker.
47+
**Notice**: If you want to check metrics, please use `http://localhost:9527/metrics` on host machine instead of `http://tron-node1:9527/metrics`, as the latter is used for container access inside Docker.
4948

5049
### Grafana service
5150
After startup, you can log in to the Grafana web UI through [http://localhost:3000/](http://localhost:3000/). The initial username and password are both `admin`. After logging in, change the password according to the prompts, and then you can enter the main interface.

metric_monitor/docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
version: '3.8'
22
services:
3-
tron_node1:
3+
tron-node1:
44
image: tronprotocol/java-tron:latest
5-
container_name: tron_node1
5+
container_name: tron-node1
66
networks:
77
- tron_network
88
deploy:

metric_monitor/metric_conf/grafana_dashboard_tron_server.json

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1479,17 +1479,22 @@
14791479
"pluginVersion": "11.4.0",
14801480
"targets": [
14811481
{
1482-
"exemplar": true,
1483-
"expr": " rate(tron:block_generate_latency_seconds_sum{group=`$group`,instance=`$instance`,sync =\"false\"}[$__interval])\n/\n rate(tron:block_generate_latency_seconds_count{group=`$group`,instance=`$instance`,sync =\"false\"}[$__interval])",
1482+
"editorMode": "code",
1483+
"exemplar": false,
1484+
"expr": " rate(tron:block_generate_latency_seconds_sum{group=`$group`,instance=`$instance`}[$__interval])\n/\n rate(tron:block_generate_latency_seconds_count{group=`$group`,instance=`$instance`}[$__interval])",
1485+
"format": "time_series",
14841486
"hide": false,
1485-
"interval": "1m",
1486-
"legendFormat": "avg",
1487+
"interval": "12s",
1488+
"legendFormat": "__auto",
1489+
"range": true,
14871490
"refId": "B"
14881491
},
14891492
{
1493+
"editorMode": "code",
14901494
"exemplar": true,
1491-
"expr": "histogram_quantile(0.99, sum(rate(tron:block_generate_latency_seconds_bucket{group=`$group`,instance=`$instance`,sync =\"false\"}[$__interval])) by (le))",
1495+
"expr": "histogram_quantile(0.99, sum(rate(tron:block_generate_latency_seconds_bucket{group=`$group`,instance=`$instance`}[$__interval])) by (le))",
14921496
"format": "time_series",
1497+
"hide": false,
14931498
"instant": false,
14941499
"interval": "1m",
14951500
"intervalFactor": 1,

0 commit comments

Comments
 (0)