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: docs/architecture/database.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
# Database configuration
2
-
Java-tron data storage supports LevelDB or RocksDB, and LevelDB is used by default. You can also choose RocksDB, which provides lots of configuration parameters, allowing nodes to be tuned according to their own machine configuration. The node database occupies less disk space than LevelDB. At the same time, RocksDB supports data backup during runtime, and the backup time only takes a few seconds.
2
+
java-tron data storage supports LevelDB or RocksDB, and LevelDB is used by default. You can also choose RocksDB, which provides lots of configuration parameters, allowing nodes to be tuned according to their own machine configuration. The node database occupies less disk space than LevelDB. At the same time, RocksDB supports data backup during runtime, and the backup time only takes a few seconds.
3
3
4
-
The following describes how to set the storage engine of the Java-tron node to RocksDB, and how to perform data conversion between leveldb and rocksdb.
4
+
The following describes how to set the storage engine of the java-tron node to RocksDB, and how to perform data conversion between leveldb and rocksdb.
Copy file name to clipboardExpand all lines: docs/architecture/event.md
+6-6Lines changed: 6 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
5
5
### TIP
6
6
7
-
The TIP: [TIP-12:Tron event subscribes model](https://github.com/tronprotocol/tips/blob/master/tip-12.md) .
7
+
The TIP: [TIP-12:TRON event subscribes model](https://github.com/tronprotocol/tips/blob/master/tip-12.md) .
8
8
9
9
### Event Type
10
10
@@ -98,21 +98,21 @@ contractTopics: contract topics list
98
98
99
99
#### Event query
100
100
101
-
Tron Event Query Service
101
+
TRON Event Query Service
102
102
103
103
TronEventQuery is implemented with Tron's new event subscribe model. It uses same query interface with Tron-Grid. Users can also subscribe block trigger, transaction trigger, contract log trigger, and contract event trigger. TronEvent is independent of a particular branch of java-tron, the new event subscribes model will be released on version 3.5 of java-tron.
104
104
105
-
For more information of tron event subscribe model, please refer to [TIP-12](https://github.com/tronprotocol/TIPs/issues/12).
105
+
For more information of TRON event subscribe model, please refer to [TIP-12](https://github.com/tronprotocol/TIPs/issues/12).
## Using Java-tron's Built-in Message Queue for Event Subscription
111
+
## Using java-tron's Built-in Message Queue for Event Subscription
112
112
113
-
TRON provides event subscription service. Developers can not only obtain on-chain events through event plugin, but also through [Java-tron’s built-in ZeroMQ message queue](https://github.com/tronprotocol/tips/blob/master/tip-28.md). The difference is that event plugin needs to be additionally deployed, which is used to implement event storage: developers can choose appropriate storage tools according to their needs, such as MongoDB, Kafka, etc., and the plugin help complete the storage of subscribed events. Java-tron's built-in ZeroMQ does not require additional deployment operations. Event subscribers can directly connect to the publisher's ip and port, set subscription topics, and receive subscribed events. However, this method does not provide event storage. Therefore, when developers want to subscribe to events directly from nodes for a short period of time, then using the built-in message queue will be a more appropriate choice.
113
+
TRON provides event subscription service. Developers can not only obtain on-chain events through event plugin, but also through [java-tron’s built-in ZeroMQ message queue](https://github.com/tronprotocol/tips/blob/master/tip-28.md). The difference is that event plugin needs to be additionally deployed, which is used to implement event storage: developers can choose appropriate storage tools according to their needs, such as MongoDB, Kafka, etc., and the plugin help complete the storage of subscribed events. java-tron's built-in ZeroMQ does not require additional deployment operations. Event subscribers can directly connect to the publisher's ip and port, set subscription topics, and receive subscribed events. However, this method does not provide event storage. Therefore, when developers want to subscribe to events directly from nodes for a short period of time, then using the built-in message queue will be a more appropriate choice.
114
114
115
-
This article will introduce how to subscribe to events through Java-tron's built-in message queue in detail.
115
+
This article will introduce how to subscribe to events through java-tron's built-in message queue in detail.
Wallet-Cli is an interactive command-line wallet that supports the TRON network for signing and broadcasting transactions in a secure local environment, as well as access to on-chain data. Wallet-Cli supports key management, you can import the private key into the wallet, Wallet-Cli will encrypt your private key with a symmetric encryption algorithm and store it in a keystore file. Wallet-Cli does not store on-chain data locally. It uses gRPC to communicate with a Java-tron node. You need to configure the Java-tron node to be linked in the configuration file. The following figure shows the process of the use of Wallet-Cli to sign and broadcast when transferring TRX:
3
+
Wallet-Cli is an interactive command-line wallet that supports the TRON network for signing and broadcasting transactions in a secure local environment, as well as access to on-chain data. Wallet-Cli supports key management, you can import the private key into the wallet, Wallet-Cli will encrypt your private key with a symmetric encryption algorithm and store it in a keystore file. Wallet-Cli does not store on-chain data locally. It uses gRPC to communicate with a java-tron node. You need to configure the java-tron node to be linked in the configuration file. The following figure shows the process of the use of Wallet-Cli to sign and broadcast when transferring TRX:
4
4

5
5
6
-
The user first runs the `Login` command to unlock the wallet, and then runs the `SendCoin` command to send TRX, Wallet-Cli will build and sign the transaction locally, and then call the BroadcastTransaction gRPC API of the Java-tron node to broadcast the transaction to the network. After the broadcast is successful, the Java-tron node will return the transaction hash to Wallet-Cli, and Wallet-Cli will display the transaction hash to the user.
6
+
The user first runs the `Login` command to unlock the wallet, and then runs the `SendCoin` command to send TRX, Wallet-Cli will build and sign the transaction locally, and then call the BroadcastTransaction gRPC API of the java-tron node to broadcast the transaction to the network. After the broadcast is successful, the java-tron node will return the transaction hash to Wallet-Cli, and Wallet-Cli will display the transaction hash to the user.
7
7
8
8
Install and run: [Wallet-Cli](https://github.com/tronprotocol/wallet-cli)
Copy file name to clipboardExpand all lines: docs/contracts/contract.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
5
5
Smart contract is a computerized transaction protocol that automatically implements its terms. Smart contract is the same as common contract, they all define the terms and rules related to the participants. Once the contract is started, it can runs in the way it is designed.
6
6
7
-
TRON smart contract support Solidity language in (Ethereum). You can find the latest solidity version in the [Tron solidity repository](https://github.com/tronprotocol/solidity/releases). Write a smart contract, then build the smart contract and deploy it to TRON network. When the smart contract is triggered, the corresponding function will be executed automatically.
7
+
TRON smart contract support Solidity language in (Ethereum). You can find the latest solidity version in the [TRON solidity repository](https://github.com/tronprotocol/solidity/releases). Write a smart contract, then build the smart contract and deploy it to TRON network. When the smart contract is triggered, the corresponding function will be executed automatically.
8
8
9
9
## Smart Contract Features
10
10
TRON virtual machine is based on Ethereum solidity language, it also has TRON's own features.
@@ -135,7 +135,7 @@ Ethereum VM address is 20 bytes, but TRON's VM address is 21 bytes.
135
135
Need to convert TRON's address while using in solidity (recommended):
136
136
```text
137
137
/**
138
-
* @dev convert uint256 (HexString add 0x at beginning) tron address to solidity address type
138
+
* @dev convert uint256 (HexString add 0x at beginning) TRON address to solidity address type
139
139
* @param tronAddress uint256 tronAddress, begin with 0x, followed by HexString
Copy file name to clipboardExpand all lines: docs/contracts/tvm.md
+8-8Lines changed: 8 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -22,7 +22,7 @@ Currently, TVM is compatible with EVM and will be with more mainstream VMs in th
22
22
4. Developer-friendly
23
23
24
24
Thanks to TVM’s bandwidth setup, developments costs are reduced and developers can focus on the logic of their contract code. TVM also offers all-in-one interfaces for contract deployment, triggering and viewing, for the convenience of developers.
25
-
The following interfaces are available in Tron Wallet-CLI:
25
+
The following interfaces are available in TRON Wallet-CLI:
@@ -31,10 +31,10 @@ Developers can call these interfaces to deploy, trigger or check smart contracts
31
31
32
32
## How TVM Works
33
33
34
-

34
+

35
35
36
36
The above flowchart shows how TVM works:
37
-
Compilation of Tron smart contract→execution and computing engines of VM→Interoperation service layer for external interfaces.
37
+
Compilation of TRON smart contract→execution and computing engines of VM→Interoperation service layer for external interfaces.
38
38
39
39
Put simply, the flow is as follows:
40
40
+ Currently, TVM is compatible mainly with Solidity. The compiler translates Solidity smart contract into bytecode readable and executable on TVM.
@@ -44,15 +44,15 @@ Put simply, the flow is as follows:
44
44
## Future Development of TVM
45
45
1. More developer-friendly debugging tools
46
46
47
-
Tron will be committed to the development of optimized debugging tools and the establishment of standardized symbol and data format, for improved developer efficiency.
47
+
TRON will be committed to the development of optimized debugging tools and the establishment of standardized symbol and data format, for improved developer efficiency.
48
48
49
49
2. Fulfillment of diversified processing demands
50
50
51
51
Different from gas consumption mechanism for every transaction on EVM, there is no charge on TVM. Each operation only occupies bandwidth, which will be released within a certain amount of time after completion of transaction. It takes developers very little to develop smart contracts with more complex logic. It is our belief that besides being used for digital asset transactions, smart contracts could also be suitably applied to areas such as game development, financial risk modeling and scientific computing. The design of TVM inherently supports multi-scenario tasks, and further optimizations of processing speed, response time, and floating point compatibility.
52
52
53
53
3. Improvement of Just-In-Time (JIT) compilation speed and integration of WebAssembly
54
54
55
-
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.
55
+
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.
The above is an introduction of Tron Virtual Machine and a guide to deployment. We welcome everyone to check out TVM and give us your thoughts and suggestions. We will continue to perfect and update TVM for optimal performance on TRON mainnet.
104
+
The above is an introduction of TRON Virtual Machine and a guide to deployment. We welcome everyone to check out TVM and give us your thoughts and suggestions. We will continue to perfect and update TVM for optimal performance on TRON mainnet.
0 commit comments