Skip to content
This repository has been archived by the owner on Nov 5, 2023. It is now read-only.

Commit

Permalink
Merge pull request #32 from helium/madninja/spec_nonce
Browse files Browse the repository at this point in the history
Madninja/spec nonce
  • Loading branch information
madninja authored Jun 30, 2021
2 parents dac60a2 + f8a777f commit 65fa681
Show file tree
Hide file tree
Showing 9 changed files with 681 additions and 171 deletions.
6 changes: 3 additions & 3 deletions config/sys.config
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@
{validation_width, 3},
{honor_quick_sync, true},
{quick_sync_mode, blessed_snapshot},
{blessed_snapshot_block_height, 894241},
{blessed_snapshot_block_height, 900001},
{blessed_snapshot_block_hash,
<<135, 31, 51, 95, 65, 153, 230, 236, 113, 142, 25, 47, 41, 152, 76, 202, 66,
249, 43, 102, 174, 34, 134, 172, 240, 113, 193, 15, 0, 205, 114, 199>>},
<<228, 126, 211, 62, 153, 16, 6, 154, 130, 180, 132, 255, 106, 149, 127, 246,
203, 218, 21, 13, 3, 33, 141, 102, 240, 100, 196, 187, 162, 75, 195, 151>>},
{port, 44158},
{key, undefined},
{base_dir, "data"},
Expand Down
177 changes: 174 additions & 3 deletions docs/blockchain_node-reference.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@
<li class="nav-item">
<a class="nav-link" href="#oracle_price_get">oracle_price_get</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#pending_transaction_get">pending_transaction_get</a>
</li>
<li class="nav-item">
<a class="nav-link" href="#pending_transaction_status">pending_transaction_status</a>
</li>
Expand Down Expand Up @@ -511,6 +514,12 @@ <h5>Result</h5>
<td></td>
<td>The current nonce for the account</td>
</tr>
<tr>
<td>result.speculative_nonce</td>
<td>number</td>
<td></td>
<td>The larger of the maximum pending balance nonce or the current nonce.</td>
</tr>
<tr>
<td>result.dc_balance</td>
<td>number</td>
Expand All @@ -535,6 +544,12 @@ <h5>Result</h5>
<td></td>
<td>The current security token nonce for the account</td>
</tr>
<tr>
<td>result.sec_speculative_nonce</td>
<td>number</td>
<td></td>
<td>The larger of the maximum pending security nonce or the current security token nonce for the account</td>
</tr>
</table>
</div>

Expand All @@ -558,10 +573,12 @@ <h5>Response example</h5>
"address": "13Ya3s4k8dsbd1dey6dmiYbwk4Dk1MRFCi3RBQ7nwKnSZqnYoW5",
"balance": 1000,
"nonce": 3,
"speculative_nonce": 12,
"dc_balance": 0,
"dc_nonce": 0,
"sec_balance": 0,
"sec_nonce": 0
"sec_nonce": 0,
"sec_speculative_nonce": 0
}
}</pre>
</div>
Expand Down Expand Up @@ -874,6 +891,146 @@ <h5>Response example</h5>
"price": 131069500,
"height": 633936
}
}</pre>
</div>
</div>
</div>
</div>
</div>
<div class="card method" id="pending_transaction_get">
<div
class="card-header text-light bg-dark"
data-toggle="collapse"
href="#pending_transaction_get-content"
>
<h4>
<span>pending_transaction_get</span>

<div class="float-right">
<span class="badge badge-light">pending transactions</span>
</div>
</h4>
</div>

<div class="card-block collapse show" id="pending_transaction_get-content">
<p>Get a pending transaction.</p>

<p>Get the previously submitted transaction with status.</p>

<hr />

<div class="container-fluid">
<div class="row">
<div class="col-8 border-right">

<h5>Parameters</h5>
<div class="table-responsive">
<table class="table table-striped table-hover table-sm">
<tr>
<th>Name</th>
<th>Type</th>
<th>Constraints</th>
<th>Description</th>
</tr>
<tr>
<td>params</td>
<td>object</td>
<td></td>
<td></td>
</tr>
<tr>
<td>params.hash</td>
<td>string</td>
<td></td>
<td>B64 hash of the pending transaction to fetch</td>
</tr>
</table>
</div>

<h5>Result</h5>
<div class="table-responsive">
<table class="table table-striped table-hover table-sm">
<tr>
<th>Name</th>
<th>Type</th>
<th>Constraints</th>
<th>Description</th>
</tr>
<tr>
<td>result</td>
<td>object</td>
<td></td>
<td>Pending transaction details. The exact fields returned depend on the transaction type returned in the result. The tranaction will be absent if status is cleared or failed</td>
</tr>
<tr>
<td>result?.txn</td>
<td>object</td>
<td></td>
<td>Transaction details. The exact fields returned depend on the transaction type returned in the result.</td>
</tr>
<tr>
<td>result?.txn.hash</td>
<td>string</td>
<td></td>
<td>B64 hash of the transaction</td>
</tr>
<tr>
<td>result?.txn.type</td>
<td>string</td>
<td></td>
<td>The type of the transaction</td>
</tr>
<tr>
<td>result.status</td>
<td>string</td>
<td></td>
<td>One of pending, cleared or failed</td>
</tr>
<tr>
<td>result?.failed_reason</td>
<td>string</td>
<td></td>
<td>Present during failed status</td>
</tr>
</table>
</div>

<h5>Errors</h5>
<div class="table-responsive">
<table class="table table-striped table-hover table-sm">
<tr>
<th>Code</th>
<th>Message</th>
<th>Description</th>
</tr>
<tr>
<td>-100</td>
<td></td>
<td>Pending transaction not found</td>
</tr>
</table>
</div>

</div>

<div class="col-4">
<h5>Request example</h5>
<pre class="bg-light">{
"jsonrpc": "2.0",
"id": "1234567890",
"method": "pending_transaction_get",
"params": {
"hash": "xG-KdomBEdp4gTiJO1Riif92DoMd5hPxadcSci05pIs"
}
}</pre>

<h5>Response example</h5>
<pre class="bg-light">{
"jsonrpc": "2.0",
"id": "1234567890",
"result": {
"txn": {}
}
}</pre>
</div>
</div>
Expand Down Expand Up @@ -1729,6 +1886,12 @@ <h5>Parameters</h5>
<td></td>
<td>Amount in bones to send</td>
</tr>
<tr>
<td>params?.nonce</td>
<td>integer</td>
<td></td>
<td>Nonce to use for transaction</td>
</tr>
</table>
</div>

Expand Down Expand Up @@ -1789,7 +1952,8 @@ <h5>Request example</h5>
"params": {
"address": "13Ya3s4k8dsbd1dey6dmiYbwk4Dk1MRFCi3RBQ7nwKnSZqnYoW5",
"payee": "13buBykFQf5VaQtv7mWj2PBY9Lq4i1DeXhg7C4Vbu3ppzqqNkTH",
"bones": 1000
"bones": 1000,
"nonce": 422
}
}</pre>

Expand Down Expand Up @@ -1875,6 +2039,12 @@ <h5>Parameters</h5>
<td></td>
<td>Amount in bones to send</td>
</tr>
<tr>
<td>params?.bones</td>
<td>integer</td>
<td></td>
<td>Amount in bones to send</td>
</tr>
</table>
</div>

Expand Down Expand Up @@ -1935,7 +2105,8 @@ <h5>Request example</h5>
"params": {
"payments": [
{}
]
],
"bones": 1000
}
}</pre>

Expand Down
Loading

0 comments on commit 65fa681

Please sign in to comment.