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
{{ message }}
Repository navigation
Commit ab7225f
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -82,8 +82,7 @@ The java-tron project comes with several runnable artifacts and helper scripts f
82
82
|**`FullNode.jar`**| Main TRON node executable (generated in `build/libs/` after a successful build following the above guidance). Runs as a full node by default. `java -jar FullNode.jar --help` for command line options|
|**`p2p-standalone.jar`**| Peer discovery, connection management and DNS-based node lists (generated in `build/libs/`). See the [p2p guide](./p2p/README.md). |
85
-
|**`start.sh`**| Quick start script (x86_64, JDK 8) to download/build/run `FullNode.jar`. See the tool [guide](./shell.md). |
86
-
|**`start.sh.simple`**| Quick start script template (ARM64, JDK 17). See usage notes inside the script. |
85
+
|**`start.sh`**| Quick start script to download/build/run `FullNode.jar` on x86_64 (JDK 8) and ARM64 (JDK 17). See the tool [guide](./shell.md). |
87
86
88
87
# Running java-tron
89
88
@@ -246,6 +245,7 @@ Thank you for considering to help out with the source code! If you'd like to con
-`start.sh` only accepts release jars signed by this key, whose fingerprint is written into the script. This protects against tampered release files, but not against a compromise of this repository, which hosts both the script and the release files: a `start.sh` taken from a compromised repository could carry a different fingerprint.
Copy file name to clipboardExpand all lines: shell.md
+33-9Lines changed: 33 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,12 @@ If you already downloaded the `FullNode.jar`, you can use `start.sh` to run it,
8
8
9
9
The script is available in the java-tron project at [github](https://github.com/tronprotocol/java-tron), or if you need a separate script: [start.sh](https://github.com/tronprotocol/java-tron/blob/develop/start.sh)
10
10
11
+
The script runs on x86_64 with JDK 8 and on ARM64 with JDK 17. It picks the JVM options for the Java version it finds, and downloads the release jars built for that architecture (`FullNode-aarch64.jar` on ARM64).
12
+
13
+
Downloaded release jars are verified against the GPG signature published with each release, made by the key listed under "Integrity Check" in the [README](./README.md), so `gpg` must be installed; a jar that fails verification is not used. The mainnet config is downloaded from java-tron and the Nile testnet config from [nile-testnet](https://github.com/tron-nile-testnet/nile-testnet).
14
+
15
+
For each download the release key is fetched by its fingerprint from keys.openpgp.org, or from keyserver.ubuntu.com if the first server does not answer, so installing a release jar needs outbound HTTPS access (port 443) to one of these key servers. If neither can be reached, the signature cannot be checked and the downloaded jar is removed.
16
+
11
17
***
12
18
13
19
# Usage
@@ -32,6 +38,8 @@ The script is available in the java-tron project at [github](https://github.com/
32
38
sh start.sh --stop
33
39
```
34
40
41
+
`--run` records the process id in `<jar name>.pid` (`FullNode.jar.pid` by default) next to `start.log`, and `--stop` reads it. Run `--stop` in the directory the node was started from, with the same `-j` name if one was given. After `--release` or `-cb` the node runs in `FullNode/`; `--stop` finds it there from the parent directory as well. A node started by an earlier version of the script (a `start.log` but no pid file) is still found by its jar name.
42
+
35
43
* Get the latest version of `FullNode.jar` and start it
36
44
37
45
```
@@ -58,17 +66,21 @@ The script is available in the java-tron project at [github](https://github.com/
58
66
59
67
start the service
60
68
61
-
*`--stop`
69
+
*`--stop` or `-s`
70
+
71
+
stop the service started from the current directory
62
72
63
-
stop the service
73
+
*`--`
74
+
75
+
Everything after it is passed to `FullNode.jar` unchanged. Options the script does not know are passed on as well, so `--` is only needed when a value of such an option looks like a script option or a jar name.
64
76
65
77
*`-c`
66
78
67
-
Specify the configuration file, by default it will load the `config.conf` in the same directory as `FullNode.jar`
79
+
Specify the configuration file, by default it will load the `config.conf` in the current directory
68
80
69
81
*`-d`
70
82
71
-
Specify the database storage path, The default path is the same directory where `FullNode.jar` is located.
83
+
Specify the database storage path. The default is `output-directory` in the directory the script is run from (`FullNode/` after `--release` or `-cb`).
72
84
73
85
*`-j`
74
86
@@ -79,7 +91,7 @@ The script is available in the java-tron project at [github](https://github.com/
79
91
Specify the maximum memory of the `FullNode.jar` service in`MB`, jvm's startup maximum memory will be adjusted according to this parameter.
80
92
81
93
*`--net`
82
-
Select test and private networks.
94
+
Select test (Nile) and private networks.
83
95
84
96
### build project
85
97
@@ -91,6 +103,14 @@ The script is available in the java-tron project at [github](https://github.com/
91
103
92
104
Get the latest released version of the `jar` package from github.
93
105
106
+
*`--upgrade`
107
+
108
+
Replace the local `jar` package with the latest release; the previous one is kept as `FullNode.jar_bak`.
109
+
110
+
*`--download`
111
+
112
+
Download the latest released `jar` package into the current directory without starting it.
113
+
94
114
95
115
### rebuild the manifest
96
116
@@ -100,7 +120,7 @@ The script is available in the java-tron project at [github](https://github.com/
100
120
101
121
*`-m`
102
122
103
-
specify the minimum required manifest file size ,unit:M,default:0
123
+
specify the minimum required manifest file size ,unit:M,default:128
@@ -162,13 +182,15 @@ Get the latest released version.
162
182
sh start.sh --release --run
163
183
```
164
184
165
-
Following file structure will be generated after executing the above command and the `FullNode.jar` will be started.
185
+
Following file structure will be generated after executing the above command and the `FullNode.jar` will be started. The node runs from `FullNode/`, so later `--run` commands are executed there with the copied script; `--stop` works both there and from the parent directory.
166
186
167
187
```
168
188
├── ...
169
189
├── FullNode/
170
190
├── config.conf
171
191
├── FullNode.jar
192
+
├── FullNode.jar.pid
193
+
├── start.log
172
194
├── start.sh
173
195
```
174
196
@@ -214,12 +236,14 @@ Following file structure will be created:
214
236
├── FullNode/
215
237
|── config.conf
216
238
├── FullNode.jar
239
+
├── FullNode.jar.pid
240
+
├── start.log
217
241
├── start.sh
218
242
```
219
243
220
244
### 3. rebuild manifest tool
221
245
222
-
This tool provides the ability to reformat the manifest based on current database, Enabled by default.
246
+
This tool provides the ability to reformat the manifest based on current database, Enabled by default. It applies to LevelDB only and is skipped on ARM64, which runs RocksDB.
0 commit comments