RPCs (Utility)

- Update Priority/fee related RPCs
This commit is contained in:
thephez 2017-11-02 12:27:57 -04:00
parent b85d023be3
commit 96684f8644
10 changed files with 194 additions and 17 deletions

View file

@ -218,8 +218,8 @@ These RPCs are all Dash-specific and not found in Bitcoin Core
* [CreateMultiSig][rpc createmultisig]: {{summary_createMultiSig}}
* [EstimateFee][rpc estimatefee]: {{summary_estimateFee}}
* [EstimatePriority][rpc estimatepriority]: {{summary_estimatePriority}}
* [EstimateSmartFee][rpc estimatesmartfee]: {{summary_estimateSmartFee}} {{DEPRECATED}}
* [EstimateSmartPriority][rpc estimatesmartpriority]: {{summary_estimateSmartPriority}} {{DEPRECATED}}
* [EstimateSmartFee][rpc estimatesmartfee]: {{summary_estimateSmartFee}} {{DEPRECATED}}
* [EstimateSmartPriority][rpc estimatesmartpriority]: {{summary_estimateSmartPriority}} {{DEPRECATED}}
* [ValidateAddress][rpc validateaddress]: {{summary_validateAddress}} {{UPDATED0_13_0}}
* [VerifyMessage][rpc verifymessage]: {{summary_verifyMessage}}

View file

@ -7,7 +7,7 @@ http://opensource.org/licenses/MIT.
##### EstimateFee
{% include helpers/subhead-links.md %}
{% assign summary_estimateFee="estimates the transaction fee per kilobyte that needs to be paid for a transaction to be included within a certain number of blocks." %}
{% assign summary_estimateFee="estimates the transaction fee per kilobyte that needs to be paid for a transaction to begin confirmation within a certain number of blocks." %}
{% autocrossref %}
@ -19,7 +19,7 @@ The `estimatefee` RPC {{summary_estimateFee}}
- n: "Blocks"
t: "number (int)"
p: "Required<br>(exactly 1)"
d: "The maximum number of blocks a transaction should have to wait before it is predicted to be included in a block. Has to be between 2 and 25 blocks"
d: "The maximum number of blocks a transaction should have to wait before it is predicted to be included in a block. Has to be between 1 and 25 blocks"
{% enditemplate %}
@ -27,28 +27,28 @@ The `estimatefee` RPC {{summary_estimateFee}}
{% itemplate ntpd1 %}
- n: "`result`"
t: "number (bitcoins)"
t: "number (Dash)"
p: "Required<br>(exactly 1)"
d: "The estimated fee the transaction should pay in order to be included within the specified number of blocks. If the node doesn't have enough information to make an estimate, the value `-1` will be returned"
{% enditemplate %}
*Examples from Bitcoin Core 0.14.1*
*Examples from Dash Core 0.12.2*
{% highlight bash %}
bitcoin-cli estimatefee 6
dash-cli estimatefee 6
{% endhighlight %}
Result:
{% highlight json %}
0.00162556
0.00044345
{% endhighlight %}
Requesting data the node can't calculate (out of range):
{% highlight bash %}
bitcoin-cli estimatefee 100
dash-cli estimatefee 100
{% endhighlight %}
Result:

View file

@ -9,13 +9,13 @@ http://opensource.org/licenses/MIT.
{% autocrossref %}
{% assign summary_estimatePriority="estimates the priority (coin age) that a transaction needs in order to be included within a certain number of blocks as a free high-priority transaction." %}
{% assign summary_estimatePriority="estimates the priority that a transaction needs in order to be included within a certain number of blocks as a free high-priority transaction." %}
*Added in Bitcoin Core 0.10.0.*
The `estimatepriority` RPC {{summary_estimatePriority}} This should not to be confused with the `prioritisetransaction` RPC which will remain supported for adding fee deltas to transactions.
{{WARNING}} `estimatepriority` has been [removed](https://github.com/bitcoin/bitcoin/commit/fe282acd7604b5265762b24e531bdf1ebb1f009b) and will no longer be available in the next major release (planned for Bitcoin Core 0.15.0). Use the RPC listed in the "See Also" subsection below instead.
{{WARNING}} `estimatepriority` has been [removed from Bitcoin](https://github.com/bitcoin/bitcoin/commit/fe282acd7604b5265762b24e531bdf1ebb1f009b) and will no longer be available in the next major release (planned for Bitcoin Core 0.15.0). Still present in Dash Core.
Transaction priority is relative to a transaction's byte size.
@ -39,10 +39,10 @@ Transaction priority is relative to a transaction's byte size.
{% enditemplate %}
*Examples from Bitcoin Core 0.10.0*
*Examples from Dash Core 0.12.2*
{% highlight bash %}
bitcoin-cli estimatepriority 6
dash-cli estimatepriority 6
{% endhighlight %}
Result:
@ -54,13 +54,13 @@ Result:
Requesting data the node can't calculate yet:
{% highlight bash %}
bitcoin-cli estimatepriority 100
dash-cli estimatepriority 100
{% endhighlight %}
Result:
{% highlight json %}
-1.00000000
-1
{% endhighlight %}
*See also*

View file

@ -0,0 +1,79 @@
{% comment %}
This file is licensed under the MIT License (MIT) available on
http://opensource.org/licenses/MIT.
{% endcomment %}
{% assign filename="_includes/devdoc/dash-core/rpcs/rpcs/estimatesmartfee.md" %}
##### EstimateSmartFee
{% include helpers/subhead-links.md %}
{% assign summary_estimateSmartFee="estimates the transaction fee per kilobyte that needs to be paid for a transaction to begin confirmation within a certain number of blocks and returns the number of blocks for which the estimate is valid." %}
{% autocrossref %}
The `estimatesmartfee` RPC {{summary_estimateSmartFee}}
*Parameter #1---how many blocks the transaction may wait before being included*
{% itemplate ntpd1 %}
- n: "Blocks"
t: "number (int)"
p: "Required<br>(exactly 1)"
d: "The maximum number of blocks a transaction should have to wait before it is predicted to be included in a block. Has to be between 1 and 25 blocks"
{% enditemplate %}
*Result---the fee the transaction needs to pay per kilobyte*
{% itemplate ntpd1 %}
- n: "`result`"
t: "object"
p: "Required<br>(exactly 1)"
d: "JSON Object containing estimate information"
- n: "→<br>`feerate`"
t: "number (Dash)"
p: "Required<br>(exactly 1)"
d: "The estimated fee the transaction should pay in order to be included within the specified number of blocks. If the node doesn't have enough information to make an estimate, the value `-1` will be returned"
- n: "→<br>`blocks`"
t: "number"
p: "Required<br>(exactly 1)"
d: "Block number where the estimate was found"
{% enditemplate %}
*Examples from Dash Core 0.12.2*
{% highlight bash %}
dash-cli estimatesmartfee 6
{% endhighlight %}
Result:
{% highlight json %}
{
"feerate": 0.00044345,
"blocks": 6
}
{% endhighlight %}
Requesting data the node can't calculate (out of range):
{% highlight bash %}
dash-cli estimatesmartfee 100
{% endhighlight %}
Result:
{% highlight json %}
{
"feerate": -1,
"blocks": 100
}
{% endhighlight %}
*See also*
* [SetTxFee][rpc settxfee]: {{summary_setTxFee}}
{% endautocrossref %}

View file

@ -0,0 +1,84 @@
{% comment %}
This file is licensed under the MIT License (MIT) available on
http://opensource.org/licenses/MIT.
{% endcomment %}
{% assign filename="_includes/devdoc/dash-core/rpcs/rpcs/estimatesmartpriority.md" %}
##### EstimateSmartPriority
{% include helpers/subhead-links.md %}
{% autocrossref %}
{% assign summary_estimateSmartPriority="estimates the priority that a transaction needs in order to be included within a certain number of blocks as a free high-priority transaction and returns the number of blocks for which the estimate is valid." %}
The `estimatesmartpriority` RPC {{summary_estimateSmartPriority}} This should not to be confused with the `prioritisetransaction` RPC which will remain supported for adding fee deltas to transactions.
{{WARNING}} `estimatesmartpriority` has been [removed from Bitcoin](https://github.com/bitcoin/bitcoin/commit/fe282acd7604b5265762b24e531bdf1ebb1f009b) and will no longer be available in the next major release (planned for Bitcoin Core 0.15.0). While still present in Dash Core, the interface should be considered unstable and may disappear or change. Use the RPC listed in the "See Also" subsection below instead.
Transaction priority is relative to a transaction's byte size.
*Parameter #1---how many blocks the transaction may wait before being included as a free high-priority transaction*
{% itemplate ntpd1 %}
- n: "Blocks"
t: "number (int)"
p: "Required<br>(exactly 1)"
d: "The maximum number of blocks a transaction should have to wait before it is predicted to be included in a block based purely on its priority"
{% enditemplate %}
*Result---the priority a transaction needs*
{% itemplate ntpd1 %}
- n: "`result`"
t: "object"
p: "Required<br>(exactly 1)"
d: "JSON Object containing estimate information"
- n: "→<br>`priority`"
t: "number"
p: "Required<br>(exactly 1)"
d: "The estimated priority the transaction should be in order to be included within the specified number of blocks. If the node doesn't have enough information to make an estimate, the value `-1` will be returned"
- n: "→<br>`blocks`"
t: "number"
p: "Required<br>(exactly 1)"
d: "Block number where the estimate was found"
{% enditemplate %}
*Examples from Dash Core 0.12.2*
{% highlight bash %}
dash-cli estimatesmartpriority 6
{% endhighlight %}
Result:
{% highlight json %}
{
"priority": 718158904
"blocks": 25
}
{% endhighlight %}
Requesting data the node can't calculate yet:
{% highlight bash %}
dash-cli estimatesmartpriority 100
{% endhighlight %}
Result:
{% highlight json %}
{
"priority": -1,
"blocks": 100
}
{% endhighlight %}
*See also*
* [EstimatePriority][rpc estimatepriority]: {{summary_estimatePriority}}
{% endautocrossref %}

View file

@ -16,8 +16,10 @@ This file is licensed under the terms of its source texts{%endcomment%}
{% assign summary_dumpPrivKey="returns the wallet-import-format (WIP) private key corresponding to an address. (But does not remove it from the wallet.)" %}
{% assign summary_dumpWallet="creates or overwrites a file with all wallet keys in a human-readable format." %}
{% assign summary_encryptWallet="encrypts the wallet with a passphrase. This is only to enable encryption for the first time. After encryption is enabled, you will need to enter the passphrase to use private keys." %}
{% assign summary_estimateFee="estimates the transaction fee per kilobyte that needs to be paid for a transaction to be included within a certain number of blocks." %}
{% assign summary_estimatePriority="estimates the priority (coin age) that a transaction needs in order to be included within a certain number of blocks as a free high-priority transaction." %}
{% assign summary_estimateFee="estimates the transaction fee per kilobyte that needs to be paid for a transaction to begin confirmation within a certain number of blocks." %}
{% assign summary_estimatePriority="estimates the priority that a transaction needs in order to be included within a certain number of blocks as a free high-priority transaction." %}
{% assign summary_estimateSmartFee="estimates the transaction fee per kilobyte that needs to be paid for a transaction to begin confirmation within a certain number of blocks and returns the number of blocks for which the estimate is valid." %}
{% assign summary_estimateSmartPriority="estimates the priority that a transaction needs in order to be included within a certain number of blocks as a free high-priority transaction and returns the number of blocks for which the estimate is valid." %}
{% assign summary_fundRawTransaction="adds inputs to a transaction until it has enough in value to meet its out value." %}
{% assign summary_gObject="provides a set of commands for managing governance objects and displaying information about them." %}
{% assign summary_gObjectCheck="." %}

View file

@ -101,6 +101,8 @@ http://opensource.org/licenses/MIT.
[rpc encryptwallet]: /en/developer-reference#encryptwallet
[rpc estimatefee]: /en/developer-reference#estimatefee
[rpc estimatepriority]: /en/developer-reference#estimatepriority
[rpc estimatesmartfee]: /en/developer-reference#estimatesmartfee
[rpc estimatesmartpriority]: /en/developer-reference#estimatesmartpriority
[rpc fundrawtransaction]: /en/developer-reference#fundrawtransaction
[rpc generate]: /en/developer-reference#generate
[rpc generatetoaddress]: /en/developer-reference#generatetoaddress