Skip to content

Commit e15289f

Browse files
Little-Peonyclaude
andcommitted
docs: audit and update root-level docs and scripts
- gen.sh: fix proto paths, add shebang and -I include flags, split core/api - build.md: rewrite with current JDK matrix; deduplicate vs README via links - run.md: rewrite to remove dead links, fix SR private key security issue, remove gradle run -Pwitness and 2018-era log output - quickstart.md: remove deprecated Solidity Node port/references; mark docker-tron-quickstart as community-maintained - CONTRIBUTING.md: replace Travis CI with GitHub Actions; fix commit title length from 50 to 10-72 chars to match PR Title Format section Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 4f5ad58 commit e15289f

5 files changed

Lines changed: 88 additions & 230 deletions

File tree

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ We would like all developers to follow a standard development flow and coding st
147147
2. Review the code before submission.
148148
3. Run standardized tests.
149149
150-
`Sonar`-scanner and `Travis CI` continuous integration scanner will be automatically triggered when a pull request has been submitted. When a PR passes all the checks, the **java-tron** maintainers will then review the PR and offer feedback and modifications when necessary. Once adopted, the PR will be closed and merged into the `develop` branch.
150+
`Sonar`-scanner and CI checks (GitHub Actions) will be automatically triggered when a pull request has been submitted. When a PR passes all the checks, the **java-tron** maintainers will then review the PR and offer feedback and modifications when necessary. Once adopted, the PR will be closed and merged into the `develop` branch.
151151
152152
We are glad to receive your pull requests and will try our best to review them as soon as we can. Any pull request is welcome, even if it is for a typo.
153153
@@ -161,7 +161,7 @@ Please make sure your submission meets the following code style:
161161
- The code must have passed the Sonar scanner test.
162162
- The code has to be pulled from the `develop` branch.
163163
- The commit message should start with a verb, whose initial should not be capitalized.
164-
- The commit message should be less than 50 characters in length.
164+
- The commit message title should be between 10 and 72 characters in length.
165165
166166
167167
@@ -196,7 +196,7 @@ The message header is a single line that contains succinct description of the ch
196196
The `scope` can be anything specifying place of the commit change. For example: `framework`, `api`, `tvm`, `db`, `net`. For a full list of scopes, see [Type and Scope Reference](#type-and-scope-reference). You can use `*` if there isn't a more fitting scope.
197197
198198
The subject contains a succinct description of the change:
199-
1. Limit the subject line, which briefly describes the purpose of the commit, to 50 characters.
199+
1. Limit the subject line, which briefly describes the purpose of the commit, to 72 characters (minimum 10).
200200
2. Start with a verb and use first-person present-tense (e.g., use "change" instead of "changed" or "changes").
201201
3. Do not capitalize the first letter.
202202
4. Do not end the subject line with a period.

build.md

Lines changed: 25 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,54 @@
11
# How to Build
22

3-
## Prepare dependencies
3+
## Hardware Requirements
44

5-
* JDK 1.8 (JDK 1.9+ are not supported yet)
6-
* On Linux Ubuntu system (e.g. Ubuntu 16.04.4 LTS), ensure that the machine has [__Oracle JDK 8__](https://www.digitalocean.com/community/tutorials/how-to-install-java-with-apt-get-on-ubuntu-16-04), instead of having __Open JDK 8__ in the system. If you are building the source code by using __Open JDK 8__, you will get [__Build Failed__](https://github.com/tronprotocol/java-tron/issues/337) result.
7-
* Open **UDP** ports for connection to the network
8-
* **Minimum** 2 CPU Cores
5+
For mainnet deployment, refer to the [Hardware Requirements for Mainnet](README.md#hardware-requirements-for-mainnet) table in the README.
96

10-
## Build and Deploy automatically using scripts
7+
For compilation only (not running a node), a minimum of **4 CPU cores, 16 GB RAM, and 10 GB free disk space** is sufficient.
118

12-
- Please take a look at the [Tron Deployment Scripts](https://github.com/tronprotocol/TronDeployment) repository.
9+
## Prerequisites, Source Code, and Console Build
1310

14-
## Getting the code with git
11+
See [Building the Source Code](README.md#building-the-source-code) in the README for:
12+
- Hardware/OS/JDK prerequisites
13+
- Dependency installation (`install_dependencies.sh`)
14+
- `git clone` and `./gradlew build` instructions
1515

16-
* Use Git from the console, see the [Setting up Git](https://help.github.com/articles/set-up-git/) and [Fork a Repo](https://help.github.com/articles/fork-a-repo/) articles.
17-
* `develop` branch: the newest code
18-
* `master` branch: more stable than develop.
19-
In the shell command, type:
20-
```bash
21-
git clone https://github.com/tronprotocol/java-tron.git
22-
git checkout -t origin/master
23-
```
16+
## Building in IntelliJ IDEA
2417

25-
* For Mac, you can also install **[GitHub for Mac](https://mac.github.com/)** then **[fork and clone our repository](https://guides.github.com/activities/forking/)**.
18+
Run `./gradlew build -x test` once from the terminal before opening the project to generate protobuf sources.
2619

27-
* If you'd rather not use Git, **[Download the ZIP](https://github.com/tronprotocol/java-tron/archive/develop.zip)**
20+
1. Open IntelliJ IDEA and select **File → Open**, locate the `java-tron` directory, and click **Open**.
21+
2. When prompted, select **Trust Project**.
22+
3. Wait for Gradle sync to complete.
23+
4. In **Settings → Build, Execution, Deployment → Compiler → Annotation Processors**, enable **Annotation Processing**.
24+
5. In the **Gradle** panel, navigate to **Tasks → build** and double-click **build**.
2825

29-
## Including java-tron as dependency
26+
## Including java-tron as a Dependency
3027

31-
If you don't want to checkout the code and build the project, you can include it directly as a dependency.
28+
**Gradle:**
3229

33-
**Using gradle:**
34-
35-
```
30+
```groovy
3631
repositories {
37-
maven { url 'https://jitpack.io' }
32+
maven { url 'https://jitpack.io' }
3833
}
3934
dependencies {
40-
implementation 'com.github.tronprotocol:java-tron:develop-SNAPSHOT'
35+
implementation 'com.github.tronprotocol:java-tron:develop-SNAPSHOT'
4136
}
4237
```
43-
44-
**Using maven:**
38+
39+
**Maven:**
4540

4641
```xml
4742
<repositories>
48-
<repository>
49-
<id>jitpack.io</id>
50-
<url>https://jitpack.io</url>
43+
<repository>
44+
<id>jitpack.io</id>
45+
<url>https://jitpack.io</url>
5146
</repository>
5247
</repositories>
5348

5449
<dependency>
5550
<groupId>com.github.tronprotocol</groupId>
5651
<artifactId>java-tron</artifactId>
5752
<version>develop-SNAPSHOT</version>
58-
<!--You can use any of the tag/branch name available-->
5953
</dependency>
6054
```
61-
62-
## Building from source code
63-
64-
- **Building using the console:**
65-
66-
```bash
67-
cd java-tron
68-
./gradlew build
69-
```
70-
71-
- **Building using [IntelliJ IDEA](https://www.jetbrains.com/idea/) (community version is enough):**
72-
73-
**Please run `./gradlew build` once to build the protocol files**
74-
75-
1. Start IntelliJ.
76-
Select `File` -> `Open`, then locate to the java-tron folder which you have git cloned to your local drive. Then click `Open` button on the right bottom.
77-
2. Check on `Use auto-import` on the `Import Project from Gradle` dialog. Select JDK 1.8 in the `Gradle JVM` option. Then click `OK`.
78-
3. IntelliJ will import the project and start gradle syncing, which will take several minutes, depending on your network connection and your IntelliJ configuration
79-
4. Enable Annotations, `Preferences` -> Search `annotations` -> check `Enable Annotation Processing`.
80-
5. When the syncing finishes, select `Gradle` -> `Tasks` -> `build`, and then double click `build` option.
81-

gen.sh

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,32 @@
1-
protoc --java_out=./ ./core/*.proto ./api/*.proto
1+
#!/usr/bin/env bash
2+
# Helper script for manually regenerating Java sources from .proto files.
3+
# The recommended approach is `./gradlew build`, which compiles protos via the
4+
# Gradle protobuf plugin automatically. Use this script only if you need to run
5+
# protoc directly (e.g., for a single proto file during development).
6+
#
7+
# Requirements: protoc v3.x installed and available on PATH.
8+
# Proto sources live under protocol/src/main/protos/.
9+
10+
set -e
11+
12+
PROTO_SRC="protocol/src/main/protos"
13+
JAVA_OUT="protocol/src/main/java"
14+
15+
# Compile core protos (Tron.proto + all contract protos)
16+
protoc \
17+
-I="$PROTO_SRC" \
18+
-I="$PROTO_SRC/core" \
19+
-I="$PROTO_SRC/core/contract" \
20+
--java_out="$JAVA_OUT" \
21+
"$PROTO_SRC/core/Tron.proto" \
22+
"$PROTO_SRC/core/contract/"*.proto
23+
24+
# Compile API proto
25+
protoc \
26+
-I="$PROTO_SRC" \
27+
-I="$PROTO_SRC/core" \
28+
-I="$PROTO_SRC/api" \
29+
--java_out="$JAVA_OUT" \
30+
"$PROTO_SRC/api/api.proto"
31+
32+
echo "Proto compilation complete. Output: $JAVA_OUT"

quickstart.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ docker pull tronprotocol/java-tron
4545

4646
You can run the command below to start the java-tron:
4747
```
48-
docker run -it -d -p 8090:8090 -p 8091:8091 -p 18888:18888 -p 50051:50051 --restart always tronprotocol/java-tron
48+
docker run -it -d -p 8090:8090 -p 18888:18888 -p 50051:50051 --restart always tronprotocol/java-tron
4949
```
5050

5151
The `-p` flag defines the ports that the container needs to be mapped on the host machine. By default the container will start and join in the mainnet
@@ -65,8 +65,9 @@ Note: The directory `/Users/tron/docker/conf` must contain the file `config-loca
6565

6666
## Quickstart for using docker-tron-quickstart
6767

68-
The image exposes a Full Node, Solidity Node, and Event Server. Through TRON Quickstart, users can deploy DApps, smart contracts, and interact with the TronWeb library.
69-
Check more information at [Quickstart:](https://github.com/TRON-US/docker-tron-quickstart)
68+
The image exposes a Full Node and Event Server. Through TRON Quickstart, users can deploy DApps, smart contracts, and interact with the TronWeb library.
69+
70+
> Note: `docker-tron-quickstart` is a community-maintained tool. Check its repository for the latest status: [Quickstart](https://github.com/TRON-US/docker-tron-quickstart)
7071
7172
### Node.JS Console
7273
Node.JS is used to interact with the Full and Solidity Nodes via Tron-Web.
@@ -84,7 +85,7 @@ docker pull trontools/quickstart
8485

8586
## Setup TRON Quickstart
8687
### TRON Quickstart Run
87-
Run the "docker run" command to launch TRON Quickstart. TRON Quickstart exposes port 9090 for Full Node, Solidity Node, and Event Server.
88+
Run the "docker run" command to launch TRON Quickstart. TRON Quickstart exposes port 9090 for Full Node and Event Server.
8889
```shell
8990
docker run -it \
9091
-p 9090:9090 \

0 commit comments

Comments
 (0)