From 6c783c9a7901572905b4d9e5bb7cd1348d07f6b4 Mon Sep 17 00:00:00 2001 From: Will Binns Date: Mon, 13 Apr 2020 11:50:59 -0600 Subject: [PATCH 01/59] hero: Update CTA --- _theme/hero.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_theme/hero.html b/_theme/hero.html index 6dec665..7812c47 100644 --- a/_theme/hero.html +++ b/_theme/hero.html @@ -1,7 +1,7 @@

Welcome

-

Understand Bitcoin and start building Bitcoin-based applications.

+

Learn Bitcoin and start building Bitcoin-based applications.

{{ toctree(maxdepth=1, collapse=False, includehidden=False) }}
From 4ebbf5c6193fd1227eb63e296379b1d63ad38a4a Mon Sep 17 00:00:00 2001 From: Will Binns Date: Mon, 13 Apr 2020 12:21:29 -0600 Subject: [PATCH 02/59] theme: Update open graph image --- _theme/layout.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_theme/layout.html b/_theme/layout.html index 6bda1d1..4b62569 100644 --- a/_theme/layout.html +++ b/_theme/layout.html @@ -11,7 +11,7 @@ - + @@ -130,4 +130,4 @@
-{%- endblock %} \ No newline at end of file +{%- endblock %} From 04cd87a7cfaebf30e38e71cd0e0ed55f213d456d Mon Sep 17 00:00:00 2001 From: Will Binns Date: Mon, 13 Apr 2020 15:02:34 -0600 Subject: [PATCH 03/59] index: Remove redundant 'Welcome' string --- index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.rst b/index.rst index 08eae1d..766a911 100644 --- a/index.rst +++ b/index.rst @@ -1,4 +1,4 @@ -Welcome +Getting Started ======== The site aims to provide the information you need to understand From 83d3a094a2366d28600bf5da3c06f76e392fd8b2 Mon Sep 17 00:00:00 2001 From: alexcherman Date: Tue, 14 Apr 2020 18:47:35 +0200 Subject: [PATCH 04/59] Fix logo size on mobile --- _theme/static/sphinxbootstrap4.css_t | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/_theme/static/sphinxbootstrap4.css_t b/_theme/static/sphinxbootstrap4.css_t index 559abd9..db37e4e 100644 --- a/_theme/static/sphinxbootstrap4.css_t +++ b/_theme/static/sphinxbootstrap4.css_t @@ -946,7 +946,9 @@ blockquote { font-size: 12px; } .logo-light { - width: 270px + width: 270px; + max-width: 220px; + height: 27px; } .footer-logo { margin-bottom: 30px; From 2c1bf61e178ac4a23d60e34da0eeea96ac839d0f Mon Sep 17 00:00:00 2001 From: alexcherman Date: Tue, 14 Apr 2020 18:47:58 +0200 Subject: [PATCH 05/59] Fix breadcrumbs layout on mobile --- _theme/breadcrumb.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_theme/breadcrumb.html b/_theme/breadcrumb.html index fdeae50..66742b1 100644 --- a/_theme/breadcrumb.html +++ b/_theme/breadcrumb.html @@ -1,6 +1,6 @@ - \ No newline at end of file + From 1d21308cb54654adad3acf3414a2be286f698e63 Mon Sep 17 00:00:00 2001 From: Will Binns Date: Sun, 17 May 2020 19:11:58 +0200 Subject: [PATCH 10/59] conf: Update copyright --- conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf.py b/conf.py index 4578ca6..ae8f159 100644 --- a/conf.py +++ b/conf.py @@ -19,7 +19,7 @@ # -- Project information ----------------------------------------------------- project = u'Bitcoin' -copyright = u'Bitcoin Project 2009-2019' +copyright = u'Bitcoin Project 2009-2020' author = u'Bitcoin Developer Documentation' # The short X.Y version From ae446095f4dc3db794b800fe89e90747c5ae9fbe Mon Sep 17 00:00:00 2001 From: Will Binns Date: Sun, 17 May 2020 22:35:19 +0200 Subject: [PATCH 11/59] README: Update with additional information to guide new contributors --- README.md | 67 ++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 54 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 4d2e904..ef934f3 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,25 @@ -# Bitcoin Developer Documentation +# Welcome to developer.bitcoin.org's codebase + +Live site: [developer.bitcoin.org](https://developer.bitcoin.org) + +Report problems or help improve the site by opening a [new +issue](https://github.com/bitcoin-dot-org/developer.bitcoin.org/issues) or [pull +request](https://github.com/bitcoin-dot-org/developer.bitcoin.org/compare). + +## How to contribute This repo hosts the sources for the Bitcoin developer documentation. -It is an experimental port of the documentation hosted at [bitcoin.org](https://bitcoin.org/en/developer-documentation) ([sources](https://github.com/bitcoin-dot-org/bitcoin.org)), converted from Markdown to [reStructuredText (RST)](http://docutils.sourceforge.net/rst.html) and rendered with [Sphinx](http://www.sphinx-doc.org). +It is an experimental port of the documentation hosted at +[bitcoin.org](https://bitcoin.org/en/developer-documentation) +([sources](https://github.com/bitcoin-dot-org/bitcoin.org)), converted from +Markdown to [reStructuredText (RST)](http://docutils.sourceforge.net/rst.html) +and rendered with [Sphinx](http://www.sphinx-doc.org). -## Render the documentation locally +### Render the documentation locally -To render the documentation locally you first need to install Sphinx and the required theme modules, e.g. by running +To render the documentation locally you first need to install Sphinx and the +required theme modules, e.g. by running pip install -r requirements.txt @@ -14,22 +27,50 @@ from the root of this repo. Then you can execute Sphinx by calling make html -This will generate HTML from the RST sources in the directory `_build/html`. It's all static HTML so you can just open the index.html file in your browser locally to view the rendered documentation. +This will generate HTML from the RST sources in the directory `_build/html`. +It's all static HTML so you can just open the index.html file in your browser +locally to view the rendered documentation. -## Import from bitcoin.org +### Import from bitcoin.org -The RST is generated from the original Markdown sources from bitcoin.org using a helper script, which resides in the [helpers](helpers) directory. Run the script by calling +The RST is generated from the original Markdown sources from bitcoin.org using a +helper script, which resides in the [helpers](helpers) directory. Run the script +by calling helpers/import-docs -with the path to a local checkout of [bitcoin-dot-org/bitcoin.org](https://github.com/bitcoin-dot-org/bitcoin.org) as argument. This will regenerate the RST files based on the content from the bitcoin.org repository. +with the path to a local checkout of +[bitcoin-dot-org/bitcoin.org](https://github.com/bitcoin-dot-org/bitcoin.org) as +argument. This will regenerate the RST files based on the content from the +bitcoin.org repository. + +This is a temporary mechanism to port the documentation to RST. Once the import +is in a good shape and the original information is captured correctly in the +converted files, the RST files will become the original source, and the import +is not needed anymore. There is a +[milestone](https://github.com/bitcoin-documentation/website/milestone/1) to +track the necessary work to be done before detaching from the Markdown sources. + +### Generation of RPC docs + +The documentation of the RPC commands is automatically generated from the help +of a bitcoin client with another [helper +tool](https://github.com/cornelius/rpc-docs-helper). This is the content in the +[reference/rpc](reference/rpc) directory. Changes in these files need to be done +through the helper tool or at least backported to the helper tool after doing +them in this repo. + +## Code of Conduct -This is a temporary mechanism to port the documentation to RST. Once the import is in a good shape and the original information is captured correctly in the converted files, the RST files will become the original source, and the import is not needed anymore. There is a [milestone](https://github.com/bitcoin-documentation/website/milestone/1) to track the necessary work to be done before detaching from the Markdown sources. +Participation in this project is subject to a [Code of +Conduct](https://github.com/bitcoin-dot-org/developer.bitcoin.org/blob/master/CODE_OF_CONDUCT.md). -## Generation of RPC docs +## Donations -The documentation of the RPC commands is automatically generated from the help of a bitcoin client with another [helper tool](https://github.com/cornelius/rpc-docs-helper). This is the content in the [reference/rpc](reference/rpc) directory. Changes in these files need to be done through the helper tool or at least backported to the helper tool after doing them in this repo. +This project, developer.bitcoin.org, is community supported: +[3FkenCiXpSLqD8L79intRNXUgjRoH9sjXa](bitcoin:3FkenCiXpSLqD8L79intRNXUgjRoH9sjXa) -## License +## Questions? -The content of this repo is licensed under the [MIT license](LICENSE). +Please contact Will Binns ([will@bitcoin.org](mailto:will@bitcoin.org)) if you +need help. From 053e7132baef3e4c0b5171ba92888f4fa338d57b Mon Sep 17 00:00:00 2001 From: Will Binns Date: Sun, 17 May 2020 22:37:21 +0200 Subject: [PATCH 12/59] README: Update intro to contributing --- README.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index ef934f3..3d4d67d 100644 --- a/README.md +++ b/README.md @@ -10,11 +10,9 @@ request](https://github.com/bitcoin-dot-org/developer.bitcoin.org/compare). This repo hosts the sources for the Bitcoin developer documentation. -It is an experimental port of the documentation hosted at -[bitcoin.org](https://bitcoin.org/en/developer-documentation) -([sources](https://github.com/bitcoin-dot-org/bitcoin.org)), converted from -Markdown to [reStructuredText (RST)](http://docutils.sourceforge.net/rst.html) -and rendered with [Sphinx](http://www.sphinx-doc.org). +It is converted from Markdown to [reStructuredText +(RST)](http://docutils.sourceforge.net/rst.html) and rendered with +[Sphinx](http://www.sphinx-doc.org). ### Render the documentation locally From 33c5b93a0f5f71e6e7ee7faec2ba192c8175af53 Mon Sep 17 00:00:00 2001 From: Will Binns Date: Sun, 17 May 2020 22:38:26 +0200 Subject: [PATCH 13/59] README: Drop import instructions for main site --- README.md | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/README.md b/README.md index 3d4d67d..434e59c 100644 --- a/README.md +++ b/README.md @@ -29,26 +29,6 @@ This will generate HTML from the RST sources in the directory `_build/html`. It's all static HTML so you can just open the index.html file in your browser locally to view the rendered documentation. -### Import from bitcoin.org - -The RST is generated from the original Markdown sources from bitcoin.org using a -helper script, which resides in the [helpers](helpers) directory. Run the script -by calling - - helpers/import-docs - -with the path to a local checkout of -[bitcoin-dot-org/bitcoin.org](https://github.com/bitcoin-dot-org/bitcoin.org) as -argument. This will regenerate the RST files based on the content from the -bitcoin.org repository. - -This is a temporary mechanism to port the documentation to RST. Once the import -is in a good shape and the original information is captured correctly in the -converted files, the RST files will become the original source, and the import -is not needed anymore. There is a -[milestone](https://github.com/bitcoin-documentation/website/milestone/1) to -track the necessary work to be done before detaching from the Markdown sources. - ### Generation of RPC docs The documentation of the RPC commands is automatically generated from the help From 5eb66264306bc8cfb1d18870436479f9bb4faef0 Mon Sep 17 00:00:00 2001 From: Will Binns Date: Sun, 17 May 2020 22:41:28 +0200 Subject: [PATCH 14/59] README: Clarify use of helper tool --- README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 434e59c..244cec8 100644 --- a/README.md +++ b/README.md @@ -32,11 +32,11 @@ locally to view the rendered documentation. ### Generation of RPC docs The documentation of the RPC commands is automatically generated from the help -of a bitcoin client with another [helper -tool](https://github.com/cornelius/rpc-docs-helper). This is the content in the -[reference/rpc](reference/rpc) directory. Changes in these files need to be done -through the helper tool or at least backported to the helper tool after doing -them in this repo. +of a bitcoin client with a [helper +tool](https://github.com/bitcoin-dot-org/developer.bitcoin.org/tree/master/helpers/rpc). +This is the content in the [reference/rpc](reference/rpc) directory. Changes in +these files need to be done through the helper tool or at least backported to +the helper tool after doing them in this repo. ## Code of Conduct From 1f035c6a4a70ac7dec5850eb15651b583f3871d8 Mon Sep 17 00:00:00 2001 From: Will Binns Date: Sun, 17 May 2020 22:46:02 +0200 Subject: [PATCH 15/59] LICENSE: Update to match bitcoin.org --- LICENSE | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/LICENSE b/LICENSE index 3509b0d..59c4050 100644 --- a/LICENSE +++ b/LICENSE @@ -1,5 +1,4 @@ -Copyright (c) 2009-2019 Bitcoin.org -Copyright (c) 2019 Bitcoin Developer Documentation +Copyright (c) 2019-2020 developer.bitcoin.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal From 51817fc1ea0bc1ad90987143bd9441419f59f467 Mon Sep 17 00:00:00 2001 From: Will Binns Date: Sun, 17 May 2020 22:48:59 +0200 Subject: [PATCH 16/59] CODE_OF_CONDUCT: Add doc --- CODE_OF_CONDUCT.md | 76 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 CODE_OF_CONDUCT.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..1238f71 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,76 @@ +# Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of +experience, nationality, personal appearance, race, religion, or sexual identity +and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers and contributors are responsible for clarifying the +standards of acceptable behavior and are expected to take appropriate and fair +corrective action in response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, or to ban temporarily or permanently any +contributor for other behaviors that they deem inappropriate, threatening, +offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting Will Binns at . All complaints will be +reviewed and investigated and will result in a response that is deemed necessary +and appropriate to the circumstances. The project team is obligated to maintain +confidentiality with regard to the reporter of an incident. + +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 1.4, available at [http://contributor-covenant.org/version/1/4][version]. + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ + From bb44a9759243466453fcf8477f4b39e4c39d2b73 Mon Sep 17 00:00:00 2001 From: Will Binns Date: Sun, 17 May 2020 22:49:10 +0200 Subject: [PATCH 17/59] CONTRIBUTING: Add doc --- CONTRIBUTING.md | 54 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..244cec8 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,54 @@ +# Welcome to developer.bitcoin.org's codebase + +Live site: [developer.bitcoin.org](https://developer.bitcoin.org) + +Report problems or help improve the site by opening a [new +issue](https://github.com/bitcoin-dot-org/developer.bitcoin.org/issues) or [pull +request](https://github.com/bitcoin-dot-org/developer.bitcoin.org/compare). + +## How to contribute + +This repo hosts the sources for the Bitcoin developer documentation. + +It is converted from Markdown to [reStructuredText +(RST)](http://docutils.sourceforge.net/rst.html) and rendered with +[Sphinx](http://www.sphinx-doc.org). + +### Render the documentation locally + +To render the documentation locally you first need to install Sphinx and the +required theme modules, e.g. by running + + pip install -r requirements.txt + +from the root of this repo. Then you can execute Sphinx by calling + + make html + +This will generate HTML from the RST sources in the directory `_build/html`. +It's all static HTML so you can just open the index.html file in your browser +locally to view the rendered documentation. + +### Generation of RPC docs + +The documentation of the RPC commands is automatically generated from the help +of a bitcoin client with a [helper +tool](https://github.com/bitcoin-dot-org/developer.bitcoin.org/tree/master/helpers/rpc). +This is the content in the [reference/rpc](reference/rpc) directory. Changes in +these files need to be done through the helper tool or at least backported to +the helper tool after doing them in this repo. + +## Code of Conduct + +Participation in this project is subject to a [Code of +Conduct](https://github.com/bitcoin-dot-org/developer.bitcoin.org/blob/master/CODE_OF_CONDUCT.md). + +## Donations + +This project, developer.bitcoin.org, is community supported: +[3FkenCiXpSLqD8L79intRNXUgjRoH9sjXa](bitcoin:3FkenCiXpSLqD8L79intRNXUgjRoH9sjXa) + +## Questions? + +Please contact Will Binns ([will@bitcoin.org](mailto:will@bitcoin.org)) if you +need help. From 89d538a27c92ab682f74558c8d9ec9acf2ff57a3 Mon Sep 17 00:00:00 2001 From: Will Binns Date: Sun, 17 May 2020 22:55:44 +0200 Subject: [PATCH 18/59] COPYING: Add doc --- COPYING | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 COPYING diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..0622f9f --- /dev/null +++ b/COPYING @@ -0,0 +1,5 @@ +The intellectual property rights in the files are owned by the respective +authors. Some of the files can be licensed under MIT License (MIT) available on +http://opensource.org/licenses/MIT or other licenses. Appropriate licensing +information can be found in the header of the file or in the folder containing +the file. From 7c77916db71f9ab5cf5c05cd17e5095fb6765562 Mon Sep 17 00:00:00 2001 From: Will Binns Date: Sun, 17 May 2020 23:21:03 +0200 Subject: [PATCH 19/59] README: Additional text tweaks to contributing section --- README.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 244cec8..40fd491 100644 --- a/README.md +++ b/README.md @@ -8,11 +8,13 @@ request](https://github.com/bitcoin-dot-org/developer.bitcoin.org/compare). ## How to contribute -This repo hosts the sources for the Bitcoin developer documentation. +This repo hosts the sources for the Bitcoin developer documentation. One of the +easiest ways to get started contributing is by rereading the site and looking for +inconsistencies in terminology, style, etc., and also in any illustrations. -It is converted from Markdown to [reStructuredText -(RST)](http://docutils.sourceforge.net/rst.html) and rendered with -[Sphinx](http://www.sphinx-doc.org). +Much of the content displayed on the is converted from Markdown to +[reStructuredText (RST)](http://docutils.sourceforge.net/rst.html) and rendered +with [Sphinx](http://www.sphinx-doc.org). ### Render the documentation locally @@ -21,7 +23,7 @@ required theme modules, e.g. by running pip install -r requirements.txt -from the root of this repo. Then you can execute Sphinx by calling +This should be done from the root of this repo. Then you can execute Sphinx by calling make html From 650febe416f8b6c2b833d90e8535b187609b72a9 Mon Sep 17 00:00:00 2001 From: Will Binns Date: Mon, 18 May 2020 10:53:44 +0200 Subject: [PATCH 20/59] docs: Add style guide --- docs/style-guide.md | 349 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 349 insertions(+) create mode 100644 docs/style-guide.md diff --git a/docs/style-guide.md b/docs/style-guide.md new file mode 100644 index 0000000..63b27e8 --- /dev/null +++ b/docs/style-guide.md @@ -0,0 +1,349 @@ +# Style Guide + +For better consistency, this style guide can be used as a reference for +terminology, style and formatting. Suggested changes can also be submitted to +this guide to keep it up to date. + +Below are a series of guidelines, with some parts being mandatory and other +parts being only advisory. You do not need to read it before contributing---the +people reviewing your pull request will let you know if you break any important +rules. + +For all style matters not explicitly covered in this guide, the authority is the +[Wikipedia Manual Of +Style](http://en.wikipedia.org/wiki/Wikipedia%3aManual_of_Style). + +## Audience Description + +Readers will primarily use this guide to build applications that are +interoperable with Bitcoin. Therefore, the reader knows at least one +full-featured programming language fairly well, including standard programming +jargon, and will have received and sent at least one Bitcoin transaction using a +common wallet application. + +Readers will have read programming books before, so they will be prepared to +skim over sections of examples and technical data during their first read, and +will return to those sections of the guide when they need those details for +implementation. + +Readers are not expected to be an expert in any system used by Bitcoin, such as +cryptographic hashing, cryptographic signing, peer-to-peer networking, stack +programming, remote procedure calls, etc. However, readers who do know about +these things will get bored if they must read a lengthy description of them, so +brief descriptions or easy skimming should be emphasized. + +Finally, readers are expected to be motivated to learn, so they do not need to +be entertained or otherwise motivated to keep reading; it is enough to give them +the facts as quickly as possible. + +## Code formatting + +To make this document easier to read, text inside code blocks should be modified +as follows: + +**Shortening strings**: Inside a string, bracket-ellipsis-bracket indicates a +range of consecutive non-whitespace characters were omitted. For example, the +hash of an empty string is e3b0[...]b855. + +**Shortening lists**: On a line by itself, bracket-ellipsis-bracket indicates a +range of consecutive lines were omitted. For example: + +~~~ +$ seq 1 5 +1 +2 +[...] +5 +~~~ + +**Splitting large strings**: When long strings are shown in their entirety, +backslash-newline indicates a single string has been printed across multiple +lines. For example, this is the full version of the first standard transaction +ever made: + +~~~ +0100000001c997a5e56e104102fa209c6a852dd90660a20b2d9c352423edce25\ +857fcd3704000000004847304402204e45e16932b8af514961a1d3a1a25fdf3f\ +4f7732e9d624c6c61548ab5fb8cd410220181522ec8eca07de4860a4acdd1290\ +9d831cc56cbbac4622082221a8768d1d0901ffffffff0200ca9a3b0000000043\ +4104ae1a62fe09c5f51b13905f07f06b99a2f7159b2225f374cd378d71302fa2\ +8414e7aab37397f554a7df5f142c21c1b7303b8a0626f1baded5c72a704f7e6c\ +d84cac00286bee0000000043410411db93e1dcdb8a016b49840f8c53bc1eb68a\ +382e97b1482ecad7b148a6909a5cb2e0eaddfb84ccf9744464f82e160bfa9b8b\ +64f9d4c03f999b8643f656b412a3ac00000000 +~~~ + +Try to wrap lines after the 64th character, as shown in the example above. +However, lines of up to 76 characters seem to render correctly in the current +layout, so longer lines are tolerable. When possible, editors should try to +format code so that the bottom scrollbar doesn't appear in the code block. + +**Code Before Descriptions:** when long code blocks are broken up to allow +explanations in HTML paragraphs, the code fragment should come before the +explanation. For example: + +~~~ +> echo "Hello, World!" +~~~ + +Although the command above works in POSIX shell, it doesn't work as expected in +the bash shell because the `!` (bang) character has special meaning. + +~~~ +> echo 'Hello, World!' +~~~~ + +When the bang character is used, it should be escaped or placed in single quotes +to ensure it is interpreted literally. + +*References:* the shortening and spiting conventions were discussed in [an old pull +request](https://github.com/saivann/bitcoin.org/pull/11). Placing code +before descriptions was discussed in another [old pull +request](https://github.com/saivann/bitcoin.org/pull/74). + +## Style + +### Capitalization In Headings, Subheads, Captions, And Abbreviation Expansions + +The first letter of each word in headings, subheadings, captions, and +abbreviation expansions should be capitalized---this includes +prepositions. + +* Heading/Subhead: "Capitalization In Headings, [...]" +* Captions: "Some Of The Data Signed By Default" +* Abbreviation Expansions: "Pay To PubKey Hash (P2PKH)" + +*References:* this style was used without discussion since the first +section of the guide was written and is currently being used to avoid +a major revision for a minor issue. Some discussion was held in [pull +request #589](https://github.com/bitcoin-dot-org/bitcoin.org/pull/589#discussion-diff-18306278), +but a real discussion should be held about changing this before any +major revision of the docs. + +### First Paragraphs + +The first paragraph of an header-level-2 (h2) section in the developer +guide should briefly describe the topic. Subsections do not need to +follow this format, but it wouldn't hurt. + +### Linking + +All links should use Markdown-style reference links, for example: + +~~~ +My favorite Bitcoin library is [bitcoinj]. +~~~ + +Specifically: + +~~~ + [bitcoinj]: http://bitcoinj.org/ +~~~ + +### Hex + +Hexadecimal byte strings should always be prefixed by "0x" and should be +in lowercase. They should otherwise be treated like regular words, such +as adding punctuation after them. For example: 0x0123456789abcdef. +The should not be put inside `code` spans or blocks unless representing +literal program input or output. + +Long hex strings may be broken apart on byte boundaries to improve +readability. For example: 0x0123 4567 89ab cdef. + +Exception: program output or input should be in whatever format the +program uses. + + +### References + +**Internal Figures**: Figures included within the text shall be referred to by +their relative position. This is so the inclusion of a new figure, or the +deletion of an old figure, does not force the re-numbering of all other figures +and figure references. + +* *The figure above shows the block chain*. +* *~~Figure 1 shows the block chain~~*. + +### Default Unit Of Value: Satoshis + +Satoshis are the default unit of value. + +* *I sent him satoshis.* +* *~~I sent him bitcoins.~~* + +## Punctuation + +**Compound adjectives (hyphenation)**: Hyphenate them, unless the first part is +an adverb (ending in "-ly", for example). + +* *A UTXO used in multiple unconfirmed transactions is a likely sign of a double-spend attempt*. +* *Double-spend risk decreases with each confirmation*. +* *~~Successful miners receive a block reward of newly-created bitcoins~~*. + +In these cases, "double-spend" is an adjective that modifies the word that +follows it. However: + +* *Criminals may attempt to double spend bitcoins to avoid payment*. +* *The Bitcoin protocol provides a confidence score as a guide to protect against double spends*. + +**Dashes**: Em dashes should be written as three hyphens---as in this +example---without surrounding spaces. En dashes (which show ranges of +values, such as 1--10) should be written as two hyphens with no +surrounding spaces. Intra-word or connective hyphens should, of course, +be written without any surrounding spaces. + +**Periods**: One space after periods at the end of a sentence in pre-formatted +text. (This does not apply in Markdown or HTML text files.) + +* "Every major style guide---including the Modern Language Association + Style Manual and the Chicago Manual of Style---prescribes a single + space after a period." ---Farhad Manjoo, Slate, + http://www.slate.com/articles/technology/technology/2011/01/space_invaders.html + +### CamelCase Terms + +Within regular text, treat camelCase terms as common nouns by using a lowercase +first letter when not at the start of a sentence. If used in literal code, use +uppercase `CamelCase` as appropriate. + +We do not have a rule for when to use a camelCase term or when to break apart +the camel case into separate words. + +## Glossary + +### Bitcoin + +1. Not capitalized when referring to value or currency. (But satoshi +should be used instead---see Default Unit Of Value section above.) Follow the same rules as for "dollar" and "yen". + * *I spent 0.05 bitcoins at the restaurant*. + * *I love the feeling of bitcoins in my pocket*. +2. Capitalized when referring to something related to bitcoin that's *not* value. In these cases, treat it as if it's a proper name. + * *I was 28 when I became involved in the Bitcoin community*. + * *The Bitcoin white paper was a wake-up call*. + * *The block chain provides Bitcoin's ledger*. +3. Pluralized in normal fashion. + * *I spent 0.05 bitcoins at the restaurant*. + * *I have 3 bitcoins in my wallet*. + * *You can buy my car for 4.5 bitcoins*. +4. Refers only to a specific cryptocurrency. Never use it to refer to other cryptocurrencies, e.g. Litecoin, Dogecoin, etc.. + * *~~My favorite bitcoin is Primecoin~~*. + +### Block chain + +Two words. Ordinary capitalization. + +* *The block chain provides bitcoin’s ledger*. +* *His actions corrupted the block chain*. + +### Bloom Filter + +Although named after Burton Howard Bloom, bloom filter shall be treated as a common noun. + +* *Filterload loads a bloom filter.* +* *~~Filteradd adds a data element to a Bloom filter.~~* + +### Change [output|transaction] + +When referring to the part of a transaction input which is returned to the +spender, “change”, try to use it with a clarifying modifier (as seen in the +examples below) so the word doesn’t get confused with the regular English verb +and noun words, change. + +* *I spent the change transaction*. +* *Always use a new public key for your change output*. +* *You can resend change back to the same address*. + +### Coinbase Transaction (Not Generation Transaction) + +Use "coinbase transaction" instead of "generation transaction" to describe the first transaction in a block. + +* *The coinbase transaction must claim the block subsidy and transaction fees.* +* ~*Pool miners are often paid in generation transactions.*~ + +### Key pair + +Two words. Ordinary capitalization. + +* *A private key and a public are the two parts of a key pair*. + +### Merkle Block + +Two words when not the name of the `merkleblock` message. + +### Merkle [Tree|Root|Leaf|Branch|Link] + +Although named after Ralph Merkle, merkle tree elements are treated as common nouns. + +* *A block header includes a merkle root.* + +*References:* discussed on [pull #589](https://github.com/bitcoin-dot-org/bitcoin.org/pull/589#discussion-diff-18305822) + +### Money + +Avoid using “money” when referring to bitcoin. Use “bitcoin,” “millibit,” +“satoshi,” or some other sub-bitcoin unit instead. + +* *Bitcoin transactions send ~~money~~ satoshis*. + + +### PaymentRequest, PaymentDetails, Payment, PaymentACK + +Messages belonging to the payment protocol. Should always be capitalized and +single words with camelCase as necessary. When not too distracting, they should +be followed by the word "message", as in "PaymentRequest message". In +particular, "Payment" should almost always be followed by "message" to +disambiguate it from generic payments. + +### Pubkey, Signature, And Redeem Scripts + +The various script parts of transactions. Pubkey is capitalized as a +regular common noun (i.e., the K is not capitalized)---exception, when +used in an abbreviation (i.e. P2PKH means Pay-To-PubKey-Hash). + +* *Outputs include a pubkey script.* +* *Inputs include a signature script or a coinbase.* +* *P2SH outputs pay a hashed redeem script.* + +*References:* extensively discussed in pulls [#563](https://github.com/bitcoin-dot-org/bitcoin.org/pull/563) and [#566](https://github.com/bitcoin-dot-org/bitcoin.org/pull/566). + +### Stale Block (Not Orphan Or Orphan Block) + +Blocks which are not part of the most difficult (best) block chain shall be called stale blocks to avoid confusion with true orphan blocks that don't have a known parent block. Accordingly, forms of "orphan" shall not be used as a verb. + +* *After the reorg, it became a stale block.* +* ~*Because of propagation delays, miners produce one to two orphan blocks a week.*~ +* ~*The 0.8.0 blocks were orphaned by the 0.7.x chain.*~ + +*References:* discussed on [pull #589](https://github.com/bitcoin-dot-org/bitcoin.org/pull/589#discussion_r18310486). + +### Standard Transaction & IsStandard() + +A transaction which passes the Bitcoin Core IsStandard() test, indicating that +it will be relayed or mined by default peers and miners. Mainly +Pay-To-PubkeyHash (P2PH) and Pay-To-ScriptHash (P2SH) transaction types. Does +not include genesis transactions. IsStandard() always begins with a capital I, +and always includes the trailing parenthensis. + +* *The first standard transaction appeared in block 170*. +* *It passed the IsStandard() checks.* + +### Timestamp + +One word. Ordinary capitalization. Noun, but can be turned into a verb +(timestamp, timestamped, timestamping...). + +* *The timestamp showed that Gupta's transaction occurred before Smith's*. +* *The block chain provides a timestamped record of all confirmed transactions*. + +## Images + +Information about creating or changing illustrations can be found in [the image README](https://github.com/bitcoin-dot-org/bitcoin.org/blob/master/img/dev/README). + +SVG is the preferred file format for illustrations, but a corresponding +PNG file with the same basename should be created. Bitmap images should +be in PNG unless a special file format is warranted. All PNG images +should be optimized by the command, `optipng -o7 .png` + +(Note: optipng overwrites your original image, so make sure you have a +backup before running it.) From 53845ec160150d6b6fe512962a32b07610c02a75 Mon Sep 17 00:00:00 2001 From: Will Binns Date: Mon, 18 May 2020 10:56:27 +0200 Subject: [PATCH 21/59] docs: Update README and CONTRIBUTING --- CONTRIBUTING.md | 15 ++++++++++----- README.md | 3 +++ 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 244cec8..18b8943 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,11 +8,16 @@ request](https://github.com/bitcoin-dot-org/developer.bitcoin.org/compare). ## How to contribute -This repo hosts the sources for the Bitcoin developer documentation. +This repo hosts the sources for the Bitcoin developer documentation. One of the +easiest ways to get started contributing is by rereading the site and looking for +inconsistencies in terminology, style, etc., and also in any illustrations. -It is converted from Markdown to [reStructuredText -(RST)](http://docutils.sourceforge.net/rst.html) and rendered with -[Sphinx](http://www.sphinx-doc.org). +Prior to contributing, please review the [style +guide](https://github.com/bitcoin-dot-org/developer.bitcoin.org/tree/master/docs/style-guide.md). + +Much of the content displayed on the is converted from Markdown to +[reStructuredText (RST)](http://docutils.sourceforge.net/rst.html) and rendered +with [Sphinx](http://www.sphinx-doc.org). ### Render the documentation locally @@ -21,7 +26,7 @@ required theme modules, e.g. by running pip install -r requirements.txt -from the root of this repo. Then you can execute Sphinx by calling +This should be done from the root of this repo. Then you can execute Sphinx by calling make html diff --git a/README.md b/README.md index 40fd491..18b8943 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,9 @@ This repo hosts the sources for the Bitcoin developer documentation. One of the easiest ways to get started contributing is by rereading the site and looking for inconsistencies in terminology, style, etc., and also in any illustrations. +Prior to contributing, please review the [style +guide](https://github.com/bitcoin-dot-org/developer.bitcoin.org/tree/master/docs/style-guide.md). + Much of the content displayed on the is converted from Markdown to [reStructuredText (RST)](http://docutils.sourceforge.net/rst.html) and rendered with [Sphinx](http://www.sphinx-doc.org). From 50f0a091bda5169085d3f2d8c5c2bcff36d053e3 Mon Sep 17 00:00:00 2001 From: Will Binns Date: Mon, 18 May 2020 11:00:40 +0200 Subject: [PATCH 22/59] footer: Update contact info --- _theme/footer.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/_theme/footer.html b/_theme/footer.html index 0dfa32d..3285ef2 100644 --- a/_theme/footer.html +++ b/_theme/footer.html @@ -114,8 +114,8 @@
{% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %} Released under the MIT License.
{%- endif %} + Feedback + Questions From 61e40d7528aeaf2555a29a7b2055890206b6a6c8 Mon Sep 17 00:00:00 2001 From: Will Binns Date: Mon, 18 May 2020 11:37:57 +0200 Subject: [PATCH 23/59] index: Update welcome text --- index.rst | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/index.rst b/index.rst index 766a911..c2e27a6 100644 --- a/index.rst +++ b/index.rst @@ -8,6 +8,57 @@ this documentation, `make sure you're running a node`_. For technical support, we recommend `Bitcoin Stack Exchange`_. For errors or suggestions related to this documentation, please open an issue on `GitHub`_. +A simple payment system +----------------------- + +Unless a payment needs to be associated with automatic invoices, accepting money +is as simple as sending some bitcoin - just display an address or QR code. This +simple setup is within reach of almost all users and can fulfill the needs of +many clients. From an accounting perspective, it's especially suitable for +reducing overhead and adding transparency. + +Many third-party APIs +--------------------- + +There are many third party payment processing services that provide APIs; you +don't need to store bitcoins on your server and handle the security that this +implies. Additionally, most of these APIs allow you to process invoices and +exchange your bitcoins into your local currency at competitive costs. + +Be your own bank +---------------- + +If you don't use any third party APIs, you can integrate a Bitcoin node directly +into your applications allowing you to become your own bank and payment +processor. With all the responsibilities that this implies, you can build +amazing systems that process Bitcoin transactions however you would like. + +Bitcoin addresses to track invoices +----------------------------------- + +Bitcoin creates a unique address for each transaction. If you were to build a +payment system associated with an invoice, all you would need to do is generate +and monitor a Bitcoin address for each payment (you should never use the same +address for more than one transaction). + +Client side security +-------------------- + +Most security is handled by the protocol, eliminating the need for PCI +compliance. Fraud prevention can be simplified down to monitoring a single +variable: the confirmation score. Beyond that, keeping your bitcoins secure is +mainly a matter of securing your wallet and using HTTPS or other secure +protocols to send payment requests to customers. + +A new world of possibilities +---------------------------- + +Bitcoin allows you to design new and creative online services that couldn't +exist before due to financial limitations. This includes tipping systems, +automated payment solutions, distributed crowdfunding services, time locked +payment management, public asset tracking, low-trust escrow services, +micropayment channels and more. + Acknowledgments --------------- From 1f8221786225f50663e42b49f3c063a6a1a8419f Mon Sep 17 00:00:00 2001 From: Will Binns Date: Mon, 18 May 2020 11:43:14 +0200 Subject: [PATCH 24/59] index: Increase size of Acknowledgements heading --- index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.rst b/index.rst index c2e27a6..4eb1320 100644 --- a/index.rst +++ b/index.rst @@ -60,7 +60,7 @@ payment management, public asset tracking, low-trust escrow services, micropayment channels and more. Acknowledgments ---------------- +======== This documentation would not be possible without the many contributions to the Bitcoin project over the years from core developers and other people. A very From 53c8a943b6f07e1aba208fc2581d507e6682c483 Mon Sep 17 00:00:00 2001 From: Will Binns Date: Mon, 18 May 2020 11:44:38 +0200 Subject: [PATCH 25/59] index: Update link to GitHub --- index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.rst b/index.rst index 4eb1320..6d8687a 100644 --- a/index.rst +++ b/index.rst @@ -71,7 +71,7 @@ developer documentation that led to this site. .. _make sure you're running a node: https://bitcoin.org/en/full-node .. _Bitcoin Stack Exchange: https://bitcoin.stackexchange.com/ -.. _GitHub: https://github.com/bitcoin-documentation/website/issues/new +.. _GitHub: https://github.com/bitcoin-dot-org/developer.bitcoin.org/issues/new/choose .. _David Harding: https://github.com/harding .. _Cornelius Schumacher: https://github.com/cornelius From e23befd4d8f4700a53ab21505dd3640e416b45f4 Mon Sep 17 00:00:00 2001 From: Will Binns Date: Mon, 18 May 2020 12:01:28 +0200 Subject: [PATCH 26/59] index: Drop additional text for now Context: #73 --- index.rst | 53 +---------------------------------------------------- 1 file changed, 1 insertion(+), 52 deletions(-) diff --git a/index.rst b/index.rst index 6d8687a..a004ea6 100644 --- a/index.rst +++ b/index.rst @@ -8,59 +8,8 @@ this documentation, `make sure you're running a node`_. For technical support, we recommend `Bitcoin Stack Exchange`_. For errors or suggestions related to this documentation, please open an issue on `GitHub`_. -A simple payment system ------------------------ - -Unless a payment needs to be associated with automatic invoices, accepting money -is as simple as sending some bitcoin - just display an address or QR code. This -simple setup is within reach of almost all users and can fulfill the needs of -many clients. From an accounting perspective, it's especially suitable for -reducing overhead and adding transparency. - -Many third-party APIs ---------------------- - -There are many third party payment processing services that provide APIs; you -don't need to store bitcoins on your server and handle the security that this -implies. Additionally, most of these APIs allow you to process invoices and -exchange your bitcoins into your local currency at competitive costs. - -Be your own bank ----------------- - -If you don't use any third party APIs, you can integrate a Bitcoin node directly -into your applications allowing you to become your own bank and payment -processor. With all the responsibilities that this implies, you can build -amazing systems that process Bitcoin transactions however you would like. - -Bitcoin addresses to track invoices ------------------------------------ - -Bitcoin creates a unique address for each transaction. If you were to build a -payment system associated with an invoice, all you would need to do is generate -and monitor a Bitcoin address for each payment (you should never use the same -address for more than one transaction). - -Client side security --------------------- - -Most security is handled by the protocol, eliminating the need for PCI -compliance. Fraud prevention can be simplified down to monitoring a single -variable: the confirmation score. Beyond that, keeping your bitcoins secure is -mainly a matter of securing your wallet and using HTTPS or other secure -protocols to send payment requests to customers. - -A new world of possibilities ----------------------------- - -Bitcoin allows you to design new and creative online services that couldn't -exist before due to financial limitations. This includes tipping systems, -automated payment solutions, distributed crowdfunding services, time locked -payment management, public asset tracking, low-trust escrow services, -micropayment channels and more. - Acknowledgments -======== +--------------- This documentation would not be possible without the many contributions to the Bitcoin project over the years from core developers and other people. A very From 2d7578d5d98d832ccde7a9954e29ee1584ec8831 Mon Sep 17 00:00:00 2001 From: Anirudha Bose Date: Sat, 23 May 2020 10:51:28 +0530 Subject: [PATCH 27/59] Fix formatting error in importmulti RPC docs --- reference/rpc/importmulti.rst | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/reference/rpc/importmulti.rst b/reference/rpc/importmulti.rst index a589461..632d7fd 100644 --- a/reference/rpc/importmulti.rst +++ b/reference/rpc/importmulti.rst @@ -21,14 +21,6 @@ Argument #1 - requests **Type:** json array, required Data to be imported - "range": n or [n,n], (numeric or array) If a ranged descriptor is used, this specifies the end or the range (in the form [begin,end]) to import - "internal": bool, (boolean, optional, default=false) Stating whether matching outputs should be treated as not incoming payments (also known as change) - "watchonly": bool, (boolean, optional, default=false) Stating whether matching outputs should be considered watchonly. - "label": "str", (string, optional, default='') Label to assign to the address, only allowed with internal=false - "keypool": bool, (boolean, optional, default=false) Stating whether imported public keys should be added to the keypool for when users request new addresses. Only allowed when wallet private keys are disabled - }, - ... - ] :: @@ -52,6 +44,13 @@ Data to be imported "key", (string) ... ], + "range": n or [n,n], (numeric or array) If a ranged descriptor is used, this specifies the end or the range (in the form [begin,end]) to import + "internal": bool, (boolean, optional, default=false) Stating whether matching outputs should be treated as not incoming payments (also known as change) + "watchonly": bool, (boolean, optional, default=false) Stating whether matching outputs should be considered watchonly. + "label": "str", (string, optional, default='') Label to assign to the address, only allowed with internal=false + "keypool": bool, (boolean, optional, default=false) Stating whether imported public keys should be added to the keypool for when users request new addresses. Only allowed when wallet private keys are disabled + } + ] Argument #2 - options ~~~~~~~~~~~~~~~~~~~~~ From 16ab30d7a7f2fa1958151d7bd070d0a563edb82d Mon Sep 17 00:00:00 2001 From: Will Binns Date: Tue, 16 Jun 2020 14:05:12 +0200 Subject: [PATCH 28/59] payment_processing: Fix link to blockchain guide --- devguide/payment_processing.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/devguide/payment_processing.rst b/devguide/payment_processing.rst index 2d6a964..3ed9b21 100644 --- a/devguide/payment_processing.rst +++ b/devguide/payment_processing.rst @@ -215,7 +215,7 @@ If a `refund <../devguide/payment_processing.html#issuing-refunds>`__ needs to b Verifying Payment ----------------- -As explained in the `Transactions <../devguide/transactions.html>`__ and `Block Chain <../devguide/blockchain.html>`__ sections, broadcasting a transaction to the `network <../devguide/p2p_network.html>`__ doesn’t ensure that the receiver gets paid. A malicious spender can create one transaction that pays the receiver and a second one that pays the same input back to himself. Only one of these transactions will be added to the block chain, and nobody can say for sure which one it will be. +As explained in the `Transactions <../devguide/transactions.html>`__ and `Block Chain <../devguide/block_chain.html>`__ sections, broadcasting a transaction to the `network <../devguide/p2p_network.html>`__ doesn’t ensure that the receiver gets paid. A malicious spender can create one transaction that pays the receiver and a second one that pays the same input back to himself. Only one of these transactions will be added to the block chain, and nobody can say for sure which one it will be. Two or more transactions spending the same input are commonly referred to as a :term:`double spend`. @@ -243,7 +243,7 @@ An interesting source of double-spend risk analysis can be acquired by connectin For example, unconfirmed transactions can be compared among all connected peers to see if any UTXO is used in multiple unconfirmed transactions, indicating a double-spend attempt, in which case the payment can be refused until it is confirmed. Transactions can also be ranked by their transaction fee to estimate the amount of time until they’re added to a block. -Another example could be to detect a fork when multiple peers report differing block header hashes at the same block height. Your program can go into a safe mode if the fork extends for more than two blocks, indicating a possible problem with the block chain. For more details, see the `Detecting Forks subsection <../devguide/blockchain.html#detecting-forks>`__. +Another example could be to detect a fork when multiple peers report differing block header hashes at the same block height. Your program can go into a safe mode if the fork extends for more than two blocks, indicating a possible problem with the block chain. For more details, see the `Detecting Forks subsection <../devguide/block_chain.html#detecting-forks>`__. Another good source of double-spend protection can be human intelligence. For example, fraudsters may act differently from legitimate customers, letting savvy merchants manually flag them as high risk. Your program can provide a safe mode which stops automatic payment acceptance on a global or per-customer basis. From 49310e3a4864b4470db51ac90e40dd86e7c85219 Mon Sep 17 00:00:00 2001 From: Will Binns Date: Tue, 16 Jun 2020 14:05:23 +0200 Subject: [PATCH 29/59] transactions: Fix link to blockchain guide --- devguide/transactions.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devguide/transactions.rst b/devguide/transactions.rst index 24c7e7f..838312c 100644 --- a/devguide/transactions.rst +++ b/devguide/transactions.rst @@ -305,7 +305,7 @@ Locktime itself is an unsigned 4-byte integer which can be parsed two ways: Transaction Fees And Change --------------------------- -Transactions pay fees based on the total byte size of the signed transaction. Fees per byte are calculated based on current demand for space in mined blocks with fees rising as demand increases. The transaction fee is given to the Bitcoin miner, as explained in the `block chain section <../devguide/blockchain.html>`__, and so it is ultimately up to each miner to choose the minimum transaction fee they will accept. +Transactions pay fees based on the total byte size of the signed transaction. Fees per byte are calculated based on current demand for space in mined blocks with fees rising as demand increases. The transaction fee is given to the Bitcoin miner, as explained in the `block chain section <../devguide/block_chain.html>`__, and so it is ultimately up to each miner to choose the minimum transaction fee they will accept. There is also a concept of so-called “:term:`high-priority transactions `” which spend satoshis that have not moved for a long time. From b99e5d287b0165550cbbfc8155efe12e0201e53c Mon Sep 17 00:00:00 2001 From: Will Binns Date: Tue, 16 Jun 2020 14:12:25 +0200 Subject: [PATCH 30/59] transactions: Update link to page anchor --- devguide/transactions.rst | 2 +- helpers/post_processor_rst.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/devguide/transactions.rst b/devguide/transactions.rst index 838312c..99d6f0b 100644 --- a/devguide/transactions.rst +++ b/devguide/transactions.rst @@ -315,7 +315,7 @@ As of Bitcoin Core 0.9, a :term:`minimum fee ` (currently 1,0 Since each transaction spends Unspent Transaction Outputs (UTXOs) and because a UTXO can only be spent once, the full value of the included UTXOs must be spent or given to a miner as a transaction fee. Few people will have UTXOs that exactly match the amount they want to pay, so most transactions include a change output. -:term:`Change outputs ` are regular outputs which spend the surplus satoshis from the UTXOs back to the spender. They can reuse the same P2PKH pubkey hash or P2SH script hash as was used in the UTXO, but for the reasons described in the `next subsection <../transactions.html#avoiding-key-reuse>`__, it is highly recommended that change outputs be sent to a new P2PKH or P2SH address. +:term:`Change outputs ` are regular outputs which spend the surplus satoshis from the UTXOs back to the spender. They can reuse the same P2PKH pubkey hash or P2SH script hash as was used in the UTXO, but for the reasons described in the `next subsection <../devguide/transactions.html#avoiding-key-reuse>`__, it is highly recommended that change outputs be sent to a new P2PKH or P2SH address. Avoiding Key Reuse ------------------ diff --git a/helpers/post_processor_rst.rb b/helpers/post_processor_rst.rb index 4269b1b..8eb0f72 100644 --- a/helpers/post_processor_rst.rb +++ b/helpers/post_processor_rst.rb @@ -180,7 +180,7 @@ def process_link(link) elsif target =~ /\/en\/developer-reference/ replace_reference_link(text, target) elsif target == "#avoiding-key-reuse" - "`#{text} <../transactions.html#avoiding-key-reuse>`__" + "`#{text} <../devguide/transactions.html#avoiding-key-reuse>`__" elsif target =~ /\/en\/release\/(.*)/ "`#{text} `__" elsif target =~ /\/en\/download/ From 056b3dd768de123e2491ff1ad31a82e07f54fb74 Mon Sep 17 00:00:00 2001 From: Will Binns Date: Tue, 16 Jun 2020 14:32:20 +0200 Subject: [PATCH 31/59] payment_processing: Update link to paymentrequest.proto --- examples/payment_processing.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/payment_processing.rst b/examples/payment_processing.rst index 1c93b49..48d3e13 100644 --- a/examples/payment_processing.rst +++ b/examples/payment_processing.rst @@ -32,7 +32,7 @@ The full sequence of events is illustrated below, starting with the spender clic BIP70 Payment Protocol -For the script to use the `protocol buffer `__, you will need a copy of Google’s `Protocol Buffer `__ compiler (``protoc``), which is available in most modern Linux package managers and `directly from Google. `__ Non-Google `protocol buffer `__ compilers are available for a variety of programming languages. You will also need a copy of the :ref:`PaymentRequest ` `Protocol Buffer description `__ from the Bitcoin Core source code. +For the script to use the `protocol buffer `__, you will need a copy of Google’s `Protocol Buffer `__ compiler (``protoc``), which is available in most modern Linux package managers and `directly from Google. `__ Non-Google `protocol buffer `__ compilers are available for a variety of programming languages. You will also need a copy of the :ref:`PaymentRequest ` `Protocol Buffer description `__ from the Bitcoin Core source code. Initialization Code ''''''''''''''''''' From 012fa58f897c49687414f6963111e5cde1c330af Mon Sep 17 00:00:00 2001 From: Daniel Leedan Date: Wed, 24 Jun 2020 11:48:57 +0800 Subject: [PATCH 32/59] Update main.css Design improvement --- _theme/static/css/main.css | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/_theme/static/css/main.css b/_theme/static/css/main.css index 747e152..9f03c60 100644 --- a/_theme/static/css/main.css +++ b/_theme/static/css/main.css @@ -102,7 +102,7 @@ body { /* Breadcrumbs */ .breadcrumbs-section { padding: 18px 0; - background: #000; + background: #090c14; } .breadcrumb { align-items: center; @@ -118,6 +118,9 @@ body { color: #3490E6; text-decoration: underline; } +.breadcrumb-item a:hover { + text-decoration: none; +} .breadcrumb-item.active { color: #fff; } @@ -130,8 +133,11 @@ body { border-color: #F7931A; } .btn-group .btn:hover { - background: #F7931A; - border-color: #F7931A; + background: #F9A136; + border-color: #F9A136; +} +h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, h4:hover > a.headerlink, h5:hover > a.headerlink, h6:hover > a.headerlink, dt:hover > a.headerlink, caption:hover > a.headerlink, p.caption:hover > a.headerlink, div.code-block-caption:hover > a.headerlink { + margin-left: 10px; } @media handheld, only screen and ( max-width: 990px ), only screen and ( max-device-width: 990px ) { @@ -145,6 +151,9 @@ body { .hero-nav .toctree-l1:nth-child(odd) { margin-left: 0; } + div.document h1 { + margin-top: 0; + } } @media handheld, only screen and ( max-width: 500px ), only screen and ( max-device-width: 500px ) { .content-container { From dd028cb3011d329978f87d41464e8a3a80810fb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B8bra?= Date: Wed, 24 Jun 2020 20:58:29 +0200 Subject: [PATCH 33/59] Update Update --- README.md | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/README.md b/README.md index 18b8943..3e148d3 100644 --- a/README.md +++ b/README.md @@ -47,13 +47,3 @@ the helper tool after doing them in this repo. Participation in this project is subject to a [Code of Conduct](https://github.com/bitcoin-dot-org/developer.bitcoin.org/blob/master/CODE_OF_CONDUCT.md). - -## Donations - -This project, developer.bitcoin.org, is community supported: -[3FkenCiXpSLqD8L79intRNXUgjRoH9sjXa](bitcoin:3FkenCiXpSLqD8L79intRNXUgjRoH9sjXa) - -## Questions? - -Please contact Will Binns ([will@bitcoin.org](mailto:will@bitcoin.org)) if you -need help. From 955543c20eb7c4f93b9825e1701c3550d4b91a91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B8bra?= Date: Thu, 25 Jun 2020 16:07:25 +0200 Subject: [PATCH 34/59] Remove analytics Remove analytics --- _theme/layout.html | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/_theme/layout.html b/_theme/layout.html index 236bf29..f4d6c04 100644 --- a/_theme/layout.html +++ b/_theme/layout.html @@ -14,16 +14,6 @@ - - - {{ super() }} {% endblock %} From 73372a649a7178eed5a3cc9528a1267053a35ba2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B8bra?= Date: Thu, 25 Jun 2020 16:11:20 +0200 Subject: [PATCH 35/59] Update Update --- CONTRIBUTING.md | 9 --------- 1 file changed, 9 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 18b8943..f1c2c6a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -48,12 +48,3 @@ the helper tool after doing them in this repo. Participation in this project is subject to a [Code of Conduct](https://github.com/bitcoin-dot-org/developer.bitcoin.org/blob/master/CODE_OF_CONDUCT.md). -## Donations - -This project, developer.bitcoin.org, is community supported: -[3FkenCiXpSLqD8L79intRNXUgjRoH9sjXa](bitcoin:3FkenCiXpSLqD8L79intRNXUgjRoH9sjXa) - -## Questions? - -Please contact Will Binns ([will@bitcoin.org](mailto:will@bitcoin.org)) if you -need help. From 52776d262a3aebdc8e6612d21465dad7ff2262b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B8bra?= Date: Thu, 25 Jun 2020 16:13:03 +0200 Subject: [PATCH 36/59] Update footer Update footer --- _theme/footer.html | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/_theme/footer.html b/_theme/footer.html index 3285ef2..1b6909a 100644 --- a/_theme/footer.html +++ b/_theme/footer.html @@ -12,7 +12,7 @@ Support Bitcoin.org: @@ -127,15 +124,15 @@
-
+
From 9d586bbcef21c26fa2f61df9fcb6c8a38e19f932 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B8bra?= Date: Fri, 26 Jun 2020 01:27:15 +0200 Subject: [PATCH 37/59] Update address Update address --- _theme/footer.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/_theme/footer.html b/_theme/footer.html index 1b6909a..a0005a1 100644 --- a/_theme/footer.html +++ b/_theme/footer.html @@ -12,7 +12,7 @@ Support Bitcoin.org:
-
+
From c311b3818e1d86066c89565cde54bf8d3785780c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B8bra?= Date: Fri, 26 Jun 2020 12:40:14 +0200 Subject: [PATCH 38/59] Update Update --- _theme/footer.html | 3 --- 1 file changed, 3 deletions(-) diff --git a/_theme/footer.html b/_theme/footer.html index a0005a1..9febeb1 100644 --- a/_theme/footer.html +++ b/_theme/footer.html @@ -15,9 +15,6 @@

- From e90db39b3f8b3df82ea39f613ec1242ea092da1c Mon Sep 17 00:00:00 2001 From: "V. Sus" <55538293+vsus@users.noreply.github.com> Date: Tue, 8 Sep 2020 12:46:52 +0200 Subject: [PATCH 39/59] Fix broken link --- devguide/mining.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devguide/mining.rst b/devguide/mining.rst index 964de8e..b28fa47 100644 --- a/devguide/mining.rst +++ b/devguide/mining.rst @@ -90,4 +90,4 @@ Using the coinbase transaction received, the mining software adds a nonce to the Unlike `“getblocktemplate” <../reference/rpc/getblocktemplate.html>`__, miners using Stratum cannot inspect or add transactions to the block they’re currently mining. Also unlike `“getblocktemplate” <../reference/rpc/getblocktemplate.html>`__, the Stratum protocol uses a two-way TCP socket directly, so miners don’t need to use HTTP longpoll to ensure they receive immediate updates from mining pools when a new block is broadcast to the `peer-to-peer network <../devguide/p2p_network.html>`__. -**Resources:** The GPLv3 `BFGMiner `__ mining software and AGPLv3 `Eloipool `__ mining pool software are widely-used among miners and pools. The `libblkmaker `__ C library and `python-blkmaker `__ library, both MIT licensed, can interpret GetBlockTemplate for your programs. +**Resources:** The GPLv3 `BFGMiner `__ mining software and AGPLv3 `Eloipool `__ mining pool software are widely-used among miners and pools. The `libblkmaker `__ C library and `python-blkmaker `__ library, both MIT licensed, can interpret GetBlockTemplate for your programs. From 9fd39cdeea9a88377cf0a0189ac98586301319c5 Mon Sep 17 00:00:00 2001 From: tushar-1728 Date: Wed, 9 Sep 2020 21:20:13 +0530 Subject: [PATCH 40/59] Formating of Block Versions section --- reference/block_chain.rst | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/reference/block_chain.rst b/reference/block_chain.rst index 6bacca8..f7bc5a3 100644 --- a/reference/block_chain.rst +++ b/reference/block_chain.rst @@ -50,9 +50,7 @@ Block Versions - :ref:`Version 2 ` was introduced in `Bitcoin Core 0.7.0 `__ (September 2012) as a soft fork. As described in `BIP34 `__, valid :ref:`version 2 blocks ` require a :ref:`block height parameter in the coinbase `. Also described in `BIP34 `__ are rules for rejecting certain blocks; based on those rules, `Bitcoin Core 0.7.0 `__ and later versions began to reject :ref:`version 2 blocks ` without the block height in coinbase at block height 224,412 (March 2013) and began to reject new version 1 blocks three weeks later at block height 227,930. -- **Version 3** blocks were introduced in `Bitcoin Core 0.10.0 `__ (February - - 2015) as a soft fork. When the fork reached full enforcement (July 2015), it required strict `DER `__ encoding of all `ECDSA `__ signatures in new blocks as described in `BIP66 `__. Transactions that do not use strict `DER `__ encoding had previously been non-standard since `Bitcoin Core 0.8.0 `__ (February 2012). +- **Version 3** blocks were introduced in `Bitcoin Core 0.10.0 `__ (February 2015) as a soft fork. When the fork reached full enforcement (July 2015), it required strict `DER `__ encoding of all `ECDSA `__ signatures in new blocks as described in `BIP66 `__. Transactions that do not use strict `DER `__ encoding had previously been non-standard since `Bitcoin Core 0.8.0 `__ (February 2012). - **Version 4** blocks specified in BIP65 and introduced in `Bitcoin Core 0.11.2 `__ (November 2015) as a soft fork became active in December 2015. These blocks now support the new ``OP_CHECKLOCKTIMEVERIFY`` opcode described in that BIP. From 42a55a99907d962b1e1bb81c448ec56671a03e9f Mon Sep 17 00:00:00 2001 From: 6102bitcoin Date: Sun, 4 Oct 2020 21:28:29 +0100 Subject: [PATCH 41/59] Fix checksum --- helpers/rpc/test_data/deriveaddresses | 2 +- helpers/rpc/test_data/markdown/deriveaddresses.md | 2 +- helpers/rpc/test_data/rst/deriveaddresses.rst | 2 +- reference/rpc/deriveaddresses.rst | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/helpers/rpc/test_data/deriveaddresses b/helpers/rpc/test_data/deriveaddresses index f3c3ba2..7adc250 100644 --- a/helpers/rpc/test_data/deriveaddresses +++ b/helpers/rpc/test_data/deriveaddresses @@ -22,5 +22,5 @@ Result: Examples: First three native segwit receive addresses -> bitcoin-cli deriveaddresses "wpkh([d34db33f/84h/0h/0h]xpub6DJ2dNUysrn5Vt36jH2KLBT2i1auw1tTSSomg8PhqNiUtx8QX2SvC9nrHu81fT41fvDUnhMjEzQgXnQjKEu3oaqMSzhSrHMxyyoEAmUHQbY/0/*)#trd0mf0l" "[0,2]" +> bitcoin-cli deriveaddresses "wpkh([d34db33f/84h/0h/0h]xpub6DJ2dNUysrn5Vt36jH2KLBT2i1auw1tTSSomg8PhqNiUtx8QX2SvC9nrHu81fT41fvDUnhMjEzQgXnQjKEu3oaqMSzhSrHMxyyoEAmUHQbY/0/*)#cjjspncu" "[0,2]" diff --git a/helpers/rpc/test_data/markdown/deriveaddresses.md b/helpers/rpc/test_data/markdown/deriveaddresses.md index 9da71ba..9185570 100644 --- a/helpers/rpc/test_data/markdown/deriveaddresses.md +++ b/helpers/rpc/test_data/markdown/deriveaddresses.md @@ -70,7 +70,7 @@ For more information on output descriptors, see the documentation in the doc/des First three native segwit receive addresses {% highlight bash %} -bitcoin-cli deriveaddresses "wpkh([d34db33f/84h/0h/0h]xpub6DJ2dNUysrn5Vt36jH2KLBT2i1auw1tTSSomg8PhqNiUtx8QX2SvC9nrHu81fT41fvDUnhMjEzQgXnQjKEu3oaqMSzhSrHMxyyoEAmUHQbY/0/*)#trd0mf0l" "[0,2]" +bitcoin-cli deriveaddresses "wpkh([d34db33f/84h/0h/0h]xpub6DJ2dNUysrn5Vt36jH2KLBT2i1auw1tTSSomg8PhqNiUtx8QX2SvC9nrHu81fT41fvDUnhMjEzQgXnQjKEu3oaqMSzhSrHMxyyoEAmUHQbY/0/*)#cjjspncu" "[0,2]" {% endhighlight %} {% endautocrossref %} diff --git a/helpers/rpc/test_data/rst/deriveaddresses.rst b/helpers/rpc/test_data/rst/deriveaddresses.rst index 73a8b0d..e9b37f5 100644 --- a/helpers/rpc/test_data/rst/deriveaddresses.rst +++ b/helpers/rpc/test_data/rst/deriveaddresses.rst @@ -51,5 +51,5 @@ Examples First three native segwit receive addresses:: - bitcoin-cli deriveaddresses "wpkh([d34db33f/84h/0h/0h]xpub6DJ2dNUysrn5Vt36jH2KLBT2i1auw1tTSSomg8PhqNiUtx8QX2SvC9nrHu81fT41fvDUnhMjEzQgXnQjKEu3oaqMSzhSrHMxyyoEAmUHQbY/0/*)#trd0mf0l" "[0,2]" + bitcoin-cli deriveaddresses "wpkh([d34db33f/84h/0h/0h]xpub6DJ2dNUysrn5Vt36jH2KLBT2i1auw1tTSSomg8PhqNiUtx8QX2SvC9nrHu81fT41fvDUnhMjEzQgXnQjKEu3oaqMSzhSrHMxyyoEAmUHQbY/0/*)#cjjspncu" "[0,2]" diff --git a/reference/rpc/deriveaddresses.rst b/reference/rpc/deriveaddresses.rst index c87a04b..7315f37 100644 --- a/reference/rpc/deriveaddresses.rst +++ b/reference/rpc/deriveaddresses.rst @@ -49,5 +49,5 @@ Examples First three native segwit receive addresses:: - bitcoin-cli deriveaddresses "wpkh([d34db33f/84h/0h/0h]xpub6DJ2dNUysrn5Vt36jH2KLBT2i1auw1tTSSomg8PhqNiUtx8QX2SvC9nrHu81fT41fvDUnhMjEzQgXnQjKEu3oaqMSzhSrHMxyyoEAmUHQbY/0/*)#trd0mf0l" "[0,2]" + bitcoin-cli deriveaddresses "wpkh([d34db33f/84h/0h/0h]xpub6DJ2dNUysrn5Vt36jH2KLBT2i1auw1tTSSomg8PhqNiUtx8QX2SvC9nrHu81fT41fvDUnhMjEzQgXnQjKEu3oaqMSzhSrHMxyyoEAmUHQbY/0/*)#cjjspncu" "[0,2]" From 22014c578bfc7f6e19edc897943d74098d727131 Mon Sep 17 00:00:00 2001 From: Vasil Dimov Date: Mon, 12 Oct 2020 15:50:16 +0200 Subject: [PATCH 42/59] Document addrv2 and sendaddrv2 messages --- img/dev/en-p2p-control-messages.dot | 2 + img/dev/en-p2p-control-messages.png | Bin 4863 -> 9479 bytes img/dev/en-p2p-control-messages.svg | 143 +++++++++++++++++----------- reference/p2p_networking.rst | 59 +++++++++++- 4 files changed, 147 insertions(+), 57 deletions(-) diff --git a/img/dev/en-p2p-control-messages.dot b/img/dev/en-p2p-control-messages.dot index ddb3523..8fd91bb 100644 --- a/img/dev/en-p2p-control-messages.dot +++ b/img/dev/en-p2p-control-messages.dot @@ -13,10 +13,12 @@ graph [ penwidth = 1.75, fontname="Sans" ] version -> verack; ping -> pong; getaddr -> addr; +getaddr -> addrv2 filterload -> filteradd; filterload -> filterclear; alert; +sendaddrv2; sendheaders; ERROR [ style = "invis" ]; diff --git a/img/dev/en-p2p-control-messages.png b/img/dev/en-p2p-control-messages.png index f9b69d2c7425f24ad69b33c0a6d52dd27196b935..e93fc1d851f3183685724449b8360fec4fe88e8c 100644 GIT binary patch literal 9479 zcmb7q1yohbK7t@bca`KHA;<+C_-uuX4gb$i z7@oof+w9&QdE^}ZFR421ErKv3cja$uxW=!IxjoR(J`&yBpv2^Bu)d^)^?T_FWtsd# z3o>>S6XvVjzJ7$5M0CP;KSl{fs~nWeYsB~9KfGJ497fml)W8=-p*#8jhjPf^0R;w8 zFf%{yp4++oB6a=?+kGq#X-&h_vM#BGn_bllTiu>Z^EBp!ex$OvEPkTZe#EcPpT4B^ z*qyd!YG&C_H{r3EPmNW%Z3~(;;riQTW@Y_3Tu5BuWc^va-6;_m7Dg#fINsFMG`aLE zO*SA|WNB$>QtW>IpET7t>>zp8!2?;HLJK@>V*2#_pRpn+`_)0AG0fk1sQzppe}Dgm z8yxrJ>)=676c4*dDJcAEPuJ{}M}8(qT`nmp5f4mXAP;HQ$v5%oHpP`a!tW0v=dfS? z&9$@Kmvu+-+O=!;$9p!Zcu$``y``v#O?UY+R)p?2n}o#Wh0agEmV=T|5-zKCIr?Ro zU3?P}%gfdl78bV_UyPU8jJ(Or)}i?{H`5aj3kVb z=zB8Ccx5~BQ&Lh67MKT23cZNA@VQ1-= zKk;jA_r2BIwzj$5rU+7VFioHmd;RXBVDb9i+Q?wFds+M1opAc0$9ayHT?x&}ase8) z6O}JE_$6X;TP7xqbM}OUgbr4Vx{4`&W|@vxxwZZHK`u^M-z}x{w{w;Jd?Dm-=WD59 zLWVx)%}{(^^p!N>p^pOk+91rGkG{&fUUl`^ovgnocJn44gJRl_-_5FaSa<&OIpvbX zl}?xSQ9J?y0!%EdsUHHhP4hqF+$17O3K%OI9Fm;Re809%YZ_QCTgL^&#?lcoh-+|| zldX|f)m;-7mb0?T=r(myR{J3LLR(*-KvYyTxpDEvUvJ+=#l?kO#35$Ba%C>Hi|w<= zR>1QN20lJMohnzM?3^4^E32Tq+B3byNL;Hs#%|=YN@|X9=-(3oSe8uMnOBO|}8EFdTd z@2hIu)l;u>SnId)a+Vu6s9IWD#N79ITf!L#vZM)<6VmS8H7VnCa;1CL7m! zeGs+`-#PxRcN`KD@;W1f%fr*Nr@OmOjY^|i{49XU3s+rT9ab^Z`AI_H=k15_+w(tP zmzUp^l$0c8Vp0?6;${}m-s&t148*0Nr1Y5)^9u;Lh=_$>Y<0*lD5xJUL5=Lnc%OM# zoj-p3SUGXURa#q1%US|UZ)R@JA5zxJODwz*!ah+j;yGRcO{asDVo&#V&xYW`YN&emXwHebaWit zOQGL-o^{t~ZZ28#-o22H)7dbrr(Tj4yId=-oZ@9l?%b3*fByW@sr8bgF?ZctrS&@9 z)t0|=X9n_iu*yw%YisL)y81;P9-eI7BE<@0U0qsMHnxYx#u3xgW@2JuNd*ODp+X)< zOKAdOZ{ei*^h+mazrW?==T|f}Whs3&#Oit09?cUN9V7!sOHfMol%I$HSgopHmiw6S`bnTq=}t zHeeejR#sd;yGF|$jjewPB`#<0mX<#({VH-(v4UA3S8I8eO+a8H)lq!}p3lDhGK&`- z+sFTmZ7CI>9wrkL)2Av*9-gw;SxsHW*|oH1ysF^=Dbf;*ByI~-ZXcEH$cBf98@_+X zyA#3K{7K>kDGd#-xw$z71;r$UlSa_wRk6*pXW2UwtWmfa7#PT_%}slH887;o)`)=W zYN?vT`OAUL(=Id6Y*^XZF~h^dkyqc}a?JFm-s@dxHWPwm#6V_R!sJv{!=4oNM}GeN zdB+_?=4g@4W9vJ|wUO_^MHv}*H72M z&o?)xGEBIszS$d%j*n@Jo7bq`ZRFvN6hwL5|1tBwBA--2;OG4 ztDT>JQf_YbQj(&1;*V?kR#ALa(w6Ev9v+_3y?c#N2~m-e2(r1k`6?!c+II9CMv(l4 z7MlJ%V}Y@>7aQZf-fFFUzZfRPi+4Vja6LAH@%Fv5#i;(vHl*M3KuSMstP^JLa(#yA|foT ztQWMjw9p_)qN^U3J!<`z_N_xVew2*D--5F{^v~ct_n{;ueFdqn#D0m8_8KNKxwI72 z)~0lDczD~`n2Emid$lpkl`B~Et@U+vh|J06#V4KdhmS7X+1aUl5~sAQJ-rbhA3r%g z?VFy?NtD(iQ=k({booZz@G#xs;o8GZqHuv}M*x2yVGccf!Nnc;z>Reh{8kd;(O=YEo@9Wn>9tZZ( z3GUHO9cllPDZ$g$srRMD=O0ne8rq563=aU`CIEn1!==T=?=Vc7o15`RG_|#b zNk~YHrYm3WayvRZKgPns;w~Y<#Wew#oqoKU+tAh)czUwkr96@m$CJD^ULA*F(v>Jf zeVsUbW-y#V0yFHkHa8CsE%H7wF|XK0MTHQc?$>RN*qe^?gcs{<$0|~b*ZOnxbrYpM zok%si1iemN_m6-;jHEZ*1vlYX=M% zxvNg?-?||plF_%2p`KQ;>YQ6sW0bSkl_0fJ=(uFfZ}1I)YKk67OHG}s^SP)On!W(Y z@H#a$75JN?o(UEvW*uPa%Ehyzl{^|~8vQaKC8VVpiHV7oM?QZ1$RaJBFi;?BJBq8O zrZyhTDj^{Oi1w#fTbu0i<&ZSBL~a|7D5c1lm;fH_T$A>9T!J@l^t*P1Pzy|N&HXr- zd`)tFU5*xhMaU#=kfjjM{iNdq^o^9a1=c830hA~dLiB*~BN}rt2srSD$+F6b%gGiBpzoS65dBT~>9X zhZPkRrl4P-kG-g(CG_982Tw z%79y7WHC1vm(Sa`9Fa@Ng zaX?-;Y|Y*+S&w@l&r2nzrbcq*%9W~}J4T#vFW9bDD~+fveP^Of1g-EBlm2Yo4`L3i zw&PV9eL{FFUxXo14cp%kT}D?4bf~GeC^qgf?a!Igo=0`{^%zjHRl9ec)J-sMP1JZs z#m9$MRY_`SXw;33F=T1w^bS=&@gq$k=FV4&siTp5^yreAxw#M!qc3S`pY0}Usv>4q zS5@*%{-l?e(`x4#_1*R9vxY(w^FEWTIa=oFh!Z7&e#FVc^K0k;ZiLUBA2^vH?HLTM zkDY_V{MT1iC1vH_VdJTXKFxVR;#11Yb>@iKRj5FInUU`iM%9>n+Os26?5HW zuBxhHz7%ACa^MgxP4S+DpPzqHEPVXx?A^O}@$9_khIC(J6E(nE(3#YirENaj7S-0( zMJ>)N+r|@&&zs^Xb9TTcD=SM%M&{Geq4LS&^(`K9a&jGgeRZE^a>G-s^|@ja~oi7rC%yXA|VEA8{DzR&er#kj0Meg)Sk>PWp~m5rPmZK3P4z*oKV{zo;sD zJ~4#~8Ps@`-=oyYdG_pCK5Bp;4%HkK8_hKf+;B!IZYLeTNNrq*GzX)!M__(FoI*ZE z?djg-OXTEOA^!NhUXUn2EDP>Y>Ev8hO9;Ie!*9AeSb&R*TL*CjKF<8NTOe?Ym0aUm z{?pZz_;`B1H*fIiB8rNHJqI~SKo`_G&^MVCbSHCKfW%OZyJ5P&KGxRJ;RkgB6!HrC z7L4H#56!gupM0SpjNI2m;-%cF8s89+i?fSKNX&G}oXgwT- z$6Z)hX!7`RYG29ddx*!l>kN^<4U}#WtcUX%Ikc_XlQ{vUyLWw**c*TmJ8zM(R9v&4 zyfrv9gojpLJpBCYTD2!2o9Y`Hrsp_xE-NS~5Z)^DCcJzjG$XUPSYy*w(+$r4-jV@4 z3o}AJy44qpKtue-n>TNKTiXZNxVY}lIX+@=aB%SLQq_(Cjn4hEwZWeND?)v-weaze z;^(&WyF^XO$gp#qL;HnqFSg*hF;fD;fL(H*eB->c8N7g ziGa*`{CJ}_PwRMPAg{5hN&a4sQ+P~FjNaNnj())YxVzfDp2at1Wo25&B!q-b0<|Y8 zeL{XuP^hfu`Wze_z_blQdYlaHs(0Uavye7~SpE9SA|j%>C`e&#W#t1PHoEYbO6Tj> zuZ70z%h*RdOP_nZ4Ba}9j;@isHF)ymiJ-9XuSeHEeNIbD({g8H`^@idppm*B-`59J z#Ws;m8hU(n;o)Lmh;7ytsn+L{~MezZ@NNPVL_hrwz zODvdZ&0XQd^+;WvB}xg@YJ@@v6&}NTmG9rbxBdL-pOuw0dIL>y znf$86K}A9%$n2@{Fu;KpB(F-%Z*U7-6?}aB?(S~H+uIxLf{atH-3qi>xgq(xv$O?3ZWg<*gSy=O^XE3`nyZd|N-OlzC!2DBc?}a2OfS|)qoiy9 zo0unNzZB$@`0bk*`YS+xiHL}LJwagOI66AIy1Ft;OB*fNsdKfTpB!$d7Jx?J8sp!f zA-GB6R*)$i0gjK(`k^#9W4t=~2+(-aAo={#()GU*<2U{x*b~IU-_~5|*OHgV3=R&4 zp3~6Sh_P9eAaav<_)C@tXT_WED_PN12KeQjxJ$|wIaqF}%o%;Z;C`c4XPy=DB>rfE z?1KZ>Y~xzSP$5b8J;K_vBc7DcpD_@iLoKk`j!T)o9h)d-n}2-=Q{ z{r>$ML4rdjm$0r~zpjzy`0(9%N(!r=pI;Kl3gi{w9}-zvt=VdxO|bR%SS2rd z;4q(J*!*2qqnvXqT3TPOcQ`Cs|Nb6Oh5Eql$)y)p*upxi+2_K?si$tkWu5kH%vw38 zmQ_Vb>6V@zU4O1&h@T(kk_#v%VAxYFVV5J7*deZ`N4toT2bqoj@%~1DJZpUkY5=`& zkcyBmNFB5rG>xX9rhYASb*#0&p9*?gi~B}(04zC-BP#3qfX1Ic ziGbOsr>EDARlY#GJ4=oXwN53@(m+fG%j}pS*&Z4ihE==oFFWxEZ*43ubBE=C?E{YJ z!*A$q^Ui`rkhv~7`)NZ}RW&d$@Ktm)<$GS;l(C>?GXC!<8Lp5C!Eku$aK|#;Uy&;UU-QU@fx3FM8 zIXOwn%OeS&F{&s_i>|Ge0o5?IxEKhL8XO)jU9sF-9m2)O_f1GJsywD1f4Ra3hB7lh zKe4W^uJ!#QM=%9$JR3w%DAer2!o3OB9bk#SGt~d=jo3AU>jN7O3=V!Y7?YPLaN**` zsrB{nq$K7*dDagfJ}jD032?U8MnsT+ct-zaa?%7XVy0YJzQ+Zm==6OGsM?ki6{V)7 zrBzZ<(Qp+|dtqu}feGRss34o9WPHqS$AUw5N$0Fwk4W~en;SX@{78r1<*0?vyeoZM zVk=>UbG>1hlbhQNfo4Iwl8g3}V7-FTBQfvaUqiCLebbrW26Efc*!VhcbGZD!bTs}5 z1T0^-=n2=F01rX$myZ>jH2`!w@YQZ%}_rz|RMauu=eg9|FeS0W`_L;stp9{`4pK1oyEHW&> z!GSY3Hz#?gF=BXF4^A<9gh|{97qqrssFGvOM8VfgUteFB35-F83<*o;v1)f}r~^F) zxu=(c@#lXFp+1cgcV`y+Nemf4!*eI}j``I=!aM&rr z3-%_IhDS$vHF&G0#E6fMGQHnezxYs;kT8DFn0buMJbNsr(M2<}0}BB|%fidl_Qe+< zi@PU>jwME8OPzYPGAd*sp?AvK6YlFT(6LnXj^(1Za#aQX;Xr(GTpXbP57UJI9MS)e zk;K2=M5+OF_~h&?d)pw4c3%1WV?m5DX=}4CZGA|W8*%vh<%`K&d$iuh=gQf*NNp@w zqbPtj+8Njc%b^ii15nQNtgK((2Z6D1^6~X4PqfcRgZ>;HH2_a}GSyRGPY+;PEc|s; z6d7~``|Wwv;^JbHKhwz>yqO-)UI(3XRPgOg#R z<(@!bwRRGD8&>+i5U_K$(vbm7xEz5q% z^!r~|zWvu61UB+)^c$I*n;ZWA!_LX`fW9FD6jBHS*bZJ7ko$~6dj_l^Ro11CfX@DQm3 zmI7W+)*h(Xst1~ySm85~@$uP$cj#M_wezU&*)|1|!8{NHDjYX_m5>w~kPs^bHK?Ra8}{R#rk_y7X~7G8)Hu2J;mVPqf9F=zVtceu88W zfDdOF7Bb(JNb+~q2+~bu?Tm6axt%T@I690DO`kr+g`LF4a@z>-kQ8q1j=h*LUFuEk zJ)Q6T6q4w5ba!47EfpCgToA9~ zv(JiQW}h6X6P*(@7JFH1P1r9rbb%A<3P~;?4-Ow8Z4?0I=oLph00HbT67>4 zx3{;=LxpZw|K_A3C9PYZsO^$IUKM^H6_wmm#mmPxH=kNw{t?3j(E&*QSXL%l=`f>M zc>~hK0)Qb^@3;-c#$$Q&=FN_wp^woqF-5>x=VxXbfh9E2n6HAAwm^I7UUMZ<4%3+A zLGsz@=}NXI^3K(USD;%)}jOH_oJi3 zB2=imMEM0Oz3%c%VBtV3lXFad97E)>rAaeU$+GWS9o?3JONTz`^d>^6!jL zq2`r`M)6yvWfjgVRF}cT08Yec9$Ju{%{xCeRS(8-Gt})M(4y4CUJDP|gCqe9hdVEc z!FYW4?p^T+JTDZTQsd){hzSZsz!CqYU>HF#^U?1DfG(AKNdd~`Hq8Ce5(p-pztYsq z>t12>dg>di0+@jB5osGUaA)NB1;s80Rmel=MZie|o6XQ;0vr;?Ca|gs0H?#|Q$vBe z?ugEp(wKjcc)<_0Qh~?e^XR>Y{UB@SQ{yTB=Va;H@w5 z>O{+|fClVRbJ)Dn24-oI)Cx&CgMK}cn0stBQL94;Dz(8c> zeBdG&sLAh5QR%|;T}nJ`fk zYwOHERloaw|Mr6(1dQvC*M>%GJWM)RU=9g6^v!*rztnDmzuGbz9L@B+yqFr1D|u`G zO0mB_n%F{{r$a@SK>FliLJD;k5q4SB3=B-=&CR^t6E|>_|PW3U+%7z^5{iuO}{JgJU=^y#`?`=jSjRK3sp!@Z|?;J zG9zj}tD=I=eSdxJ_krK04`3O=#ful|C0$7YRX`WhNPCEZZwP2OTmn^u7Do`!H-xko zkj?)=ziVZ6nQXXLK+@AdcWsi`sJaM)h0zLUg8KUUPq8r-phu&kqI|&QS@OIB^}Vi< zxCPTGbErpG*wEDMEGGOwUO@o^2@MUMTw5c8Y=U9?51SQmTp^z5_XJ+PeA(-sPqE9V zwlQAqusL~KLrcr-U~>vq+xGo?z47^xcG%Hd5fbO;%w1@eOd@@dG*$|B9%nV}SZgZ| ztOY$Qv$q#~L&B8na^8OQpcETkmjL=eNJt2IAY(G$@sVy0zJ~#3J=hX|d*{Wi6<(Kt zk`%ml&AQC6=jA)({T>fv*8RUn7iL{E6>eL60YaN#C#=4+R{+XCQX-@8Lm@ij1D`t?KTq44`fCv6OFg zQZKK=X#g~l(bC>+rX-{PzcZ(oSpVy{MZS_u#&_TT+q)$@?B^sgS@8;`1xgn1W)pH( M;l6yXtcmac0Vc2(>;M1& literal 4863 zcmaJ_XE+>8*IrhOUU&6H5Mo7?=tNsJYLty2i${qbz1Ik$B|1Tn=xvo%qXi+lh!xB7 z=)J}2?UUzyzw+n({>+*C%v|Tp%(>@GiP6(hqabA_1pojP8tN(r002JxwjM?Tye$Pl zVjQ=MdA%owu$!BkTMZr_9zH%k5C|k7ARr_pBqAarCMG5!A-Qws4k;-q85tQlIXMLd z1tldV6%`dVH8l+l4J|D#9UUD#Jv{>h0|*2HgTai9j7&^S%*@OzEG(?7tZZy-?Ck6i z2!w-!gOih!i;Ih!o12G+hnJW4-o1N#e0==;{P*wQ7Z4DDLZO0!f)5@%5E2r4`0$~y zu&{`Th^VNjn3&k3M~}qC#U&&pBqb%Kq@<*!rDbGfWMyULSHWQPI)SF)=Z3-@c8Fjg5lao_YQc_b>)6&w?)6+9DGBPtWKYaL*ot>SNlarg9`|;z) zyu7^p{QQD~f={15eg6Epu&}VGsHnKOxTK_{w6wIWtgO7eyrQC_va+(Os;auW8i_>K z)YR10*4Ee8qfn@ZhK9z*#-^sG=H}*>mX_Am)-PYaw6(Rhx3_n6baZxhc6D`q{ra`L zySt~Sr?APo}R{FFf%hVv$L~UEOu^gZhn6L@4x?ESXfwGTwGdOT3%jWSy@?KU0qvS zTVG$_*x13L8mQTuufLB_B-nb^!WpE_6d#lx$xlOP}4T))*! z-D7Q~xigDU#XQD!d_FurV}#L;Yc=!fJ2g3~>Lt~WSV*YOnSg5dHQ(u_IW*9<<* zzhcYlR*W$6;B=_2TI6cq3-S$dIVGnLeQ<0N_nuFICuaZb{4ew7f*Q{yqXp zna=`l)CKyAT*tBRO9rakmk4wk?cG5el?sWRNj|V}9R)Yc%3Y=y;w!6$l4_ zLJ1Lg|54bK?&Q~9ch$1YQX)0=>-HI0;kvdfPE;uMun$mPm)g;O8t5QNdsk9X165fy z?Q9LSk;@hlG-DklT|Dj5O8{LkXe1WEM0UOQA~fVd^0n01 z5{FAha{5MwP<5x4l#%2jue1;=33{g$Saz-EGS;wZ9X=?J5@#<<~@8z`1TdVP7h zf2{D5Yq-mx^}Ul$VV>T4B4dXLRIqs6F|LE3dl>hAm6;swxZG^;`EP?cPYY98Q@VD> zH*wot1#PJ$N@Mq16rLmdE$mrTw8}tXJ7lp={liX<)|AHDwKyW=x__J<1NvuzK$`7G zV{CL{zIKzpOsUGkaB%|p6$*EG>^cgH_X45~Uv?^yg4jGK1d9{nJ&Ck-iflgxO0~B( z9{utX70#7y-d!gt&6H0vi)gWaANZkJ2BaO1el7Hd^KJmr-jyd@LoWciZeh=p&tnwZ zc^nB7U$$*P)r1ISpHaJPo$yvA&P2V^fV@0*-&l+}wJEl*)Xg_%tR6_uH9>rl>ZO4H z4h{B<=+9%uy@IN%+d=G@z zH?nqdmjL0OLa&oje#7!E3RKZ+wk@a{;&Pt7oYuYWQ!(k!X(sv;1r{wbX^zNK84%O* zQ9^Gm|I^x19p5YRIS#e=TpfjSq^-1k@PRMTJAXoWej7rowiS|=Je#U^zw{HOUwH=R zG@8v>Ozxss%&&+@aGW;w{vHmOe7f#0eG!)Q4Q=P241P+wl|UIVO9r3#jF(7?ScsX> zg>-y93xJ|nhF2Leg64AJ=%u^1q)ZLxm*liival$p-k71sOKvcDe$ML&<>AmX8$ z4u}08haRFc7)rpF01kMTAM7$;&#AS(eNh#oq8g-X5g1@M`o(YUODL*9cQx^Y3R35Z zCd;{#(g!-YgG3fZuFtD;_qZ2BWaei{^ef9LVk>K`=ZrGQ{@YnnLQTn)RgYaG>m|-c zv`I9<_Qbalvy9O6g6aJ?N7w*qy3?UH2eGLVr!?q}KH8RM@MU@el~)jQz^7rSZ5f<^ zU~0MD(`kb68>WmbiQ;h@sImlrtn)YT=@!wg#76?4|5=QH;ZgdUMQtLi7`nseXaW5! z7=8Ie4Nmq7_Dr2=$-?AJ)-|e%_L!oDA6()dk%Cpl96P#=2O6H1MG}!?eVF}TJ~`3V zw|Q$oqVg3x(QPlOEX2I!>Y!QA-4i&DIh<6`Gjk`B9hmb;!N(?`o5Ac0JRZPcCA%W* z!Th2FQIQic4FL7=XV#WnYuKB^%`O4xLRVA;ma1Ib<}V^n!|N1oafQ!P)RgZ=2jeh) z767Uilp)(`-B3497JA#3H`?t-EJyj0nW2Ny7a!?_k}0=qUQ@j1uQnh|(pj5!1rdXn zLA~4rsRR!vvFm;$pH?2m!E~e#mbb&b_vtE@#St0nV$$4Hq6Em!hS>sig#Gi z*d;Ko9}H!17J?7Cn&HsKa^)<+xsZ0xVpcn!8*omimCllCqI(Xu=`P&K|9RA_=g5kk z?q}p=bRN%;)h8EG`S8KAo7 zIuigVZOflx?vnv|FiZHSY;AvI>#~}dk&c_0uYvyC=7kI>egIq3Q{vDjcHuhgoITi< z98vgJ8E04Jo9B7m&p8iRrlt`Bn2gA+rG});w3Xo9OXL2)01EaM|3eEC*T^5ZW6CA= zE?VctNh#b@UjnVTGIY5{{SB|nlG$z!YlS=XSEXb50%)B8^p7dg(M@+l<;7*$IBX~k z+jMkmr}dQ@avk>zZ8>`vEtmmRM2H8unW& zDg1Ka_2d{~TJu@yyVLks@n2y7h3E z9oi+I{S7H1>_Y)Uk%B*!9sRg}zbW2_6RE=ei>y{*ju%S{U6iP*>$1(Ar0}?S9krJv z6zp-fZLEfjo@g5XWM(I^durTY)ab?NLzRYrj99@lGFpjZO(SFVQU0Y2471-_Y2o;^ z+l0?JT$AVUZVIh$0u)EoSg*B;1+KzzhfTJvmTL^qoJ7gc$<$7NDTt3L(o=pBU<}50 zG@cL1bw!$yb%uAi0RG=h3aB_FMVlX9ImF>rw92V6I^dzr5?|G7cQVU9rXB`$Wr;tA zV=??)Eni0s+J!<<&BVW}J;#aMKb^oMhCvNI0lbaO;pA#~{JZ9Y>mvm8^|aoe(#Wj3 zD?uB2Dv-SS(hECJCci|R-AKbNsf2_6MSE=p+IC-Nhj3%%;w93hy6ZGrhEDvjaE4Gq ze53*ZL~;uNQ0jjW2Y`$K@dw>1@!)^Zzq@SGyGs^WOdhr=eTevoP3;Zs)Bh&A;bnq- zz|<)+RV18`D-FPZtIyVvx~t2V9WQ_^_ zO4ZXGJ*ccD+w^JbjrsF;eU|fhNOWPl!3)&Gy07)Zn~%Oxj?m?;R^i8iQ()yqIzKE9 zos|N85YCj3&10y*)s4HB%(bW&#$k`(f#srbee)E>nTNs7)S-n_Jc-|LbOa27NIlnf zCI(#()qZw}QZMz51%G+;1N!Zq?%t^W3GNdaKSk+R$MftQv~D)}y5-GJbm%mfy*M%b zdrLBVjPwmqB>T-@iegAj+PQS9JtHiw$~}C{Kvk_0Uw8Tm)rnu&2c2BRnOmtc?2@xK zqj(h|yDOpj&=?{eE&q^(z;-+j0~$Nty@S?wuRog)D3d2_IXvF5S%^NzoOb)-I!*SU zMz%0+S_~u_`Bla9m6{JtZ^sdDBTh0@5N7lq z<)e%AewUaROxqVoN?v@LJh&KkVbX4ze!aQlJ4+ixPEmo2Ylo?&uI)uO-l^X3V16M9 z&Tc~#|4kO3 z^4)y6U6Z#mr~vLqY;%+!u^v$n|EvraVG3(+lbNq6(G6Rm4{?7c>lV^w?&w-JRHpl& zvDI3?^82OUC1qJkGavr};XUASINPC+nAKTq_FN6_ns{5|?o^TXxr(=Fm5v2}3r~p- zL4{G9CRsktB0%{RBRK1+IWof)zh|R1ZFMakq|l6?W(pCBmfII6d9GJy48zRHb$yKp z;kl8y(pi0)_qg|?1&DIC?`FVnUrKiSyO}ciU3j%!&|ASyhs8ZPn-&?gc%2N$IH9EP zcJW2BJw<10OfPs=mY2EXR%dA?@8P5Vcvp;)5ZtusU-~`e!fyL zu@JcTE&A8EU}-B(ltRj?Em95`Z2yM<{(<5=wPd65v)0j;0LPbUUDGgvSShA=z`YGJ zZ_;*z2Zy5vX74jSC=jv#Snth*3zUQfRn-T+{Ud~iURo`-<2mke|q`d=Abi3 zma~&SRGj5jSBX+1}QQze-9c zQlrWth5?5<1P7Izj9H<+!4)HJtEwRl~LG z8B6~&v20>Ic#e6w`=}q}bDcc^so;OKZM0~eGE#uoiSGseSDyLbtdqAV2ItU&;zA-0 W*_doM!K$|}dw>Q^N2N*$5&mB`MJ_V{ diff --git a/img/dev/en-p2p-control-messages.svg b/img/dev/en-p2p-control-messages.svg index eab7012..0aa1051 100644 --- a/img/dev/en-p2p-control-messages.svg +++ b/img/dev/en-p2p-control-messages.svg @@ -1,96 +1,129 @@ - - - - -%3 - - -Overview Of P2P Protocol Control And Advisory Messages + + + + + +Overview Of P2P Protocol Control And Advisory Messages -version - -version + +version + +version -verack - -verack + +verack + +verack -version->verack - + +version->verack + -ping - -ping + +ping + +ping -pong - -pong + +pong + +pong -ping->pong - + +ping->pong + -getaddr - -getaddr + +getaddr + +getaddr -addr - -addr + +addr + +addr -getaddr->addr - + +getaddr->addr + + + + +addrv2 + +addrv2 + + + +getaddr->addrv2 + -filterload - -filterload + +filterload + +filterload -filteradd - -filteradd + +filteradd + +filteradd -filterload->filteradd - + +filterload->filteradd + -filterclear - -filterclear + +filterclear + +filterclear -filterload->filterclear - + +filterload->filterclear + -alert - -alert + +alert + +alert + + + +sendaddrv2 + +sendaddrv2 -sendheaders - -sendheaders + +sendheaders + +sendheaders -reject - -reject + +reject + +reject diff --git a/reference/p2p_networking.rst b/reference/p2p_networking.rst index 5afbdca..8d06722 100644 --- a/reference/p2p_networking.rst +++ b/reference/p2p_networking.rst @@ -598,7 +598,7 @@ Note that almost none of the control messages are authenticated in any way, mean Addr ^^^^ -The ``addr`` (IP address) message relays connection information for peers on the `network <../devguide/p2p_network.html>`__. Each peer which wants to accept incoming connections creates an `“addr” message <../reference/p2p_networking.html#addr>`__ providing its connection information and then sends that message to its peers unsolicited. Some of its peers send that information to their peers (also unsolicited), some of which further distribute it, allowing decentralized peer discovery for any program already on the `network <../devguide/p2p_network.html>`__. +The ``addr`` (IP address) message relays connection information for peers on the `network <../devguide/p2p_network.html>`__. Each peer which wants to accept incoming connections creates an `“addr” <../reference/p2p_networking.html#addr>`__ or `“addrv2” <../reference/p2p_networking.html#addrv2>`__ message providing its connection information and then sends that message to its peers unsolicited. Some of its peers send that information to their peers (also unsolicited), some of which further distribute it, allowing decentralized peer discovery for any program already on the `network <../devguide/p2p_network.html>`__. An `“addr” message <../reference/p2p_networking.html#addr>`__ may also be sent in response to a `“getaddr” message <../reference/p2p_networking.html#getaddr>`__. @@ -639,6 +639,54 @@ The following annotated hexdump shows part of an `“addr” message <../referen [...] .............................. (999 more addresses omitted) +Addrv2 +^^^^^^ + +The ``addrv2`` (address version two) message relays connection information for peers on the `network <../devguide/p2p_network.html>`__ in a similar way to the `“addr“ message <../reference/p2p_networking.html#addr>`__ except that it uses a different encoding which supports addresses longer than 16 bytes. + ++----------+------------------+-------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| Bytes | Name | Data Type | Description | ++==========+==================+=======================================================+============================================================================================================================+ +| *Varies* | address count | compactSize uint | The number of address entries up to a maximum of 1,000. | ++----------+------------------+-------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ +| *Varies* | addresses | `network <../devguide/p2p_network.html>`__ address | Address entries. See the table below for the format of a Bitcoin `network <../devguide/p2p_network.html>`__ addrv2 address.| ++----------+------------------+-------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------+ + +Each encapsulated address uses the following structure (``addrv2`` encoding): + ++----------+----------------+------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ +| Bytes | Name | Data Type | Description | ++==========+================+==================+===================================================================================================================================================+ +| 4 | time | uint32 | Same as in the `“addr” message <../reference/p2p_networking.html#addr>`__. | ++----------+----------------+------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ +| *Varies* | services | compactSize uint | Same as in the `“addr” message <../reference/p2p_networking.html#addr>`__, but encoded as compactSize. | ++----------+----------------+------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ +| 1 | network id | uint8_t | The id of the network to which the address belongs to, as defined in `BIP155 `__. | ++----------+----------------+------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ +| *Varies* | address length | compactSize uint | The size of the address in the following field (in bytes). | ++----------+----------------+------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ +| *Varies* | address | byte[] | The network address. The interpretation depends on the network id. | ++----------+----------------+------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ +| 2 | port | uint16_t | Same as in the `“addr” message <../reference/p2p_networking.html#addr>`__. | ++----------+----------------+------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + +The following annotated hexdump shows part of an `“addrv2” message <../reference/p2p_networking.html#addrv2>`__ (the message header has been omitted). + +.. highlight:: text + +:: + + fde803 ............................. Address count: 1000 + + d91f4854 ........................... [Epoch time][unix epoch time]: 1414012889 + fd4804 ............................. Service bits: compactSize(NODE_WITNESS | NODE_COMPACT_FILTERS | NODE_NETWORK_LIMITED) + 01 ................................. BIP155 network id: IPv4 + 04 ................................. Address length: compactSize(4) + c0000233 ........................... Address: 192.0.2.51 + 208d ............................... Port: 8333 + + [...] .............................. (999 more addresses omitted) + Alert ^^^^^ @@ -879,7 +927,7 @@ In addition, because the filter size stays the same even though additional eleme GetAddr ^^^^^^^ -The `“getaddr” message <../reference/p2p_networking.html#getaddr>`__ requests an `“addr” message <../reference/p2p_networking.html#addr>`__ from the receiving node, preferably one with lots of IP addresses of other receiving nodes. The transmitting node can use those IP addresses to quickly update its database of available nodes rather than waiting for unsolicited `“addr” messages <../reference/p2p_networking.html#addr>`__ to arrive over time. +The `“getaddr” message <../reference/p2p_networking.html#getaddr>`__ requests an `“addr” <../reference/p2p_networking.html#addr>`__ or `“addrv2” <../reference/p2p_networking.html#addrv2>`__ message from the receiving node, preferably one with lots of addresses of other receiving nodes. The transmitting node can use those addresses to quickly update its database of available nodes rather than waiting for unsolicited `“addr” <../reference/p2p_networking.html#addr>`__ or `“addrv2” <../reference/p2p_networking.html#addrv2>`__ messages to arrive over time. There is no payload in a `“getaddr” message <../reference/p2p_networking.html#getaddr>`__. See the `message header section <../reference/p2p_networking.html#message-headers>`__ for an example of a message without a payload. @@ -990,6 +1038,13 @@ The `“sendheaders” message <../reference/p2p_networking.html#sendheaders>`__ There is no payload in a `“sendheaders” message <../reference/p2p_networking.html#sendheaders>`__. See the `message header section <../reference/p2p_networking.html#message-headers>`__ for an example of a message without a payload. +SendAddrv2 +^^^^^^^^^^^ + +The `“sendaddrv2” message <../reference/p2p_networking.html#sendaddrv2>`__ tells the receiving peer that the sender can understand `“addrv2” messages <../reference/p2p_networking.html#addrv2>`__ and prefers to receive them instead of `“addr” messages <../reference/p2p_networking.html#addr>`__. + +There is no payload in a `“sendaddrv2” message <../reference/p2p_networking.html#sendaddrv2>`__. See the `message header section <../reference/p2p_networking.html#message-headers>`__ for an example of a message without a payload. + VerAck ^^^^^^ From 82256a4e49dc7cf666f503840113aeb02e8d3293 Mon Sep 17 00:00:00 2001 From: tushar-1728 Date: Fri, 6 Nov 2020 23:29:48 +0530 Subject: [PATCH 43/59] Fixed sphinx build warnings --- devguide/block_chain.rst | 32 +++++++++++++------------- devguide/contracts.rst | 4 ++-- devguide/p2p_network.rst | 6 ++--- devguide/payment_processing.rst | 6 ++--- devguide/transactions.rst | 40 ++++++++++++++++----------------- devguide/wallets.rst | 20 ++++++++--------- examples/testing.rst | 2 +- index.rst | 2 +- reference/block_chain.rst | 6 ++--- reference/p2p_networking.rst | 6 ++--- reference/transactions.rst | 8 +++---- 11 files changed, 66 insertions(+), 66 deletions(-) diff --git a/devguide/block_chain.rst b/devguide/block_chain.rst index 2f61466..4bbfbb3 100644 --- a/devguide/block_chain.rst +++ b/devguide/block_chain.rst @@ -6,14 +6,14 @@ The block chain provides Bitcoin's public ledger, an ordered and timestamped rec Introduction ------------ -Each full node in the Bitcoin `network <../devguide/p2p_network.html>`__ independently stores a block chain containing only blocks validated by that node. When several nodes all have the same blocks in their block chain, they are considered to be in :term:`consensus`. The validation rules these nodes follow to maintain consensus are called :term:`consensus rules`. This section describes many of the consensus rules used by Bitcoin Core. +Each full node in the Bitcoin `network <../devguide/p2p_network.html>`__ independently stores a block chain containing only blocks validated by that node. When several nodes all have the same blocks in their block chain, they are considered to be in :term:`consensus `. The validation rules these nodes follow to maintain consensus are called :term:`consensus rules `. This section describes many of the consensus rules used by Bitcoin Core. .. figure:: /img/dev/en-blockchain-overview.svg :alt: Block Chain Overview Block Chain Overview -The illustration above shows a simplified version of a block chain. A :term:`block` of one or more new transactions is collected into the transaction data part of a block. Copies of each transaction are hashed, and the hashes are then paired, hashed, paired again, and hashed again until a single hash remains, the :term:`merkle root` of a merkle tree. +The illustration above shows a simplified version of a block chain. A :term:`block ` of one or more new transactions is collected into the transaction data part of a block. Copies of each transaction are hashed, and the hashes are then paired, hashed, paired again, and hashed again until a single hash remains, the :term:`merkle root ` of a merkle tree. The merkle root is stored in the block header. Each block also stores the hash of the previous block’s header, chaining the blocks together. This ensures a transaction cannot be modified without modifying the block that records it and all following blocks. @@ -26,11 +26,11 @@ Transactions are also chained together. Bitcoin wallet software gives the impres A single transaction can create multiple outputs, as would be the case when sending to multiple addresses, but each output of a particular transaction can only be used as an input once in the block chain. Any subsequent reference is a forbidden double spend—an attempt to spend the same satoshis twice. -Outputs are tied to :term:`transaction identifiers (TXIDs) `, which are the hashes of signed transactions. +Outputs are tied to :term:`transaction identifiers (TXIDs) `, which are the hashes of signed transactions. -Because each output of a particular transaction can only be spent once, the outputs of all transactions included in the block chain can be categorized as either :term:`Unspent Transaction Outputs (UTXOs) ` or spent transaction outputs. For a payment to be valid, it must only use UTXOs as inputs. +Because each output of a particular transaction can only be spent once, the outputs of all transactions included in the block chain can be categorized as either :term:`Unspent Transaction Outputs (UTXOs) ` or spent transaction outputs. For a payment to be valid, it must only use UTXOs as inputs. -Ignoring coinbase transactions (described later), if the value of a transaction’s outputs exceed its inputs, the transaction will be rejected—but if the inputs exceed the value of the outputs, any difference in value may be claimed as a :term:`transaction fee` by the Bitcoin :term:`miner ` who creates the block containing that transaction. For example, in the illustration above, each transaction spends 10,000 satoshis fewer than it receives from its combined inputs, effectively paying a 10,000 satoshi transaction fee. +Ignoring coinbase transactions (described later), if the value of a transaction’s outputs exceed its inputs, the transaction will be rejected—but if the inputs exceed the value of the outputs, any difference in value may be claimed as a :term:`transaction fee ` by the Bitcoin :term:`miner ` who creates the block containing that transaction. For example, in the illustration above, each transaction spends 10,000 satoshis fewer than it receives from its combined inputs, effectively paying a 10,000 satoshi transaction fee. Proof Of Work ------------- @@ -39,13 +39,13 @@ The block chain is collaboratively maintained by anonymous peers on the `network Chaining blocks together makes it impossible to modify transactions included in any block without modifying all subsequent blocks. As a result, the cost to modify a particular block increases with every new block added to the block chain, magnifying the effect of the proof of work. -The :term:`proof of work` used in Bitcoin takes advantage of the apparently random nature of cryptographic hashes. A good cryptographic hash algorithm converts arbitrary data into a seemingly random number. If the data is modified in any way and the hash re-run, a new seemingly random number is produced, so there is no way to modify the data to make the hash number predictable. +The :term:`proof of work ` used in Bitcoin takes advantage of the apparently random nature of cryptographic hashes. A good cryptographic hash algorithm converts arbitrary data into a seemingly random number. If the data is modified in any way and the hash re-run, a new seemingly random number is produced, so there is no way to modify the data to make the hash number predictable. To prove you did some extra work to create a block, you must create a hash of the block header which does not exceed a certain value. For example, if the maximum possible hash value is 2256 − 1, you can prove that you tried up to two combinations by producing a hash value less than 2255. -In the example given above, you will produce a successful hash on average every other try. You can even estimate the probability that a given hash attempt will generate a number below the :term:`target ` threshold. Bitcoin assumes a linear probability that the lower it makes the target threshold, the more hash attempts (on average) will need to be tried. +In the example given above, you will produce a successful hash on average every other try. You can even estimate the probability that a given hash attempt will generate a number below the :term:`target ` threshold. Bitcoin assumes a linear probability that the lower it makes the target threshold, the more hash attempts (on average) will need to be tried. -New blocks will only be added to the block chain if their hash is at least as challenging as a :term:`difficulty` value expected by the consensus protocol. Every 2,016 blocks, the `network <../devguide/p2p_network.html>`__ uses timestamps stored in each block header to calculate the number of seconds elapsed between generation of the first and last of those last 2,016 blocks. The ideal value is 1,209,600 seconds (two weeks). +New blocks will only be added to the block chain if their hash is at least as challenging as a :term:`difficulty ` value expected by the consensus protocol. Every 2,016 blocks, the `network <../devguide/p2p_network.html>`__ uses timestamps stored in each block header to calculate the number of seconds elapsed between generation of the first and last of those last 2,016 blocks. The ideal value is 1,209,600 seconds (two weeks). - If it took fewer than two weeks to generate the 2,016 blocks, the expected difficulty value is increased proportionally (by as much as 300%) so that the next 2,016 blocks should take exactly two weeks to generate if hashes are checked at the same rate. @@ -60,18 +60,18 @@ The block header provides several easy-to-modify fields, such as a dedicated non Block Height And Forking ------------------------ -Any Bitcoin miner who successfully hashes a block header to a value below the target threshold can add the entire block to the block chain (assuming the block is otherwise valid). These blocks are commonly addressed by their :term:`block height`—the number of blocks between them and the first Bitcoin block (block 0, most commonly known as the :term:`genesis block`). For example, block 2016 is where difficulty could have first been adjusted. +Any Bitcoin miner who successfully hashes a block header to a value below the target threshold can add the entire block to the block chain (assuming the block is otherwise valid). These blocks are commonly addressed by their :term:`block height `—the number of blocks between them and the first Bitcoin block (block 0, most commonly known as the :term:`genesis block `). For example, block 2016 is where difficulty could have first been adjusted. .. figure:: /img/dev/en-blockchain-fork.svg :alt: Common And Uncommon Block Chain Forks Common And Uncommon Block Chain Forks -Multiple blocks can all have the same block height, as is common when two or more miners each produce a block at roughly the same time. This creates an apparent :term:`fork` in the block chain, as shown in the illustration above. +Multiple blocks can all have the same block height, as is common when two or more miners each produce a block at roughly the same time. This creates an apparent :term:`fork ` in the block chain, as shown in the illustration above. When miners produce simultaneous blocks at the end of the block chain, each node individually chooses which block to accept. In the absence of other considerations, discussed below, nodes usually use the first block they see. -Eventually a miner produces another block which attaches to only one of the competing simultaneously-mined blocks. This makes that side of the fork stronger than the other side. Assuming a fork only contains valid blocks, normal peers always follow the most difficult chain to recreate and throw away :term:`stale blocks ` belonging to shorter forks. (Stale blocks are also sometimes called orphans or orphan blocks, but those terms are also used for true orphan blocks without a known parent block.) +Eventually a miner produces another block which attaches to only one of the competing simultaneously-mined blocks. This makes that side of the fork stronger than the other side. Assuming a fork only contains valid blocks, normal peers always follow the most difficult chain to recreate and throw away :term:`stale blocks ` belonging to shorter forks. (Stale blocks are also sometimes called orphans or orphan blocks, but those terms are also used for true orphan blocks without a known parent block.) Long-term forks are possible if different miners work at cross-purposes, such as some miners diligently working to extend the block chain at the same time other miners are attempting a 51 percent attack to revise transaction history. @@ -88,7 +88,7 @@ Blocks are not required to include any non-coinbase transactions, but miners alm All transactions, including the coinbase transaction, are encoded into blocks in binary raw transaction format. -The raw transaction format is hashed to create the transaction identifier (txid). From these txids, the :term:`merkle tree` is constructed by pairing each txid with one other txid and then hashing them together. If there are an odd number of txids, the txid without a partner is hashed with a copy of itself. +The raw transaction format is hashed to create the transaction identifier (txid). From these txids, the :term:`merkle tree ` is constructed by pairing each txid with one other txid and then hashing them together. If there are an odd number of txids, the txid without a partner is hashed with a copy of itself. The resulting hashes themselves are each paired with one other hash and hashed together. Any hash without a partner is hashed with itself. The process repeats until only one hash remains, the merkle root. @@ -119,14 +119,14 @@ To maintain consensus, all full nodes validate blocks using the same consensus r 2. A block violating the new consensus rules is rejected by upgraded nodes but accepted by non-upgraded nodes. For example, an abusive transaction feature is used within a block: upgraded nodes reject it because it violates the new rules, but non-upgraded nodes accept it because it follows the old rules. -In the first case, rejection by non-upgraded nodes, mining software which gets block chain data from those non-upgraded nodes refuses to build on the same chain as mining software getting data from upgraded nodes. This creates permanently divergent chains—one for non-upgraded nodes and one for upgraded nodes—called a :term:`hard fork`. +In the first case, rejection by non-upgraded nodes, mining software which gets block chain data from those non-upgraded nodes refuses to build on the same chain as mining software getting data from upgraded nodes. This creates permanently divergent chains—one for non-upgraded nodes and one for upgraded nodes—called a :term:`hard fork `. .. figure:: /img/dev/en-hard-fork.svg :alt: Hard Fork Hard Fork -In the second case, rejection by upgraded nodes, it’s possible to keep the block chain from permanently diverging if upgraded nodes control a majority of the hash rate. That’s because, in this case, non-upgraded nodes will accept as valid all the same blocks as upgraded nodes, so the upgraded nodes can build a stronger chain that the non-upgraded nodes will accept as the best valid block chain. This is called a :term:`soft fork`. +In the second case, rejection by upgraded nodes, it’s possible to keep the block chain from permanently diverging if upgraded nodes control a majority of the hash rate. That’s because, in this case, non-upgraded nodes will accept as valid all the same blocks as upgraded nodes, so the upgraded nodes can build a stronger chain that the non-upgraded nodes will accept as the best valid block chain. This is called a :term:`soft fork `. .. figure:: /img/dev/en-soft-fork.svg :alt: Soft Fork @@ -135,9 +135,9 @@ In the second case, rejection by upgraded nodes, it’s possible to keep the blo Although a fork is an actual divergence in block chains, changes to the consensus rules are often described by their potential to create either a hard or soft fork. For example, “increasing the block size above 1 MB requires a hard fork.” In this example, an actual block chain fork is not required—but it is a possible outcome. -Consensus rule changes may be activated in various ways. During Bitcoin’s first two years, Satoshi Nakamoto performed several soft forks by just releasing the backwards-compatible change in a client that began immediately enforcing the new rule. Multiple soft forks such as `BIP30 `__ have been activated via a flag day where the new rule began to be enforced at a preset time or block height. Such forks activated via a flag day are known as :term:`User Activated Soft Forks ` (UASF) as they are dependent on having sufficient users (nodes) to enforce the new rules after the flag day. +Consensus rule changes may be activated in various ways. During Bitcoin’s first two years, Satoshi Nakamoto performed several soft forks by just releasing the backwards-compatible change in a client that began immediately enforcing the new rule. Multiple soft forks such as `BIP30 `__ have been activated via a flag day where the new rule began to be enforced at a preset time or block height. Such forks activated via a flag day are known as :term:`User Activated Soft Forks ` (UASF) as they are dependent on having sufficient users (nodes) to enforce the new rules after the flag day. -Later soft forks waited for a majority of hash rate (typically 75% or 95%) to signal their readiness for enforcing the new consensus rules. Once the signalling threshold has been passed, all nodes will begin enforcing the new rules. Such forks are known as :term:`Miner Activated Soft Forks ` (MASF) as they are dependent on miners for activation. +Later soft forks waited for a majority of hash rate (typically 75% or 95%) to signal their readiness for enforcing the new consensus rules. Once the signalling threshold has been passed, all nodes will begin enforcing the new rules. Such forks are known as :term:`Miner Activated Soft Forks ` (MASF) as they are dependent on miners for activation. **Resources:** `BIP16 `__, `BIP30 `__, and `BIP34 `__ were implemented as changes which might have lead to soft forks. `BIP50 `__ describes both an accidental hard fork, resolved by temporary downgrading the capabilities of upgraded nodes, and an intentional hard fork when the temporary downgrade was removed. A document from Gavin Andresen outlines `how future rule changes may be implemented `__. diff --git a/devguide/contracts.rst b/devguide/contracts.rst index d44a446..77832b4 100644 --- a/devguide/contracts.rst +++ b/devguide/contracts.rst @@ -17,9 +17,9 @@ Charlie-the-customer wants to buy a product from Bob-the-businessman, but neithe A simple contract could say that Charlie will spend satoshis to an output which can only be spent if Charlie and Bob both sign the input spending it. That means Bob won’t get paid unless Charlie gets his merchandise, but Charlie can’t get the merchandise and keep his payment. -This simple contract isn’t much help if there’s a dispute, so Bob and Charlie enlist the help of Alice-the-arbitrator to create an :term:`escrow contract`. Charlie spends his satoshis to an output which can only be spent if two of the three people sign the input. Now Charlie can pay Bob if everything is ok, Bob can `refund <../devguide/payment_processing.html#issuing-refunds>`__ Charlie’s money if there’s a problem, or Alice can arbitrate and decide who should get the satoshis if there’s a dispute. +This simple contract isn’t much help if there’s a dispute, so Bob and Charlie enlist the help of Alice-the-arbitrator to create an :term:`escrow contract `. Charlie spends his satoshis to an output which can only be spent if two of the three people sign the input. Now Charlie can pay Bob if everything is ok, Bob can `refund <../devguide/payment_processing.html#issuing-refunds>`__ Charlie’s money if there’s a problem, or Alice can arbitrate and decide who should get the satoshis if there’s a dispute. -To create a multiple-signature (:term:`multisig`) output, they each give the others a public key. Then Bob creates the following :term:`P2SH multisig ` redeem script: +To create a multiple-signature (:term:`multisig `) output, they each give the others a public key. Then Bob creates the following :term:`P2SH multisig ` redeem script: :: diff --git a/devguide/p2p_network.rst b/devguide/p2p_network.rst index 77a03a5..66896cd 100644 --- a/devguide/p2p_network.rst +++ b/devguide/p2p_network.rst @@ -15,7 +15,7 @@ To provide practical examples of the Bitcoin `peer-to-peer network <../devguide/ Peer Discovery -------------- -When started for the first time, programs don’t know the IP addresses of any active full nodes. In order to discover some IP addresses, they query one or more DNS names (called :term:`DNS seeds `) hardcoded into Bitcoin Core and `BitcoinJ `__. The response to the lookup should include one or more `DNS A records `__ with the IP addresses of full nodes that may accept new incoming connections. For example, using the `Unix ``dig`` command `__: +When started for the first time, programs don’t know the IP addresses of any active full nodes. In order to discover some IP addresses, they query one or more DNS names (called :term:`DNS seeds `) hardcoded into Bitcoin Core and `BitcoinJ `__. The response to the lookup should include one or more `DNS A records `__ with the IP addresses of full nodes that may accept new incoming connections. For example, using the `Unix ``dig`` command `__: :: @@ -155,7 +155,7 @@ All of these problems are addressed in part or in full by the headers-first IBD Headers-First ~~~~~~~~~~~~~ -`Bitcoin Core 0.10.0 `__ uses an initial block download (IBD) method called *headers-first*. The goal is to download the headers for the best :term:`header chain`, partially validate them as best as possible, and then download the corresponding blocks in parallel. This solves several problems with the older blocks-first IBD method. +`Bitcoin Core 0.10.0 `__ uses an initial block download (IBD) method called *headers-first*. The goal is to download the headers for the best :term:`header chain
`, partially validate them as best as possible, and then download the corresponding blocks in parallel. This solves several problems with the older blocks-first IBD method. .. figure:: /img/dev/en-headers-first-flowchart.svg :alt: Overview Of Headers-First Method @@ -230,7 +230,7 @@ When a miner discovers a new block, it broadcasts the new block to its peers usi The miner replies to each request accordingly by sending the block in a `“block” message <../reference/p2p_networking.html#block>`__, one or more headers in a `“headers” message <../reference/p2p_networking.html#headers>`__, or the merkle block and transactions relative to the SPV client’s bloom filter in a `“merkleblock” message <../reference/p2p_networking.html#merkleblock>`__ followed by zero or more `“tx” messages <../reference/p2p_networking.html#tx>`__. -- :term:`Direct Headers Announcement `\ **:** a relay node may skip the round trip overhead of an `“inv” message <../reference/p2p_networking.html#inv>`__ followed by ``getheaders`` by instead immediately sending a `“headers” message <../reference/p2p_networking.html#headers>`__ containing the full header of the new block. A HF peer receiving this message will partially validate the block header as it would during headers-first IBD, then request the full block contents with a `“getdata” message <../reference/p2p_networking.html#getdata>`__ if the header is valid. The relay node then responds to the ``getdata`` request with the full or filtered block data in a ``block`` or `“merkleblock” message <../reference/p2p_networking.html#merkleblock>`__, respectively. A HF node may signal that it prefers to receive ``headers`` instead of ``inv`` announcements by sending a special `“sendheaders” message <../reference/p2p_networking.html#sendheaders>`__ during the connection handshake. +- :term:`Direct Headers Announcement `\ **:** a relay node may skip the round trip overhead of an `“inv” message <../reference/p2p_networking.html#inv>`__ followed by ``getheaders`` by instead immediately sending a `“headers” message <../reference/p2p_networking.html#headers>`__ containing the full header of the new block. A HF peer receiving this message will partially validate the block header as it would during headers-first IBD, then request the full block contents with a `“getdata” message <../reference/p2p_networking.html#getdata>`__ if the header is valid. The relay node then responds to the ``getdata`` request with the full or filtered block data in a ``block`` or `“merkleblock” message <../reference/p2p_networking.html#merkleblock>`__, respectively. A HF node may signal that it prefers to receive ``headers`` instead of ``inv`` announcements by sending a special `“sendheaders” message <../reference/p2p_networking.html#sendheaders>`__ during the connection handshake. This protocol for block broadcasting was proposed in BIP 130 and has been implemented in Bitcoin Core since version 0.12. diff --git a/devguide/payment_processing.rst b/devguide/payment_processing.rst index 3ed9b21..8b75923 100644 --- a/devguide/payment_processing.rst +++ b/devguide/payment_processing.rst @@ -126,7 +126,7 @@ Payment Protocol |Warning icon| **Warning:** The payment protocol is considered to be deprecated and will be removed in a later version of Bitcoin Core. The protocol has multiple security design flaws and implementation flaws in some wallets. Users will begin receiving deprecation warnings in Bitcoin Core version 0.18 when using `BIP70 `__ URI’s. Merchants should transition away from `BIP70 `__ to more secure options such as `BIP21 `__. Merchants should never require `BIP70 `__ payments and should provide `BIP21 `__ fallbacks. -Bitcoin Core 0.9 supports the new :term:`payment protocol`. The payment protocol adds many important features to payment requests: +Bitcoin Core 0.9 supports the new :term:`payment protocol `. The payment protocol adds many important features to payment requests: - Supports `X.509 `__ certificates and SSL encryption to verify receivers’ identity and help prevent `man-in-the-middle `__ attacks. @@ -217,9 +217,9 @@ Verifying Payment As explained in the `Transactions <../devguide/transactions.html>`__ and `Block Chain <../devguide/block_chain.html>`__ sections, broadcasting a transaction to the `network <../devguide/p2p_network.html>`__ doesn’t ensure that the receiver gets paid. A malicious spender can create one transaction that pays the receiver and a second one that pays the same input back to himself. Only one of these transactions will be added to the block chain, and nobody can say for sure which one it will be. -Two or more transactions spending the same input are commonly referred to as a :term:`double spend`. +Two or more transactions spending the same input are commonly referred to as a :term:`double spend `. -Once the transaction is included in a block, double spends are impossible without modifying block chain history to replace the transaction, which is quite difficult. Using this system, the Bitcoin protocol can give each of your transactions an updating confidence score based on the number of blocks which would need to be modified to replace a transaction. For each block, the transaction gains one :term:`confirmation `. Since modifying blocks is quite difficult, higher confirmation scores indicate greater protection. +Once the transaction is included in a block, double spends are impossible without modifying block chain history to replace the transaction, which is quite difficult. Using this system, the Bitcoin protocol can give each of your transactions an updating confidence score based on the number of blocks which would need to be modified to replace a transaction. For each block, the transaction gains one :term:`confirmation `. Since modifying blocks is quite difficult, higher confirmation scores indicate greater protection. **0 confirmations**: The transaction has been broadcast but is still not included in any block. Zero confirmation transactions (unconfirmed transactions) should generally not be trusted without risk analysis. Although miners usually confirm the first transaction they receive, fraudsters may be able to manipulate the `network <../devguide/p2p_network.html>`__ into including their version of a transaction. diff --git a/devguide/transactions.rst b/devguide/transactions.rst index 99d6f0b..8f30f5f 100644 --- a/devguide/transactions.rst +++ b/devguide/transactions.rst @@ -15,7 +15,7 @@ To keep things simple, this section pretends coinbase transactions do not exist. The Parts Of A Transaction -The figure above shows the main parts of a Bitcoin transaction. Each transaction has at least one input and one output. Each :term:`input` spends the satoshis paid to a previous output. Each :term:`output` then waits as an Unspent Transaction Output (UTXO) until a later input spends it. When your Bitcoin wallet tells you that you have a 10,000 satoshi balance, it really means that you have 10,000 satoshis waiting in one or more UTXOs. +The figure above shows the main parts of a Bitcoin transaction. Each transaction has at least one input and one output. Each :term:`input

\u2022 `add` to add a node to the addnode list. Up to 8 nodes can be added additional to the default 8 nodes. Not limited by `-maxconnections`
\u2022 `remove` to remove a node from the list. If currently connected, this will disconnect immediately
\u2022 `onetry` to immediately attempt connection to the node even if the outgoing connection slots are full; this will only attempt the connection once" + }, + "node": { + "description": "The node to add as a string in the form of `:`. The IP address may be a hostname resolvable through DNS, an IPv4 address, an IPv4-as-IPv6 address, or an IPv6 address" + } + }, + "changed": "0.14.0", + "see_also": { + "commands": [ + "getaddednodeinfo" + ] + } + }, + "addwitnessaddress": { + "deprecated": "0.16.0", + "removed": "0.17.0" + }, + "analyzepsbt": { + "added": "0.18.0" + }, + "backupwallet": { + "see_also": { + "commands": [ + "dumpwallet", + "importwallet" + ] + }, + "wallet": true + }, + "bumpfee": { + "added": "0.14.0", + "see_also": { + "commands": [ + "createrawtransaction", + "fundrawtransaction", + "sendrawtransaction" + ] + } + }, + "clearbanned": { + "added": "0.12.0", + "see_also": { + "commands": [ + "listbanned", + "setban" + ] + } + }, + "createmultisig": { + "see_also": { + "commands": [ + "addmultisigaddress", + "decodescript" + ] + } + }, + "createrawtransaction": { + "changed": "0.14.1", + "see_also": { + "commands": [ + "decoderawtransaction", + "sendrawtransaction" + ] + } + }, + "decoderawtransaction": { + "changed": "0.13.0", + "see_also": { + "commands": [ + "createrawtransaction", + "sendrawtransaction" + ] + } + }, + "decodescript": { + "see_also": { + "commands": [ + "createmultisig" + ] + } + }, + "deriveaddresses": { + "added": "0.18.0" + }, + "disconnectnode": { + "added": "0.12.0", + "changed": "0.14.1", + "see_also": { + "commands": [ + "addnode", + "getaddednodeinfo" + ] + } + }, + "dumpprivkey": { + "see_also": { + "commands": [ + "importprivkey", + "dumpwallet" + ] + } + }, + "dumpwallet": { + "see_also": { + "commands": [ + "backupwallet", + "importwallet" + ] + } + }, + "encryptwallet": { + "see_also": { + "commands": [ + "walletpassphrase", + "walletlock", + "walletpassphrasechange" + ] + } + }, + "estimatefee": { + "deprecated": "0.15.0", + "removed": "0.17.0", + "see_also": { + "commands": [ + "settxfee" + ] + } + }, + "estimatepriority": { + "removed": "0.15.0" + }, + "fundrawtransaction": { + "added": "0.12.0", + "changed": "0.14.0", + "see_also": { + "commands": [ + "createrawtransaction", + "decoderawtransaction", + "sendrawtransaction" + ] + } + }, + "generate": { + "added": "0.11.0", + "changed": "0.13.0", + "deprecated": "0.18.0", + "removed": "0.19" + }, + "generatetoaddress": { + "added": "0.13.0", + "see_also": { + "commands": [ + "generate", + "getmininginfo", + "getblocktemplate" + ] + } + }, + "getaccount": { + "removed": "0.18.0" + }, + "getaccountaddress": { + "deprecated": true, + "removed": "0.18.0" + }, + "getaddednodeinfo": { + "changed": "0.14.0", + "see_also": { + "commands": [ + "addnode", + "getpeerinfo" + ] + } + }, + "getaddressbyaccount": { + "deprecated": true, + "removed": "0.18.0" + }, + "getaddressesbyaccount": { + "removed": "0.18.0", + "see_also": { + "commands": [ + "getbalance" + ] + } + }, + "getaddressesbylabel": { + "added": "0.17.0" + }, + "getaddressinfo": { + "added": "0.17.0" + }, + "getbalance": { + "see_also": { + "commands": [ + "getreceivedbyaddress" + ] + } + }, + "getbalances": { + "added": "0.19" + }, + "getbestblockhash": { + "see_also": { + "commands": [ + "getblock", + "getblockhash" + ] + } + }, + "getblock": { + "args": { + "blockhash": { + "type": "hex" + } + }, + "changed": "0.13.0", + "see_also": { + "commands": [ + "getblockhash", + "getbestblockhash" + ] + }, + "summary": "gets a block with a particular header hash from the local block database either as a JSON object or as a serialized block." + }, + "getblockchaininfo": { + "changed": "0.12.1", + "see_also": { + "commands": [ + "getmininginfo", + "getnetworkinfo", + "getwalletinfo" + ] + } + }, + "getblockcount": { + "see_also": { + "commands": [ + "getblockhash", + "getblock" + ] + } + }, + "getblockfilter": { + "added": "0.19" + }, + "getblockhash": { + "see_also": { + "commands": [ + "getblock", + "getbestblockhash" + ] + } + }, + "getblockheader": { + "added": "0.12.0", + "see_also": { + "commands": [ + "getblock", + "getblockhash", + "getbestblockhash" + ] + } + }, + "getblocktemplate": { + "see_also": { + "commands": [ + "getmininginfo", + "submitblock", + "prioritisetransaction" + ] + } + }, + "getchaintips": { + "see_also": { + "commands": [ + "getbestblockhash", + "getblock", + "getblockchaininfo" + ] + } + }, + "getconnectioncount": { + "see_also": { + "commands": [ + "getnettotals", + "getpeerinfo", + "getnetworkinfo" + ] + } + }, + "getdescriptorinfo": { + "added": "0.18.0" + }, + "getdifficulty": { + "see_also": { + "commands": [ + "getnetworkhashps", + "getmininginfo" + ] + } + }, + "getgenerate": { + "removed": "0.13.0", + "see_also": { + "commands": [ + "generate", + "generatetoaddress", + "getmininginfo" + ] + } + }, + "gethashespersec": { + "removed": "0.11.0", + "see_also": { + "commands": [ + "generate", + "getmininginfo" + ] + } + }, + "getinfo": { + "removed": "0.16.0", + "see_also": { + "commands": [ + "getblockchaininfo", + "getmempoolinfo", + "getmininginfo", + "getnetworkinfo", + "getwalletinfo" + ] + } + }, + "getmemoryinfo": { + "added": "0.14.0", + "see_also": { + "commands": [ + "getmempoolinfo" + ] + } + }, + "getmempoolancestors": { + "added": "0.13.0", + "see_also": { + "commands": [ + "getmempooldescendants", + "getrawmempool" + ] + } + }, + "getmempooldescendants": { + "added": "0.13.0", + "see_also": { + "commands": [ + "getmempoolancestors", + "getrawmempool" + ] + } + }, + "getmempoolentry": { + "added": "0.13.0", + "see_also": { + "commands": [ + "getmempoolancestors", + "getmempooldescendants", + "getrawmempool" + ] + } + }, + "getmempoolinfo": { + "changed": "0.12.0", + "see_also": { + "commands": [ + "getblockchaininfo", + "getrawmempool", + "gettxoutsetinfo" + ] + } + }, + "getmininginfo": { + "changed": "0.14.0", + "see_also": { + "commands": [ + "getmempoolinfo", + "getrawmempool", + "getblocktemplate", + "generate" + ] + } + }, + "getnettotals": { + "changed": "0.12.0", + "see_also": { + "commands": [ + "getnetworkinfo", + "getpeerinfo" + ] + } + }, + "getnetworkhashps": { + "see_also": { + "commands": [ + "getdifficulty", + "getblock" + ] + } + }, + "getnetworkinfo": { + "changed": "0.13.0", + "see_also": { + "commands": [ + "getpeerinfo", + "getnettotals" + ] + } + }, + "getnewaddress": { + "see_also": { + "commands": [ + "getrawchangeaddress", + "getbalance" + ] + } + }, + "getnodeaddresses": { + "added": "0.18.0" + }, + "getpeerinfo": { + "changed": "0.13.0", + "see_also": { + "commands": [ + "getaddednodeinfo", + "getnettotals", + "getnetworkinfo" + ] + } + }, + "getrawchangeaddress": { + "see_also": { + "commands": [ + "getnewaddress" + ] + } + }, + "getrawmempool": { + "changed": "0.13.0", + "see_also": { + "commands": [ + "getmempoolinfo", + "getmempoolentry", + "gettxoutsetinfo" + ] + } + }, + "getrawtransaction": { + "changed": "0.14.0", + "see_also": { + "commands": [ + "gettransaction" + ] + } + }, + "getreceivedbyaccount": { + "deprecated": true, + "removed": "0.18.0" + }, + "getreceivedbyaddress": {}, + "getreceivedbylabel": { + "added": "0.17.0" + }, + "getrpcinfo": { + "added": "0.18.0" + }, + "gettransaction": { + "changed": "0.12.0", + "see_also": { + "commands": [ + "getrawtransaction" + ] + } + }, + "gettxout": { + "see_also": { + "commands": [ + "getrawtransaction", + "gettransaction" + ] + } + }, + "gettxoutproof": { + "added": "0.11.0", + "see_also": { + "commands": [ + "verifytxoutproof" + ], + "messages": [ + [ + "merkleblock", + "A description of the\n format used for the proof." + ] + ] + } + }, + "gettxoutsetinfo": { + "see_also": { + "commands": [ + "getblockchaininfo", + "getmempoolinfo" + ] + } + }, + "getunconfirmedbalance": { + "see_also": { + "commands": [ + "getbalance" + ] + } + }, + "getwalletinfo": { + "see_also": { + "commands": [ + "listtransactions" + ] + } + }, + "getwork": { + "removed": "0.10.0", + "see_also": { + "commands": [ + "getblocktemplate", + "submitblock" + ] + } + }, + "importaddress": { + "see_also": { + "commands": [ + "importprivkey", + "listreceivedbyaddress" + ] + } + }, + "importmulti": { + "added": "0.14.0", + "see_also": { + "commands": [ + "importprivkey", + "importaddress", + "importwallet" + ] + } + }, + "importprivkey": { + "see_also": { + "commands": [ + "dumpprivkey", + "importaddress", + "importwallet" + ] + } + }, + "importprunedfunds": { + "added": "0.13.0", + "see_also": { + "commands": [ + "importprivkey", + "removeprunedfunds" + ] + } + }, + "importwallet": { + "see_also": { + "commands": [ + "dumpwallet", + "importprivkey" + ] + } + }, + "joinpsbts": { + "added": "0.18.0" + }, + "keypoolrefill": { + "see_also": { + "commands": [ + "getnewaddress", + "getwalletinfo" + ] + } + }, + "listaccounts": { + "deprecated": true, + "removed": "0.18.0" + }, + "listaddressgroupings": { + "see_also": { + "commands": [ + "gettransaction" + ] + } + }, + "listbanned": { + "added": "0.12.0", + "see_also": { + "commands": [ + "setban", + "clearbanned" + ] + } + }, + "listlabels": { + "added": "0.17.0" + }, + "listlockunspent": { + "see_also": { + "commands": [ + "lockunspent" + ] + } + }, + "listreceivedbyaccount": { + "deprecated": true, + "removed": "0.18.0" + }, + "listreceivedbyaddress": { + "see_also": { + "commands": [ + "getreceivedbyaddress" + ] + } + }, + "listreceivedbylabel": { + "added": "0.17.0" + }, + "listsinceblock": { + "see_also": { + "commands": [ + "listreceivedbyaddress" + ] + } + }, + "listtransactions": { + "changed": "0.12.1", + "see_also": { + "commands": [ + "gettransaction", + "listsinceblock" + ] + } + }, + "listunspent": { + "changed": "0.13.0", + "see_also": { + "commands": [ + "listtransactions", + "lockunspent" + ] + } + }, + "listwalletdir": { + "added": "0.18.0" + }, + "lockunspent": { + "see_also": { + "commands": [ + "listlockunspent", + "listunspent" + ] + } + }, + "move": { + "deprecated": true, + "removed": "0.18.0" + }, + "ping": { + "see_also": { + "commands": [ + "getpeerinfo" + ] + } + }, + "preciousblock": { + "added": "0.14.0" + }, + "prioritisetransaction": { + "see_also": { + "commands": [ + "getrawmempool", + "getblocktemplate" + ] + } + }, + "pruneblockchain": { + "added": "0.14.0", + "see_also": { + "commands": [ + "importprunedfunds" + ] + } + }, + "removeprunedfunds": { + "added": "0.13.0", + "see_also": { + "commands": [ + "importprivkey", + "importprunedfunds" + ] + } + }, + "rescanblockchain": { + "added": "0.16.0" + }, + "savemempool": { + "added": "0.16.0" + }, + "sendfrom": { + "deprecated": true, + "removed": "0.18.0" + }, + "sendmany": { + "see_also": { + "commands": [ + "sendtoaddress" + ] + } + }, + "sendrawtransaction": { + "see_also": { + "commands": [ + "createrawtransaction", + "decoderawtransaction" + ] + } + }, + "sendtoaddress": { + "see_also": { + "commands": [ + "sendmany" + ] + } + }, + "setaccount": { + "deprecated": true, + "removed": "0.18.0" + }, + "setban": { + "added": "0.12.0", + "see_also": { + "commands": [ + "listbanned", + "clearbanned" + ] + } + }, + "setgenerate": { + "removed": "0.13.0", + "see_also": { + "commands": [ + "generate", + "generatetoaddress", + "getmininginfo", + "getblocktemplate" + ] + } + }, + "setlabel": { + "added": "0.17.0" + }, + "setnetworkactive": { + "added": "0.14.0", + "see_also": { + "commands": [ + "getnetworkinfo" + ] + } + }, + "settxfee": { + "see_also": { + "commands": [ + "getwalletinfo", + "getnetworkinfo" + ] + } + }, + "setwalletflag": { + "added": "0.19" + }, + "signmessage": { + "see_also": { + "commands": [ + "signmessagewithprivkey", + "verifymessage" + ] + } + }, + "signmessagewithprivkey": { + "added": "0.13.0", + "see_also": { + "commands": [ + "signmessage", + "verifymessage" + ] + } + }, + "signrawtransaction": { + "removed": "0.18.0" + }, + "submitblock": { + "see_also": { + "commands": [ + "getblocktemplate" + ] + } + }, + "submitheader": { + "added": "0.18.0" + }, + "utxoupdatepsbt": { + "added": "0.18.0" + }, + "validateaddress": { + "changed": "0.13.0", + "see_also": { + "commands": [ + "importaddress", + "getnewaddress" + ] + } + }, + "verifychain": { + "see_also": { + "commands": [ + "getblockchaininfo", + "gettxoutsetinfo" + ] + } + }, + "verifymessage": { + "see_also": { + "commands": [ + "signmessage" + ] + } + }, + "verifytxoutproof": { + "added": "0.11.0", + "see_also": { + "commands": [ + "gettxoutproof" + ] + } + }, + "walletlock": { + "see_also": { + "commands": [ + "encryptwallet", + "walletpassphrase", + "walletpassphrasechange" + ] + } + }, + "walletpassphrase": { + "see_also": { + "commands": [ + "encryptwallet", + "walletpassphrasechange", + "walletlock" + ] + } + }, + "walletpassphrasechange": { + "see_also": { + "commands": [ + "encryptwallet", + "walletpassphrase", + "walletlock" + ] + } + } +} \ No newline at end of file From 0db20f782a3731a83fed29c9c82e73070f2b246f Mon Sep 17 00:00:00 2001 From: Cornelius Schumacher Date: Sat, 27 Feb 2021 23:08:35 +0100 Subject: [PATCH 52/59] Update RPCs added and removed in 0.20 --- helpers/rpc/annotations-bitcoin-0.21.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/helpers/rpc/annotations-bitcoin-0.21.json b/helpers/rpc/annotations-bitcoin-0.21.json index 8a41136..51e81f8 100644 --- a/helpers/rpc/annotations-bitcoin-0.21.json +++ b/helpers/rpc/annotations-bitcoin-0.21.json @@ -137,6 +137,9 @@ ] } }, + "dumptxoutset": { + "added": "0.20" + }, "dumpwallet": { "see_also": { "commands": [ @@ -193,6 +196,9 @@ ] } }, + "generatetodescriptor": { + "added": "0.20" + }, "getaccount": { "removed": "0.18.0" }, From e37ead609e7aab7ce2ebddfeffed6e17dfe69aba Mon Sep 17 00:00:00 2001 From: Cornelius Schumacher Date: Sat, 27 Feb 2021 23:10:54 +0100 Subject: [PATCH 53/59] Add RPCs added in 0.21 --- helpers/rpc/annotations-bitcoin-0.21.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/helpers/rpc/annotations-bitcoin-0.21.json b/helpers/rpc/annotations-bitcoin-0.21.json index 51e81f8..82c644d 100644 --- a/helpers/rpc/annotations-bitcoin-0.21.json +++ b/helpers/rpc/annotations-bitcoin-0.21.json @@ -362,6 +362,9 @@ ] } }, + "getindexinfo": { + "added": "0.20" + }, "getinfo": { "removed": "0.16.0", "see_also": { @@ -857,6 +860,9 @@ "submitheader": { "added": "0.18.0" }, + "upgradewallet": { + "added": "0.21" + }, "utxoupdatepsbt": { "added": "0.18.0" }, From 7ef0454dde30efe337c865c19a0923692445120b Mon Sep 17 00:00:00 2001 From: Cornelius Schumacher Date: Sat, 27 Feb 2021 23:11:51 +0100 Subject: [PATCH 54/59] Use updated annotations --- helpers/rpc/renderer_rst.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helpers/rpc/renderer_rst.py b/helpers/rpc/renderer_rst.py index 67847f7..27a9b6c 100644 --- a/helpers/rpc/renderer_rst.py +++ b/helpers/rpc/renderer_rst.py @@ -14,7 +14,7 @@ class RendererRst: def __init__(self, output_dir): self.output_dir = Path(output_dir) - self.annotations = Annotations("annotations-bitcoin-0.18.json") + self.annotations = Annotations("annotations-bitcoin-0.21.json") def add_version_note(self, page): if "added" in self.annotation: From 765d39d0a3749c907afc12e20cf6e4f11a423b75 Mon Sep 17 00:00:00 2001 From: Cornelius Schumacher Date: Sat, 27 Feb 2021 23:18:15 +0100 Subject: [PATCH 55/59] Remove docs for removed command --- reference/rpc/generate.rst | 41 -------------------------------------- 1 file changed, 41 deletions(-) delete mode 100644 reference/rpc/generate.rst diff --git a/reference/rpc/generate.rst b/reference/rpc/generate.rst deleted file mode 100644 index 421c97a..0000000 --- a/reference/rpc/generate.rst +++ /dev/null @@ -1,41 +0,0 @@ -.. This file is licensed under the MIT License (MIT) available on - http://opensource.org/licenses/MIT. - -generate -======== - -``generate nblocks ( maxtries )`` - -Mine up to nblocks blocks immediately (before the RPC call returns) to an address in the wallet. - -Argument #1 - nblocks -~~~~~~~~~~~~~~~~~~~~~ - -**Type:** numeric, required - -How many blocks are generated immediately. - -Argument #2 - maxtries -~~~~~~~~~~~~~~~~~~~~~~ - -**Type:** numeric, optional, default=1000000 - -How many iterations to try. - -Result -~~~~~~ - -:: - - [ blockhashes ] (array) hashes of blocks generated - -Examples -~~~~~~~~ - - -.. highlight:: shell - -Generate 11 blocks:: - - bitcoin-cli generate 11 - From abe1c25c8b3d9a570bb0f070a01f72bbf4c061f6 Mon Sep 17 00:00:00 2001 From: Cornelius Schumacher Date: Sat, 27 Feb 2021 23:18:33 +0100 Subject: [PATCH 56/59] Fix header --- index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.rst b/index.rst index a004ea6..49dc437 100644 --- a/index.rst +++ b/index.rst @@ -1,5 +1,5 @@ Getting Started -======== +=============== The site aims to provide the information you need to understand Bitcoin and start building Bitcoin-based applications. To make the best use of From 8c6bab6c4323e3d43fad3d393c91131ac12be30c Mon Sep 17 00:00:00 2001 From: Cornelius Schumacher Date: Sun, 28 Feb 2021 00:32:50 +0100 Subject: [PATCH 57/59] Update RPC docs to Bitcoin Core 0.21 --- helpers/rpc/TODO.md | 12 +- helpers/rpc/annotations-bitcoin-0.21.json | 9 ++ reference/rpc/abandontransaction.rst | 9 +- reference/rpc/abortrescan.rst | 17 +- reference/rpc/addmultisigaddress.rst | 15 +- reference/rpc/addnode.rst | 9 +- reference/rpc/analyzepsbt.rst | 49 +++--- reference/rpc/backupwallet.rst | 9 +- reference/rpc/bumpfee.rst | 51 +++--- reference/rpc/clearbanned.rst | 9 +- reference/rpc/combinepsbt.rst | 17 +- reference/rpc/combinerawtransaction.rst | 8 +- reference/rpc/converttopsbt.rst | 23 ++- reference/rpc/createmultisig.rst | 11 +- reference/rpc/createpsbt.rst | 17 +- reference/rpc/createrawtransaction.rst | 10 +- reference/rpc/createwallet.rst | 38 ++++- reference/rpc/decodepsbt.rst | 152 +++++++++--------- reference/rpc/decoderawtransaction.rst | 87 +++++----- reference/rpc/decodescript.rst | 30 ++-- reference/rpc/deriveaddresses.rst | 5 +- reference/rpc/disconnectnode.rst | 11 +- reference/rpc/dumpprivkey.rst | 4 +- reference/rpc/dumpwallet.rst | 8 +- reference/rpc/encryptwallet.rst | 15 +- reference/rpc/estimatesmartfee.rst | 15 +- reference/rpc/finalizepsbt.rst | 9 +- reference/rpc/fundrawtransaction.rst | 42 +++-- reference/rpc/generateblock.rst | 52 ++++++ reference/rpc/generatetoaddress.rst | 7 +- reference/rpc/generatetodescriptor.rst | 51 ++++++ reference/rpc/getaddednodeinfo.rst | 27 ++-- reference/rpc/getaddressesbylabel.rst | 11 +- reference/rpc/getaddressinfo.rst | 82 +++++----- reference/rpc/getbalance.rst | 19 ++- reference/rpc/getbalances.rst | 43 +++++ reference/rpc/getbestblockhash.rst | 4 +- reference/rpc/getblock.rst | 64 ++++---- reference/rpc/getblockchaininfo.rst | 79 +++++---- reference/rpc/getblockcount.rst | 6 +- reference/rpc/getblockfilter.rst | 48 ++++++ reference/rpc/getblockhash.rst | 4 +- reference/rpc/getblockheader.rst | 38 ++--- reference/rpc/getblockstats.rst | 82 +++++----- reference/rpc/getblocktemplate.rst | 96 +++++------ reference/rpc/getchaintips.rst | 27 ++-- reference/rpc/getchaintxstats.rst | 19 +-- reference/rpc/getconnectioncount.rst | 2 +- reference/rpc/getdescriptorinfo.rst | 11 +- reference/rpc/getdifficulty.rst | 4 +- reference/rpc/getindexinfo.rst | 51 ++++++ reference/rpc/getmemoryinfo.rst | 28 ++-- reference/rpc/getmempoolancestors.rst | 69 ++++---- reference/rpc/getmempooldescendants.rst | 69 ++++---- reference/rpc/getmempoolentry.rst | 58 +++---- reference/rpc/getmempoolinfo.rst | 18 ++- reference/rpc/getmininginfo.rst | 20 +-- reference/rpc/getnettotals.rst | 25 ++- reference/rpc/getnetworkhashps.rst | 4 +- reference/rpc/getnetworkinfo.rst | 66 ++++---- reference/rpc/getnewaddress.rst | 4 +- reference/rpc/getnodeaddresses.rst | 20 +-- reference/rpc/getpeerinfo.rst | 117 +++++++++----- reference/rpc/getrawchangeaddress.rst | 4 +- reference/rpc/getrawmempool.rst | 91 +++++++---- reference/rpc/getrawtransaction.rst | 91 ++++++----- reference/rpc/getreceivedbyaddress.rst | 10 +- reference/rpc/getreceivedbylabel.rst | 4 +- reference/rpc/getrpcinfo.rst | 19 +-- reference/rpc/gettransaction.rst | 90 +++++++---- reference/rpc/gettxout.rst | 30 ++-- reference/rpc/gettxoutproof.rst | 4 +- reference/rpc/gettxoutsetinfo.rst | 29 ++-- reference/rpc/getunconfirmedbalance.rst | 16 +- reference/rpc/getwalletinfo.rst | 37 +++-- reference/rpc/help.rst | 2 +- reference/rpc/importaddress.rst | 13 +- reference/rpc/importdescriptors.rst | 72 +++++++++ reference/rpc/importmulti.rst | 35 ++-- reference/rpc/importprivkey.rst | 11 +- reference/rpc/importprunedfunds.rst | 7 + reference/rpc/importpubkey.rst | 13 +- reference/rpc/importwallet.rst | 11 +- reference/rpc/index.rst | 11 +- reference/rpc/joinpsbts.rst | 15 +- reference/rpc/keypoolrefill.rst | 11 +- reference/rpc/listaddressgroupings.rst | 23 +-- reference/rpc/listbanned.rst | 18 ++- reference/rpc/listlabels.rst | 6 +- reference/rpc/listlockunspent.rst | 14 +- reference/rpc/listreceivedbyaddress.rst | 32 ++-- reference/rpc/listreceivedbylabel.rst | 22 +-- reference/rpc/listsinceblock.rst | 79 +++++---- reference/rpc/listtransactions.rst | 68 ++++---- reference/rpc/listunspent.rst | 47 +++--- reference/rpc/listwalletdir.rst | 14 +- reference/rpc/listwallets.rst | 8 +- reference/rpc/loadwallet.rst | 19 ++- reference/rpc/lockunspent.rst | 6 +- reference/rpc/logging.rst | 12 +- reference/rpc/ping.rst | 9 +- reference/rpc/preciousblock.rst | 9 +- reference/rpc/prioritisetransaction.rst | 4 +- reference/rpc/pruneblockchain.rst | 6 +- reference/rpc/psbtbumpfee.rst | 94 +++++++++++ reference/rpc/removeprunedfunds.rst | 9 +- reference/rpc/rescanblockchain.rst | 10 +- reference/rpc/savemempool.rst | 9 +- reference/rpc/scantxoutset.rst | 37 +++-- reference/rpc/send.rst | 138 ++++++++++++++++ reference/rpc/sendmany.rst | 62 ++++--- reference/rpc/sendrawtransaction.rst | 20 ++- reference/rpc/sendtoaddress.rst | 66 +++++--- reference/rpc/setban.rst | 11 +- reference/rpc/sethdseed.rst | 11 +- reference/rpc/setlabel.rst | 11 +- reference/rpc/setnetworkactive.rst | 13 ++ reference/rpc/settxfee.rst | 6 +- reference/rpc/setwalletflag.rst | 49 ++++++ reference/rpc/signmessage.rst | 5 +- reference/rpc/signmessagewithprivkey.rst | 4 +- reference/rpc/signrawtransactionwithkey.rst | 34 ++-- .../rpc/signrawtransactionwithwallet.rst | 32 ++-- reference/rpc/stop.rst | 15 +- reference/rpc/submitblock.rst | 15 +- reference/rpc/submitheader.rst | 12 +- reference/rpc/testmempoolaccept.rst | 36 +++-- reference/rpc/unloadwallet.rst | 24 ++- reference/rpc/upgradewallet.rst | 46 ++++++ reference/rpc/uptime.rst | 4 +- reference/rpc/utxoupdatepsbt.rst | 35 +++- reference/rpc/validateaddress.rst | 10 +- reference/rpc/verifychain.rst | 10 +- reference/rpc/verifymessage.rst | 2 +- reference/rpc/verifytxoutproof.rst | 15 +- reference/rpc/walletcreatefundedpsbt.rst | 45 +++--- reference/rpc/walletlock.rst | 11 +- reference/rpc/walletpassphrase.rst | 9 +- reference/rpc/walletpassphrasechange.rst | 9 +- reference/rpc/walletprocesspsbt.rst | 13 +- 140 files changed, 2680 insertions(+), 1290 deletions(-) create mode 100644 reference/rpc/generateblock.rst create mode 100644 reference/rpc/generatetodescriptor.rst create mode 100644 reference/rpc/getbalances.rst create mode 100644 reference/rpc/getblockfilter.rst create mode 100644 reference/rpc/getindexinfo.rst create mode 100644 reference/rpc/importdescriptors.rst create mode 100644 reference/rpc/psbtbumpfee.rst create mode 100644 reference/rpc/send.rst create mode 100644 reference/rpc/setwalletflag.rst create mode 100644 reference/rpc/upgradewallet.rst diff --git a/helpers/rpc/TODO.md b/helpers/rpc/TODO.md index 15b0d95..01788d1 100644 --- a/helpers/rpc/TODO.md +++ b/helpers/rpc/TODO.md @@ -1,10 +1,12 @@ # RPC helper To do -* Add RST - * Add basic renderer - * Try rendered result - * Add unit tests - * Refactor (share between backends, abstract rst page) +* Add command to add deprecation notice and deprecate getbalance, getunconfirmedbalance in 0.19 + +* Remove markdown support + * Remove renderer + * Remove helper subcommands which rely on markdown files + +* Add command to add "see also" and add references, e.g. in importaddress, importmulti, importprivkey, importpubkey, importwallet, rescanblockchain, walletprocesspsbt * Fix description * gettxoutproof (first line cut off before "txids") diff --git a/helpers/rpc/annotations-bitcoin-0.21.json b/helpers/rpc/annotations-bitcoin-0.21.json index 82c644d..c9a637b 100644 --- a/helpers/rpc/annotations-bitcoin-0.21.json +++ b/helpers/rpc/annotations-bitcoin-0.21.json @@ -186,6 +186,9 @@ "deprecated": "0.18.0", "removed": "0.19" }, + "generateblock": { + "added": "0.21" + }, "generatetoaddress": { "added": "0.13.0", "see_also": { @@ -586,6 +589,9 @@ ] } }, + "importdescriptors": { + "added": "0.21" + }, "importmulti": { "added": "0.14.0", "see_also": { @@ -743,6 +749,9 @@ ] } }, + "psbtbumpfee": { + "added": "0.21" + }, "removeprunedfunds": { "added": "0.13.0", "see_also": { diff --git a/reference/rpc/abandontransaction.rst b/reference/rpc/abandontransaction.rst index ae6f9b7..b999f86 100644 --- a/reference/rpc/abandontransaction.rst +++ b/reference/rpc/abandontransaction.rst @@ -21,6 +21,13 @@ Argument #1 - txid The transaction id +Result +~~~~~~ + +:: + + null (json null) + Examples ~~~~~~~~ @@ -33,5 +40,5 @@ Examples :: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "abandontransaction", "params": ["1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "abandontransaction", "params": ["1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/abortrescan.rst b/reference/rpc/abortrescan.rst index 2378796..15fa0d6 100644 --- a/reference/rpc/abortrescan.rst +++ b/reference/rpc/abortrescan.rst @@ -8,6 +8,21 @@ abortrescan Stops current wallet rescan triggered by an RPC call, e.g. by an importprivkey call. +Note: Use "getwalletinfo" to query the scanning progress. + +Result +~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Name + - Type + - Description + * - true|false + - boolean + - Whether the abort was successful + Examples ~~~~~~~~ @@ -24,5 +39,5 @@ Abort the running wallet rescan:: As a JSON-RPC call:: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "abortrescan", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "abortrescan", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/addmultisigaddress.rst b/reference/rpc/addmultisigaddress.rst index e9fb9e1..35bcff5 100644 --- a/reference/rpc/addmultisigaddress.rst +++ b/reference/rpc/addmultisigaddress.rst @@ -6,7 +6,7 @@ addmultisigaddress ``addmultisigaddress nrequired ["key",...] ( "label" "address_type" )`` -Add a nrequired-to-sign multisignature address to the wallet. Requires a new wallet backup. +Add an nrequired-to-sign multisignature address to the wallet. Requires a new wallet backup. Each key is a Bitcoin address or hex-encoded public key. @@ -28,7 +28,7 @@ Argument #2 - keys **Type:** json array, required -A json array of bitcoin addresses or hex-encoded public keys +The bitcoin addresses or hex-encoded public keys :: @@ -56,9 +56,10 @@ Result :: - { - "address":"multisigaddress", (string) The value of the new multisig address. - "redeemScript":"script" (string) The string value of the hex-encoded redemption script. + { (json object) + "address" : "str", (string) The value of the new multisig address + "redeemScript" : "hex", (string) The string value of the hex-encoded redemption script + "descriptor" : "str" (string) The descriptor for this multisig } Examples @@ -69,9 +70,9 @@ Examples Add a multisig address from 2 addresses:: - bitcoin-cli addmultisigaddress 2 "[\"16sSauSf5pF2UkUwvKGq4qjNRzBZYqgEL5\",\"171sgjn4YtPu27adkKGrdDwzRTxnRkBfKV\"]" + bitcoin-cli addmultisigaddress 2 "[\"bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl\",\"bc1q02ad21edsxd23d32dfgqqsz4vv4nmtfzuklhy3\"]" As a JSON-RPC call:: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "addmultisigaddress", "params": [2, "[\"16sSauSf5pF2UkUwvKGq4qjNRzBZYqgEL5\",\"171sgjn4YtPu27adkKGrdDwzRTxnRkBfKV\"]"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "addmultisigaddress", "params": [2, "[\"bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl\",\"bc1q02ad21edsxd23d32dfgqqsz4vv4nmtfzuklhy3\"]"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/addnode.rst b/reference/rpc/addnode.rst index 58d91a7..2d66366 100644 --- a/reference/rpc/addnode.rst +++ b/reference/rpc/addnode.rst @@ -27,6 +27,13 @@ Argument #2 - command 'add' to add a node to the list, 'remove' to remove a node from the list, 'onetry' to try a connection to the node once +Result +~~~~~~ + +:: + + null (json null) + Examples ~~~~~~~~ @@ -39,5 +46,5 @@ Examples :: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "addnode", "params": ["192.168.0.6:8333", "onetry"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "addnode", "params": ["192.168.0.6:8333", "onetry"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/analyzepsbt.rst b/reference/rpc/analyzepsbt.rst index 3931797..85b1fa7 100644 --- a/reference/rpc/analyzepsbt.rst +++ b/reference/rpc/analyzepsbt.rst @@ -20,29 +20,32 @@ Result :: - { - "inputs" : [ (array of json objects) - { - "has_utxo" : true|false (boolean) Whether a UTXO is provided - "is_final" : true|false (boolean) Whether the input is finalized - "missing" : { (json object, optional) Things that are missing that are required to complete this input - "pubkeys" : [ (array, optional) - "keyid" (string) Public key ID, hash160 of the public key, of a public key whose BIP 32 derivation path is missing - ] - "signatures" : [ (array, optional) - "keyid" (string) Public key ID, hash160 of the public key, of a public key whose signature is missing - ] - "redeemscript" : "hash" (string, optional) Hash160 of the redeemScript that is missing - "witnessscript" : "hash" (string, optional) SHA256 of the witnessScript that is missing - } - "next" : "role" (string, optional) Role of the next person that this input needs to go to - } - ,... - ] - "estimated_vsize" : vsize (numeric, optional) Estimated vsize of the final signed transaction - "estimated_feerate" : feerate (numeric, optional) Estimated feerate of the final signed transaction in BTC/kB. Shown only if all UTXO slots in the PSBT have been filled. - "fee" : fee (numeric, optional) The transaction fee paid. Shown only if all UTXO slots in the PSBT have been filled. - "next" : "role" (string) Role of the next person that this psbt needs to go to + { (json object) + "inputs" : [ (json array) + { (json object) + "has_utxo" : true|false, (boolean) Whether a UTXO is provided + "is_final" : true|false, (boolean) Whether the input is finalized + "missing" : { (json object, optional) Things that are missing that are required to complete this input + "pubkeys" : [ (json array, optional) + "hex", (string) Public key ID, hash160 of the public key, of a public key whose BIP 32 derivation path is missing + ... + ], + "signatures" : [ (json array, optional) + "hex", (string) Public key ID, hash160 of the public key, of a public key whose signature is missing + ... + ], + "redeemscript" : "hex", (string, optional) Hash160 of the redeemScript that is missing + "witnessscript" : "hex" (string, optional) SHA256 of the witnessScript that is missing + }, + "next" : "str" (string, optional) Role of the next person that this input needs to go to + }, + ... + ], + "estimated_vsize" : n, (numeric, optional) Estimated vsize of the final signed transaction + "estimated_feerate" : n, (numeric, optional) Estimated feerate of the final signed transaction in BTC/kB. Shown only if all UTXO slots in the PSBT have been filled + "fee" : n, (numeric, optional) The transaction fee paid. Shown only if all UTXO slots in the PSBT have been filled + "next" : "str", (string) Role of the next person that this psbt needs to go to + "error" : "str" (string, optional) Error message (if there is one) } Examples diff --git a/reference/rpc/backupwallet.rst b/reference/rpc/backupwallet.rst index 7b60b36..d24e1d9 100644 --- a/reference/rpc/backupwallet.rst +++ b/reference/rpc/backupwallet.rst @@ -15,6 +15,13 @@ Argument #1 - destination The destination directory or file +Result +~~~~~~ + +:: + + null (json null) + Examples ~~~~~~~~ @@ -27,5 +34,5 @@ Examples :: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "backupwallet", "params": ["backup.dat"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "backupwallet", "params": ["backup.dat"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/bumpfee.rst b/reference/rpc/bumpfee.rst index 4e26110..b6877fd 100644 --- a/reference/rpc/bumpfee.rst +++ b/reference/rpc/bumpfee.rst @@ -10,21 +10,25 @@ Bumps the fee of an opt-in-RBF transaction T, replacing it with a new transactio An opt-in RBF transaction with the given txid must be in the wallet. -The command will pay the additional fee by decreasing (or perhaps removing) its change output. +The command will pay the additional fee by reducing change outputs or adding inputs when necessary. + +It may add a new change output if one does not already exist. + +All inputs in the original transaction will be included in the replacement transaction. -If the change output is not big enough to cover the increased fee, the command will currently fail -instead of adding new inputs to compensate. (A future implementation could improve this.) The command will fail if the wallet or mempool contains a transaction that spends one of T's outputs. -By default, the new fee will be calculated automatically using estimatesmartfee. +By default, the new fee will be calculated automatically using the estimatesmartfee RPC. The user can specify a confirmation target for estimatesmartfee. -Alternatively, the user can specify totalFee, or use RPC settxfee to set a higher fee rate. +Alternatively, the user can specify a fee rate in sat/vB for the new transaction. At a minimum, the new fee rate must be high enough to pay an additional new relay fee (incrementalfee returned by getnetworkinfo) to enter the node's mempool. +\* WARNING: before version 0.21, fee_rate was in BTC/kvB. As of 0.21, fee_rate is in sat/vB. \* + Argument #1 - txid ~~~~~~~~~~~~~~~~~~ @@ -40,11 +44,13 @@ Argument #2 - options :: { - "confTarget": n, (numeric, optional, default=fallback to wallet's default) Confirmation target (in blocks) - "totalFee": n, (numeric, optional, default=fallback to 'confTarget') Total fee (NOT feerate) to pay, in satoshis. - In rare cases, the actual fee paid might be slightly higher than the specified - totalFee if the tx change output has to be removed because it is too close to - the dust threshold. + "conf_target": n, (numeric, optional, default=wallet -txconfirmtarget) Confirmation target in blocks + + "fee_rate": amount, (numeric or string, optional, default=not set, fall back to wallet fee estimation) + Specify a fee rate in sat/vB instead of relying on the built-in fee estimator. + Must be at least 1.000 sat/vB higher than the current transaction fee rate. + WARNING: before version 0.21, fee_rate was in BTC/kvB. As of 0.21, fee_rate is in sat/vB. + "replaceable": bool, (boolean, optional, default=true) Whether the new transaction should still be marked bip-125 replaceable. If true, the sequence numbers in the transaction will be left unchanged from the original. If false, any input sequence numbers in the @@ -52,10 +58,11 @@ Argument #2 - options so the new transaction will not be explicitly bip-125 replaceable (though it may still be replaceable in practice, for example if it has unconfirmed ancestors which are replaceable). - "estimate_mode": "str", (string, optional, default=UNSET) The fee estimate mode, must be one of: - "UNSET" - "ECONOMICAL" - "CONSERVATIVE" + + "estimate_mode": "str", (string, optional, default=unset) The fee estimate mode, must be one of (case insensitive): + "unset" + "economical" + "conservative" } Result @@ -63,11 +70,15 @@ Result :: - { - "txid": "value", (string) The id of the new transaction - "origfee": n, (numeric) Fee of the replaced transaction - "fee": n, (numeric) Fee of the new transaction - "errors": [ str... ] (json array of strings) Errors encountered during processing (may be empty) + { (json object) + "psbt" : "str", (string) The base64-encoded unsigned PSBT of the new transaction. Only returned when wallet private keys are disabled. (DEPRECATED) + "txid" : "hex", (string) The id of the new transaction. Only returned when wallet private keys are enabled. + "origfee" : n, (numeric) The fee of the replaced transaction. + "fee" : n, (numeric) The fee of the new transaction. + "errors" : [ (json array) Errors encountered during processing (may be empty). + "str", (string) + ... + ] } Examples @@ -76,7 +87,7 @@ Examples .. highlight:: shell -Bump the fee, get the new transaction's txid:: +Bump the fee, get the new transaction'stxid:: bitcoin-cli bumpfee diff --git a/reference/rpc/clearbanned.rst b/reference/rpc/clearbanned.rst index 688c0a8..5398f34 100644 --- a/reference/rpc/clearbanned.rst +++ b/reference/rpc/clearbanned.rst @@ -8,6 +8,13 @@ clearbanned Clear all banned IPs. +Result +~~~~~~ + +:: + + null (json null) + Examples ~~~~~~~~ @@ -20,5 +27,5 @@ Examples :: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "clearbanned", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "clearbanned", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/combinepsbt.rst b/reference/rpc/combinepsbt.rst index 42ae6bc..c86eade 100644 --- a/reference/rpc/combinepsbt.rst +++ b/reference/rpc/combinepsbt.rst @@ -15,7 +15,7 @@ Argument #1 - txs **Type:** json array, required -A json array of base64 strings of partially signed transactions +The base64 strings of partially signed transactions :: @@ -24,6 +24,19 @@ A json array of base64 strings of partially signed transactions ... ] +Result +~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Name + - Type + - Description + * - str + - string + - The base64-encoded partially signed transaction + Examples ~~~~~~~~ @@ -32,5 +45,5 @@ Examples :: - bitcoin-cli combinepsbt ["mybase64_1", "mybase64_2", "mybase64_3"] + bitcoin-cli combinepsbt '["mybase64_1", "mybase64_2", "mybase64_3"]' diff --git a/reference/rpc/combinerawtransaction.rst b/reference/rpc/combinerawtransaction.rst index 0696d9f..8287b2a 100644 --- a/reference/rpc/combinerawtransaction.rst +++ b/reference/rpc/combinerawtransaction.rst @@ -16,12 +16,12 @@ Argument #1 - txs **Type:** json array, required -A json array of hex strings of partially signed transactions +The hex strings of partially signed transactions :: [ - "hexstring", (string) A transaction hash + "hexstring", (string) A hex-encoded raw transaction ... ] @@ -34,7 +34,7 @@ Result * - Name - Type - Description - * - hex + * - str - string - The hex-encoded raw transaction with signature(s) @@ -46,5 +46,5 @@ Examples :: - bitcoin-cli combinerawtransaction ["myhex1", "myhex2", "myhex3"] + bitcoin-cli combinerawtransaction '["myhex1", "myhex2", "myhex3"]' diff --git a/reference/rpc/converttopsbt.rst b/reference/rpc/converttopsbt.rst index 53678e1..91cd85a 100644 --- a/reference/rpc/converttopsbt.rst +++ b/reference/rpc/converttopsbt.rst @@ -21,7 +21,7 @@ Argument #2 - permitsigdata **Type:** boolean, optional, default=false -If true, any signatures in the input will be discarded and conversion. +If true, any signatures in the input will be discarded and conversion will continue. If false, RPC will fail if any signatures are present. Argument #3 - iswitness @@ -30,9 +30,24 @@ Argument #3 - iswitness **Type:** boolean, optional, default=depends on heuristic tests Whether the transaction hex is a serialized witness transaction. - If iswitness is not present, heuristic tests will be used in decoding. If true, only witness deserializaion - will be tried. If false, only non-witness deserialization will be tried. Only has an effect if - permitsigdata is true. + If iswitness is not present, heuristic tests will be used in decoding. + If true, only witness deserialization will be tried. + If false, only non-witness deserialization will be tried. + This boolean should reflect whether the transaction has inputs + (e.g. fully valid, or on-chain transactions), if known by the caller. + +Result +~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Name + - Type + - Description + * - str + - string + - The resulting raw transaction (base64-encoded string) Examples ~~~~~~~~ diff --git a/reference/rpc/createmultisig.rst b/reference/rpc/createmultisig.rst index f6739a5..23a3bea 100644 --- a/reference/rpc/createmultisig.rst +++ b/reference/rpc/createmultisig.rst @@ -22,7 +22,7 @@ Argument #2 - keys **Type:** json array, required -A json array of hex-encoded public keys. +The hex-encoded public keys. :: @@ -43,9 +43,10 @@ Result :: - { - "address":"multisigaddress", (string) The value of the new multisig address. - "redeemScript":"script" (string) The string value of the hex-encoded redemption script. + { (json object) + "address" : "str", (string) The value of the new multisig address. + "redeemScript" : "hex", (string) The string value of the hex-encoded redemption script. + "descriptor" : "str" (string) The descriptor for this multisig } Examples @@ -60,5 +61,5 @@ Create a multisig address from 2 public keys:: As a JSON-RPC call:: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "createmultisig", "params": [2, "[\"03789ed0bb717d88f7d321a368d905e7430207ebbd82bd342cf11ae157a7ace5fd\",\"03dbc6764b8884a92e871274b87583e6d5c2a58819473e17e107ef3f6aa5a61626\"]"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "createmultisig", "params": [2, "[\"03789ed0bb717d88f7d321a368d905e7430207ebbd82bd342cf11ae157a7ace5fd\",\"03dbc6764b8884a92e871274b87583e6d5c2a58819473e17e107ef3f6aa5a61626\"]"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/createpsbt.rst b/reference/rpc/createpsbt.rst index 5d12c45..2e5f3d5 100644 --- a/reference/rpc/createpsbt.rst +++ b/reference/rpc/createpsbt.rst @@ -15,7 +15,7 @@ Argument #1 - inputs **Type:** json array, required -A json array of json objects +The json objects :: @@ -33,7 +33,7 @@ Argument #2 - outputs **Type:** json array, required -a json array with outputs (key-value pairs), where none of the keys are duplicated. +The outputs (key-value pairs), where none of the keys are duplicated. That is, each address can only appear once and there can only be one 'data' object. For compatibility reasons, a dictionary, which holds the key-value pairs directly, is also accepted as second parameter. @@ -65,6 +65,19 @@ Argument #4 - replaceable Marks this transaction as BIP125 replaceable. Allows this transaction to be replaced by a transaction with higher fees. If provided, it is an error if explicit sequence numbers are incompatible. +Result +~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Name + - Type + - Description + * - str + - string + - The resulting raw transaction (base64-encoded string) + Examples ~~~~~~~~ diff --git a/reference/rpc/createrawtransaction.rst b/reference/rpc/createrawtransaction.rst index 9bb3526..33444e8 100644 --- a/reference/rpc/createrawtransaction.rst +++ b/reference/rpc/createrawtransaction.rst @@ -20,7 +20,7 @@ Argument #1 - inputs **Type:** json array, required -A json array of json objects +The inputs :: @@ -38,7 +38,7 @@ Argument #2 - outputs **Type:** json array, required -a json array with outputs (key-value pairs), where none of the keys are duplicated. +The outputs (key-value pairs), where none of the keys are duplicated. That is, each address can only appear once and there can only be one 'data' object. For compatibility reasons, a dictionary, which holds the key-value pairs directly, is also accepted as second parameter. @@ -79,7 +79,7 @@ Result * - Name - Type - Description - * - transaction + * - hex - string - hex string of the transaction @@ -99,9 +99,9 @@ Examples :: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "createrawtransaction", "params": ["[{\"txid\":\"myid\",\"vout\":0}]", "[{\"address\":0.01}]"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "createrawtransaction", "params": ["[{\"txid\":\"myid\",\"vout\":0}]", "[{\"address\":0.01}]"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ :: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "createrawtransaction", "params": ["[{\"txid\":\"myid\",\"vout\":0}]", "[{\"data\":\"00010203\"}]"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "createrawtransaction", "params": ["[{\"txid\":\"myid\",\"vout\":0}]", "[{\"data\":\"00010203\"}]"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/createwallet.rst b/reference/rpc/createwallet.rst index 91e991f..c978840 100644 --- a/reference/rpc/createwallet.rst +++ b/reference/rpc/createwallet.rst @@ -4,7 +4,7 @@ createwallet ============ -``createwallet "wallet_name" ( disable_private_keys blank )`` +``createwallet "wallet_name" ( disable_private_keys blank "passphrase" avoid_reuse descriptors load_on_startup )`` Creates and loads a new wallet. @@ -29,14 +29,42 @@ Argument #3 - blank Create a blank wallet. A blank wallet has no keys or HD seed. One can be set using sethdseed. +Argument #4 - passphrase +~~~~~~~~~~~~~~~~~~~~~~~~ + +**Type:** string + +Encrypt the wallet with this passphrase. + +Argument #5 - avoid_reuse +~~~~~~~~~~~~~~~~~~~~~~~~~ + +**Type:** boolean, optional, default=false + +Keep track of coin reuse, and treat dirty and clean coins differently with privacy considerations in mind. + +Argument #6 - descriptors +~~~~~~~~~~~~~~~~~~~~~~~~~ + +**Type:** boolean, optional, default=false + +Create a native descriptor wallet. The wallet will use descriptors internally to handle address creation + +Argument #7 - load_on_startup +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +**Type:** boolean, optional, default=null + +Save wallet name to persistent settings and load on startup. True to add wallet to startup list, false to remove, null to leave unchanged. + Result ~~~~~~ :: - { - "name" : , (string) The wallet name if created successfully. If the wallet was created using a full path, the wallet_name will be the full path. - "warning" : , (string) Warning message if wallet was not loaded cleanly. + { (json object) + "name" : "str", (string) The wallet name if created successfully. If the wallet was created using a full path, the wallet_name will be the full path. + "warning" : "str" (string) Warning message if wallet was not loaded cleanly. } Examples @@ -51,5 +79,5 @@ Examples :: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "createwallet", "params": ["testwallet"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "createwallet", "params": ["testwallet"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/decodepsbt.rst b/reference/rpc/decodepsbt.rst index 137c6e4..c7e0609 100644 --- a/reference/rpc/decodepsbt.rst +++ b/reference/rpc/decodepsbt.rst @@ -20,91 +20,93 @@ Result :: - { - "tx" : { (json object) The decoded network-serialized unsigned transaction. - ... The layout is the same as the output of decoderawtransaction. + { (json object) + "tx" : { (json object) The decoded network-serialized unsigned transaction. + ... The layout is the same as the output of decoderawtransaction. }, - "unknown" : { (json object) The unknown global fields - "key" : "value" (key-value pair) An unknown key-value pair - ... + "unknown" : { (json object) The unknown global fields + "key" : "hex", (string) (key-value pair) An unknown key-value pair + ... }, - "inputs" : [ (array of json objects) - { - "non_witness_utxo" : { (json object, optional) Decoded network transaction for non-witness UTXOs + "inputs" : [ (json array) + { (json object) + "non_witness_utxo" : { (json object, optional) Decoded network transaction for non-witness UTXOs ... }, - "witness_utxo" : { (json object, optional) Transaction output for witness UTXOs - "amount" : x.xxx, (numeric) The value in BTC - "scriptPubKey" : { (json object) - "asm" : "asm", (string) The asm - "hex" : "hex", (string) The hex - "type" : "pubkeyhash", (string) The type, eg 'pubkeyhash' - "address" : "address" (string) Bitcoin address if there is one + "witness_utxo" : { (json object, optional) Transaction output for witness UTXOs + "amount" : n, (numeric) The value in BTC + "scriptPubKey" : { (json object) + "asm" : "str", (string) The asm + "hex" : "hex", (string) The hex + "type" : "str", (string) The type, eg 'pubkeyhash' + "address" : "str" (string) Bitcoin address if there is one } }, "partial_signatures" : { (json object, optional) - "pubkey" : "signature", (string) The public key and signature that corresponds to it. - ,... - } - "sighash" : "type", (string, optional) The sighash type to be used - "redeem_script" : { (json object, optional) - "asm" : "asm", (string) The asm - "hex" : "hex", (string) The hex - "type" : "pubkeyhash", (string) The type, eg 'pubkeyhash' - } - "witness_script" : { (json object, optional) - "asm" : "asm", (string) The asm - "hex" : "hex", (string) The hex - "type" : "pubkeyhash", (string) The type, eg 'pubkeyhash' - } - "bip32_derivs" : { (json object, optional) - "pubkey" : { (json object, optional) The public key with the derivation path as the value. - "master_fingerprint" : "fingerprint" (string) The fingerprint of the master key - "path" : "path", (string) The path - } - ,... - } - "final_scriptsig" : { (json object, optional) - "asm" : "asm", (string) The asm - "hex" : "hex", (string) The hex - } - "final_scriptwitness": ["hex", ...] (array of string) hex-encoded witness data (if any) - "unknown" : { (json object) The unknown global fields - "key" : "value" (key-value pair) An unknown key-value pair - ... + "pubkey" : "str", (string) The public key and signature that corresponds to it. + ... }, - } - ,... - ] - "outputs" : [ (array of json objects) - { - "redeem_script" : { (json object, optional) - "asm" : "asm", (string) The asm - "hex" : "hex", (string) The hex - "type" : "pubkeyhash", (string) The type, eg 'pubkeyhash' - } - "witness_script" : { (json object, optional) - "asm" : "asm", (string) The asm - "hex" : "hex", (string) The hex - "type" : "pubkeyhash", (string) The type, eg 'pubkeyhash' - } - "bip32_derivs" : [ (array of json objects, optional) - { - "pubkey" : "pubkey", (string) The public key this path corresponds to - "master_fingerprint" : "fingerprint" (string) The fingerprint of the master key - "path" : "path", (string) The path - } - } - ,... + "sighash" : "str", (string, optional) The sighash type to be used + "redeem_script" : { (json object, optional) + "asm" : "str", (string) The asm + "hex" : "hex", (string) The hex + "type" : "str" (string) The type, eg 'pubkeyhash' + }, + "witness_script" : { (json object, optional) + "asm" : "str", (string) The asm + "hex" : "hex", (string) The hex + "type" : "str" (string) The type, eg 'pubkeyhash' + }, + "bip32_derivs" : [ (json array, optional) + { (json object, optional) The public key with the derivation path as the value. + "master_fingerprint" : "str", (string) The fingerprint of the master key + "path" : "str" (string) The path + }, + ... + ], + "final_scriptsig" : { (json object, optional) + "asm" : "str", (string) The asm + "hex" : "str" (string) The hex + }, + "final_scriptwitness" : [ (json array) + "hex", (string) hex-encoded witness data (if any) + ... ], - "unknown" : { (json object) The unknown global fields - "key" : "value" (key-value pair) An unknown key-value pair - ... + "unknown" : { (json object) The unknown global fields + "key" : "hex", (string) (key-value pair) An unknown key-value pair + ... + } + }, + ... + ], + "outputs" : [ (json array) + { (json object) + "redeem_script" : { (json object, optional) + "asm" : "str", (string) The asm + "hex" : "hex", (string) The hex + "type" : "str" (string) The type, eg 'pubkeyhash' }, - } - ,... - ] - "fee" : fee (numeric, optional) The transaction fee paid if all UTXOs slots in the PSBT have been filled. + "witness_script" : { (json object, optional) + "asm" : "str", (string) The asm + "hex" : "hex", (string) The hex + "type" : "str" (string) The type, eg 'pubkeyhash' + }, + "bip32_derivs" : [ (json array, optional) + { (json object) + "pubkey" : "str", (string) The public key this path corresponds to + "master_fingerprint" : "str", (string) The fingerprint of the master key + "path" : "str" (string) The path + }, + ... + ], + "unknown" : { (json object) The unknown global fields + "key" : "hex", (string) (key-value pair) An unknown key-value pair + ... + } + }, + ... + ], + "fee" : n (numeric, optional) The transaction fee paid if all UTXOs slots in the PSBT have been filled. } Examples diff --git a/reference/rpc/decoderawtransaction.rst b/reference/rpc/decoderawtransaction.rst index 923ad18..2dfe594 100644 --- a/reference/rpc/decoderawtransaction.rst +++ b/reference/rpc/decoderawtransaction.rst @@ -20,52 +20,59 @@ Argument #2 - iswitness **Type:** boolean, optional, default=depends on heuristic tests -Whether the transaction hex is a serialized witness transaction - If iswitness is not present, heuristic tests will be used in decoding +Whether the transaction hex is a serialized witness transaction. + If iswitness is not present, heuristic tests will be used in decoding. + If true, only witness deserialization will be tried. + If false, only non-witness deserialization will be tried. + This boolean should reflect whether the transaction has inputs + (e.g. fully valid, or on-chain transactions), if known by the caller. Result ~~~~~~ :: - { - "txid" : "id", (string) The transaction id - "hash" : "id", (string) The transaction hash (differs from txid for witness transactions) - "size" : n, (numeric) The transaction size - "vsize" : n, (numeric) The virtual transaction size (differs from size for witness transactions) - "weight" : n, (numeric) The transaction's weight (between vsize*4 - 3 and vsize*4) - "version" : n, (numeric) The version - "locktime" : ttt, (numeric) The lock time - "vin" : [ (array of json objects) - { - "txid": "id", (string) The transaction id - "vout": n, (numeric) The output number - "scriptSig": { (json object) The script - "asm": "asm", (string) asm - "hex": "hex" (string) hex - }, - "txinwitness": ["hex", ...] (array of string) hex-encoded witness data (if any) - "sequence": n (numeric) The script sequence number - } - ,... - ], - "vout" : [ (array of json objects) - { - "value" : x.xxx, (numeric) The value in BTC - "n" : n, (numeric) index - "scriptPubKey" : { (json object) - "asm" : "asm", (string) the asm - "hex" : "hex", (string) the hex - "reqSigs" : n, (numeric) The required sigs - "type" : "pubkeyhash", (string) The type, eg 'pubkeyhash' - "addresses" : [ (json array of string) - "12tvKAXCxZjSmdNbao16dKXC8tRWfcF5oc" (string) bitcoin address - ,... - ] - } - } - ,... + { (json object) + "txid" : "hex", (string) The transaction id + "hash" : "hex", (string) The transaction hash (differs from txid for witness transactions) + "size" : n, (numeric) The transaction size + "vsize" : n, (numeric) The virtual transaction size (differs from size for witness transactions) + "weight" : n, (numeric) The transaction's weight (between vsize*4 - 3 and vsize*4) + "version" : n, (numeric) The version + "locktime" : xxx, (numeric) The lock time + "vin" : [ (json array) + { (json object) + "txid" : "hex", (string) The transaction id + "vout" : n, (numeric) The output number + "scriptSig" : { (json object) The script + "asm" : "str", (string) asm + "hex" : "hex" (string) hex + }, + "txinwitness" : [ (json array) + "hex", (string) hex-encoded witness data (if any) + ... + ], + "sequence" : n (numeric) The script sequence number + }, + ... ], + "vout" : [ (json array) + { (json object) + "value" : n, (numeric) The value in BTC + "n" : n, (numeric) index + "scriptPubKey" : { (json object) + "asm" : "str", (string) the asm + "hex" : "hex", (string) the hex + "reqSigs" : n, (numeric) The required sigs + "type" : "str", (string) The type, eg 'pubkeyhash' + "addresses" : [ (json array) + "str", (string) bitcoin address + ... + ] + } + }, + ... + ] } Examples @@ -80,5 +87,5 @@ Examples :: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "decoderawtransaction", "params": ["hexstring"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "decoderawtransaction", "params": ["hexstring"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/decodescript.rst b/reference/rpc/decodescript.rst index 02212c9..123ed9c 100644 --- a/reference/rpc/decodescript.rst +++ b/reference/rpc/decodescript.rst @@ -20,16 +20,26 @@ Result :: - { - "asm":"asm", (string) Script public key - "hex":"hex", (string) hex-encoded public key - "type":"type", (string) The output type - "reqSigs": n, (numeric) The required signatures - "addresses": [ (json array of string) - "address" (string) bitcoin address - ,... + { (json object) + "asm" : "str", (string) Script public key + "type" : "str", (string) The output type (e.g. nonstandard, pubkey, pubkeyhash, scripthash, multisig, nulldata, witness_v0_scripthash, witness_v0_keyhash, witness_v1_taproot, witness_unknown) + "reqSigs" : n, (numeric) The required signatures + "addresses" : [ (json array) + "str", (string) bitcoin address + ... ], - "p2sh","address" (string) address of P2SH script wrapping this redeem script (not returned if the script is already a P2SH). + "p2sh" : "str", (string) address of P2SH script wrapping this redeem script (not returned if the script is already a P2SH) + "segwit" : { (json object) Result of a witness script public key wrapping this redeem script (not returned if the script is a P2SH or witness) + "asm" : "str", (string) String representation of the script public key + "hex" : "hex", (string) Hex string of the script public key + "type" : "str", (string) The type of the script public key (e.g. witness_v0_keyhash or witness_v0_scripthash) + "reqSigs" : n, (numeric) The required signatures (always 1) + "addresses" : [ (json array) (always length 1) + "str", (string) segwit address + ... + ], + "p2sh-segwit" : "str" (string) address of the P2SH script wrapping this witness redeem script + } } Examples @@ -44,5 +54,5 @@ Examples :: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "decodescript", "params": ["hexstring"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "decodescript", "params": ["hexstring"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/deriveaddresses.rst b/reference/rpc/deriveaddresses.rst index 7315f37..dbc6976 100644 --- a/reference/rpc/deriveaddresses.rst +++ b/reference/rpc/deriveaddresses.rst @@ -39,7 +39,10 @@ Result :: - [ address ] (array) the derived addresses + [ (json array) + "str", (string) the derived addresses + ... + ] Examples ~~~~~~~~ diff --git a/reference/rpc/disconnectnode.rst b/reference/rpc/disconnectnode.rst index c319021..ec4db53 100644 --- a/reference/rpc/disconnectnode.rst +++ b/reference/rpc/disconnectnode.rst @@ -26,6 +26,13 @@ Argument #2 - nodeid The node ID (see getpeerinfo for node IDs) +Result +~~~~~~ + +:: + + null (json null) + Examples ~~~~~~~~ @@ -42,9 +49,9 @@ Examples :: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "disconnectnode", "params": ["192.168.0.6:8333"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "disconnectnode", "params": ["192.168.0.6:8333"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ :: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "disconnectnode", "params": ["", 1] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "disconnectnode", "params": ["", 1]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/dumpprivkey.rst b/reference/rpc/dumpprivkey.rst index 4d214b9..52bfe2b 100644 --- a/reference/rpc/dumpprivkey.rst +++ b/reference/rpc/dumpprivkey.rst @@ -26,7 +26,7 @@ Result * - Name - Type - Description - * - key + * - str - string - The private key @@ -46,5 +46,5 @@ Examples :: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "dumpprivkey", "params": ["myaddress"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "dumpprivkey", "params": ["myaddress"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/dumpwallet.rst b/reference/rpc/dumpwallet.rst index 872d09e..6e426b0 100644 --- a/reference/rpc/dumpwallet.rst +++ b/reference/rpc/dumpwallet.rst @@ -18,15 +18,15 @@ Argument #1 - filename **Type:** string, required -The filename with path (either absolute or relative to bitcoind) +The filename with path (absolute path recommended) Result ~~~~~~ :: - { (json object) - "filename" : { (string) The filename with full absolute path + { (json object) + "filename" : "str" (string) The filename with full absolute path } Examples @@ -41,5 +41,5 @@ Examples :: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "dumpwallet", "params": ["test"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "dumpwallet", "params": ["test"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/encryptwallet.rst b/reference/rpc/encryptwallet.rst index f21b7e5..a2085c3 100644 --- a/reference/rpc/encryptwallet.rst +++ b/reference/rpc/encryptwallet.rst @@ -22,6 +22,19 @@ Argument #1 - passphrase The pass phrase to encrypt the wallet with. It must be at least 1 character, but should be long. +Result +~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Name + - Type + - Description + * - str + - string + - A string with further instructions + Examples ~~~~~~~~ @@ -46,5 +59,5 @@ Now lock the wallet again by removing the passphrase:: As a JSON-RPC call:: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "encryptwallet", "params": ["my pass phrase"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "encryptwallet", "params": ["my pass phrase"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/estimatesmartfee.rst b/reference/rpc/estimatesmartfee.rst index edfe95b..678bc74 100644 --- a/reference/rpc/estimatesmartfee.rst +++ b/reference/rpc/estimatesmartfee.rst @@ -38,10 +38,17 @@ Result :: - { - "feerate" : x.x, (numeric, optional) estimate fee rate in BTC/kB - "errors": [ str... ] (json array of strings, optional) Errors encountered during processing - "blocks" : n (numeric) block number where estimate was found + { (json object) + "feerate" : n, (numeric, optional) estimate fee rate in BTC/kB (only present if no errors were encountered) + "errors" : [ (json array, optional) Errors encountered during processing (if there are any) + "str", (string) error + ... + ], + "blocks" : n (numeric) block number where estimate was found + The request target will be clamped between 2 and the highest target + fee estimation is able to return based on how long it has been running. + An error is returned if not enough transactions and blocks + have been observed to make an estimate for any number of blocks. } Examples diff --git a/reference/rpc/finalizepsbt.rst b/reference/rpc/finalizepsbt.rst index bb18890..c9f3ae5 100644 --- a/reference/rpc/finalizepsbt.rst +++ b/reference/rpc/finalizepsbt.rst @@ -32,11 +32,10 @@ Result :: - { - "psbt" : "value", (string) The base64-encoded partially signed transaction if not extracted - "hex" : "value", (string) The hex-encoded network transaction if extracted - "complete" : true|false, (boolean) If the transaction has a complete set of signatures - ] + { (json object) + "psbt" : "str", (string) The base64-encoded partially signed transaction if not extracted + "hex" : "hex", (string) The hex-encoded network transaction if extracted + "complete" : true|false (boolean) If the transaction has a complete set of signatures } Examples diff --git a/reference/rpc/fundrawtransaction.rst b/reference/rpc/fundrawtransaction.rst index f35ab03..0a1280a 100644 --- a/reference/rpc/fundrawtransaction.rst +++ b/reference/rpc/fundrawtransaction.rst @@ -6,9 +6,9 @@ fundrawtransaction ``fundrawtransaction "hexstring" ( options iswitness )`` -Add inputs to a transaction until it has enough in value to meet its out value. +If the transaction has no inputs, they will be automatically selected to meet its out value. -This will not modify existing inputs, and will add at most one change output to the outputs. +It will add at most one change output to the outputs. No existing outputs will be modified unless "subtractFeeFromOutputs" is specified. @@ -39,25 +39,29 @@ Argument #2 - options **Type:** json object, optional for backward compatibility: passing in a true instead of an object will result in {"includeWatching":true} - "replaceable": bool, (boolean, optional, default=fallback to wallet's default) Marks this transaction as BIP125 replaceable. + "replaceable": bool, (boolean, optional, default=wallet default) Marks this transaction as BIP125 replaceable. Allows this transaction to be replaced by a transaction with higher fees - "conf_target": n, (numeric, optional, default=fallback to wallet's default) Confirmation target (in blocks) - "estimate_mode": "str", (string, optional, default=UNSET) The fee estimate mode, must be one of: - "UNSET" - "ECONOMICAL" - "CONSERVATIVE" + "conf_target": n, (numeric, optional, default=wallet -txconfirmtarget) Confirmation target in blocks + "estimate_mode": "str", (string, optional, default=unset) The fee estimate mode, must be one of (case insensitive): + "unset" + "economical" + "conservative" } :: { + "add_inputs": bool, (boolean, optional, default=true) For a transaction with existing inputs, automatically include more if they are not enough. "changeAddress": "str", (string, optional, default=pool address) The bitcoin address to receive the change "changePosition": n, (numeric, optional, default=random) The index of the change output "change_type": "str", (string, optional, default=set by -changetype) The output type to use. Only valid if changeAddress is not specified. Options are "legacy", "p2sh-segwit", and "bech32". - "includeWatching": bool, (boolean, optional, default=false) Also select inputs which are watch only + "includeWatching": bool, (boolean, optional, default=true for watch-only wallets, otherwise false) Also select inputs which are watch only. + Only solvable inputs can be used. Watch-only destinations are solvable if the public key and/or output script was imported, + e.g. with 'importpubkey' or 'importmulti' with the 'pubkeys' or 'desc' field. "lockUnspents": bool, (boolean, optional, default=false) Lock selected unspent outputs - "feeRate": amount, (numeric or string, optional, default=not set: makes wallet determine the fee) Set a specific fee rate in BTC/kB - "subtractFeeFromOutputs": [ (json array, optional, default=empty array) A json array of integers. + "fee_rate": amount, (numeric or string, optional, default=not set, fall back to wallet fee estimation) Specify a fee rate in sat/vB. + "feeRate": amount, (numeric or string, optional, default=not set, fall back to wallet fee estimation) Specify a fee rate in BTC/kvB. + "subtractFeeFromOutputs": [ (json array, optional, default=empty array) The integers. The fee will be equally deducted from the amount of each specified output. Those recipients will receive less bitcoins than you enter in their corresponding amount field. If no outputs are specified here, the sender pays the fee. @@ -70,18 +74,22 @@ Argument #3 - iswitness **Type:** boolean, optional, default=depends on heuristic tests -Whether the transaction hex is a serialized witness transaction - If iswitness is not present, heuristic tests will be used in decoding +Whether the transaction hex is a serialized witness transaction. + If iswitness is not present, heuristic tests will be used in decoding. + If true, only witness deserialization will be tried. + If false, only non-witness deserialization will be tried. + This boolean should reflect whether the transaction has inputs + (e.g. fully valid, or on-chain transactions), if known by the caller. Result ~~~~~~ :: - { - "hex": "value", (string) The resulting raw transaction (hex-encoded string) - "fee": n, (numeric) Fee in BTC the resulting transaction pays - "changepos": n (numeric) The position of the added change output, or -1 + { (json object) + "hex" : "hex", (string) The resulting raw transaction (hex-encoded string) + "fee" : n, (numeric) Fee in BTC the resulting transaction pays + "changepos" : n (numeric) The position of the added change output, or -1 } Examples diff --git a/reference/rpc/generateblock.rst b/reference/rpc/generateblock.rst new file mode 100644 index 0000000..b703155 --- /dev/null +++ b/reference/rpc/generateblock.rst @@ -0,0 +1,52 @@ +.. This file is licensed under the MIT License (MIT) available on + http://opensource.org/licenses/MIT. + +generateblock +============= + +``generateblock "output" ["rawtx/txid",...]`` + +Mine a block with a set of ordered transactions immediately to a specified address or descriptor (before the RPC call returns) + +Argument #1 - output +~~~~~~~~~~~~~~~~~~~~ + +**Type:** string, required + +The address or descriptor to send the newly generated bitcoin to. + +Argument #2 - transactions +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +**Type:** json array, required + +An array of hex strings which are either txids or raw transactions. + Txids must reference transactions currently in the mempool. + All transactions must be valid and in valid order, otherwise the block will be rejected. + +:: + + [ + "rawtx/txid", (string) + ... + ] + +Result +~~~~~~ + +:: + + { (json object) + "hash" : "hex" (string) hash of generated block + } + +Examples +~~~~~~~~ + + +.. highlight:: shell + +Generate a block to myaddress, with txs rawtx and mempool_txid:: + + bitcoin-cli generateblock "myaddress" '["rawtx", "mempool_txid"]' + diff --git a/reference/rpc/generatetoaddress.rst b/reference/rpc/generatetoaddress.rst index ccbc335..0bbbea0 100644 --- a/reference/rpc/generatetoaddress.rst +++ b/reference/rpc/generatetoaddress.rst @@ -34,7 +34,10 @@ Result :: - [ blockhashes ] (array) hashes of blocks generated + [ (json array) hashes of blocks generated + "hex", (string) blockhash + ... + ] Examples ~~~~~~~~ @@ -46,7 +49,7 @@ Generate 11 blocks to myaddress:: bitcoin-cli generatetoaddress 11 "myaddress" -If you are running the bitcoin core wallet, you can get a new address to send the newly generated bitcoin to with::: +If you are using the Bitcoin Core wallet, you can get a new address to send the newly generated bitcoin to with::: bitcoin-cli getnewaddress diff --git a/reference/rpc/generatetodescriptor.rst b/reference/rpc/generatetodescriptor.rst new file mode 100644 index 0000000..bed3987 --- /dev/null +++ b/reference/rpc/generatetodescriptor.rst @@ -0,0 +1,51 @@ +.. This file is licensed under the MIT License (MIT) available on + http://opensource.org/licenses/MIT. + +generatetodescriptor +==================== + +``generatetodescriptor num_blocks "descriptor" ( maxtries )`` + +Mine blocks immediately to a specified descriptor (before the RPC call returns) + +Argument #1 - num_blocks +~~~~~~~~~~~~~~~~~~~~~~~~ + +**Type:** numeric, required + +How many blocks are generated immediately. + +Argument #2 - descriptor +~~~~~~~~~~~~~~~~~~~~~~~~ + +**Type:** string, required + +The descriptor to send the newly generated bitcoin to. + +Argument #3 - maxtries +~~~~~~~~~~~~~~~~~~~~~~ + +**Type:** numeric, optional, default=1000000 + +How many iterations to try. + +Result +~~~~~~ + +:: + + [ (json array) hashes of blocks generated + "hex", (string) blockhash + ... + ] + +Examples +~~~~~~~~ + + +.. highlight:: shell + +Generate 11 blocks to mydesc:: + + bitcoin-cli generatetodescriptor 11 "mydesc" + diff --git a/reference/rpc/getaddednodeinfo.rst b/reference/rpc/getaddednodeinfo.rst index 8a73faa..984b09c 100644 --- a/reference/rpc/getaddednodeinfo.rst +++ b/reference/rpc/getaddednodeinfo.rst @@ -21,18 +21,19 @@ Result :: - [ - { - "addednode" : "192.168.0.201", (string) The node IP address or name (as provided to addnode) - "connected" : true|false, (boolean) If connected - "addresses" : [ (list of objects) Only when connected = true - { - "address" : "192.168.0.201:8333", (string) The bitcoin server IP and port we're connected to - "connected" : "outbound" (string) connection, inbound or outbound - } - ] - } - ,... + [ (json array) + { (json object) + "addednode" : "str", (string) The node IP address or name (as provided to addnode) + "connected" : true|false, (boolean) If connected + "addresses" : [ (json array) Only when connected = true + { (json object) + "address" : "str", (string) The bitcoin server IP and port we're connected to + "connected" : "str" (string) connection, inbound or outbound + }, + ... + ] + }, + ... ] Examples @@ -47,5 +48,5 @@ Examples :: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getaddednodeinfo", "params": ["192.168.0.201"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getaddednodeinfo", "params": ["192.168.0.201"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/getaddressesbylabel.rst b/reference/rpc/getaddressesbylabel.rst index 5bcf409..9e833d1 100644 --- a/reference/rpc/getaddressesbylabel.rst +++ b/reference/rpc/getaddressesbylabel.rst @@ -20,10 +20,11 @@ Result :: - { (json object with addresses as keys) - "address": { (json object with information about address) - "purpose": "string" (string) Purpose of address ("send" for sending address, "receive" for receiving address) - },... + { (json object) json object with addresses as keys + "address" : { (json object) json object with information about address + "purpose" : "str" (string) Purpose of address ("send" for sending address, "receive" for receiving address) + }, + ... } Examples @@ -38,5 +39,5 @@ Examples :: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getaddressesbylabel", "params": ["tabby"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getaddressesbylabel", "params": ["tabby"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/getaddressinfo.rst b/reference/rpc/getaddressinfo.rst index 3e18de1..8690aae 100644 --- a/reference/rpc/getaddressinfo.rst +++ b/reference/rpc/getaddressinfo.rst @@ -6,56 +6,58 @@ getaddressinfo ``getaddressinfo "address"`` -Return information about the given bitcoin address. Some information requires the address -to be in the wallet. +Return information about the given bitcoin address. + +Some of the information will only be present if the address is in the active wallet. Argument #1 - address ~~~~~~~~~~~~~~~~~~~~~ **Type:** string, required -The bitcoin address to get the information of. +The bitcoin address for which to get information. Result ~~~~~~ :: - { - "address" : "address", (string) The bitcoin address validated - "scriptPubKey" : "hex", (string) The hex-encoded scriptPubKey generated by the address - "ismine" : true|false, (boolean) If the address is yours or not - "iswatchonly" : true|false, (boolean) If the address is watchonly - "solvable" : true|false, (boolean) Whether we know how to spend coins sent to this address, ignoring the possible lack of private keys - "desc" : "desc", (string, optional) A descriptor for spending coins sent to this address (only when solvable) - "isscript" : true|false, (boolean) If the key is a script - "ischange" : true|false, (boolean) If the address was used for change output - "iswitness" : true|false, (boolean) If the address is a witness address - "witness_version" : version (numeric, optional) The version number of the witness program - "witness_program" : "hex" (string, optional) The hex value of the witness program - "script" : "type" (string, optional) The output script type. Only if "isscript" is true and the redeemscript is known. Possible types: nonstandard, pubkey, pubkeyhash, scripthash, multisig, nulldata, witness_v0_keyhash, witness_v0_scripthash, witness_unknown - "hex" : "hex", (string, optional) The redeemscript for the p2sh address - "pubkeys" (string, optional) Array of pubkeys associated with the known redeemscript (only if "script" is "multisig") - [ - "pubkey" - ,... - ] - "sigsrequired" : xxxxx (numeric, optional) Number of signatures required to spend multisig output (only if "script" is "multisig") - "pubkey" : "publickeyhex", (string, optional) The hex value of the raw public key, for single-key addresses (possibly embedded in P2SH or P2WSH) - "embedded" : {...}, (object, optional) Information about the address embedded in P2SH or P2WSH, if relevant and known. It includes all getaddressinfo output fields for the embedded address, excluding metadata ("timestamp", "hdkeypath", "hdseedid") and relation to the wallet ("ismine", "iswatchonly"). - "iscompressed" : true|false, (boolean, optional) If the pubkey is compressed - "label" : "label" (string) The label associated with the address, "" is the default label - "timestamp" : timestamp, (number, optional) The creation time of the key if available in seconds since epoch (Jan 1 1970 GMT) - "hdkeypath" : "keypath" (string, optional) The HD keypath if the key is HD and available - "hdseedid" : "" (string, optional) The Hash160 of the HD seed - "hdmasterfingerprint" : "" (string, optional) The fingperint of the master key. - "labels" (object) Array of labels associated with the address. - [ - { (json object of label data) - "name": "labelname" (string) The label - "purpose": "string" (string) Purpose of address ("send" for sending address, "receive" for receiving address) - },... - ] + { (json object) + "address" : "str", (string) The bitcoin address validated. + "scriptPubKey" : "hex", (string) The hex-encoded scriptPubKey generated by the address. + "ismine" : true|false, (boolean) If the address is yours. + "iswatchonly" : true|false, (boolean) If the address is watchonly. + "solvable" : true|false, (boolean) If we know how to spend coins sent to this address, ignoring the possible lack of private keys. + "desc" : "str", (string, optional) A descriptor for spending coins sent to this address (only when solvable). + "isscript" : true|false, (boolean) If the key is a script. + "ischange" : true|false, (boolean) If the address was used for change output. + "iswitness" : true|false, (boolean) If the address is a witness address. + "witness_version" : n, (numeric, optional) The version number of the witness program. + "witness_program" : "hex", (string, optional) The hex value of the witness program. + "script" : "str", (string, optional) The output script type. Only if isscript is true and the redeemscript is known. Possible + types: nonstandard, pubkey, pubkeyhash, scripthash, multisig, nulldata, witness_v0_keyhash, + witness_v0_scripthash, witness_unknown. + "hex" : "hex", (string, optional) The redeemscript for the p2sh address. + "pubkeys" : [ (json array, optional) Array of pubkeys associated with the known redeemscript (only if script is multisig). + "str", (string) + ... + ], + "sigsrequired" : n, (numeric, optional) The number of signatures required to spend multisig output (only if script is multisig). + "pubkey" : "hex", (string, optional) The hex value of the raw public key for single-key addresses (possibly embedded in P2SH or P2WSH). + "embedded" : { (json object, optional) Information about the address embedded in P2SH or P2WSH, if relevant and known. + ... Includes all getaddressinfo output fields for the embedded address, excluding metadata (timestamp, hdkeypath, hdseedid) + and relation to the wallet (ismine, iswatchonly). + }, + "iscompressed" : true|false, (boolean, optional) If the pubkey is compressed. + "timestamp" : xxx, (numeric, optional) The creation time of the key, if available, expressed in UNIX epoch time. + "hdkeypath" : "str", (string, optional) The HD keypath, if the key is HD and available. + "hdseedid" : "hex", (string, optional) The Hash160 of the HD seed. + "hdmasterfingerprint" : "hex", (string, optional) The fingerprint of the master key. + "labels" : [ (json array) Array of labels associated with the address. Currently limited to one label but returned + as an array to keep the API stable if multiple labels are enabled in the future. + "str", (string) Label name (defaults to ""). + ... + ] } Examples @@ -66,9 +68,9 @@ Examples :: - bitcoin-cli getaddressinfo "1PSSGeFHDnKNxiEyFrD1wcEaHr9hrQDDWc" + bitcoin-cli getaddressinfo "bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl" :: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getaddressinfo", "params": ["1PSSGeFHDnKNxiEyFrD1wcEaHr9hrQDDWc"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getaddressinfo", "params": ["bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/getbalance.rst b/reference/rpc/getbalance.rst index 382da4d..6733c20 100644 --- a/reference/rpc/getbalance.rst +++ b/reference/rpc/getbalance.rst @@ -4,7 +4,7 @@ getbalance ========== -``getbalance ( "dummy" minconf include_watchonly )`` +``getbalance ( "dummy" minconf include_watchonly avoid_reuse )`` Returns the total available balance. @@ -28,10 +28,17 @@ Only include transactions confirmed at least this many times. Argument #3 - include_watchonly ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -**Type:** boolean, optional, default=false +**Type:** boolean, optional, default=true for watch-only wallets, otherwise false Also include balance in watch-only addresses (see 'importaddress') +Argument #4 - avoid_reuse +~~~~~~~~~~~~~~~~~~~~~~~~~ + +**Type:** boolean, optional, default=true + +(only available if avoid_reuse wallet flag is set) Do not include balance in dirty outputs; addresses are considered dirty if they have previously been used in a transaction. + Result ~~~~~~ @@ -41,7 +48,7 @@ Result * - Name - Type - Description - * - amount + * - n - numeric - The total amount in BTC received for this wallet. @@ -51,15 +58,15 @@ Examples .. highlight:: shell -The total amount in the wallet with 1 or more confirmations:: +The total amount in the wallet with 0 or more confirmations:: bitcoin-cli getbalance -The total amount in the wallet at least 6 blocks confirmed:: +The total amount in the wallet with at least 6 confirmations:: bitcoin-cli getbalance "*" 6 As a JSON-RPC call:: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getbalance", "params": ["*", 6] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getbalance", "params": ["*", 6]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/getbalances.rst b/reference/rpc/getbalances.rst new file mode 100644 index 0000000..b8f94dc --- /dev/null +++ b/reference/rpc/getbalances.rst @@ -0,0 +1,43 @@ +.. This file is licensed under the MIT License (MIT) available on + http://opensource.org/licenses/MIT. + +getbalances +=========== + +``getbalances`` + +Returns an object with all balances in BTC. + +Result +~~~~~~ + +:: + + { (json object) + "mine" : { (json object) balances from outputs that the wallet can sign + "trusted" : n, (numeric) trusted balance (outputs created by the wallet or confirmed outputs) + "untrusted_pending" : n, (numeric) untrusted pending balance (outputs created by others that are in the mempool) + "immature" : n, (numeric) balance from immature coinbase outputs + "used" : n (numeric) (only present if avoid_reuse is set) balance from coins sent to addresses that were previously spent from (potentially privacy violating) + }, + "watchonly" : { (json object) watchonly balances (not present if wallet does not watch anything) + "trusted" : n, (numeric) trusted balance (outputs created by the wallet or confirmed outputs) + "untrusted_pending" : n, (numeric) untrusted pending balance (outputs created by others that are in the mempool) + "immature" : n (numeric) balance from immature coinbase outputs + } + } + +Examples +~~~~~~~~ + + +.. highlight:: shell + +:: + + bitcoin-cli getbalances + +:: + + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getbalances", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + diff --git a/reference/rpc/getbestblockhash.rst b/reference/rpc/getbestblockhash.rst index fc8061d..297af4b 100644 --- a/reference/rpc/getbestblockhash.rst +++ b/reference/rpc/getbestblockhash.rst @@ -6,7 +6,7 @@ getbestblockhash ``getbestblockhash`` -Returns the hash of the best (tip) block in the longest blockchain. +Returns the hash of the best (tip) block in the most-work fully-validated chain. Result ~~~~~~ @@ -33,5 +33,5 @@ Examples :: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getbestblockhash", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getbestblockhash", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/getblock.rst b/reference/rpc/getblock.rst index ac4b01c..729b0c5 100644 --- a/reference/rpc/getblock.rst +++ b/reference/rpc/getblock.rst @@ -35,38 +35,38 @@ Result (for verbosity = 0) * - Name - Type - Description - * - data + * - hex - string - - A string that is serialized, hex-encoded data for block 'hash'. + - A string that is serialized, hex-encoded data for block 'hash' Result (for verbosity = 1) ~~~~~~~~~~~~~~~~~~~~~~~~~~ :: - { - "hash" : "hash", (string) the block hash (same as provided) - "confirmations" : n, (numeric) The number of confirmations, or -1 if the block is not on the main chain - "size" : n, (numeric) The block size - "strippedsize" : n, (numeric) The block size excluding witness data - "weight" : n (numeric) The block weight as defined in BIP 141 - "height" : n, (numeric) The block height or index - "version" : n, (numeric) The block version - "versionHex" : "00000000", (string) The block version formatted in hexadecimal - "merkleroot" : "xxxx", (string) The merkle root - "tx" : [ (array of string) The transaction ids - "transactionid" (string) The transaction id - ,... + { (json object) + "hash" : "hex", (string) the block hash (same as provided) + "confirmations" : n, (numeric) The number of confirmations, or -1 if the block is not on the main chain + "size" : n, (numeric) The block size + "strippedsize" : n, (numeric) The block size excluding witness data + "weight" : n, (numeric) The block weight as defined in BIP 141 + "height" : n, (numeric) The block height or index + "version" : n, (numeric) The block version + "versionHex" : "hex", (string) The block version formatted in hexadecimal + "merkleroot" : "hex", (string) The merkle root + "tx" : [ (json array) The transaction ids + "hex", (string) The transaction id + ... ], - "time" : ttt, (numeric) The block time in seconds since epoch (Jan 1 1970 GMT) - "mediantime" : ttt, (numeric) The median block time in seconds since epoch (Jan 1 1970 GMT) - "nonce" : n, (numeric) The nonce - "bits" : "1d00ffff", (string) The bits - "difficulty" : x.xxx, (numeric) The difficulty - "chainwork" : "xxxx", (string) Expected number of hashes required to produce the chain up to this block (in hex) - "nTx" : n, (numeric) The number of transactions in the block. - "previousblockhash" : "hash", (string) The hash of the previous block - "nextblockhash" : "hash" (string) The hash of the next block + "time" : xxx, (numeric) The block time expressed in UNIX epoch time + "mediantime" : xxx, (numeric) The median block time expressed in UNIX epoch time + "nonce" : n, (numeric) The nonce + "bits" : "hex", (string) The bits + "difficulty" : n, (numeric) The difficulty + "chainwork" : "hex", (string) Expected number of hashes required to produce the chain up to this block (in hex) + "nTx" : n, (numeric) The number of transactions in the block + "previousblockhash" : "hex", (string) The hash of the previous block + "nextblockhash" : "hex" (string) The hash of the next block } Result (for verbosity = 2) @@ -74,12 +74,14 @@ Result (for verbosity = 2) :: - { - ..., Same output as verbosity = 1. - "tx" : [ (array of Objects) The transactions in the format of the getrawtransaction RPC. Different from verbosity = 1 "tx" result. - ,... - ], - ,... Same output as verbosity = 1. + { (json object) + ..., Same output as verbosity = 1 + "tx" : [ (json array) + { (json object) + ... The transactions in the format of the getrawtransaction RPC. Different from verbosity = 1 "tx" result + }, + ... + ] } Examples @@ -94,5 +96,5 @@ Examples :: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getblock", "params": ["00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getblock", "params": ["00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/getblockchaininfo.rst b/reference/rpc/getblockchaininfo.rst index 6ba9559..e4c726f 100644 --- a/reference/rpc/getblockchaininfo.rst +++ b/reference/rpc/getblockchaininfo.rst @@ -13,47 +13,44 @@ Result :: - { - "chain": "xxxx", (string) current network name as defined in BIP70 (main, test, regtest) - "blocks": xxxxxx, (numeric) the current number of blocks processed in the server - "headers": xxxxxx, (numeric) the current number of headers we have validated - "bestblockhash": "...", (string) the hash of the currently best block - "difficulty": xxxxxx, (numeric) the current difficulty - "mediantime": xxxxxx, (numeric) median time for the current best block - "verificationprogress": xxxx, (numeric) estimate of verification progress [0..1] - "initialblockdownload": xxxx, (bool) (debug information) estimate of whether this node is in Initial Block Download mode. - "chainwork": "xxxx" (string) total amount of work in active chain, in hexadecimal - "size_on_disk": xxxxxx, (numeric) the estimated size of the block and undo files on disk - "pruned": xx, (boolean) if the blocks are subject to pruning - "pruneheight": xxxxxx, (numeric) lowest-height complete block stored (only present if pruning is enabled) - "automatic_pruning": xx, (boolean) whether automatic pruning is enabled (only present if pruning is enabled) - "prune_target_size": xxxxxx, (numeric) the target size used by pruning (only present if automatic pruning is enabled) - "softforks": [ (array) status of softforks in progress - { - "id": "xxxx", (string) name of softfork - "version": xx, (numeric) block version - "reject": { (object) progress toward rejecting pre-softfork blocks - "status": xx, (boolean) true if threshold reached - }, - }, ... - ], - "bip9_softforks": { (object) status of BIP9 softforks in progress - "xxxx" : { (string) name of the softfork - "status": "xxxx", (string) one of "defined", "started", "locked_in", "active", "failed" - "bit": xx, (numeric) the bit (0-28) in the block version field used to signal this softfork (only for "started" status) - "startTime": xx, (numeric) the minimum median time past of a block at which the bit gains its meaning - "timeout": xx, (numeric) the median time past of a block at which the deployment is considered failed if not yet locked in - "since": xx, (numeric) height of the first block to which the status applies - "statistics": { (object) numeric statistics about BIP9 signalling for a softfork (only for "started" status) - "period": xx, (numeric) the length in blocks of the BIP9 signalling period - "threshold": xx, (numeric) the number of blocks with the version bit set required to activate the feature - "elapsed": xx, (numeric) the number of blocks elapsed since the beginning of the current period - "count": xx, (numeric) the number of blocks with the version bit set in the current period - "possible": xx (boolean) returns false if there are not enough blocks left in this period to pass activation threshold + { (json object) + "chain" : "str", (string) current network name (main, test, regtest) + "blocks" : n, (numeric) the height of the most-work fully-validated chain. The genesis block has height 0 + "headers" : n, (numeric) the current number of headers we have validated + "bestblockhash" : "str", (string) the hash of the currently best block + "difficulty" : n, (numeric) the current difficulty + "mediantime" : n, (numeric) median time for the current best block + "verificationprogress" : n, (numeric) estimate of verification progress [0..1] + "initialblockdownload" : true|false, (boolean) (debug information) estimate of whether this node is in Initial Block Download mode + "chainwork" : "hex", (string) total amount of work in active chain, in hexadecimal + "size_on_disk" : n, (numeric) the estimated size of the block and undo files on disk + "pruned" : true|false, (boolean) if the blocks are subject to pruning + "pruneheight" : n, (numeric) lowest-height complete block stored (only present if pruning is enabled) + "automatic_pruning" : true|false, (boolean) whether automatic pruning is enabled (only present if pruning is enabled) + "prune_target_size" : n, (numeric) the target size used by pruning (only present if automatic pruning is enabled) + "softforks" : { (json object) status of softforks + "xxxx" : { (json object) name of the softfork + "type" : "str", (string) one of "buried", "bip9" + "bip9" : { (json object) status of bip9 softforks (only for "bip9" type) + "status" : "str", (string) one of "defined", "started", "locked_in", "active", "failed" + "bit" : n, (numeric) the bit (0-28) in the block version field used to signal this softfork (only for "started" status) + "start_time" : xxx, (numeric) the minimum median time past of a block at which the bit gains its meaning + "timeout" : xxx, (numeric) the median time past of a block at which the deployment is considered failed if not yet locked in + "since" : n, (numeric) height of the first block to which the status applies + "statistics" : { (json object) numeric statistics about BIP9 signalling for a softfork (only for "started" status) + "period" : n, (numeric) the length in blocks of the BIP9 signalling period + "threshold" : n, (numeric) the number of blocks with the version bit set required to activate the feature + "elapsed" : n, (numeric) the number of blocks elapsed since the beginning of the current period + "count" : n, (numeric) the number of blocks with the version bit set in the current period + "possible" : true|false (boolean) returns false if there are not enough blocks left in this period to pass activation threshold } - } - } - "warnings" : "...", (string) any network and blockchain warnings. + }, + "height" : n, (numeric) height of the first block which the rules are or will be enforced (only for "buried" type, or "bip9" type with "active" status) + "active" : true|false (boolean) true if the rules are enforced for the mempool and the next block + }, + ... + }, + "warnings" : "str" (string) any network and blockchain warnings } Examples @@ -68,5 +65,5 @@ Examples :: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getblockchaininfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getblockchaininfo", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/getblockcount.rst b/reference/rpc/getblockcount.rst index 61ba39c..41446c8 100644 --- a/reference/rpc/getblockcount.rst +++ b/reference/rpc/getblockcount.rst @@ -6,7 +6,9 @@ getblockcount ``getblockcount`` -Returns the number of blocks in the longest blockchain. +Returns the height of the most-work fully-validated chain. + +The genesis block has height 0. Result ~~~~~~ @@ -33,5 +35,5 @@ Examples :: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getblockcount", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getblockcount", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/getblockfilter.rst b/reference/rpc/getblockfilter.rst new file mode 100644 index 0000000..f027549 --- /dev/null +++ b/reference/rpc/getblockfilter.rst @@ -0,0 +1,48 @@ +.. This file is licensed under the MIT License (MIT) available on + http://opensource.org/licenses/MIT. + +getblockfilter +============== + +``getblockfilter "blockhash" ( "filtertype" )`` + +Retrieve a BIP 157 content filter for a particular block. + +Argument #1 - blockhash +~~~~~~~~~~~~~~~~~~~~~~~ + +**Type:** string, required + +The hash of the block + +Argument #2 - filtertype +~~~~~~~~~~~~~~~~~~~~~~~~ + +**Type:** string, optional, default=basic + +The type name of the filter + +Result +~~~~~~ + +:: + + { (json object) + "filter" : "hex", (string) the hex-encoded filter data + "header" : "hex" (string) the hex-encoded filter header + } + +Examples +~~~~~~~~ + + +.. highlight:: shell + +:: + + bitcoin-cli getblockfilter "00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09" "basic" + +:: + + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getblockfilter", "params": ["00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09", "basic"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + diff --git a/reference/rpc/getblockhash.rst b/reference/rpc/getblockhash.rst index 826893a..caec69e 100644 --- a/reference/rpc/getblockhash.rst +++ b/reference/rpc/getblockhash.rst @@ -24,7 +24,7 @@ Result * - Name - Type - Description - * - hash + * - hex - string - The block hash @@ -40,5 +40,5 @@ Examples :: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getblockhash", "params": [1000] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getblockhash", "params": [1000]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/getblockheader.rst b/reference/rpc/getblockheader.rst index 2e17c3f..b15871b 100644 --- a/reference/rpc/getblockheader.rst +++ b/reference/rpc/getblockheader.rst @@ -29,22 +29,22 @@ Result (for verbose = true) :: - { - "hash" : "hash", (string) the block hash (same as provided) - "confirmations" : n, (numeric) The number of confirmations, or -1 if the block is not on the main chain - "height" : n, (numeric) The block height or index - "version" : n, (numeric) The block version - "versionHex" : "00000000", (string) The block version formatted in hexadecimal - "merkleroot" : "xxxx", (string) The merkle root - "time" : ttt, (numeric) The block time in seconds since epoch (Jan 1 1970 GMT) - "mediantime" : ttt, (numeric) The median block time in seconds since epoch (Jan 1 1970 GMT) - "nonce" : n, (numeric) The nonce - "bits" : "1d00ffff", (string) The bits - "difficulty" : x.xxx, (numeric) The difficulty - "chainwork" : "0000...1f3" (string) Expected number of hashes required to produce the current chain (in hex) - "nTx" : n, (numeric) The number of transactions in the block. - "previousblockhash" : "hash", (string) The hash of the previous block - "nextblockhash" : "hash", (string) The hash of the next block + { (json object) + "hash" : "hex", (string) the block hash (same as provided) + "confirmations" : n, (numeric) The number of confirmations, or -1 if the block is not on the main chain + "height" : n, (numeric) The block height or index + "version" : n, (numeric) The block version + "versionHex" : "hex", (string) The block version formatted in hexadecimal + "merkleroot" : "hex", (string) The merkle root + "time" : xxx, (numeric) The block time expressed in UNIX epoch time + "mediantime" : xxx, (numeric) The median block time expressed in UNIX epoch time + "nonce" : n, (numeric) The nonce + "bits" : "hex", (string) The bits + "difficulty" : n, (numeric) The difficulty + "chainwork" : "hex", (string) Expected number of hashes required to produce the current chain + "nTx" : n, (numeric) The number of transactions in the block + "previousblockhash" : "hex", (string) The hash of the previous block + "nextblockhash" : "hex" (string) The hash of the next block } Result (for verbose=false) @@ -56,9 +56,9 @@ Result (for verbose=false) * - Name - Type - Description - * - data + * - hex - string - - A string that is serialized, hex-encoded data for block 'hash'. + - A string that is serialized, hex-encoded data for block 'hash' Examples ~~~~~~~~ @@ -72,5 +72,5 @@ Examples :: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getblockheader", "params": ["00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getblockheader", "params": ["00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/getblockstats.rst b/reference/rpc/getblockstats.rst index 72a917e..9f57901 100644 --- a/reference/rpc/getblockstats.rst +++ b/reference/rpc/getblockstats.rst @@ -10,8 +10,6 @@ Compute per block statistics for a given window. All amounts are in satoshis. It won't work for some heights with pruning. -It won't work without -txindex for utxo_size_inc, \*fee or \*feerate stats. - Argument #1 - hash_or_height ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -39,42 +37,42 @@ Result :: - { (json object) - "avgfee": xxxxx, (numeric) Average fee in the block - "avgfeerate": xxxxx, (numeric) Average feerate (in satoshis per virtual byte) - "avgtxsize": xxxxx, (numeric) Average transaction size - "blockhash": xxxxx, (string) The block hash (to check for potential reorgs) - "feerate_percentiles": [ (array of numeric) Feerates at the 10th, 25th, 50th, 75th, and 90th percentile weight unit (in satoshis per virtual byte) - "10th_percentile_feerate", (numeric) The 10th percentile feerate - "25th_percentile_feerate", (numeric) The 25th percentile feerate - "50th_percentile_feerate", (numeric) The 50th percentile feerate - "75th_percentile_feerate", (numeric) The 75th percentile feerate - "90th_percentile_feerate", (numeric) The 90th percentile feerate + { (json object) + "avgfee" : n, (numeric) Average fee in the block + "avgfeerate" : n, (numeric) Average feerate (in satoshis per virtual byte) + "avgtxsize" : n, (numeric) Average transaction size + "blockhash" : "hex", (string) The block hash (to check for potential reorgs) + "feerate_percentiles" : [ (json array) Feerates at the 10th, 25th, 50th, 75th, and 90th percentile weight unit (in satoshis per virtual byte) + n, (numeric) The 10th percentile feerate + n, (numeric) The 25th percentile feerate + n, (numeric) The 50th percentile feerate + n, (numeric) The 75th percentile feerate + n (numeric) The 90th percentile feerate ], - "height": xxxxx, (numeric) The height of the block - "ins": xxxxx, (numeric) The number of inputs (excluding coinbase) - "maxfee": xxxxx, (numeric) Maximum fee in the block - "maxfeerate": xxxxx, (numeric) Maximum feerate (in satoshis per virtual byte) - "maxtxsize": xxxxx, (numeric) Maximum transaction size - "medianfee": xxxxx, (numeric) Truncated median fee in the block - "mediantime": xxxxx, (numeric) The block median time past - "mediantxsize": xxxxx, (numeric) Truncated median transaction size - "minfee": xxxxx, (numeric) Minimum fee in the block - "minfeerate": xxxxx, (numeric) Minimum feerate (in satoshis per virtual byte) - "mintxsize": xxxxx, (numeric) Minimum transaction size - "outs": xxxxx, (numeric) The number of outputs - "subsidy": xxxxx, (numeric) The block subsidy - "swtotal_size": xxxxx, (numeric) Total size of all segwit transactions - "swtotal_weight": xxxxx, (numeric) Total weight of all segwit transactions divided by segwit scale factor (4) - "swtxs": xxxxx, (numeric) The number of segwit transactions - "time": xxxxx, (numeric) The block time - "total_out": xxxxx, (numeric) Total amount in all outputs (excluding coinbase and thus reward [ie subsidy + totalfee]) - "total_size": xxxxx, (numeric) Total size of all non-coinbase transactions - "total_weight": xxxxx, (numeric) Total weight of all non-coinbase transactions divided by segwit scale factor (4) - "totalfee": xxxxx, (numeric) The fee total - "txs": xxxxx, (numeric) The number of transactions (excluding coinbase) - "utxo_increase": xxxxx, (numeric) The increase/decrease in the number of unspent outputs - "utxo_size_inc": xxxxx, (numeric) The increase/decrease in size for the utxo index (not discounting op_return and similar) + "height" : n, (numeric) The height of the block + "ins" : n, (numeric) The number of inputs (excluding coinbase) + "maxfee" : n, (numeric) Maximum fee in the block + "maxfeerate" : n, (numeric) Maximum feerate (in satoshis per virtual byte) + "maxtxsize" : n, (numeric) Maximum transaction size + "medianfee" : n, (numeric) Truncated median fee in the block + "mediantime" : n, (numeric) The block median time past + "mediantxsize" : n, (numeric) Truncated median transaction size + "minfee" : n, (numeric) Minimum fee in the block + "minfeerate" : n, (numeric) Minimum feerate (in satoshis per virtual byte) + "mintxsize" : n, (numeric) Minimum transaction size + "outs" : n, (numeric) The number of outputs + "subsidy" : n, (numeric) The block subsidy + "swtotal_size" : n, (numeric) Total size of all segwit transactions + "swtotal_weight" : n, (numeric) Total weight of all segwit transactions + "swtxs" : n, (numeric) The number of segwit transactions + "time" : n, (numeric) The block time + "total_out" : n, (numeric) Total amount in all outputs (excluding coinbase and thus reward [ie subsidy + totalfee]) + "total_size" : n, (numeric) Total size of all non-coinbase transactions + "total_weight" : n, (numeric) Total weight of all non-coinbase transactions + "totalfee" : n, (numeric) The fee total + "txs" : n, (numeric) The number of transactions (including coinbase) + "utxo_increase" : n, (numeric) The increase/decrease in the number of unspent outputs + "utxo_size_inc" : n (numeric) The increase/decrease in size for the utxo index (not discounting op_return and similar) } Examples @@ -83,11 +81,19 @@ Examples .. highlight:: shell +:: + + bitcoin-cli getblockstats '"00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09"' '["minfeerate","avgfeerate"]' + :: bitcoin-cli getblockstats 1000 '["minfeerate","avgfeerate"]' :: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getblockstats", "params": [1000 '["minfeerate","avgfeerate"]'] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getblockstats", "params": ["00000000c937983704a73af28acdec37b049d214adbda81d7e2a3dd146f6ed09", ["minfeerate","avgfeerate"]]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + +:: + + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getblockstats", "params": [1000, ["minfeerate","avgfeerate"]]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/getblocktemplate.rst b/reference/rpc/getblocktemplate.rst index 4312cb6..14b1e6e 100644 --- a/reference/rpc/getblocktemplate.rst +++ b/reference/rpc/getblocktemplate.rst @@ -4,7 +4,7 @@ getblocktemplate ================ -``getblocktemplate "template_request"`` +``getblocktemplate ( "template_request" )`` If the request parameters include a 'mode' key, that is used to explicitly select between the default 'template' request or a 'proposal'. @@ -20,11 +20,12 @@ For full specification, see BIPs 22, 23, 9, and 145: Argument #1 - template_request ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -**Type:** json object, required +**Type:** json object, optional, default={} -A json object in the following spec +Format of the template "rules": [ (json array, required) A list of strings - "support", (string) client side supported softfork deployment + "segwit", (string, required) (literal) indicates client side segwit support + "str", (string) other client side supported softfork deployment ... ], } @@ -34,7 +35,7 @@ A json object in the following spec { "mode": "str", (string, optional) This must be set to "template", "proposal" (see BIP 23), or omitted "capabilities": [ (json array, optional) A list of strings - "support", (string) client side supported feature, 'longpoll', 'coinbasetxn', 'coinbasevalue', 'proposal', 'serverlist', 'workid' + "str", (string) client side supported feature, 'longpoll', 'coinbasevalue', 'proposal', 'serverlist', 'workid' ... ], @@ -43,48 +44,53 @@ Result :: - { - "version" : n, (numeric) The preferred block version - "rules" : [ "rulename", ... ], (array of strings) specific block rules that are to be enforced - "vbavailable" : { (json object) set of pending, supported versionbit (BIP 9) softfork deployments - "rulename" : bitnumber (numeric) identifies the bit number as indicating acceptance and readiness for the named softfork rule - ,... + { (json object) + "version" : n, (numeric) The preferred block version + "rules" : [ (json array) specific block rules that are to be enforced + "str", (string) name of a rule the client must understand to some extent; see BIP 9 for format + ... + ], + "vbavailable" : { (json object) set of pending, supported versionbit (BIP 9) softfork deployments + "rulename" : n, (numeric) identifies the bit number as indicating acceptance and readiness for the named softfork rule + ... }, - "vbrequired" : n, (numeric) bit mask of versionbits the server requires set in submissions - "previousblockhash" : "xxxx", (string) The hash of current highest block - "transactions" : [ (array) contents of non-coinbase transactions that should be included in the next block - { - "data" : "xxxx", (string) transaction data encoded in hexadecimal (byte-for-byte) - "txid" : "xxxx", (string) transaction id encoded in little-endian hexadecimal - "hash" : "xxxx", (string) hash encoded in little-endian hexadecimal (including witness data) - "depends" : [ (array) array of numbers - n (numeric) transactions before this one (by 1-based index in 'transactions' list) that must be present in the final block if this one is - ,... - ], - "fee": n, (numeric) difference in value between transaction inputs and outputs (in satoshis); for coinbase transactions, this is a negative Number of the total collected block fees (ie, not including the block subsidy); if key is not present, fee is unknown and clients MUST NOT assume there isn't one - "sigops" : n, (numeric) total SigOps cost, as counted for purposes of block limits; if key is not present, sigop cost is unknown and clients MUST NOT assume it is zero - "weight" : n, (numeric) total transaction weight, as counted for purposes of block limits - } - ,... + "vbrequired" : n, (numeric) bit mask of versionbits the server requires set in submissions + "previousblockhash" : "str", (string) The hash of current highest block + "transactions" : [ (json array) contents of non-coinbase transactions that should be included in the next block + { (json object) + "data" : "hex", (string) transaction data encoded in hexadecimal (byte-for-byte) + "txid" : "hex", (string) transaction id encoded in little-endian hexadecimal + "hash" : "hex", (string) hash encoded in little-endian hexadecimal (including witness data) + "depends" : [ (json array) array of numbers + n, (numeric) transactions before this one (by 1-based index in 'transactions' list) that must be present in the final block if this one is + ... + ], + "fee" : n, (numeric) difference in value between transaction inputs and outputs (in satoshis); for coinbase transactions, this is a negative Number of the total collected block fees (ie, not including the block subsidy); if key is not present, fee is unknown and clients MUST NOT assume there isn't one + "sigops" : n, (numeric) total SigOps cost, as counted for purposes of block limits; if key is not present, sigop cost is unknown and clients MUST NOT assume it is zero + "weight" : n (numeric) total transaction weight, as counted for purposes of block limits + }, + ... ], - "coinbaseaux" : { (json object) data that should be included in the coinbase's scriptSig content - "flags" : "xx" (string) key name is to be ignored, and value included in scriptSig + "coinbaseaux" : { (json object) data that should be included in the coinbase's scriptSig content + "key" : "hex", (string) values must be in the coinbase (keys may be ignored) + ... }, - "coinbasevalue" : n, (numeric) maximum allowable input to coinbase transaction, including the generation award and transaction fees (in satoshis) - "coinbasetxn" : { ... }, (json object) information for coinbase transaction - "target" : "xxxx", (string) The hash target - "mintime" : xxx, (numeric) The minimum timestamp appropriate for next block time in seconds since epoch (Jan 1 1970 GMT) - "mutable" : [ (array of string) list of ways the block template may be changed - "value" (string) A way the block template may be changed, e.g. 'time', 'transactions', 'prevblock' - ,... + "coinbasevalue" : n, (numeric) maximum allowable input to coinbase transaction, including the generation award and transaction fees (in satoshis) + "longpollid" : "str", (string) an id to include with a request to longpoll on an update to this template + "target" : "str", (string) The hash target + "mintime" : xxx, (numeric) The minimum timestamp appropriate for the next block time, expressed in UNIX epoch time + "mutable" : [ (json array) list of ways the block template may be changed + "str", (string) A way the block template may be changed, e.g. 'time', 'transactions', 'prevblock' + ... ], - "noncerange" : "00000000ffffffff",(string) A range of valid nonces - "sigoplimit" : n, (numeric) limit of sigops in blocks - "sizelimit" : n, (numeric) limit of block size - "weightlimit" : n, (numeric) limit of block weight - "curtime" : ttt, (numeric) current timestamp in seconds since epoch (Jan 1 1970 GMT) - "bits" : "xxxxxxxx", (string) compressed target of next block - "height" : n (numeric) The height of the next block + "noncerange" : "hex", (string) A range of valid nonces + "sigoplimit" : n, (numeric) limit of sigops in blocks + "sizelimit" : n, (numeric) limit of block size + "weightlimit" : n, (numeric) limit of block weight + "curtime" : xxx, (numeric) current timestamp in UNIX epoch time + "bits" : "str", (string) compressed target of next block + "height" : n, (numeric) The height of the next block + "default_witness_commitment" : "str" (string, optional) a valid witness commitment for the unmodified block template } Examples @@ -95,9 +101,9 @@ Examples :: - bitcoin-cli getblocktemplate {"rules": ["segwit"]} + bitcoin-cli getblocktemplate '{"rules": ["segwit"]}' :: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getblocktemplate", "params": [{"rules": ["segwit"]}] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getblocktemplate", "params": [{"rules": ["segwit"]}]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/getchaintips.rst b/reference/rpc/getchaintips.rst index 5aeec3e..c6b3ecd 100644 --- a/reference/rpc/getchaintips.rst +++ b/reference/rpc/getchaintips.rst @@ -13,19 +13,20 @@ Result :: - [ - { - "height": xxxx, (numeric) height of the chain tip - "hash": "xxxx", (string) block hash of the tip - "branchlen": 0 (numeric) zero for main chain - "status": "active" (string) "active" for the main chain + [ (json array) + { (json object) + "height" : n, (numeric) height of the chain tip + "hash" : "hex", (string) block hash of the tip + "branchlen" : n, (numeric) zero for main chain, otherwise length of branch connecting the tip to the main chain + "status" : "str" (string) status of the chain, "active" for the main chain + Possible values for status: + 1. "invalid" This branch contains at least one invalid block + 2. "headers-only" Not all blocks for this branch are available, but the headers are valid + 3. "valid-headers" All blocks are available for this branch, but they were never fully validated + 4. "valid-fork" This branch is not part of the active chain, but is fully validated + 5. "active" This is the tip of the active main chain, which is certainly valid }, - { - "height": xxxx, - "hash": "xxxx", - "branchlen": 1 (numeric) length of branch connecting the tip to the main chain - "status": "xxxx" (string) status of the chain (active, valid-fork, valid-headers, headers-only, invalid) - } + ... ] Examples @@ -40,5 +41,5 @@ Examples :: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getchaintips", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getchaintips", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/getchaintxstats.rst b/reference/rpc/getchaintxstats.rst index d284e38..a75fd59 100644 --- a/reference/rpc/getchaintxstats.rst +++ b/reference/rpc/getchaintxstats.rst @@ -27,14 +27,15 @@ Result :: - { - "time": xxxxx, (numeric) The timestamp for the final block in the window in UNIX format. - "txcount": xxxxx, (numeric) The total number of transactions in the chain up to that point. - "window_final_block_hash": "...", (string) The hash of the final block in the window. - "window_block_count": xxxxx, (numeric) Size of the window in number of blocks. - "window_tx_count": xxxxx, (numeric) The number of transactions in the window. Only returned if "window_block_count" is > 0. - "window_interval": xxxxx, (numeric) The elapsed time in the window in seconds. Only returned if "window_block_count" is > 0. - "txrate": x.xx, (numeric) The average rate of transactions per second in the window. Only returned if "window_interval" is > 0. + { (json object) + "time" : xxx, (numeric) The timestamp for the final block in the window, expressed in UNIX epoch time + "txcount" : n, (numeric) The total number of transactions in the chain up to that point + "window_final_block_hash" : "hex", (string) The hash of the final block in the window + "window_final_block_height" : n, (numeric) The height of the final block in the window. + "window_block_count" : n, (numeric) Size of the window in number of blocks + "window_tx_count" : n, (numeric) The number of transactions in the window. Only returned if "window_block_count" is > 0 + "window_interval" : n, (numeric) The elapsed time in the window in seconds. Only returned if "window_block_count" is > 0 + "txrate" : n (numeric) The average rate of transactions per second in the window. Only returned if "window_interval" is > 0 } Examples @@ -49,5 +50,5 @@ Examples :: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getchaintxstats", "params": [2016] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getchaintxstats", "params": [2016]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/getconnectioncount.rst b/reference/rpc/getconnectioncount.rst index 5b6ccd3..2d89c62 100644 --- a/reference/rpc/getconnectioncount.rst +++ b/reference/rpc/getconnectioncount.rst @@ -33,5 +33,5 @@ Examples :: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getconnectioncount", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getconnectioncount", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/getdescriptorinfo.rst b/reference/rpc/getdescriptorinfo.rst index a061f47..c66918e 100644 --- a/reference/rpc/getdescriptorinfo.rst +++ b/reference/rpc/getdescriptorinfo.rst @@ -20,11 +20,12 @@ Result :: - { - "descriptor" : "desc", (string) The descriptor in canonical form, without private keys - "isrange" : true|false, (boolean) Whether the descriptor is ranged - "issolvable" : true|false, (boolean) Whether the descriptor is solvable - "hasprivatekeys" : true|false, (boolean) Whether the input descriptor contained at least one private key + { (json object) + "descriptor" : "str", (string) The descriptor in canonical form, without private keys + "checksum" : "str", (string) The checksum for the input descriptor + "isrange" : true|false, (boolean) Whether the descriptor is ranged + "issolvable" : true|false, (boolean) Whether the descriptor is solvable + "hasprivatekeys" : true|false (boolean) Whether the input descriptor contained at least one private key } Examples diff --git a/reference/rpc/getdifficulty.rst b/reference/rpc/getdifficulty.rst index c5baafd..053a0ac 100644 --- a/reference/rpc/getdifficulty.rst +++ b/reference/rpc/getdifficulty.rst @@ -17,7 +17,7 @@ Result * - Name - Type - Description - * - n.nnn + * - n - numeric - the proof-of-work difficulty as a multiple of the minimum difficulty. @@ -33,5 +33,5 @@ Examples :: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getdifficulty", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getdifficulty", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/getindexinfo.rst b/reference/rpc/getindexinfo.rst new file mode 100644 index 0000000..2c575e4 --- /dev/null +++ b/reference/rpc/getindexinfo.rst @@ -0,0 +1,51 @@ +.. This file is licensed under the MIT License (MIT) available on + http://opensource.org/licenses/MIT. + +getindexinfo +============ + +``getindexinfo ( "index_name" )`` + +Returns the status of one or all available indices currently running in the node. + +Argument #1 - index_name +~~~~~~~~~~~~~~~~~~~~~~~~ + +**Type:** string, optional + +Filter results for an index with a specific name. + +Result +~~~~~~ + +:: + + { (json object) + "name" : { (json object) The name of the index + "synced" : true|false, (boolean) Whether the index is synced or not + "best_block_height" : n (numeric) The block height to which the index is synced + } + } + +Examples +~~~~~~~~ + + +.. highlight:: shell + +:: + + bitcoin-cli getindexinfo + +:: + + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getindexinfo", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + +:: + + bitcoin-cli getindexinfo txindex + +:: + + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getindexinfo", "params": [txindex]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + diff --git a/reference/rpc/getmemoryinfo.rst b/reference/rpc/getmemoryinfo.rst index 386bbfe..202caa2 100644 --- a/reference/rpc/getmemoryinfo.rst +++ b/reference/rpc/getmemoryinfo.rst @@ -22,23 +22,29 @@ Result (mode "stats") :: - { - "locked": { (json object) Information about locked memory manager - "used": xxxxx, (numeric) Number of bytes used - "free": xxxxx, (numeric) Number of bytes available in current arenas - "total": xxxxxxx, (numeric) Total number of bytes managed - "locked": xxxxxx, (numeric) Amount of bytes that succeeded locking. If this number is smaller than total, locking pages failed at some point and key data could be swapped to disk. - "chunks_used": xxxxx, (numeric) Number allocated chunks - "chunks_free": xxxxx, (numeric) Number unused chunks + { (json object) + "locked" : { (json object) Information about locked memory manager + "used" : n, (numeric) Number of bytes used + "free" : n, (numeric) Number of bytes available in current arenas + "total" : n, (numeric) Total number of bytes managed + "locked" : n, (numeric) Amount of bytes that succeeded locking. If this number is smaller than total, locking pages failed at some point and key data could be swapped to disk. + "chunks_used" : n, (numeric) Number allocated chunks + "chunks_free" : n (numeric) Number unused chunks } } Result (mode "mallocinfo") ~~~~~~~~~~~~~~~~~~~~~~~~~~ -:: +.. list-table:: + :header-rows: 1 - "..." + * - Name + - Type + - Description + * - str + - string + - "..." Examples ~~~~~~~~ @@ -52,5 +58,5 @@ Examples :: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getmemoryinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getmemoryinfo", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/getmempoolancestors.rst b/reference/rpc/getmempoolancestors.rst index 9fc50d6..06b0e84 100644 --- a/reference/rpc/getmempoolancestors.rst +++ b/reference/rpc/getmempoolancestors.rst @@ -27,9 +27,9 @@ Result (for verbose = false) :: - [ (json array of strings) - "transactionid" (string) The transaction id of an in-mempool ancestor transaction - ,... + [ (json array) + "hex", (string) The transaction id of an in-mempool ancestor transaction + ... ] Result (for verbose = true) @@ -37,34 +37,39 @@ Result (for verbose = true) :: - { (json object) - "transactionid" : { (json object) - "size" : n, (numeric) virtual transaction size as defined in BIP 141. This is different from actual serialized size for witness transactions as witness data is discounted. - "fee" : n, (numeric) transaction fee in BTC (DEPRECATED) - "modifiedfee" : n, (numeric) transaction fee with fee deltas used for mining priority (DEPRECATED) - "time" : n, (numeric) local time transaction entered pool in seconds since 1 Jan 1970 GMT - "height" : n, (numeric) block height when transaction entered pool - "descendantcount" : n, (numeric) number of in-mempool descendant transactions (including this one) - "descendantsize" : n, (numeric) virtual transaction size of in-mempool descendants (including this one) - "descendantfees" : n, (numeric) modified fees (see above) of in-mempool descendants (including this one) (DEPRECATED) - "ancestorcount" : n, (numeric) number of in-mempool ancestor transactions (including this one) - "ancestorsize" : n, (numeric) virtual transaction size of in-mempool ancestors (including this one) - "ancestorfees" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one) (DEPRECATED) - "wtxid" : hash, (string) hash of serialized transaction, including witness data - "fees" : { - "base" : n, (numeric) transaction fee in BTC - "modified" : n, (numeric) transaction fee with fee deltas used for mining priority in BTC - "ancestor" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one) in BTC - "descendant" : n, (numeric) modified fees (see above) of in-mempool descendants (including this one) in BTC - } - "depends" : [ (array) unconfirmed transactions used as inputs for this transaction - "transactionid", (string) parent transaction id - ... ] - "spentby" : [ (array) unconfirmed transactions spending outputs from this transaction - "transactionid", (string) child transaction id - ... ] - "bip125-replaceable" : true|false, (boolean) Whether this transaction could be replaced due to BIP125 (replace-by-fee) - }, ... + { (json object) + "transactionid" : { (json object) + "vsize" : n, (numeric) virtual transaction size as defined in BIP 141. This is different from actual serialized size for witness transactions as witness data is discounted. + "weight" : n, (numeric) transaction weight as defined in BIP 141. + "fee" : n, (numeric) transaction fee in BTC (DEPRECATED) + "modifiedfee" : n, (numeric) transaction fee with fee deltas used for mining priority (DEPRECATED) + "time" : xxx, (numeric) local time transaction entered pool in seconds since 1 Jan 1970 GMT + "height" : n, (numeric) block height when transaction entered pool + "descendantcount" : n, (numeric) number of in-mempool descendant transactions (including this one) + "descendantsize" : n, (numeric) virtual transaction size of in-mempool descendants (including this one) + "descendantfees" : n, (numeric) modified fees (see above) of in-mempool descendants (including this one) (DEPRECATED) + "ancestorcount" : n, (numeric) number of in-mempool ancestor transactions (including this one) + "ancestorsize" : n, (numeric) virtual transaction size of in-mempool ancestors (including this one) + "ancestorfees" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one) (DEPRECATED) + "wtxid" : "hex", (string) hash of serialized transaction, including witness data + "fees" : { (json object) + "base" : n, (numeric) transaction fee in BTC + "modified" : n, (numeric) transaction fee with fee deltas used for mining priority in BTC + "ancestor" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one) in BTC + "descendant" : n (numeric) modified fees (see above) of in-mempool descendants (including this one) in BTC + }, + "depends" : [ (json array) unconfirmed transactions used as inputs for this transaction + "hex", (string) parent transaction id + ... + ], + "spentby" : [ (json array) unconfirmed transactions spending outputs from this transaction + "hex", (string) child transaction id + ... + ], + "bip125-replaceable" : true|false, (boolean) Whether this transaction could be replaced due to BIP125 (replace-by-fee) + "unbroadcast" : true|false (boolean) Whether this transaction is currently unbroadcast (initial broadcast not yet acknowledged by any peers) + }, + ... } Examples @@ -79,5 +84,5 @@ Examples :: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getmempoolancestors", "params": ["mytxid"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getmempoolancestors", "params": ["mytxid"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/getmempooldescendants.rst b/reference/rpc/getmempooldescendants.rst index 9dc4657..6de89b9 100644 --- a/reference/rpc/getmempooldescendants.rst +++ b/reference/rpc/getmempooldescendants.rst @@ -27,9 +27,9 @@ Result (for verbose = false) :: - [ (json array of strings) - "transactionid" (string) The transaction id of an in-mempool descendant transaction - ,... + [ (json array) + "hex", (string) The transaction id of an in-mempool descendant transaction + ... ] Result (for verbose = true) @@ -37,34 +37,39 @@ Result (for verbose = true) :: - { (json object) - "transactionid" : { (json object) - "size" : n, (numeric) virtual transaction size as defined in BIP 141. This is different from actual serialized size for witness transactions as witness data is discounted. - "fee" : n, (numeric) transaction fee in BTC (DEPRECATED) - "modifiedfee" : n, (numeric) transaction fee with fee deltas used for mining priority (DEPRECATED) - "time" : n, (numeric) local time transaction entered pool in seconds since 1 Jan 1970 GMT - "height" : n, (numeric) block height when transaction entered pool - "descendantcount" : n, (numeric) number of in-mempool descendant transactions (including this one) - "descendantsize" : n, (numeric) virtual transaction size of in-mempool descendants (including this one) - "descendantfees" : n, (numeric) modified fees (see above) of in-mempool descendants (including this one) (DEPRECATED) - "ancestorcount" : n, (numeric) number of in-mempool ancestor transactions (including this one) - "ancestorsize" : n, (numeric) virtual transaction size of in-mempool ancestors (including this one) - "ancestorfees" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one) (DEPRECATED) - "wtxid" : hash, (string) hash of serialized transaction, including witness data - "fees" : { - "base" : n, (numeric) transaction fee in BTC - "modified" : n, (numeric) transaction fee with fee deltas used for mining priority in BTC - "ancestor" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one) in BTC - "descendant" : n, (numeric) modified fees (see above) of in-mempool descendants (including this one) in BTC - } - "depends" : [ (array) unconfirmed transactions used as inputs for this transaction - "transactionid", (string) parent transaction id - ... ] - "spentby" : [ (array) unconfirmed transactions spending outputs from this transaction - "transactionid", (string) child transaction id - ... ] - "bip125-replaceable" : true|false, (boolean) Whether this transaction could be replaced due to BIP125 (replace-by-fee) - }, ... + { (json object) + "transactionid" : { (json object) + "vsize" : n, (numeric) virtual transaction size as defined in BIP 141. This is different from actual serialized size for witness transactions as witness data is discounted. + "weight" : n, (numeric) transaction weight as defined in BIP 141. + "fee" : n, (numeric) transaction fee in BTC (DEPRECATED) + "modifiedfee" : n, (numeric) transaction fee with fee deltas used for mining priority (DEPRECATED) + "time" : xxx, (numeric) local time transaction entered pool in seconds since 1 Jan 1970 GMT + "height" : n, (numeric) block height when transaction entered pool + "descendantcount" : n, (numeric) number of in-mempool descendant transactions (including this one) + "descendantsize" : n, (numeric) virtual transaction size of in-mempool descendants (including this one) + "descendantfees" : n, (numeric) modified fees (see above) of in-mempool descendants (including this one) (DEPRECATED) + "ancestorcount" : n, (numeric) number of in-mempool ancestor transactions (including this one) + "ancestorsize" : n, (numeric) virtual transaction size of in-mempool ancestors (including this one) + "ancestorfees" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one) (DEPRECATED) + "wtxid" : "hex", (string) hash of serialized transaction, including witness data + "fees" : { (json object) + "base" : n, (numeric) transaction fee in BTC + "modified" : n, (numeric) transaction fee with fee deltas used for mining priority in BTC + "ancestor" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one) in BTC + "descendant" : n (numeric) modified fees (see above) of in-mempool descendants (including this one) in BTC + }, + "depends" : [ (json array) unconfirmed transactions used as inputs for this transaction + "hex", (string) parent transaction id + ... + ], + "spentby" : [ (json array) unconfirmed transactions spending outputs from this transaction + "hex", (string) child transaction id + ... + ], + "bip125-replaceable" : true|false, (boolean) Whether this transaction could be replaced due to BIP125 (replace-by-fee) + "unbroadcast" : true|false (boolean) Whether this transaction is currently unbroadcast (initial broadcast not yet acknowledged by any peers) + }, + ... } Examples @@ -79,5 +84,5 @@ Examples :: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getmempooldescendants", "params": ["mytxid"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getmempooldescendants", "params": ["mytxid"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/getmempoolentry.rst b/reference/rpc/getmempoolentry.rst index be93f9d..e5c3582 100644 --- a/reference/rpc/getmempoolentry.rst +++ b/reference/rpc/getmempoolentry.rst @@ -20,32 +20,36 @@ Result :: - { (json object) - "size" : n, (numeric) virtual transaction size as defined in BIP 141. This is different from actual serialized size for witness transactions as witness data is discounted. - "fee" : n, (numeric) transaction fee in BTC (DEPRECATED) - "modifiedfee" : n, (numeric) transaction fee with fee deltas used for mining priority (DEPRECATED) - "time" : n, (numeric) local time transaction entered pool in seconds since 1 Jan 1970 GMT - "height" : n, (numeric) block height when transaction entered pool - "descendantcount" : n, (numeric) number of in-mempool descendant transactions (including this one) - "descendantsize" : n, (numeric) virtual transaction size of in-mempool descendants (including this one) - "descendantfees" : n, (numeric) modified fees (see above) of in-mempool descendants (including this one) (DEPRECATED) - "ancestorcount" : n, (numeric) number of in-mempool ancestor transactions (including this one) - "ancestorsize" : n, (numeric) virtual transaction size of in-mempool ancestors (including this one) - "ancestorfees" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one) (DEPRECATED) - "wtxid" : hash, (string) hash of serialized transaction, including witness data - "fees" : { - "base" : n, (numeric) transaction fee in BTC - "modified" : n, (numeric) transaction fee with fee deltas used for mining priority in BTC - "ancestor" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one) in BTC - "descendant" : n, (numeric) modified fees (see above) of in-mempool descendants (including this one) in BTC - } - "depends" : [ (array) unconfirmed transactions used as inputs for this transaction - "transactionid", (string) parent transaction id - ... ] - "spentby" : [ (array) unconfirmed transactions spending outputs from this transaction - "transactionid", (string) child transaction id - ... ] - "bip125-replaceable" : true|false, (boolean) Whether this transaction could be replaced due to BIP125 (replace-by-fee) + { (json object) + "vsize" : n, (numeric) virtual transaction size as defined in BIP 141. This is different from actual serialized size for witness transactions as witness data is discounted. + "weight" : n, (numeric) transaction weight as defined in BIP 141. + "fee" : n, (numeric) transaction fee in BTC (DEPRECATED) + "modifiedfee" : n, (numeric) transaction fee with fee deltas used for mining priority (DEPRECATED) + "time" : xxx, (numeric) local time transaction entered pool in seconds since 1 Jan 1970 GMT + "height" : n, (numeric) block height when transaction entered pool + "descendantcount" : n, (numeric) number of in-mempool descendant transactions (including this one) + "descendantsize" : n, (numeric) virtual transaction size of in-mempool descendants (including this one) + "descendantfees" : n, (numeric) modified fees (see above) of in-mempool descendants (including this one) (DEPRECATED) + "ancestorcount" : n, (numeric) number of in-mempool ancestor transactions (including this one) + "ancestorsize" : n, (numeric) virtual transaction size of in-mempool ancestors (including this one) + "ancestorfees" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one) (DEPRECATED) + "wtxid" : "hex", (string) hash of serialized transaction, including witness data + "fees" : { (json object) + "base" : n, (numeric) transaction fee in BTC + "modified" : n, (numeric) transaction fee with fee deltas used for mining priority in BTC + "ancestor" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one) in BTC + "descendant" : n (numeric) modified fees (see above) of in-mempool descendants (including this one) in BTC + }, + "depends" : [ (json array) unconfirmed transactions used as inputs for this transaction + "hex", (string) parent transaction id + ... + ], + "spentby" : [ (json array) unconfirmed transactions spending outputs from this transaction + "hex", (string) child transaction id + ... + ], + "bip125-replaceable" : true|false, (boolean) Whether this transaction could be replaced due to BIP125 (replace-by-fee) + "unbroadcast" : true|false (boolean) Whether this transaction is currently unbroadcast (initial broadcast not yet acknowledged by any peers) } Examples @@ -60,5 +64,5 @@ Examples :: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getmempoolentry", "params": ["mytxid"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getmempoolentry", "params": ["mytxid"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/getmempoolinfo.rst b/reference/rpc/getmempoolinfo.rst index 4cb8c43..079233a 100644 --- a/reference/rpc/getmempoolinfo.rst +++ b/reference/rpc/getmempoolinfo.rst @@ -13,13 +13,15 @@ Result :: - { - "size": xxxxx, (numeric) Current tx count - "bytes": xxxxx, (numeric) Sum of all virtual transaction sizes as defined in BIP 141. Differs from actual serialized size because witness data is discounted - "usage": xxxxx, (numeric) Total memory usage for the mempool - "maxmempool": xxxxx, (numeric) Maximum memory usage for the mempool - "mempoolminfee": xxxxx (numeric) Minimum fee rate in BTC/kB for tx to be accepted. Is the maximum of minrelaytxfee and minimum mempool fee - "minrelaytxfee": xxxxx (numeric) Current minimum relay fee for transactions + { (json object) + "loaded" : true|false, (boolean) True if the mempool is fully loaded + "size" : n, (numeric) Current tx count + "bytes" : n, (numeric) Sum of all virtual transaction sizes as defined in BIP 141. Differs from actual serialized size because witness data is discounted + "usage" : n, (numeric) Total memory usage for the mempool + "maxmempool" : n, (numeric) Maximum memory usage for the mempool + "mempoolminfee" : n, (numeric) Minimum fee rate in BTC/kB for tx to be accepted. Is the maximum of minrelaytxfee and minimum mempool fee + "minrelaytxfee" : n, (numeric) Current minimum relay fee for transactions + "unbroadcastcount" : n (numeric) Current number of transactions that haven't passed initial broadcast yet } Examples @@ -34,5 +36,5 @@ Examples :: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getmempoolinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getmempoolinfo", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/getmininginfo.rst b/reference/rpc/getmininginfo.rst index 5a36f4c..dbd0060 100644 --- a/reference/rpc/getmininginfo.rst +++ b/reference/rpc/getmininginfo.rst @@ -13,15 +13,15 @@ Result :: - { - "blocks": nnn, (numeric) The current block - "currentblockweight": nnn, (numeric, optional) The block weight of the last assembled block (only present if a block was ever assembled) - "currentblocktx": nnn, (numeric, optional) The number of block transactions of the last assembled block (only present if a block was ever assembled) - "difficulty": xxx.xxxxx (numeric) The current difficulty - "networkhashps": nnn, (numeric) The network hashes per second - "pooledtx": n (numeric) The size of the mempool - "chain": "xxxx", (string) current network name as defined in BIP70 (main, test, regtest) - "warnings": "..." (string) any network and blockchain warnings + { (json object) + "blocks" : n, (numeric) The current block + "currentblockweight" : n, (numeric, optional) The block weight of the last assembled block (only present if a block was ever assembled) + "currentblocktx" : n, (numeric, optional) The number of block transactions of the last assembled block (only present if a block was ever assembled) + "difficulty" : n, (numeric) The current difficulty + "networkhashps" : n, (numeric) The network hashes per second + "pooledtx" : n, (numeric) The size of the mempool + "chain" : "str", (string) current network name (main, test, regtest) + "warnings" : "str" (string) any network and blockchain warnings } Examples @@ -36,5 +36,5 @@ Examples :: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getmininginfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getmininginfo", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/getnettotals.rst b/reference/rpc/getnettotals.rst index 2f4aa27..f3194ae 100644 --- a/reference/rpc/getnettotals.rst +++ b/reference/rpc/getnettotals.rst @@ -14,18 +14,17 @@ Result :: - { - "totalbytesrecv": n, (numeric) Total bytes received - "totalbytessent": n, (numeric) Total bytes sent - "timemillis": t, (numeric) Current UNIX time in milliseconds - "uploadtarget": - { - "timeframe": n, (numeric) Length of the measuring timeframe in seconds - "target": n, (numeric) Target in bytes - "target_reached": true|false, (boolean) True if target is reached - "serve_historical_blocks": true|false, (boolean) True if serving historical blocks - "bytes_left_in_cycle": t, (numeric) Bytes left in current time cycle - "time_left_in_cycle": t (numeric) Seconds left in current time cycle + { (json object) + "totalbytesrecv" : n, (numeric) Total bytes received + "totalbytessent" : n, (numeric) Total bytes sent + "timemillis" : xxx, (numeric) Current UNIX epoch time in milliseconds + "uploadtarget" : { (json object) + "timeframe" : n, (numeric) Length of the measuring timeframe in seconds + "target" : n, (numeric) Target in bytes + "target_reached" : true|false, (boolean) True if target is reached + "serve_historical_blocks" : true|false, (boolean) True if serving historical blocks + "bytes_left_in_cycle" : n, (numeric) Bytes left in current time cycle + "time_left_in_cycle" : n (numeric) Seconds left in current time cycle } } @@ -41,5 +40,5 @@ Examples :: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getnettotals", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getnettotals", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/getnetworkhashps.rst b/reference/rpc/getnetworkhashps.rst index 70629e3..bab864b 100644 --- a/reference/rpc/getnetworkhashps.rst +++ b/reference/rpc/getnetworkhashps.rst @@ -35,7 +35,7 @@ Result * - Name - Type - Description - * - x + * - n - numeric - Hashes per second estimated @@ -51,5 +51,5 @@ Examples :: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getnetworkhashps", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getnetworkhashps", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/getnetworkinfo.rst b/reference/rpc/getnetworkinfo.rst index 083b1ff..6179424 100644 --- a/reference/rpc/getnetworkinfo.rst +++ b/reference/rpc/getnetworkinfo.rst @@ -13,36 +13,42 @@ Result :: - { - "version": xxxxx, (numeric) the server version - "subversion": "/Satoshi:x.x.x/", (string) the server subversion string - "protocolversion": xxxxx, (numeric) the protocol version - "localservices": "xxxxxxxxxxxxxxxx", (string) the services we offer to the network - "localrelay": true|false, (bool) true if transaction relay is requested from peers - "timeoffset": xxxxx, (numeric) the time offset - "connections": xxxxx, (numeric) the number of connections - "networkactive": true|false, (bool) whether p2p networking is enabled - "networks": [ (array) information per network - { - "name": "xxx", (string) network (ipv4, ipv6 or onion) - "limited": true|false, (boolean) is the network limited using -onlynet? - "reachable": true|false, (boolean) is the network reachable? - "proxy": "host:port" (string) the proxy that is used for this network, or empty if none - "proxy_randomize_credentials": true|false, (string) Whether randomized credentials are used - } - ,... + { (json object) + "version" : n, (numeric) the server version + "subversion" : "str", (string) the server subversion string + "protocolversion" : n, (numeric) the protocol version + "localservices" : "hex", (string) the services we offer to the network + "localservicesnames" : [ (json array) the services we offer to the network, in human-readable form + "str", (string) the service name + ... ], - "relayfee": x.xxxxxxxx, (numeric) minimum relay fee for transactions in BTC/kB - "incrementalfee": x.xxxxxxxx, (numeric) minimum fee increment for mempool limiting or BIP 125 replacement in BTC/kB - "localaddresses": [ (array) list of local addresses - { - "address": "xxxx", (string) network address - "port": xxx, (numeric) network port - "score": xxx (numeric) relative score - } - ,... - ] - "warnings": "..." (string) any network and blockchain warnings + "localrelay" : true|false, (boolean) true if transaction relay is requested from peers + "timeoffset" : n, (numeric) the time offset + "connections" : n, (numeric) the total number of connections + "connections_in" : n, (numeric) the number of inbound connections + "connections_out" : n, (numeric) the number of outbound connections + "networkactive" : true|false, (boolean) whether p2p networking is enabled + "networks" : [ (json array) information per network + { (json object) + "name" : "str", (string) network (ipv4, ipv6 or onion) + "limited" : true|false, (boolean) is the network limited using -onlynet? + "reachable" : true|false, (boolean) is the network reachable? + "proxy" : "str", (string) ("host:port") the proxy that is used for this network, or empty if none + "proxy_randomize_credentials" : true|false (boolean) Whether randomized credentials are used + }, + ... + ], + "relayfee" : n, (numeric) minimum relay fee for transactions in BTC/kB + "incrementalfee" : n, (numeric) minimum fee increment for mempool limiting or BIP 125 replacement in BTC/kB + "localaddresses" : [ (json array) list of local addresses + { (json object) + "address" : "str", (string) network address + "port" : n, (numeric) network port + "score" : n (numeric) relative score + }, + ... + ], + "warnings" : "str" (string) any network and blockchain warnings } Examples @@ -57,5 +63,5 @@ Examples :: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getnetworkinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getnetworkinfo", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/getnewaddress.rst b/reference/rpc/getnewaddress.rst index 8a0e5ae..9fdbd0f 100644 --- a/reference/rpc/getnewaddress.rst +++ b/reference/rpc/getnewaddress.rst @@ -34,7 +34,7 @@ Result * - Name - Type - Description - * - address + * - str - string - The new bitcoin address @@ -50,5 +50,5 @@ Examples :: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getnewaddress", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getnewaddress", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/getnodeaddresses.rst b/reference/rpc/getnodeaddresses.rst index 42c5402..e34ca37 100644 --- a/reference/rpc/getnodeaddresses.rst +++ b/reference/rpc/getnodeaddresses.rst @@ -13,21 +13,21 @@ Argument #1 - count **Type:** numeric, optional, default=1 -How many addresses to return. Limited to the smaller of 2500 or 23% of all known addresses. +The maximum number of addresses to return. Specify 0 to return all known addresses. Result ~~~~~~ :: - [ - { - "time": ttt, (numeric) Timestamp in seconds since epoch (Jan 1 1970 GMT) keeping track of when the node was last seen - "services": n, (numeric) The services offered - "address": "host", (string) The address of the node - "port": n (numeric) The port of the node - } - ,.... + [ (json array) + { (json object) + "time" : xxx, (numeric) The UNIX epoch time of when the node was last seen + "services" : n, (numeric) The services offered + "address" : "str", (string) The address of the node + "port" : n (numeric) The port of the node + }, + ... ] Examples @@ -42,5 +42,5 @@ Examples :: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getnodeaddresses", "params": [8] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getnodeaddresses", "params": [8]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/getpeerinfo.rst b/reference/rpc/getpeerinfo.rst index ca26320..76360b4 100644 --- a/reference/rpc/getpeerinfo.rst +++ b/reference/rpc/getpeerinfo.rst @@ -13,51 +13,82 @@ Result :: - [ - { - "id": n, (numeric) Peer index - "addr":"host:port", (string) The IP address and port of the peer - "addrbind":"ip:port", (string) Bind address of the connection to the peer - "addrlocal":"ip:port", (string) Local address as reported by the peer - "services":"xxxxxxxxxxxxxxxx", (string) The services offered - "relaytxes":true|false, (boolean) Whether peer has asked us to relay transactions to it - "lastsend": ttt, (numeric) The time in seconds since epoch (Jan 1 1970 GMT) of the last send - "lastrecv": ttt, (numeric) The time in seconds since epoch (Jan 1 1970 GMT) of the last receive - "bytessent": n, (numeric) The total bytes sent - "bytesrecv": n, (numeric) The total bytes received - "conntime": ttt, (numeric) The connection time in seconds since epoch (Jan 1 1970 GMT) - "timeoffset": ttt, (numeric) The time offset in seconds - "pingtime": n, (numeric) ping time (if available) - "minping": n, (numeric) minimum observed ping time (if any at all) - "pingwait": n, (numeric) ping wait (if non-zero) - "version": v, (numeric) The peer version, such as 70001 - "subver": "/Satoshi:0.8.5/", (string) The string version - "inbound": true|false, (boolean) Inbound (true) or Outbound (false) - "addnode": true|false, (boolean) Whether connection was due to addnode/-connect or if it was an automatic/inbound connection - "startingheight": n, (numeric) The starting height (block) of the peer - "banscore": n, (numeric) The ban score - "synced_headers": n, (numeric) The last header we have in common with this peer - "synced_blocks": n, (numeric) The last block we have in common with this peer - "inflight": [ - n, (numeric) The heights of blocks we're currently asking from this peer - ... + [ (json array) + { (json object) + "id" : n, (numeric) Peer index + "addr" : "str", (string) (host:port) The IP address and port of the peer + "addrbind" : "str", (string) (ip:port) Bind address of the connection to the peer + "addrlocal" : "str", (string) (ip:port) Local address as reported by the peer + "network" : "str", (string) Network (ipv4, ipv6, or onion) the peer connected through + "mapped_as" : n, (numeric) The AS in the BGP route to the peer used for diversifying + peer selection (only available if the asmap config flag is set) + "services" : "hex", (string) The services offered + "servicesnames" : [ (json array) the services offered, in human-readable form + "str", (string) the service name if it is recognised + ... ], - "whitelisted": true|false, (boolean) Whether the peer is whitelisted - "minfeefilter": n, (numeric) The minimum fee rate for transactions this peer accepts - "bytessent_per_msg": { - "msg": n, (numeric) The total bytes sent aggregated by message type - When a message type is not listed in this json object, the bytes sent are 0. - Only known message types can appear as keys in the object. - ... + "relaytxes" : true|false, (boolean) Whether peer has asked us to relay transactions to it + "lastsend" : xxx, (numeric) The UNIX epoch time of the last send + "lastrecv" : xxx, (numeric) The UNIX epoch time of the last receive + "last_transaction" : xxx, (numeric) The UNIX epoch time of the last valid transaction received from this peer + "last_block" : xxx, (numeric) The UNIX epoch time of the last block received from this peer + "bytessent" : n, (numeric) The total bytes sent + "bytesrecv" : n, (numeric) The total bytes received + "conntime" : xxx, (numeric) The UNIX epoch time of the connection + "timeoffset" : n, (numeric) The time offset in seconds + "pingtime" : n, (numeric) ping time (if available) + "minping" : n, (numeric) minimum observed ping time (if any at all) + "pingwait" : n, (numeric) ping wait (if non-zero) + "version" : n, (numeric) The peer version, such as 70001 + "subver" : "str", (string) The string version + "inbound" : true|false, (boolean) Inbound (true) or Outbound (false) + "addnode" : true|false, (boolean) Whether connection was due to addnode/-connect or if it was an automatic/inbound connection + (DEPRECATED, returned only if the config option -deprecatedrpc=getpeerinfo_addnode is passed) + "connection_type" : "str", (string) Type of connection: + outbound-full-relay (default automatic connections), + block-relay-only (does not relay transactions or addresses), + inbound (initiated by the peer), + manual (added via addnode RPC or -addnode/-connect configuration options), + addr-fetch (short-lived automatic connection for soliciting addresses), + feeler (short-lived automatic connection for testing addresses). + Please note this output is unlikely to be stable in upcoming releases as we iterate to + best capture connection behaviors. + "startingheight" : n, (numeric) The starting height (block) of the peer + "banscore" : n, (numeric) The ban score (DEPRECATED, returned only if config option -deprecatedrpc=banscore is passed) + "synced_headers" : n, (numeric) The last header we have in common with this peer + "synced_blocks" : n, (numeric) The last block we have in common with this peer + "inflight" : [ (json array) + n, (numeric) The heights of blocks we're currently asking from this peer + ... + ], + "whitelisted" : true|false, (boolean, optional) Whether the peer is whitelisted with default permissions + (DEPRECATED, returned only if config option -deprecatedrpc=whitelisted is passed) + "permissions" : [ (json array) Any special permissions that have been granted to this peer + "str", (string) bloomfilter (allow requesting BIP37 filtered blocks and transactions), + noban (do not ban for misbehavior; implies download), + forcerelay (relay transactions that are already in the mempool; implies relay), + relay (relay even in -blocksonly mode, and unlimited transaction announcements), + mempool (allow requesting BIP35 mempool contents), + download (allow getheaders during IBD, no disconnect after maxuploadtarget limit), + addr (responses to GETADDR avoid hitting the cache and contain random records with the most up-to-date info). + + ... + ], + "minfeefilter" : n, (numeric) The minimum fee rate for transactions this peer accepts + "bytessent_per_msg" : { (json object) + "msg" : n, (numeric) The total bytes sent aggregated by message type + When a message type is not listed in this json object, the bytes sent are 0. + Only known message types can appear as keys in the object. + ... }, - "bytesrecv_per_msg": { - "msg": n, (numeric) The total bytes received aggregated by message type - When a message type is not listed in this json object, the bytes received are 0. - Only known message types can appear as keys in the object and all bytes received of unknown message types are listed under '*other*'. - ... + "bytesrecv_per_msg" : { (json object) + "msg" : n (numeric) The total bytes received aggregated by message type + When a message type is not listed in this json object, the bytes received are 0. + Only known message types can appear as keys in the object and all bytes received + of unknown message types are listed under '*other*'. } - } - ,... + }, + ... ] Examples @@ -72,5 +103,5 @@ Examples :: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getpeerinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getpeerinfo", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/getrawchangeaddress.rst b/reference/rpc/getrawchangeaddress.rst index c3db397..a5fe923 100644 --- a/reference/rpc/getrawchangeaddress.rst +++ b/reference/rpc/getrawchangeaddress.rst @@ -26,7 +26,7 @@ Result * - Name - Type - Description - * - address + * - str - string - The address @@ -42,5 +42,5 @@ Examples :: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getrawchangeaddress", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getrawchangeaddress", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/getrawmempool.rst b/reference/rpc/getrawmempool.rst index d36c444..cefe7a9 100644 --- a/reference/rpc/getrawmempool.rst +++ b/reference/rpc/getrawmempool.rst @@ -4,7 +4,7 @@ getrawmempool ============= -``getrawmempool ( verbose )`` +``getrawmempool ( verbose mempool_sequence )`` Returns all transaction ids in memory pool as a json array of string transaction ids. @@ -17,14 +17,21 @@ Argument #1 - verbose True for a json object, false for array of transaction ids +Argument #2 - mempool_sequence +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +**Type:** boolean, optional, default=false + +If verbose=false, returns a json object with transaction list and mempool sequence number attached. + Result (for verbose = false) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :: - [ (json array of string) - "transactionid" (string) The transaction id - ,... + [ (json array) + "hex", (string) The transaction id + ... ] Result (for verbose = true) @@ -32,34 +39,52 @@ Result (for verbose = true) :: - { (json object) - "transactionid" : { (json object) - "size" : n, (numeric) virtual transaction size as defined in BIP 141. This is different from actual serialized size for witness transactions as witness data is discounted. - "fee" : n, (numeric) transaction fee in BTC (DEPRECATED) - "modifiedfee" : n, (numeric) transaction fee with fee deltas used for mining priority (DEPRECATED) - "time" : n, (numeric) local time transaction entered pool in seconds since 1 Jan 1970 GMT - "height" : n, (numeric) block height when transaction entered pool - "descendantcount" : n, (numeric) number of in-mempool descendant transactions (including this one) - "descendantsize" : n, (numeric) virtual transaction size of in-mempool descendants (including this one) - "descendantfees" : n, (numeric) modified fees (see above) of in-mempool descendants (including this one) (DEPRECATED) - "ancestorcount" : n, (numeric) number of in-mempool ancestor transactions (including this one) - "ancestorsize" : n, (numeric) virtual transaction size of in-mempool ancestors (including this one) - "ancestorfees" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one) (DEPRECATED) - "wtxid" : hash, (string) hash of serialized transaction, including witness data - "fees" : { - "base" : n, (numeric) transaction fee in BTC - "modified" : n, (numeric) transaction fee with fee deltas used for mining priority in BTC - "ancestor" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one) in BTC - "descendant" : n, (numeric) modified fees (see above) of in-mempool descendants (including this one) in BTC - } - "depends" : [ (array) unconfirmed transactions used as inputs for this transaction - "transactionid", (string) parent transaction id - ... ] - "spentby" : [ (array) unconfirmed transactions spending outputs from this transaction - "transactionid", (string) child transaction id - ... ] - "bip125-replaceable" : true|false, (boolean) Whether this transaction could be replaced due to BIP125 (replace-by-fee) - }, ... + { (json object) + "transactionid" : { (json object) + "vsize" : n, (numeric) virtual transaction size as defined in BIP 141. This is different from actual serialized size for witness transactions as witness data is discounted. + "weight" : n, (numeric) transaction weight as defined in BIP 141. + "fee" : n, (numeric) transaction fee in BTC (DEPRECATED) + "modifiedfee" : n, (numeric) transaction fee with fee deltas used for mining priority (DEPRECATED) + "time" : xxx, (numeric) local time transaction entered pool in seconds since 1 Jan 1970 GMT + "height" : n, (numeric) block height when transaction entered pool + "descendantcount" : n, (numeric) number of in-mempool descendant transactions (including this one) + "descendantsize" : n, (numeric) virtual transaction size of in-mempool descendants (including this one) + "descendantfees" : n, (numeric) modified fees (see above) of in-mempool descendants (including this one) (DEPRECATED) + "ancestorcount" : n, (numeric) number of in-mempool ancestor transactions (including this one) + "ancestorsize" : n, (numeric) virtual transaction size of in-mempool ancestors (including this one) + "ancestorfees" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one) (DEPRECATED) + "wtxid" : "hex", (string) hash of serialized transaction, including witness data + "fees" : { (json object) + "base" : n, (numeric) transaction fee in BTC + "modified" : n, (numeric) transaction fee with fee deltas used for mining priority in BTC + "ancestor" : n, (numeric) modified fees (see above) of in-mempool ancestors (including this one) in BTC + "descendant" : n (numeric) modified fees (see above) of in-mempool descendants (including this one) in BTC + }, + "depends" : [ (json array) unconfirmed transactions used as inputs for this transaction + "hex", (string) parent transaction id + ... + ], + "spentby" : [ (json array) unconfirmed transactions spending outputs from this transaction + "hex", (string) child transaction id + ... + ], + "bip125-replaceable" : true|false, (boolean) Whether this transaction could be replaced due to BIP125 (replace-by-fee) + "unbroadcast" : true|false (boolean) Whether this transaction is currently unbroadcast (initial broadcast not yet acknowledged by any peers) + }, + ... + } + +Result (for verbose = false and mempool_sequence = true) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +:: + + { (json object) + "txids" : [ (json array) + "hex", (string) The transaction id + ... + ], + "mempool_sequence" : n (numeric) The mempool sequence value. } Examples @@ -74,5 +99,5 @@ Examples :: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getrawmempool", "params": [true] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getrawmempool", "params": [true]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/getrawtransaction.rst b/reference/rpc/getrawtransaction.rst index 04dbb0d..855f36e 100644 --- a/reference/rpc/getrawtransaction.rst +++ b/reference/rpc/getrawtransaction.rst @@ -50,7 +50,7 @@ Result (if verbose is not set or set to false) * - Name - Type - Description - * - data + * - str - string - The serialized, hex-encoded data for 'txid' @@ -59,50 +59,53 @@ Result (if verbose is set to true) :: - { - "in_active_chain": b, (bool) Whether specified block is in the active chain or not (only present with explicit "blockhash" argument) - "hex" : "data", (string) The serialized, hex-encoded data for 'txid' - "txid" : "id", (string) The transaction id (same as provided) - "hash" : "id", (string) The transaction hash (differs from txid for witness transactions) - "size" : n, (numeric) The serialized transaction size - "vsize" : n, (numeric) The virtual transaction size (differs from size for witness transactions) - "weight" : n, (numeric) The transaction's weight (between vsize*4-3 and vsize*4) - "version" : n, (numeric) The version - "locktime" : ttt, (numeric) The lock time - "vin" : [ (array of json objects) - { - "txid": "id", (string) The transaction id - "vout": n, (numeric) - "scriptSig": { (json object) The script - "asm": "asm", (string) asm - "hex": "hex" (string) hex - }, - "sequence": n (numeric) The script sequence number - "txinwitness": ["hex", ...] (array of string) hex-encoded witness data (if any) - } - ,... + { (json object) + "in_active_chain" : true|false, (boolean) Whether specified block is in the active chain or not (only present with explicit "blockhash" argument) + "hex" : "hex", (string) The serialized, hex-encoded data for 'txid' + "txid" : "hex", (string) The transaction id (same as provided) + "hash" : "hex", (string) The transaction hash (differs from txid for witness transactions) + "size" : n, (numeric) The serialized transaction size + "vsize" : n, (numeric) The virtual transaction size (differs from size for witness transactions) + "weight" : n, (numeric) The transaction's weight (between vsize*4-3 and vsize*4) + "version" : n, (numeric) The version + "locktime" : xxx, (numeric) The lock time + "vin" : [ (json array) + { (json object) + "txid" : "hex", (string) The transaction id + "vout" : n, (numeric) The output number + "scriptSig" : { (json object) The script + "asm" : "str", (string) asm + "hex" : "hex" (string) hex + }, + "sequence" : n, (numeric) The script sequence number + "txinwitness" : [ (json array) + "hex", (string) hex-encoded witness data (if any) + ... + ] + }, + ... ], - "vout" : [ (array of json objects) - { - "value" : x.xxx, (numeric) The value in BTC - "n" : n, (numeric) index - "scriptPubKey" : { (json object) - "asm" : "asm", (string) the asm - "hex" : "hex", (string) the hex - "reqSigs" : n, (numeric) The required sigs - "type" : "pubkeyhash", (string) The type, eg 'pubkeyhash' - "addresses" : [ (json array of string) - "address" (string) bitcoin address - ,... - ] - } - } - ,... + "vout" : [ (json array) + { (json object) + "value" : n, (numeric) The value in BTC + "n" : n, (numeric) index + "scriptPubKey" : { (json object) + "asm" : "str", (string) the asm + "hex" : "str", (string) the hex + "reqSigs" : n, (numeric) The required sigs + "type" : "str", (string) The type, eg 'pubkeyhash' + "addresses" : [ (json array) + "str", (string) bitcoin address + ... + ] + } + }, + ... ], - "blockhash" : "hash", (string) the block hash - "confirmations" : n, (numeric) The confirmations - "blocktime" : ttt (numeric) The block time in seconds since epoch (Jan 1 1970 GMT) - "time" : ttt, (numeric) Same as "blocktime" + "blockhash" : "hex", (string) the block hash + "confirmations" : n, (numeric) The confirmations + "blocktime" : xxx, (numeric) The block time expressed in UNIX epoch time + "time" : n (numeric) Same as "blocktime" } Examples @@ -121,7 +124,7 @@ Examples :: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getrawtransaction", "params": ["mytxid", true] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getrawtransaction", "params": ["mytxid", true]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ :: diff --git a/reference/rpc/getreceivedbyaddress.rst b/reference/rpc/getreceivedbyaddress.rst index cb17041..9d40507 100644 --- a/reference/rpc/getreceivedbyaddress.rst +++ b/reference/rpc/getreceivedbyaddress.rst @@ -31,7 +31,7 @@ Result * - Name - Type - Description - * - amount + * - n - numeric - The total amount in BTC received at this address. @@ -43,17 +43,17 @@ Examples The amount from transactions with at least 1 confirmation:: - bitcoin-cli getreceivedbyaddress "1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX" + bitcoin-cli getreceivedbyaddress "bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl" The amount including unconfirmed transactions, zero confirmations:: - bitcoin-cli getreceivedbyaddress "1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX" 0 + bitcoin-cli getreceivedbyaddress "bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl" 0 The amount with at least 6 confirmations:: - bitcoin-cli getreceivedbyaddress "1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX" 6 + bitcoin-cli getreceivedbyaddress "bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl" 6 As a JSON-RPC call:: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getreceivedbyaddress", "params": ["1D1ZrZNe3JUo7ZycKEYQQiQAWd9y54F4XX", 6] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getreceivedbyaddress", "params": ["bc1q09vm5lfy0j5reeulh4x5752q25uqqvz34hufdl", 6]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/getreceivedbylabel.rst b/reference/rpc/getreceivedbylabel.rst index a83fdcf..b5612f2 100644 --- a/reference/rpc/getreceivedbylabel.rst +++ b/reference/rpc/getreceivedbylabel.rst @@ -31,7 +31,7 @@ Result * - Name - Type - Description - * - amount + * - n - numeric - The total amount in BTC received for this label. @@ -55,5 +55,5 @@ The amount with at least 6 confirmations:: As a JSON-RPC call:: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getreceivedbylabel", "params": ["tabby", 6] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getreceivedbylabel", "params": ["tabby", 6]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/getrpcinfo.rst b/reference/rpc/getrpcinfo.rst index e82655a..0041dde 100644 --- a/reference/rpc/getrpcinfo.rst +++ b/reference/rpc/getrpcinfo.rst @@ -13,14 +13,15 @@ Result :: - { - "active_commands" (array) All active commands - [ - { (object) Information about an active command - "method" (string) The name of the RPC command - "duration" (numeric) The running time in microseconds - },... - ] + { (json object) + "active_commands" : [ (json array) All active commands + { (json object) Information about an active command + "method" : "str", (string) The name of the RPC command + "duration" : n (numeric) The running time in microseconds + }, + ... + ], + "logpath" : "str" (string) The complete file path to the debug log } Examples @@ -35,5 +36,5 @@ Examples :: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getrpcinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getrpcinfo", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/gettransaction.rst b/reference/rpc/gettransaction.rst index 3cbfbf4..b7fcad0 100644 --- a/reference/rpc/gettransaction.rst +++ b/reference/rpc/gettransaction.rst @@ -4,7 +4,7 @@ gettransaction ============== -``gettransaction "txid" ( include_watchonly )`` +``gettransaction "txid" ( include_watchonly verbose )`` Get detailed information about in-wallet transaction @@ -18,48 +18,68 @@ The transaction id Argument #2 - include_watchonly ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -**Type:** boolean, optional, default=false +**Type:** boolean, optional, default=true for watch-only wallets, otherwise false Whether to include watch-only addresses in balance calculation and details[] +Argument #3 - verbose +~~~~~~~~~~~~~~~~~~~~~ + +**Type:** boolean, optional, default=false + +Whether to include a `decoded` field containing the decoded transaction (equivalent to RPC decoderawtransaction) + Result ~~~~~~ :: - { - "amount" : x.xxx, (numeric) The transaction amount in BTC - "fee": x.xxx, (numeric) The amount of the fee in BTC. This is negative and only available for the - 'send' category of transactions. - "confirmations" : n, (numeric) The number of confirmations - "blockhash" : "hash", (string) The block hash - "blockindex" : xx, (numeric) The index of the transaction in the block that includes it - "blocktime" : ttt, (numeric) The time in seconds since epoch (1 Jan 1970 GMT) - "txid" : "transactionid", (string) The transaction id. - "time" : ttt, (numeric) The transaction time in seconds since epoch (1 Jan 1970 GMT) - "timereceived" : ttt, (numeric) The time received in seconds since epoch (1 Jan 1970 GMT) - "bip125-replaceable": "yes|no|unknown", (string) Whether this transaction could be replaced due to BIP125 (replace-by-fee); - may be unknown for unconfirmed transactions not in the mempool - "details" : [ - { - "address" : "address", (string) The bitcoin address involved in the transaction - "category" : (string) The transaction category. - "send" Transactions sent. - "receive" Non-coinbase transactions received. - "generate" Coinbase transactions received with more than 100 confirmations. - "immature" Coinbase transactions received with 100 or fewer confirmations. - "orphan" Orphaned coinbase transactions received. - "amount" : x.xxx, (numeric) The amount in BTC - "label" : "label", (string) A comment for the address/transaction, if any - "vout" : n, (numeric) the vout value - "fee": x.xxx, (numeric) The amount of the fee in BTC. This is negative and only available for the + { (json object) + "amount" : n, (numeric) The amount in BTC + "fee" : n, (numeric) The amount of the fee in BTC. This is negative and only available for the 'send' category of transactions. - "abandoned": xxx (bool) 'true' if the transaction has been abandoned (inputs are respendable). Only available for the + "confirmations" : n, (numeric) The number of confirmations for the transaction. Negative confirmations means the + transaction conflicted that many blocks ago. + "generated" : true|false, (boolean) Only present if transaction only input is a coinbase one. + "trusted" : true|false, (boolean) Only present if we consider transaction to be trusted and so safe to spend from. + "blockhash" : "hex", (string) The block hash containing the transaction. + "blockheight" : n, (numeric) The block height containing the transaction. + "blockindex" : n, (numeric) The index of the transaction in the block that includes it. + "blocktime" : xxx, (numeric) The block time expressed in UNIX epoch time. + "txid" : "hex", (string) The transaction id. + "walletconflicts" : [ (json array) Conflicting transaction ids. + "hex", (string) The transaction id. + ... + ], + "time" : xxx, (numeric) The transaction time expressed in UNIX epoch time. + "timereceived" : xxx, (numeric) The time received expressed in UNIX epoch time. + "comment" : "str", (string) If a comment is associated with the transaction, only present if not empty. + "bip125-replaceable" : "str", (string) ("yes|no|unknown") Whether this transaction could be replaced due to BIP125 (replace-by-fee); + may be unknown for unconfirmed transactions not in the mempool + "details" : [ (json array) + { (json object) + "involvesWatchonly" : true|false, (boolean) Only returns true if imported addresses were involved in transaction. + "address" : "str", (string) The bitcoin address involved in the transaction. + "category" : "str", (string) The transaction category. + "send" Transactions sent. + "receive" Non-coinbase transactions received. + "generate" Coinbase transactions received with more than 100 confirmations. + "immature" Coinbase transactions received with 100 or fewer confirmations. + "orphan" Orphaned coinbase transactions received. + "amount" : n, (numeric) The amount in BTC + "label" : "str", (string) A comment for the address/transaction, if any + "vout" : n, (numeric) the vout value + "fee" : n, (numeric) The amount of the fee in BTC. This is negative and only available for the + 'send' category of transactions. + "abandoned" : true|false (boolean) 'true' if the transaction has been abandoned (inputs are respendable). Only available for the 'send' category of transactions. - } - ,... + }, + ... ], - "hex" : "data" (string) Raw data for transaction + "hex" : "hex", (string) Raw data for transaction + "decoded" : { (json object) Optional, the decoded transaction (only present when `verbose` is passed) + ... Equivalent to the RPC decoderawtransaction method, or the RPC getrawtransaction method when `verbose` is passed. + } } Examples @@ -78,5 +98,9 @@ Examples :: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "gettransaction", "params": ["1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d"] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + bitcoin-cli gettransaction "1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d" false true + +:: + + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "gettransaction", "params": ["1075db55d416d3ca199f55b6084e2115b9345e16c5cf302fc80e9d5fbf5d48d"]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/gettxout.rst b/reference/rpc/gettxout.rst index 9b397e9..366f511 100644 --- a/reference/rpc/gettxout.rst +++ b/reference/rpc/gettxout.rst @@ -34,21 +34,21 @@ Result :: - { - "bestblock": "hash", (string) The hash of the block at the tip of the chain - "confirmations" : n, (numeric) The number of confirmations - "value" : x.xxx, (numeric) The transaction value in BTC - "scriptPubKey" : { (json object) - "asm" : "code", (string) - "hex" : "hex", (string) - "reqSigs" : n, (numeric) Number of required signatures - "type" : "pubkeyhash", (string) The type, eg pubkeyhash - "addresses" : [ (array of string) array of bitcoin addresses - "address" (string) bitcoin address - ,... - ] + { (json object) + "bestblock" : "hex", (string) The hash of the block at the tip of the chain + "confirmations" : n, (numeric) The number of confirmations + "value" : n, (numeric) The transaction value in BTC + "scriptPubKey" : { (json object) + "asm" : "hex", (string) + "hex" : "hex", (string) + "reqSigs" : n, (numeric) Number of required signatures + "type" : "hex", (string) The type, eg pubkeyhash + "addresses" : [ (json array) array of bitcoin addresses + "str", (string) bitcoin address + ... + ] }, - "coinbase" : true|false (boolean) Coinbase or not + "coinbase" : true|false (boolean) Coinbase or not } Examples @@ -67,5 +67,5 @@ View the details:: As a JSON-RPC call:: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "gettxout", "params": ["txid", 1] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "gettxout", "params": ["txid", 1]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/gettxoutproof.rst b/reference/rpc/gettxoutproof.rst index c5af663..ac77b36 100644 --- a/reference/rpc/gettxoutproof.rst +++ b/reference/rpc/gettxoutproof.rst @@ -18,7 +18,7 @@ Argument #1 - txids **Type:** json array, required -A json array of txids to filter +The txids to filter :: @@ -43,7 +43,7 @@ Result * - Name - Type - Description - * - data + * - str - string - A string that is a serialized, hex-encoded data for the proof. diff --git a/reference/rpc/gettxoutsetinfo.rst b/reference/rpc/gettxoutsetinfo.rst index 2e08b93..12edd32 100644 --- a/reference/rpc/gettxoutsetinfo.rst +++ b/reference/rpc/gettxoutsetinfo.rst @@ -4,26 +4,33 @@ gettxoutsetinfo =============== -``gettxoutsetinfo`` +``gettxoutsetinfo ( "hash_type" )`` Returns statistics about the unspent transaction output set. Note this call may take some time. +Argument #1 - hash_type +~~~~~~~~~~~~~~~~~~~~~~~ + +**Type:** string, optional, default=hash_serialized_2 + +Which UTXO set hash should be calculated. Options: 'hash_serialized_2' (the legacy algorithm), 'none'. + Result ~~~~~~ :: - { - "height":n, (numeric) The current block height (index) - "bestblock": "hex", (string) The hash of the block at the tip of the chain - "transactions": n, (numeric) The number of transactions with unspent outputs - "txouts": n, (numeric) The number of unspent transaction outputs - "bogosize": n, (numeric) A meaningless metric for UTXO set size - "hash_serialized_2": "hash", (string) The serialized hash - "disk_size": n, (numeric) The estimated size of the chainstate on disk - "total_amount": x.xxx (numeric) The total amount + { (json object) + "height" : n, (numeric) The current block height (index) + "bestblock" : "hex", (string) The hash of the block at the tip of the chain + "transactions" : n, (numeric) The number of transactions with unspent outputs + "txouts" : n, (numeric) The number of unspent transaction outputs + "bogosize" : n, (numeric) A meaningless metric for UTXO set size + "hash_serialized_2" : "hex", (string) The serialized hash (only present if 'hash_serialized_2' hash_type is chosen) + "disk_size" : n, (numeric) The estimated size of the chainstate on disk + "total_amount" : n (numeric) The total amount } Examples @@ -38,5 +45,5 @@ Examples :: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "gettxoutsetinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "gettxoutsetinfo", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/getunconfirmedbalance.rst b/reference/rpc/getunconfirmedbalance.rst index 5484257..6006988 100644 --- a/reference/rpc/getunconfirmedbalance.rst +++ b/reference/rpc/getunconfirmedbalance.rst @@ -6,5 +6,19 @@ getunconfirmedbalance ``getunconfirmedbalance`` -Returns the server's total unconfirmed balance +DEPRECATED +Identical to getbalances().mine.untrusted_pending + +Result +~~~~~~ + +.. list-table:: + :header-rows: 1 + + * - Name + - Type + - Description + * - n + - numeric + - The balance diff --git a/reference/rpc/getwalletinfo.rst b/reference/rpc/getwalletinfo.rst index 076c676..384979c 100644 --- a/reference/rpc/getwalletinfo.rst +++ b/reference/rpc/getwalletinfo.rst @@ -13,20 +13,27 @@ Result :: - { - "walletname": xxxxx, (string) the wallet name - "walletversion": xxxxx, (numeric) the wallet version - "balance": xxxxxxx, (numeric) the total confirmed balance of the wallet in BTC - "unconfirmed_balance": xxx, (numeric) the total unconfirmed balance of the wallet in BTC - "immature_balance": xxxxxx, (numeric) the total immature balance of the wallet in BTC - "txcount": xxxxxxx, (numeric) the total number of transactions in the wallet - "keypoololdest": xxxxxx, (numeric) the timestamp (seconds since Unix epoch) of the oldest pre-generated key in the key pool - "keypoolsize": xxxx, (numeric) how many new keys are pre-generated (only counts external keys) - "keypoolsize_hd_internal": xxxx, (numeric) how many new keys are pre-generated for internal use (used for change outputs, only appears if the wallet is using this feature, otherwise external keys are used) - "unlocked_until": ttt, (numeric) the timestamp in seconds since epoch (midnight Jan 1 1970 GMT) that the wallet is unlocked for transfers, or 0 if the wallet is locked - "paytxfee": x.xxxx, (numeric) the transaction fee configuration, set in BTC/kB - "hdseedid": "" (string, optional) the Hash160 of the HD seed (only present when HD is enabled) - "private_keys_enabled": true|false (boolean) false if privatekeys are disabled for this wallet (enforced watch-only wallet) + { (json object) + "walletname" : "str", (string) the wallet name + "walletversion" : n, (numeric) the wallet version + "format" : "str", (string) the database format (bdb or sqlite) + "balance" : n, (numeric) DEPRECATED. Identical to getbalances().mine.trusted + "unconfirmed_balance" : n, (numeric) DEPRECATED. Identical to getbalances().mine.untrusted_pending + "immature_balance" : n, (numeric) DEPRECATED. Identical to getbalances().mine.immature + "txcount" : n, (numeric) the total number of transactions in the wallet + "keypoololdest" : xxx, (numeric) the UNIX epoch time of the oldest pre-generated key in the key pool. Legacy wallets only. + "keypoolsize" : n, (numeric) how many new keys are pre-generated (only counts external keys) + "keypoolsize_hd_internal" : n, (numeric) how many new keys are pre-generated for internal use (used for change outputs, only appears if the wallet is using this feature, otherwise external keys are used) + "unlocked_until" : xxx, (numeric, optional) the UNIX epoch time until which the wallet is unlocked for transfers, or 0 if the wallet is locked (only present for passphrase-encrypted wallets) + "paytxfee" : n, (numeric) the transaction fee configuration, set in BTC/kvB + "hdseedid" : "hex", (string, optional) the Hash160 of the HD seed (only present when HD is enabled) + "private_keys_enabled" : true|false, (boolean) false if privatekeys are disabled for this wallet (enforced watch-only wallet) + "avoid_reuse" : true|false, (boolean) whether this wallet tracks clean/dirty coins in terms of reuse + "scanning" : { (json object) current scanning details, or false if no scan is in progress + "duration" : n, (numeric) elapsed seconds since scan start + "progress" : n (numeric) scanning progress percentage [0.0, 1.0] + }, + "descriptors" : true|false (boolean) whether this wallet uses descriptors for scriptPubKey management } Examples @@ -41,5 +48,5 @@ Examples :: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getwalletinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "getwalletinfo", "params": []}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/help.rst b/reference/rpc/help.rst index f3353b9..31959e7 100644 --- a/reference/rpc/help.rst +++ b/reference/rpc/help.rst @@ -24,7 +24,7 @@ Result * - Name - Type - Description - * - text + * - str - string - The help text diff --git a/reference/rpc/importaddress.rst b/reference/rpc/importaddress.rst index 26fb8fa..8e10df7 100644 --- a/reference/rpc/importaddress.rst +++ b/reference/rpc/importaddress.rst @@ -13,9 +13,13 @@ may report that the imported address exists but related transactions are still m If you have the full public key, you should call importpubkey instead of this. +Hint: use importmulti to import more than one address. + Note: If you import a non-standard raw script in hex form, outputs sending to it will be treated as change, and not show up in many RPCs. +Note: Use "getwalletinfo" to query the scanning progress. + Argument #1 - address ~~~~~~~~~~~~~~~~~~~~~ @@ -44,6 +48,13 @@ Argument #4 - p2sh Add the P2SH version of the script as well +Result +~~~~~~ + +:: + + null (json null) + Examples ~~~~~~~~ @@ -60,5 +71,5 @@ Import using a label without rescan:: As a JSON-RPC call:: - curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "importaddress", "params": ["myaddress", "testing", false] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ + curl --user myusername --data-binary '{"jsonrpc": "1.0", "id": "curltest", "method": "importaddress", "params": ["myaddress", "testing", false]}' -H 'content-type: text/plain;' http://127.0.0.1:8332/ diff --git a/reference/rpc/importdescriptors.rst b/reference/rpc/importdescriptors.rst new file mode 100644 index 0000000..3e7ca1e --- /dev/null +++ b/reference/rpc/importdescriptors.rst @@ -0,0 +1,72 @@ +.. This file is licensed under the MIT License (MIT) available on + http://opensource.org/licenses/MIT. + +importdescriptors +================= + +``importdescriptors "requests"`` + +Import descriptors. This will trigger a rescan of the blockchain based on the earliest timestamp of all descriptors being imported. Requires a new wallet backup. + +Note: This call can take over an hour to complete if using an early timestamp; during that time, other rpc calls +may report that the imported keys, addresses or scripts exist but related transactions are still missing. + +Argument #1 - requests +~~~~~~~~~~~~~~~~~~~~~~ + +**Type:** json array, required + +Data to be imported + +:: + + [ + { (json object) + "desc": "str", (string, required) Descriptor to import. + "active": bool, (boolean, optional, default=false) Set this descriptor to be the active descriptor for the corresponding output type/externality + "range": n or [n,n], (numeric or array) If a ranged descriptor is used, this specifies the end or the range (in the form [begin,end]) to import + "next_index": n, (numeric) If a ranged descriptor is set to active, this specifies the next index to generate addresses from + "timestamp": timestamp | "now", (integer / string, required) Time from which to start rescanning the blockchain for this descriptor, in UNIX epoch time + Use the string "now" to substitute the current synced blockchain time. + "now" can be specified to bypass scanning, for outputs which are known to never have been used, and + 0 can be specified to scan the entire blockchain. Blocks up to 2 hours before the earliest timestamp + of all descriptors being imported will be scanned. + "internal": bool, (boolean, optional, default=false) Whether matching outputs should be treated as not incoming payments (e.g. change) + "label": "str", (string, optional, default='') Label to assign to the address, only allowed with internal=false + }, + ... + ] + +Result +~~~~~~ + +:: + + [ (json array) Response is an array with the same size as the input that has the execution result + { (json object) + "success" : true|false, (boolean) + "warnings" : [ (json array, optional) + "str", (string) + ... + ], + "error" : { (json object, optional) + ... JSONRPC error + } + }, + ... + ] + +Examples +~~~~~~~~ + + +.. highlight:: shell + +:: + + bitcoin-cli importdescriptors '[{ "desc": "", "timestamp":1455191478, "internal": true }, { "desc": "", "label": "example 2", "timestamp": 1455191480 }]' + +:: + + bitcoin-cli importdescriptors '[{ "desc": "", "timestamp":1455191478, "active": true, "range": [0,100], "label": "" }]' + diff --git a/reference/rpc/importmulti.rst b/reference/rpc/importmulti.rst index 632d7fd..83535f3 100644 --- a/reference/rpc/importmulti.rst +++ b/reference/rpc/importmulti.rst @@ -13,7 +13,9 @@ If an address/script is imported without all of the private keys required to spe Conversely, if all the private keys are provided and the address/script is spendable, the watchonly option must be set to false, or a warning will be returned. Note: This call can take over an hour to complete if rescan is true, during that time, other rpc calls -may report that the imported keys, addresses or scripts exists but related transactions are still missing. +may report that the imported keys, addresses or scripts exist but related transactions are still missing. + +Note: Use "getwalletinfo" to query the scanning progress. Argument #1 - requests ~~~~~~~~~~~~~~~~~~~~~~ @@ -21,6 +23,14 @@ Argument #1 - requests **Type:** json array, required Data to be imported + "range": n or [n,n], (numeric or array) If a ranged descriptor is used, this specifies the end or the range (in the form [begin,end]) to import + "internal": bool, (boolean, optional, default=false) Stating whether matching outputs should be treated as not incoming payments (also known as change) + "watchonly": bool, (boolean, optional, default=false) Stating whether matching outputs should be considered watchonly. + "label": "str", (string, optional, default='') Label to assign to the address, only allowed with internal=false + "keypool": bool, (boolean, optional, default=false) Stating whether imported public keys should be added to the keypool for when users request new addresses. Only allowed when wallet private keys are disabled + }, + ... + ] :: @@ -28,7 +38,7 @@ Data to be imported { (json object) "desc": "str", (string) Descriptor to import. If using descriptor, do not also provide address/scriptPubKey, scripts, or pubkeys "scriptPubKey": "