Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
Polish and expand Bitcoin Core RPC interface intro in developer reference #1030
Conversation
harding
and 1 other
commented on an outdated diff
Aug 26, 2015
| -In order to start `bitcoind`, you will need to set a password for | ||
| -JSON-RPC in the `bitcoin.conf` file. See the [Examples | ||
| -Page][devexamples] for details. JSON-RPC starts on port 8332 for mainnet | ||
| -and 18332 for testnet and regtest. By default, `bitcoind` doesn't use a | ||
| -JSON-RPC user, but you can set one (see `bitcoind --help`). | ||
| - | ||
| -The interface is not intended for public access and is only accessible | ||
| -from localhost by default. | ||
| - | ||
| -RPCs are made using the standard JSON-RPC 1.0 syntax, which sends several | ||
| -standard arguments: | ||
| +Bitcoin Core provides a remote procedure call (RPC) interface for various | ||
| +administrative tasks, wallet operations, and queries about network and block | ||
| +chain data. | ||
| + | ||
| +If you start Bitcoin Core using `bitcoin-xt`, the RPC interface is disabled by |
carnesen
Contributor
|
harding
and 1 other
commented on an outdated diff
Aug 26, 2015
| - | ||
| -The interface is not intended for public access and is only accessible | ||
| -from localhost by default. | ||
| - | ||
| -RPCs are made using the standard JSON-RPC 1.0 syntax, which sends several | ||
| -standard arguments: | ||
| +Bitcoin Core provides a remote procedure call (RPC) interface for various | ||
| +administrative tasks, wallet operations, and queries about network and block | ||
| +chain data. | ||
| + | ||
| +If you start Bitcoin Core using `bitcoin-xt`, the RPC interface is disabled by | ||
| +default. To enable it, set `server=1` in `bitcoin.conf` or supply the `-server` | ||
| +argument when invoking the program. | ||
| + | ||
| +If you start Bitcoin Core using `bitcoind`, the RPC interface is enabled by | ||
| +default. To disable it, set `server=0` in `bitcoin.conf`. |
harding
Contributor
|
harding
and 1 other
commented on an outdated diff
Aug 26, 2015
| +(CLI) to Bitcoin Core or for making RPC calls from applications written in | ||
| +languages lacking a suitable native client. The remainder of this section | ||
| +describes the Bitcoin Core RPC protocol in detail. | ||
| + | ||
| +The Bitcoin Core RPC service listens for HTTP `POST` requests on port 8332 in | ||
| +mainnet mode or 18332 in testnet or regtest mode. The port number can be changed | ||
| +by setting `rpcport` in `bitcoin.conf`. By default the RPC service binds to your | ||
| +server's [localhost](https://en.wikipedia.org/wiki/Localhost) loopback | ||
| +network<!--noref--> interface so it's not accessible from other servers. | ||
| +Authentication is implemented using HTTP [basic | ||
| +authentication](https://en.wikipedia.org/wiki/Basic_access_authentication). RPC | ||
| +HTTP requests must include a `Content-Type` header set to `text/plain` and a | ||
| +`Content-Length` header set to the size of the request body. | ||
| + | ||
| +The format of the request body and response data is based on [version 1.0 of the | ||
| +JSON-RPC specification](http://json-rpc<!--noref-->.org/wiki/specification). Specifically, |
harding
Contributor
|
|
@carnesen I gave the diff a quick skim, and it looks excellent! Thanks! I left a few comments for now and I'll take a closer look later. |
harding
added
the
Dev Docs
label
Aug 26, 2015
|
I completed a more intensive review and didn't see any other issues. I also tested the batch processing using the instructions provided and had no problems. Once the previously-mentioned issues have been resolved, I think this should be good. Thanks again! |
|
@carnesen FYI, you can optionally add |
|
Up to 532fc41 LGTM. Thanks! Preview: http://dg0.dtrt.org/en/developer-reference#remote-procedure-calls-rpcs In the absence of critical feedback, this pull will be merged on Sunday. |
harding
added
the
Merge Scheduled
label
Aug 27, 2015
saivann
and 1 other
commented on an outdated diff
Aug 28, 2015
| [HTTP longpoll]: https://en.wikipedia.org/wiki/Push_technology#Long_polling | ||
| [IP-to-IP payment protocol]: https://en.bitcoin.it/wiki/IP_Transactions | ||
| [IPv4-mapped IPv6 addresses]: http://en.wikipedia.org/wiki/IPv6#IPv4-mapped_IPv6_addresses | ||
| [irc channels]: https://en.bitcoin.it/wiki/IRC_channels | ||
| +[JSON-RPC version 1.0]: http://json-rpc.org/wiki/specification | ||
| +[JSON-RPC version 2.0]: http://www.jsonrpc.org/specification#batch |
saivann
Contributor
|
|
@carnesen Thanks a lot of your recent contributions! |
carnesen commentedAug 26, 2015
This PR contains a polished and expanded version of the developer reference section that describes the Bitcoin Core RPC interface. Site tests are passing on my laptop and on Travis CI. A preview of the changes can be found here:
http://bitcoin-dot-org.carnesen.com/en/developer-reference#remote-procedure-calls-rpcs
For comparison here's that section on the site currently:
https://bitcoin.org/en/developer-reference#remote-procedure-calls-rpcs
The changes in this PR are limited to the RPC interface description up to where the "Quick Reference" starts.
Feedback is welcomed, and I'd be happy to explain why I made any of these changes, just let me know.