mirror of
https://github.com/seigler/dash-docs
synced 2025-07-27 09:46:12 +00:00
* 824: Dev Docs: Update For New 'generate' RPC * 830: Link "quantum computing" in FAQ to related Bitcoin Magazine article
This commit is contained in:
commit
224127f2f0
10 changed files with 90 additions and 3 deletions
|
@ -209,6 +209,8 @@ CVE-2012-2459:
|
||||||
'`estimatefee` RPC': rpc estimatefee
|
'`estimatefee` RPC': rpc estimatefee
|
||||||
'`estimatepriority`': rpc estimatepriority
|
'`estimatepriority`': rpc estimatepriority
|
||||||
'`estimatepriority` RPC': rpc estimatepriority
|
'`estimatepriority` RPC': rpc estimatepriority
|
||||||
|
'`generate`': rpc generate
|
||||||
|
'`generate` RPC': rpc generate
|
||||||
'`getaccount`': rpc getaccount
|
'`getaccount`': rpc getaccount
|
||||||
'`getaccount` RPC': rpc getaccount
|
'`getaccount` RPC': rpc getaccount
|
||||||
'`getaccountaddress`': rpc getaccountaddress
|
'`getaccountaddress`': rpc getaccountaddress
|
||||||
|
|
|
@ -64,12 +64,16 @@ Start `bitcoind` in regtest mode to create a private block chain.
|
||||||
{% endautocrossref %}
|
{% endautocrossref %}
|
||||||
|
|
||||||
~~~
|
~~~
|
||||||
|
## Bitcoin Core 0.10.1 and earlier
|
||||||
bitcoin-cli -regtest setgenerate true 101
|
bitcoin-cli -regtest setgenerate true 101
|
||||||
|
|
||||||
|
## Bitcoin Core master (as of commit 48265f3)
|
||||||
|
bitcoin-cli -regtest generate 101
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
{% autocrossref %}
|
{% autocrossref %}
|
||||||
|
|
||||||
Generate 101 blocks using a special version of the `setgenerate` RPC
|
Generate 101 blocks using a special RPC
|
||||||
which is only available in regtest mode. This takes about 30 seconds on
|
which is only available in regtest mode. This takes about 30 seconds on
|
||||||
a generic PC. Because this is a new block chain using Bitcoin's default
|
a generic PC. Because this is a new block chain using Bitcoin's default
|
||||||
rules, the first blocks pay a block reward of 50 bitcoins. Unlike
|
rules, the first blocks pay a block reward of 50 bitcoins. Unlike
|
||||||
|
|
|
@ -115,8 +115,12 @@ someone else, that second transaction would not be displayed in our
|
||||||
list of UTXOs.
|
list of UTXOs.
|
||||||
|
|
||||||
{% highlight bash %}
|
{% highlight bash %}
|
||||||
|
## Bitcoin Core 0.10.1 and earlier
|
||||||
> bitcoin-cli -regtest setgenerate true 1
|
> bitcoin-cli -regtest setgenerate true 1
|
||||||
|
|
||||||
|
## Later versions of Bitcoin Core
|
||||||
|
> bitcoin-cli -regtest generate 1
|
||||||
|
|
||||||
> unset NEW_ADDRESS
|
> unset NEW_ADDRESS
|
||||||
{% endhighlight %}
|
{% endhighlight %}
|
||||||
|
|
||||||
|
@ -332,8 +336,12 @@ would usually then broadcast it to other peers, but we're not currently
|
||||||
connected to other peers because we started in regtest mode.
|
connected to other peers because we started in regtest mode.
|
||||||
|
|
||||||
{% highlight bash %}
|
{% highlight bash %}
|
||||||
|
## Bitcoin Core 0.10.1 and earlier
|
||||||
> bitcoin-cli -regtest setgenerate true 1
|
> bitcoin-cli -regtest setgenerate true 1
|
||||||
|
|
||||||
|
## Later versions of Bitcoin Core
|
||||||
|
> bitcoin-cli -regtest generate 1
|
||||||
|
|
||||||
> unset UTXO_TXID UTXO_VOUT NEW_ADDRESS RAW_TX SIGNED_RAW_TX
|
> unset UTXO_TXID UTXO_VOUT NEW_ADDRESS RAW_TX SIGNED_RAW_TX
|
||||||
{% endhighlight %}
|
{% endhighlight %}
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,7 @@ This file is licensed under the terms of its source texts{%endcomment%}
|
||||||
{% 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_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_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 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." %}
|
||||||
|
{% assign summary_generate="nearly instantly generates blocks (in regtest mode only)" %}
|
||||||
{% assign summary_getAccountAddress="returns the current Bitcoin address for receiving payments to this account. If the account doesn't exist, it creates both the account and a new address for receiving payment. Once a payment has been received to an address, future calls to this RPC for the same account will return a different address." %}
|
{% assign summary_getAccountAddress="returns the current Bitcoin address for receiving payments to this account. If the account doesn't exist, it creates both the account and a new address for receiving payment. Once a payment has been received to an address, future calls to this RPC for the same account will return a different address." %}
|
||||||
{% assign summary_getAccount="returns the name of the account associated with the given address." %}
|
{% assign summary_getAccount="returns the name of the account associated with the given address." %}
|
||||||
{% assign summary_getAddedNodeInfo="returns information about the given added node, or all added nodes (except onetry nodes). Only nodes which have been manually added using the `addnode` RPC will have their information displayed." %}
|
{% assign summary_getAddedNodeInfo="returns information about the given added node, or all added nodes (except onetry nodes). Only nodes which have been manually added using the `addnode` RPC will have their information displayed." %}
|
||||||
|
|
|
@ -17,6 +17,7 @@ Use v0.n.n in abbreviation title to prevent autocrossrefing.
|
||||||
{% endcomment %}
|
{% endcomment %}
|
||||||
|
|
||||||
<!-- master -->
|
<!-- master -->
|
||||||
|
{% assign NEW_MASTER='**<abbr title="New in Bitcoin Core’s master branch (unreleased)">New in master</abbr>**' %}
|
||||||
{% assign UPDATED_MASTER='**<abbr title="Updated in Bitcoin Core’s master branch (unreleased)">Updated in master</abbr>**' %}
|
{% assign UPDATED_MASTER='**<abbr title="Updated in Bitcoin Core’s master branch (unreleased)">Updated in master</abbr>**' %}
|
||||||
|
|
||||||
<!-- Bitcoin Core 0.10.0 expected January 2015 -->
|
<!-- Bitcoin Core 0.10.0 expected January 2015 -->
|
||||||
|
@ -76,8 +77,9 @@ Use v0.n.n in abbreviation title to prevent autocrossrefing.
|
||||||
|
|
||||||
{% autocrossref %}
|
{% autocrossref %}
|
||||||
|
|
||||||
|
* [Generate][rpc generate]: {{summary_generate}} {{NEW_MASTER}}
|
||||||
* [GetGenerate][rpc getgenerate]: {{summary_getGenerate}}
|
* [GetGenerate][rpc getgenerate]: {{summary_getGenerate}}
|
||||||
* [SetGenerate][rpc setgenerate]: {{summary_setGenerate}}
|
* [SetGenerate][rpc setgenerate]: {{summary_setGenerate}} {{UPDATED_MASTER}}
|
||||||
|
|
||||||
{% endautocrossref %}
|
{% endautocrossref %}
|
||||||
|
|
||||||
|
|
64
_includes/ref/bitcoin-core/rpcs/rpcs/generate.md
Normal file
64
_includes/ref/bitcoin-core/rpcs/rpcs/generate.md
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
{% comment %}
|
||||||
|
This file is licensed under the MIT License (MIT) available on
|
||||||
|
http://opensource.org/licenses/MIT.
|
||||||
|
{% endcomment %}
|
||||||
|
{% assign filename="_includes/ref/bitcoin-core/rpcs/rpcs/generate.md" %}
|
||||||
|
|
||||||
|
##### Generate
|
||||||
|
{% include helpers/subhead-links.md %}
|
||||||
|
|
||||||
|
{% assign summary_generate="nearly instantly generates blocks (in regtest mode only)" %}
|
||||||
|
|
||||||
|
{% autocrossref %}
|
||||||
|
|
||||||
|
*Requires wallet support.*
|
||||||
|
|
||||||
|
The `generate` RPC {{summary_generate}}
|
||||||
|
|
||||||
|
*Parameter #1---the number of blocks to generate*
|
||||||
|
|
||||||
|
{% itemplate ntpd1 %}
|
||||||
|
- n: "Blocks"
|
||||||
|
t: "number (int)"
|
||||||
|
p: "Required<br>(exactly 1)"
|
||||||
|
d: "The number of blocks to generate. The RPC call will not return until all blocks have been generated"
|
||||||
|
{% enditemplate %}
|
||||||
|
|
||||||
|
*Result---the generated block header hashes*
|
||||||
|
|
||||||
|
{% itemplate ntpd1 %}
|
||||||
|
- n: "`result`"
|
||||||
|
t: "array"
|
||||||
|
p: "Required<br>(exactly 1)"
|
||||||
|
d: "An array containing the block header hashes of the generated blocks (may be empty if used with `generate 0`)"
|
||||||
|
|
||||||
|
- n: "→<br>Header Hashes"
|
||||||
|
t: "string (hex)"
|
||||||
|
p: "Required<br>(1 or more)"
|
||||||
|
d: "The hashes of the headers of the blocks generated in regtest mode, as hex in RPC byte order"
|
||||||
|
{% enditemplate %}
|
||||||
|
|
||||||
|
*Examples from Bitcoin Core master (commit c2fa0846)*
|
||||||
|
|
||||||
|
Using regtest mode, generate 2 blocks:
|
||||||
|
|
||||||
|
{% highlight bash %}
|
||||||
|
bitcoin-cli -regtest generate 2
|
||||||
|
{% endhighlight %}
|
||||||
|
|
||||||
|
Result:
|
||||||
|
|
||||||
|
{% highlight json %}
|
||||||
|
[
|
||||||
|
"36252b5852a5921bdfca8701f936b39edeb1f8c39fffe73b0d8437921401f9af",
|
||||||
|
"5f2956817db1e386759aa5794285977c70596b39ea093b9eab0aa4ba8cd50c06"
|
||||||
|
]
|
||||||
|
{% endhighlight %}
|
||||||
|
|
||||||
|
*See also*
|
||||||
|
|
||||||
|
* [SetGenerate][rpc getgenerate]: {{summary_getGenerate}}
|
||||||
|
* [GetMiningInfo][rpc getmininginfo]: {{summary_getMiningInfo}}
|
||||||
|
* [GetBlockTemplate][rpc getblocktemplate]: {{summary_getBlockTemplate}}
|
||||||
|
|
||||||
|
{% endautocrossref %}
|
|
@ -37,6 +37,9 @@ The `setgenerate` RPC {{summary_setGenerate}}
|
||||||
|
|
||||||
*Parameter #2 (regtest)---the number of blocks to generate*
|
*Parameter #2 (regtest)---the number of blocks to generate*
|
||||||
|
|
||||||
|
Note: setgenerate in regtest mode has been removed in Bitcoin Core
|
||||||
|
master. See the `generate` RPC for the replacement.
|
||||||
|
|
||||||
{% itemplate ntpd1 %}
|
{% itemplate ntpd1 %}
|
||||||
- n: "Blocks"
|
- n: "Blocks"
|
||||||
t: "number (int)"
|
t: "number (int)"
|
||||||
|
|
|
@ -84,6 +84,7 @@ http://opensource.org/licenses/MIT.
|
||||||
[rpc encryptwallet]: /en/developer-reference#encryptwallet
|
[rpc encryptwallet]: /en/developer-reference#encryptwallet
|
||||||
[rpc estimatefee]: /en/developer-reference#estimatefee
|
[rpc estimatefee]: /en/developer-reference#estimatefee
|
||||||
[rpc estimatepriority]: /en/developer-reference#estimatepriority
|
[rpc estimatepriority]: /en/developer-reference#estimatepriority
|
||||||
|
[rpc generate]: /en/developer-reference#generate
|
||||||
[rpc getaccount]: /en/developer-reference#getaccount
|
[rpc getaccount]: /en/developer-reference#getaccount
|
||||||
[rpc getaccountaddress]: /en/developer-reference#getaccountaddress
|
[rpc getaccountaddress]: /en/developer-reference#getaccountaddress
|
||||||
[rpc getaddednodeinfo]: /en/developer-reference#getaddednodeinfo
|
[rpc getaddednodeinfo]: /en/developer-reference#getaddednodeinfo
|
||||||
|
|
|
@ -383,7 +383,7 @@ en:
|
||||||
colludetxt1: "It is not possible to change the Bitcoin protocol that easily. Any Bitcoin client that doesn't comply with the same rules cannot enforce their own rules on other users. As per the current specification, double spending is not possible on the same block chain, and neither is spending bitcoins without a valid signature. Therefore, It is not possible to generate uncontrolled amounts of bitcoins out of thin air, spend other users' funds, corrupt the network, or anything similar."
|
colludetxt1: "It is not possible to change the Bitcoin protocol that easily. Any Bitcoin client that doesn't comply with the same rules cannot enforce their own rules on other users. As per the current specification, double spending is not possible on the same block chain, and neither is spending bitcoins without a valid signature. Therefore, It is not possible to generate uncontrolled amounts of bitcoins out of thin air, spend other users' funds, corrupt the network, or anything similar."
|
||||||
colludetxt2: "However, powerful miners could arbitrarily choose to block or reverse recent transactions. A majority of users can also put pressure for some changes to be adopted. Because Bitcoin only works correctly with a complete consensus between all users, changing the protocol can be very difficult and requires an overwhelming majority of users to adopt the changes in such a way that remaining users have nearly no choice but to follow. As a general rule, it is hard to imagine why any Bitcoin user would choose to adopt any change that could compromise their own money."
|
colludetxt2: "However, powerful miners could arbitrarily choose to block or reverse recent transactions. A majority of users can also put pressure for some changes to be adopted. Because Bitcoin only works correctly with a complete consensus between all users, changing the protocol can be very difficult and requires an overwhelming majority of users to adopt the changes in such a way that remaining users have nearly no choice but to follow. As a general rule, it is hard to imagine why any Bitcoin user would choose to adopt any change that could compromise their own money."
|
||||||
quantum: "Is Bitcoin vulnerable to quantum computing?"
|
quantum: "Is Bitcoin vulnerable to quantum computing?"
|
||||||
quantumtxt1: "Yes, most systems relying on cryptography in general are, including traditional banking systems. However, quantum computers don't yet exist and probably won't for a while. In the event that quantum computing could be an imminent threat to Bitcoin, the protocol could be upgraded to use post-quantum algorithms. Given the importance that this update would have, it can be safely expected that it would be highly reviewed by developers and adopted by all Bitcoin users."
|
quantumtxt1: "Yes, most systems relying on cryptography in general are, including traditional banking systems. However, quantum computers don't yet exist and probably won't for a while. In the event that <a href=\"https://bitcoinmagazine.com/6021/bitcoin-is-not-quantum-safe-and-how-we-can-fix/\">quantum computing</a> could be an imminent threat to Bitcoin, the protocol could be upgraded to use post-quantum algorithms. Given the importance that this update would have, it can be safely expected that it would be highly reviewed by developers and adopted by all Bitcoin users."
|
||||||
help: "Help"
|
help: "Help"
|
||||||
morehelp: "I'd like to learn more. Where can I get help?"
|
morehelp: "I'd like to learn more. Where can I get help?"
|
||||||
morehelptxt1: "You can find more information and help on the <a href=\"#resources#\">resources</a> and <a href=\"#community#\">community</a> pages or on the <a href=\"https://en.bitcoin.it/wiki/FAQ\">Wiki FAQ</a>."
|
morehelptxt1: "You can find more information and help on the <a href=\"#resources#\">resources</a> and <a href=\"#community#\">community</a> pages or on the <a href=\"https://en.bitcoin.it/wiki/FAQ\">Wiki FAQ</a>."
|
||||||
|
|
|
@ -83,6 +83,8 @@ untrusted source.
|
||||||
|
|
||||||
{% include ref/bitcoin-core/rpcs/rpcs/estimatepriority.md %}
|
{% include ref/bitcoin-core/rpcs/rpcs/estimatepriority.md %}
|
||||||
|
|
||||||
|
{% include ref/bitcoin-core/rpcs/rpcs/generate.md %}
|
||||||
|
|
||||||
{% include ref/bitcoin-core/rpcs/rpcs/getaccountaddress.md %}
|
{% include ref/bitcoin-core/rpcs/rpcs/getaccountaddress.md %}
|
||||||
|
|
||||||
{% include ref/bitcoin-core/rpcs/rpcs/getaccount.md %}
|
{% include ref/bitcoin-core/rpcs/rpcs/getaccount.md %}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue