Skip to content

Commit 5056db9

Browse files
author
zonLi
committed
add docs imags
1 parent ae27ade commit 5056db9

24 files changed

+135
-111
lines changed

docs/Official_Public_Node.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Full Node
1+
# FullNodes
22
* GRPC port: 50051
33
* P2P network port: 18888
44
* HTTP port : 8090
@@ -35,7 +35,7 @@
3535
47.75.249.4
3636
```
3737

38-
# Solidity Node
38+
# SolidityNodes
3939
* GRPC port: 50051
4040
* HTTP port : 8091
4141
```
+93
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
# SolidityNode and FullNode Deployment on The Same Host
2+
3+
Create separate directories for fullnode and soliditynode
4+
```text
5+
/deploy/fullnode
6+
/deploy/soliditynode
7+
```
8+
9+
Create two folders for fullnode and soliditynode.
10+
11+
Clone the latest master branch of [https://github.com/tronprotocol/java-tron](https://github.com/tronprotocol/java-tron) and extract it to
12+
```text
13+
/deploy/java-tron
14+
```
15+
16+
Make sure you have the proper dependencies.
17+
18+
* JDK 1.8 (JDK 1.9+ is not supported yet)
19+
* 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.
20+
* Open **UDP** ports for connection to the network
21+
* **MINIMUM** 2 CPU Cores
22+
23+
## Deployment Guide
24+
25+
1. Build the java-tron project
26+
```text
27+
cd /deploy/java-tron
28+
./gradlew build
29+
```
30+
31+
2. Copy the FullNode.jar and SolidityNode.jar along with configuration files into the respective directories
32+
```text
33+
download your needed configuration file from https://github.com/tronprotocol/TronDeployment.
34+
35+
main_net_config.conf is the configuration for MainNet, and test_net_config.conf is the configuration for TestNet.
36+
37+
please rename the configuration file to `config.conf` and use this config.conf to start FullNode and SoliditNode.
38+
39+
cp build/libs/FullNode.jar ../fullnode
40+
41+
cp build/libs/SolidityNode.jar ../soliditynode
42+
```
43+
44+
3. You can now run your FullNode using the following command
45+
```text
46+
java -jar FullNode.jar -c config.conf // make sure that your config.conf is downloaded from https://github.com/tronprotocol/TronDeployment
47+
```
48+
49+
4. Configure the SolidityNode configuration file
50+
51+
You need to edit `config.conf` to connect to your local FullNode. Change `trustNode` in `node` to local `127.0.0.1:50051`, which is the default rpc port. Set `listen.port` to any number within the range of 1024-65535. Please don't use any ports between 0-1024 since you'll most likely hit conflicts with other system services. Also change `rpc port` to `50052` or something to avoid conflicts. **Please forward the UDP port 18888 for FullNode.**
52+
```text
53+
rpc {
54+
port = 50052
55+
}
56+
```
57+
58+
5. You can now run your SolidityNode using the following command:
59+
```text
60+
java -jar SolidityNode.jar -c config.conf //make sure that your config.conf is downloaded from https://github.com/tronprotocol/TronDeployment
61+
```
62+
63+
# Logging and Network Connection Verification
64+
65+
Logs for both nodes are located in `/deploy/\*/logs/tron.log`. Use `tail -f /logs/tron.log/` to follow along with the block syncing.
66+
67+
You should see something similar to this in your logs for block synchronization:
68+
69+
**FullNode**
70+
```text
71+
12:00:57.658 INFO [pool-7-thread-1] [o.t.c.n.n.NodeImpl](NodeImpl.java:830) Success handle block Num:236610,ID:0000000000039c427569efa27cc2493c1fff243cc1515aa6665c617c45d2e1bf
72+
```
73+
**SolidityNode**
74+
```text
75+
12:00:40.691 INFO [pool-17-thread-1] [o.t.p.SolidityNode](SolidityNode.java:88) sync solidity block, lastSolidityBlockNum:209671, remoteLastSolidityBlockNum:211823
76+
```
77+
# Stop Node Gracefully
78+
Create file stop.sh,use kill -15 to close java-tron.jar(or FullNode.jar、SolidityNode.jar).
79+
You need to modify pid=`ps -ef |grep java-tron.jar |grep -v grep |awk '{print $2}'` to find the correct pid.
80+
```text
81+
#!/bin/bash
82+
while true; do
83+
pid=`ps -ef |grep java-tron.jar |grep -v grep |awk '{print $2}'`
84+
if [ -n "$pid" ]; then
85+
kill -15 $pid
86+
echo "The java-tron process is exiting, it may take some time, forcing the exit may cause damage to the database, please wait patiently..."
87+
sleep 1
88+
else
89+
echo "java-tron killed successfully!"
90+
break
91+
fi
92+
done
93+
```

docs/Solidity_and_Full_Node_Deployment_EN.md

-88
This file was deleted.

docs/Tron-VM.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ The following interfaces are available in Tron Wallet-CLI:
2929
+ getcontract(contractAddress)
3030
Developers can call these interfaces to deploy, trigger or check smart contracts.
3131

32-
## How TVM works
32+
## How TVM Works
3333

3434
![Flowchart of Tron Virtual Machine](https://raw.githubusercontent.com/ybhgenius/Documentation/master/images/Virtual_Machine/虚拟机.png)
3535

@@ -41,7 +41,7 @@ Put simply, the flow is as follows:
4141
+ A virtual machine processes data through opcode, which is equivalent to operating a logic of a stack-based finite state machine.
4242
+ TVM accesses blockchain data and invoke External Data Interface through the Interoperation layer.
4343

44-
## Future development of TVM
44+
## Future Development of TVM
4545
1. More developer-friendly debugging tools
4646

4747
Tron will be committed to the development of optimized debugging tools and the establishment of standardized symbol and data format, for improved developer efficiency.
@@ -54,7 +54,7 @@ Different from gas consumption mechanism for every transaction on EVM, there is
5454

5555
Improving JIT compilation speed is conducive to faster interpretation and optimized compilation of local code. Meanwhile, Tron is planning to further optimize its TVM based on WebAssembly (WASM). WebAssembly, spearheaded by Apple, Google, Microsoft and Mozilla, is designed to break bottlenecks of current Web browsers and can be generated through compiling C/C++ and other programming languages. Integrating WASM, TVM will be able to provide high performance and high throughput for blockchain to cope with complex scenarios.
5656

57-
## The following is a guide to TVM (smart contract deployment)
57+
## Usage Guide to TVM
5858

5959
1. Compile contract
6060

docs/Tron-http.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# TRON Built-in Http Introduction
2-
## hexString and base58check transcode demo
2+
## HexString and Base58check Transcode Demo
33
JAVA:
44
[https://github.com/tronprotocol/wallet-cli/blob/master/src/main/java/org/tron/demo/TransactionSignDemo.java#L92](https://github.com/tronprotocol/wallet-cli/blob/master/src/main/java/org/tron/demo/TransactionSignDemo.java#L92)
55
PHP:

docs/Tron-overview.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,11 @@ For more api detail, please refer to [Tron-http](Tron-http.md)
120120

121121
TRON uses account model. An account's identity is address, it needs private key signature to operate an account. An account has many attributes, like TRX balance, tokens balance, bandwidth, etc. TRX and tokens can be transfered from account to account and it costs bandwidth. An account can also issue a smart contract, apply to become a super representative candidate, vote, etc. All TRON's activities are based on account.
122122

123-
## 3.2 Way to Create an Account
123+
## 3.2 How to Create an Account
124124

125-
1. Use a wallet to generate the address and private key. To active the account, you need to transfer TRX or transfer token to the new created account.
126-
2. Use an account already existed in TRON network to create an account
125+
1. Use a wallet to generate the address and private key. To active the account, you need to transfer TRX or transfer token to the new created account. [generate an account](https://tronscan.org/#/wallet/new)
126+
127+
2. Use an account already existed in TRON network to create an account
127128

128129
## 3.3 Key-pair Generation Algorithm
129130
Tron signature algorithm is ECDSA, curve used is SECP256K1. Private key is a random bumber, public key is a point in the elliptic curve. The process is: first generate a random number d to be the private key, then caculate P = d * G as the public key, G is the elliptic curve base point.
@@ -138,7 +139,8 @@ ALPHABET = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
138139

139140
## 3.5 Signature
140141
Signature introduction, please refer to:
141-
https://github.com/tronprotocol/Documentation/blob/fix_http/%E4%B8%AD%E6%96%87%E6%96%87%E6%A1%A3/%E4%BA%A4%E6%98%93%E7%AD%BE%E5%90%8D%E6%B5%81%E7%A8%8B.md
142+
[https://github.com/tronprotocol/Documentation/blob/fix_http/%E4%B8%AD%E6%96%87%E6%96%87%E6%A1%A3/%E4%BA%A4%E6%98%93%E7%AD%BE%E5%90%8D%E6%B5%81%E7%A8%8B.md](
143+
https://github.com/tronprotocol/Documentation/blob/fix_http/%E4%B8%AD%E6%96%87%E6%96%87%E6%A1%A3/%E4%BA%A4%E6%98%93%E7%AD%BE%E5%90%8D%E6%B5%81%E7%A8%8B.md)
142144

143145
# 4 TRON Network Node
144146
## 4.1 SuperNode

docs/index.md

+28-12
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,33 @@
1-
# Welcome to MkDocs
1+
# Documentation Guide
22

3-
For full documentation visit [mkdocs.org](https://mkdocs.org).
3+
**Please visit the new [TRON Developers Hub](https://developers.tron.network/) for detailed guides, interactive APIs, and much more!**
44

5-
## Commands
5+
+ If you want to know more about the recent progress of the TRON project, please check out [TRON Introduction](https://github.com/tronprotocol/Documentation/tree/master/English_Documentation/TRON_Introduction).
6+
+ If you want to know more about the protocol documentation, please check out [TRON Protocol](https://github.com/tronprotocol/Documentation/tree/master/English_Documentation/TRON_Protocol).
7+
+ If you want to know more about the SR information, vote, or token creation, please check out [TRON blockchain explorer](https://github.com/tronprotocol/Documentation/tree/master/English_Documentation/TRON_Blockchain_Explorer).
8+
+ If you want to know more about TRON Wallet, please check out [Android Wallet](https://github.com/tronprotocol/Documentation/blob/master/English_Documentation/Android_Wallet/Guide_to_Android_Wallet.md).
9+
+ If you want to know more about the programming contest, please check out [TRON programming contest](https://github.com/tronprotocol/Documentation/tree/master/English_Documentation/TRON_Programming_Contest).
10+
+ If you want to know more about the TRX migration, please check out [TRX](https://github.com/tronprotocol/Documentation/tree/master/TRX).
11+
+ For more information about Virtual Machine, please check out [TVM](https://github.com/tronprotocol/Documentation/blob/master/English_Documentation/TRON_Virtual_Machine/Virtual_Machine_Introduction.md).
12+
+ For latest process of TRON, please follow the [TRON documentation](https://github.com/tronprotocol/Documentation/tree/master/English_Documentation).
13+
14+
15+
16+
17+
18+
19+
# 文档
20+
21+
# 文档指引
22+
23+
+ 如果你想了解波场的发展进程以及最新动态,请查看[波场介绍](https://github.com/tronprotocol/Documentation/tree/master/中文文档/波场介绍)相关文档。
24+
+ 如果你想了解波场的相关技术协议,请查看[波场协议](https://github.com/tronprotocol/Documentation/tree/master/中文文档/波场协议)相关文档。
25+
+ 如果你想了解有关超级节点、投票和发行资产的相关信息,请查看[波场区块链浏览器](https://github.com/tronprotocol/Documentation/tree/master/中文文档/波场区块链浏览器介绍)
26+
+ 如果你想了解关于波场钱包的相关信息,请查看[Android钱包使用指导](https://github.com/tronprotocol/Documentation/blob/master/中文文档/Android钱包/Android钱包使用指导.md)
27+
+ 如果你想了解编程大赛,请查看[波场编程大赛](https://github.com/tronprotocol/Documentation/tree/master/中文文档/波场编程大赛)
28+
+ 如果你想了解波场TRX迁移,请查看[TRX](https://github.com/tronprotocol/Documentation/tree/master/TRX)相关文档。
29+
+ 对于波场虚拟机的更多信息,请查看[TVM](https://github.com/tronprotocol/Documentation/blob/master/English_Documentation/TRON_Virtual_Machine/Virtual_Machine_Introduction.md)相关文档。
30+
+ 对于波场发展的最新进展,请时刻关注[波场文档](https://github.com/tronprotocol/Documentation/tree/master/中文文档)
631

7-
* `mkdocs new [dir-name]` - Create a new project.
8-
* `mkdocs serve` - Start the live-reloading docs server.
9-
* `mkdocs build` - Build the documentation site.
10-
* `mkdocs help` - Print this help message.
1132

12-
## Project layout
1333

14-
mkdocs.yml # The configuration file.
15-
docs/
16-
index.md # The documentation homepage.
17-
... # Other markdown pages, images and other files.
47.1 KB
Loading

imags/Recharge_process.png

32.1 KB
Loading
56 KB
Loading

imags/Withdrawal_process.png

34.4 KB
Loading

imags/bandwidthRestoreEqn.gif

919 Bytes
Loading

imags/db_backup.png

915 KB
Loading

imags/db_engine.png

408 KB
Loading

imags/discovery_enable.png

28.6 KB
Loading

imags/genesis_block.png

198 KB
Loading

imags/ip_list.png

14.7 KB
Loading

imags/localwitness.jpg

116 KB
Loading

imags/need_sync_check.png

58.9 KB
Loading

imags/network.png

163 KB
Loading

imags/p2p_version.png

21.4 KB
Loading

imags/rocksdb_tuning_parameters.png

1.04 MB
Loading

imags/witness.png

49.1 KB
Loading

mkdocs.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ nav:
55
- TRON Http Api: Tron-http.md
66
- TRON RPC Api: Tron-rpc.md
77
- TRON Official Public Nodes: Official_Public_Node.md
8-
- TRON Virtual Mmachine: Tron-VM.md
8+
- TRON Virtual Machine: Tron-VM.md
9+
- TRON Deployment: SolidityNode&FullNode_Deployment.md
910
theme: readthedocs

0 commit comments

Comments
 (0)