Skip to content

Commit

Permalink
Merge pull request #403 from King31T/spellingNorm
Browse files Browse the repository at this point in the history
fix: Normalize the spelling of TRON and java-tron
  • Loading branch information
Benson0224 authored Jan 24, 2025
2 parents 98f3b1e + 934647c commit 6b8420d
Show file tree
Hide file tree
Showing 38 changed files with 210 additions and 210 deletions.
4 changes: 2 additions & 2 deletions docs/architecture/database.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Database configuration
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.
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.

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.
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.

# RocksDB

Expand Down
12 changes: 6 additions & 6 deletions docs/architecture/event.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

### TIP

The TIP: [TIP-12:Tron event subscribes model](https://github.com/tronprotocol/tips/blob/master/tip-12.md) .
The TIP: [TIP-12:TRON event subscribes model](https://github.com/tronprotocol/tips/blob/master/tip-12.md) .

### Event Type

Expand Down Expand Up @@ -98,21 +98,21 @@ contractTopics: contract topics list

#### Event query

Tron Event Query Service
TRON Event Query Service

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.

For more information of tron event subscribe model, please refer to [TIP-12](https://github.com/tronprotocol/TIPs/issues/12).
For more information of TRON event subscribe model, please refer to [TIP-12](https://github.com/tronprotocol/TIPs/issues/12).

- [Event query deployment](https://tronprotocol.github.io/documentation-en/developers/deployment/#event-subscribe-plugin-deployment)
- [Event query HTTP API](https://github.com/tronprotocol/documentation-en/tree/master/docs_without_index/plugin/event-query-http.md)


## Using Java-tron's Built-in Message Queue for Event Subscription
## Using java-tron's Built-in Message Queue for Event Subscription

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.
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.

This article will introduce how to subscribe to events through Java-tron's built-in message queue in detail.
This article will introduce how to subscribe to events through java-tron's built-in message queue in detail.


### Configure node
Expand Down
2 changes: 1 addition & 1 deletion docs/clients/tron-grid.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ TronGrid provides TRON clients running in the cloud, so you don't have to run on

TronGrid offers an easy to use hosted API, load balanced full nodes, secure and reliable developer tools with direct access to the TRON Network.

TronGrid uses a set of NodeJS apps to talk with Redis and PostgreSQL to provide a simple, fast and reliable query interface for the Tron API.
TronGrid uses a set of NodeJS apps to talk with Redis and PostgreSQL to provide a simple, fast and reliable query interface for the TRON API.

TronGrid supports 2 types of api:

Expand Down
6 changes: 3 additions & 3 deletions docs/clients/wallet-cli-command.md
Original file line number Diff line number Diff line change
Expand Up @@ -1884,9 +1884,9 @@ wallet> getproposal 34
### VoteWitness
Voting requires Tron Power, which can be obtained by freezing funds.
Voting requires TRON Power, which can be obtained by freezing funds.
```
wallet> votewitness [SR(Super Representatives) address] [Tron Power Amount]
wallet> votewitness [SR(Super Representatives) address] [TRON Power Amount]
```
* The share calculation method is: 1 unit of share can be obtained for every 1TRX frozen.
Expand All @@ -1896,7 +1896,7 @@ wallet> votewitness [SR(Super Representatives) address] [Tron Power Amount]
For example:
```shell
wallet> freezeBalance 100000000 3 1 address # Freeze 10TRX and acquire 10 units of Tron Power
wallet> freezeBalance 100000000 3 1 address # Freeze 10TRX and acquire 10 units of TRON Power
wallet> votewitness [SR1] 4 [SR2] 6 # Cast 4 votes for SR1 and 6 votes for SR2 at the same time
Expand Down
4 changes: 2 additions & 2 deletions docs/clients/wallet-cli.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

## What is Wallet-CLI?
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:
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:
![](https://i.imgur.com/NRKmZmE.png)

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.
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.

Install and run: [Wallet-Cli](https://github.com/tronprotocol/wallet-cli)

4 changes: 2 additions & 2 deletions docs/contracts/contract.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

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.

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.
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.

## Smart Contract Features
TRON virtual machine is based on Ethereum solidity language, it also has TRON's own features.
Expand Down Expand Up @@ -135,7 +135,7 @@ Ethereum VM address is 20 bytes, but TRON's VM address is 21 bytes.
Need to convert TRON's address while using in solidity (recommended):
```text
/**
* @dev convert uint256 (HexString add 0x at beginning) tron address to solidity address type
* @dev convert uint256 (HexString add 0x at beginning) TRON address to solidity address type
* @param tronAddress uint256 tronAddress, begin with 0x, followed by HexString
* @return Solidity address type
*/
Expand Down
16 changes: 8 additions & 8 deletions docs/contracts/tvm.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Currently, TVM is compatible with EVM and will be with more mainstream VMs in th
4. Developer-friendly

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.
The following interfaces are available in Tron Wallet-CLI:
The following interfaces are available in TRON Wallet-CLI:

+ deploycontract(password, contractAddress, ABI, code, data, value)
+ triggercontract(password, contractAddress, selector, data, value)
Expand All @@ -31,10 +31,10 @@ Developers can call these interfaces to deploy, trigger or check smart contracts

## How TVM Works

![Flowchart of Tron Virtual Machine](https://raw.githubusercontent.com/tronprotocol/documentation/master/images/Virtual_Machine/虚拟机.png)
![Flowchart of TRON Virtual Machine](https://raw.githubusercontent.com/tronprotocol/documentation/master/images/Virtual_Machine/虚拟机.png)

The above flowchart shows how TVM works:
Compilation of Tron smart contract→execution and computing engines of VM→Interoperation service layer for external interfaces.
Compilation of TRON smart contract→execution and computing engines of VM→Interoperation service layer for external interfaces.

Put simply, the flow is as follows:
+ Currently, TVM is compatible mainly with Solidity. The compiler translates Solidity smart contract into bytecode readable and executable on TVM.
Expand All @@ -44,15 +44,15 @@ Put simply, the flow is as follows:
## Future Development of TVM
1. More developer-friendly debugging tools

Tron will be committed to the development of optimized debugging tools and the establishment of standardized symbol and data format, for improved developer efficiency.
TRON will be committed to the development of optimized debugging tools and the establishment of standardized symbol and data format, for improved developer efficiency.

2. Fulfillment of diversified processing demands

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.

3. Improvement of Just-In-Time (JIT) compilation speed and integration of WebAssembly

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.
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.

## Usage Guide to TVM

Expand Down Expand Up @@ -82,9 +82,9 @@ pragma solidity^0.4.11;
3. Deploy contract

Wallet-cli-vm branch: [https://github.com/tronprotocol/wallet-cli/tree/wallet-cli-vm](https://github.com/tronprotocol/wallet-cli/tree/wallet-cli-vm)
Java-tron-vm branch: [https://github.com/tronprotocol/java-tron/tree/develop_vm](https://github.com/tronprotocol/java-tron/tree/develop_vm)
java-tron-vm branch: [https://github.com/tronprotocol/java-tron/tree/develop_vm](https://github.com/tronprotocol/java-tron/tree/develop_vm)
Password: password of client-end wallet
ContractAddress: customized contract address (in Tron’s required format)
ContractAddress: customized contract address (in TRON’s required format)
ABI: interface description
Data: parameters of the initial function
Value: reserved field
Expand All @@ -101,4 +101,4 @@ triggercontract(Password, ContractAddress, Selector, Data, Value)
getcontract(ContractAddress)
```

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.
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.
Loading

0 comments on commit 6b8420d

Please sign in to comment.