Skip to content

Commit

Permalink
Merge pull request #406 from King31T/bignumber_ipFix
Browse files Browse the repository at this point in the history
Fix: underline in big number and location of an IP
  • Loading branch information
Benson0224 authored Feb 6, 2025
2 parents 6071cfc + 184b211 commit 46f3bad
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 38 deletions.
48 changes: 24 additions & 24 deletions docs/introduction/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ Only the account of a super representative can create a proposal.
The network parameters can be modified([min,max]):

- 0: MAINTENANCE_TIME_INTERVAL, [3 * 27* 1000, 24 * 3600 * 1000] //super representative votes count time interval, currently 6 * 3600 * 1000 ms
- 1: ACCOUNT_UPGRADE_COST, [0, 100 000 000 000 000 000] //the fee to apply to become a super representative candidate, currently 9999_000_000 SUN
- 2: CREATE_ACCOUNT_FEE, [0, 100 000 000 000 000 000] //the fee to create an account, currently 100_000 SUN
- 3: TRANSACTION_FEE, [0, 100 000 000 000 000 000] //the fee for bandwidth, currently 1_000 SUN/byte
- 4: ASSET_ISSUE_FEE, [0, 100 000 000 000 000 000] //the fee to issue an asset, currently 1024_000_000 SUN
- 5: WITNESS_PAY_PER_BLOCK, [0, 100 000 000 000 000 000] //the block producing reward, currently 32_000_000 SUN
- 6: WITNESS_STANDBY_ALLOWANCE, [0, 100 000 000 000 000 000] //the votes reward for top 127 super representative candidates, currently 115_200_000_000 SUN
- 7: CREATE_NEW_ACCOUNT_FEE_IN_SYSTEM_CONTRACT, //the fee to create an account in system, currently 1_000_000 SUN
- 1: ACCOUNT_UPGRADE_COST, [0, 100 000 000 000 000 000] //the fee to apply to become a super representative candidate, currently 9,999,000,000 SUN
- 2: CREATE_ACCOUNT_FEE, [0, 100 000 000 000 000 000] //the fee to create an account, currently 100,000 SUN
- 3: TRANSACTION_FEE, [0, 100 000 000 000 000 000] //the fee for bandwidth, currently 1,000 SUN/byte
- 4: ASSET_ISSUE_FEE, [0, 100 000 000 000 000 000] //the fee to issue an asset, currently 1,024,000,000 SUN
- 5: WITNESS_PAY_PER_BLOCK, [0, 100 000 000 000 000 000] //the block producing reward, currently 32,000,000 SUN
- 6: WITNESS_STANDBY_ALLOWANCE, [0, 100 000 000 000 000 000] //the votes reward for top 127 super representative candidates, currently 115,200,000,000 SUN
- 7: CREATE_NEW_ACCOUNT_FEE_IN_SYSTEM_CONTRACT, //the fee to create an account in system, currently 1,000,000 SUN
- 8: CREATE_NEW_ACCOUNT_BANDWIDTH_RATE, //the consumption of bandwidth or TRX while creating an account, using together with #7
- 9: ALLOW_CREATION_OF_CONTRACTS, //to enable the VM
- 10: REMOVE_THE_POWER_OF_THE_GR, //to clear the votes of GR
Expand All @@ -84,7 +84,7 @@ id: the serial number (0 ~ 18)
value: the parameter value
```

Note: In TRON network, 1 TRX = 1000_000 SUN
Note: In TRON network, 1 TRX = 1,000,000 SUN

### 2.4.3 Vote for a Proposal

Expand Down Expand Up @@ -562,21 +562,21 @@ Example (Using wallet-cli):
freezeBalanceV2 frozen_balance [ResourceCode:0 BANDWIDTH,1 ENERGY]
```

Stake TRX to get energy, energy obtained = user's TRX staked amount / total amount of staked TRX in TRON * 50_000_000_000.
Stake TRX to get energy, energy obtained = user's TRX staked amount / total amount of staked TRX in TRON * 50,000,000,000.

Example:

```text
If there are only two users, A stakes 2 TRX, B stakes 2 TRX
the energy they can get is:
A: 25_000_000_000 and energy_limit is 25_000_000_000
B: 25_000_000_000 and energy_limit is 25_000_000_000
A: 25,000,000,000 and energy_limit is 25,000,000,000
B: 25,000,000,000 and energy_limit is 25,000,000,000
when C stakes 1 TRX:
the energy they can get is:
A: 20_000_000_000 and energy_limit is 20_000_000_000
B: 20_000_000_000 and energy_limit is 20_000_000_000
B: 10_000_000_000 and energy_limit is 10_000_000_000
A: 20,000,000,000 and energy_limit is 20,000,000,000
B: 20,000,000,000 and energy_limit is 20,000,000,000
C: 10,000,000,000 and energy_limit is 10,000,000,000
```

** Energy Recovery **
Expand All @@ -586,9 +586,9 @@ The energy consumed will reduce to 0 smoothly within 24 hours.
Example:

```text
at one moment, A has used 72_000_000 Energy
at one moment, A has used 72,000,000 Energy
if there is no continuous consumption or TRX stake
one hour later, the energy consumption amount will be 72_000_000 - (72_000_000 * (60*60/60*60*24)) Energy = 69_000_000 Energy
one hour later, the energy consumption amount will be 72,000,000 - (72,000,000 * (60*60/60*60*24)) Energy = 69,000,000 Energy
24 hours later, the energy consumption amount will be 0 Energy
```

Expand Down Expand Up @@ -629,16 +629,16 @@ Assume developer undertake 90% energy consumption, and developer has enough ener

Then the way to estimate the fee limit is:
```
1). A = 20000 energy * (1 TRX / 400 energy) = 50 TRX = 50_000_000 SUN,
1). A = 20000 energy * (1 TRX / 400 energy) = 50 TRX = 50,000,000 SUN,
2). B = 20000 energy * (1 TRX / 10000 energy) = 2 TRX = 2_000_000 SUN,
2). B = 20000 energy * (1 TRX / 10000 energy) = 2 TRX = 2,000,000 SUN,
3). Take the greater number of A and B, which is 50_000_000 SUN,
3). Take the greater number of A and B, which is 50,000,000 SUN,
4). Developer undertakes 90% energy consumption, caller undertakes 10% energy consumption,
```

So, the caller is suggested to set fee limit to 50_000_000 SUN * 10% = 5_000_000 SUN
So, the caller is suggested to set fee limit to 50,000,000 SUN * 10% = 5,000,000 SUN

Note:
```
Expand Down Expand Up @@ -970,7 +970,7 @@ Note: Due to the change of the total amount of the staked TRX in the network and

## 8.2.1 How to Get Bandwidth Points

1. By staking TRX to get Bandwidth Points, Bandwidth Points = the amount of TRX self-staked / the total amount of TRX staked for Bandwidth Points in the network * 43_200_000_000
1. By staking TRX to get Bandwidth Points, Bandwidth Points = the amount of TRX self-staked / the total amount of TRX staked for Bandwidth Points in the network * 43,200,000,000

2. Every account has a fixed amount of free Bandwidth Points every day, it is defined in #61 network parameter, user can check the value on tronscan(https://tronscan.org/#/sr/committee).

Expand All @@ -990,15 +990,15 @@ Bandwidth points consumption sequence for TRC-10 transfer:

3. Bandwidth points TRX staking.

4. Bandwidth points obtained by TRX burning, the rate = the number of bytes of the transaction * 1_000 SUN;
4. Bandwidth points obtained by TRX burning, the rate = the number of bytes of the transaction * 1,000 SUN;

Bandwidth points consumption sequence for other transactions:

1. Free Bandwidth points.

2. Bandwidth points TRX staking.

3. Bandwidth points obtained by TRX burning, the rate = the number of bytes of the transaction * 1_000 SUN;
3. Bandwidth points obtained by TRX burning, the rate = the number of bytes of the transaction * 1,000 SUN;

### 8.2.3 Bandwidth Points Recovery
Every 24 hours, the amount of the usage of Bandwidth points of an account will be reset to 0. For the specific formula:
Expand Down Expand Up @@ -1077,7 +1077,7 @@ The token price is determined by the ratio of the balance of the two tokens.
### 9.6.3 Calculate the Amount of Token You Can Get
sellTokenQuant is the amount of the first_token you want to sell;
buyTokenQuant is the amount of second_token you can get;
supply = 1_000_000_000_000_000_000L;
supply = 1,000,000,000,000,000,000L;
supplyQuant = -supply * (1.0 - Math.pow(1.0 + (double) sellTokenQuant/(firstTokenBalance + sellTokenQuant, 0.0005));
buyTokenQuant = (long)balance * (Math.pow(1.0 + (double) supplyQuant / supply, 2000.0) - 1.0);

Expand Down
2 changes: 1 addition & 1 deletion docs/mechanism-algorithm/dex.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ The token price is determined by the ratio of the balance of the two tokens.
`buyTokenQuant` is the amount of `second_token` you can get.

```java
supply = 1_000_000_000_000_000_000L
supply = 1,000,000,000,000,000,000L

supplyQuant = -supply * (1.0 - Math.pow(1.0 + (double) sellTokenQuant/(firstTokenBalance + sellTokenQuant, 0.0005))

Expand Down
22 changes: 11 additions & 11 deletions docs/mechanism-algorithm/resource.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Such as if the number of bytes of a transaction is 200, so this transaction cons

### 1. How to Get Bandwidth Points

1. By staking TRX to get Bandwidth Points, Bandwidth Points = the amount of TRX self-staked / the total amount of TRX staked for Bandwidth Points in the network * 43_200_000_000
1. By staking TRX to get Bandwidth Points, Bandwidth Points = the amount of TRX self-staked / the total amount of TRX staked for Bandwidth Points in the network * 43,200,000,000
2. Every account has a fixed amount of free Bandwidth Points(600) every day

### 2. Bandwidth Points Consumption
Expand All @@ -39,15 +39,15 @@ Bandwidth points consumption sequence for TRC-10 transfer:

3. Bandwidth points TRX staking.

4. Bandwidth points obtained by TRX burning, the rate = the number of bytes of the transaction * 1_000 SUN;
4. Bandwidth points obtained by TRX burning, the rate = the number of bytes of the transaction * 1,000 SUN;

Bandwidth points consumption sequence for other transactions:

1. Free Bandwidth points.

2. Bandwidth points TRX staking.

3. Bandwidth points obtained by TRX burning, the rate = the number of bytes of the transaction * 1_000 SUN;
3. Bandwidth points obtained by TRX burning, the rate = the number of bytes of the transaction * 1,000 SUN;

### 3. Bandwidth Points Recovery

Expand Down Expand Up @@ -79,21 +79,21 @@ Example (Using wallet-cli):
freezeBalanceV2 frozen_balance [ResourceCode:0 BANDWIDTH,1 ENERGY]
```

stake TRX to get energy, energy obtained = user's TRX staked amount / total amount of staked TRX in TRON * 180_000_000_000.
stake TRX to get energy, energy obtained = user's TRX staked amount / total amount of staked TRX in TRON * 180,000,000,000.

Example:

```text
If there are only two users, A stakes 2 TRX, B stakes 2 TRX
the energy they can get is:
A: 75_000_000_000 and energy_limit is 90_000_000_000
B: 75_000_000_000 and energy_limit is 90_000_000_000
A: 75,000,000,000 and energy_limit is 90,000,000,000
B: 75,000,000,000 and energy_limit is 90,000,000,000
when C stakes 1 TRX:
the energy they can get is:
A: 60_000_000_000 and energy_limit is 72_000_000_000
B: 60_000_000_000 and energy_limit is 72_000_000_000
C: 30_000_000_000 and energy_limit is 36_000_000_000
A: 60,000,000,000 and energy_limit is 72,000,000,000
B: 60,000,000,000 and energy_limit is 72,000,000,000
C: 30,000,000,000 and energy_limit is 36,000,000,000
```
#### Energy Consumption

Expand Down Expand Up @@ -150,10 +150,10 @@ Assume developer undertake 90% energy consumption, and developer has enough ener

Then the way to estimate the fee limit is:

1. A = 20000 energy * 210sun = 4_200_000 sun = 4.2 trx
1. A = 20000 energy * 210sun = 4,200,000 sun = 4.2 trx
2. Developer undertakes 90% energy consumption, caller undertakes 10% energy consumption,

So, the caller is suggested to set fee limit to 4_200_000 sun * 10% = 420_000 sun.
So, the caller is suggested to set fee limit to 4,200,000 sun * 10% = 420,000 sun.

### 3. Energy Calculation (Developer Must Read)

Expand Down
2 changes: 1 addition & 1 deletion docs/releases/history.md
Original file line number Diff line number Diff line change
Expand Up @@ -2146,7 +2146,7 @@ After this upgrade, TRON will be fully compatible with the new features introduc
###2、Make MAX_FEE_LIMIT configurable as a chain property.
After the new version, SR and SRP can initiate a voting request to modify MAX_FEE_LIMIT. The range of MAX_FEE_LIMIT is [0,10000_000_000].
After the new version, SR and SRP can initiate a voting request to modify MAX_FEE_LIMIT. The range of MAX_FEE_LIMIT is [0,10000000000].
- TIP: [TIP-204](https://github.com/tronprotocol/tips/issues/204)
- Source code: [#3534](https://github.com/tronprotocol/java-tron/pull/3534)
Expand Down
2 changes: 1 addition & 1 deletion docs/using_javatron/backup_restore.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ The following table shows the download address of Fullnode data snapshots. Pleas
| -------- | -------- | -------- |
| Official data source (North America: Virginia) | http://34.86.86.229/ | LevelDB, exclude internal transactions (About 1821G on 6 Aug. 2024) |
| Official data source (Singapore) | http://34.143.247.77/ | LevelDB, exclude internal transactions (About 1819G on 5 Aug. 2024) |
| Official data source (Singapore) | http://35.197.17.205/ | RocksDB, exclude internal transactions (About 1799G on 6 Aug. 2024) |
| Official data source (North America: America) | http://35.197.17.205/ | RocksDB, exclude internal transactions (About 1799G on 6 Aug. 2024) |
| Official data source (Singapore) | http://35.247.128.170/ | LevelDB, include internal transactions (About 2000G on 6 Aug. 2024) |
| Official data source ((North America: Virginia)) | http://34.48.6.163/ | LevelDB, exclude internal transactions, include account history TRX balance (About 2288G on 6 Aug. 2024) |

Expand Down

0 comments on commit 46f3bad

Please sign in to comment.