Commit Graph

10376 Commits

Author SHA1 Message Date
Wladimir J. van der Laan
116503c0b8 Fix race condition between starting HTTP server thread and setting EventBase()
Split StartHTTPServer into InitHTTPServer and StartHTTPServer to give
clients a window to register their handlers without race conditions.

Thanks @ajweiss for figuring this out.
2017-03-24 09:03:59 +13:00
Wladimir J. van der Laan
9fb5b94e64 Document options for new HTTP/RPC server in --help 2017-03-24 09:03:59 +13:00
Wladimir J. van der Laan
858afa1a4a Implement RPCTimerHandler for Qt RPC console
Implement RPCTimerHandler for Qt RPC console, so that `walletpassphrase`
works with GUI and `-server=0`.

Also simplify HTTPEvent-related code by using boost::function directly.

Zcash: QT changes ommitted
2017-03-24 09:03:59 +13:00
Wladimir J. van der Laan
afd64f76ea evhttpd implementation
- *Replace usage of boost::asio with [libevent2](http://libevent.org/)*.
boost::asio is not part of C++11, so unlike other boost there is no
forwards-compatibility reason to stick with it. Together with #4738 (convert
json_spirit to UniValue), this rids Bitcoin Core of the worst offenders with
regard to compile-time slowness.

- *Replace spit-and-duct-tape http server with evhttp*. Front-end http handling
is handled by libevent, a work queue (with configurable depth and parallelism)
is used to handle application requests.

- *Wrap HTTP request in C++ class*; this makes the application code mostly
HTTP-server-neutral

- *Refactor RPC to move all http-specific code to a separate file*.
Theoreticaly this can allow building without HTTP server but with another RPC
backend, e.g. Qt's debug console (currently not implemented) or future RPC
mechanisms people may want to use.

- *HTTP dispatch mechanism*; services (e.g., RPC, REST) register which URL
paths they want to handle.

By using a proven, high-performance asynchronous networking library (also used
by Tor) and HTTP server, problems such as #5674, #5655, #344 should be avoided.

What works? bitcoind, bitcoin-cli, bitcoin-qt. Unit tests and RPC/REST tests
pass. The aim for now is everything but SSL support.

Configuration options:

- `-rpcthreads`: repurposed as "number of  work handler threads". Still
defaults to 4.

- `-rpcworkqueue`: maximum depth of work queue. When this is reached, new
requests will return a 500 Internal Error.

- `-rpctimeout`: inactivity time, in seconds, after which to disconnect a
client.

- `-debug=http`: low-level http activity logging
2017-03-24 09:03:59 +13:00
Wladimir J. van der Laan
cc14ac45f4 tests: GET requests cannot have request body, use POST in rest.py
Sending a request body with GET request is not valid in HTTP spec, and
not compatible with evhttpd.
2017-03-24 09:03:59 +13:00
Wladimir J. van der Laan
df377ca82c build: build-system changes for libevent 2017-03-24 09:03:59 +13:00
Cory Fields
505b30ff01 libevent: add depends 2017-03-24 09:03:59 +13:00
Wladimir J. van der Laan
72f52420ec Remove rpc_boostasiotocnetaddr test
Dropping all use of boost::asio.
2017-03-24 09:03:59 +13:00
Wladimir J. van der Laan
14dcc6ab96 qa: Remove -rpckeepalive tests from httpbasics
This option was a temporary workaround, and is no longer necessary
with the new web server.
2017-03-24 09:03:59 +13:00
Wladimir J. van der Laan
b6fbda0982 doc: remove documentation for rpcssl 2017-03-24 09:03:59 +13:00
Jack Grigg
bec25c91cb Revert "Closes #1680, temporary fix for rpc deadlock inherited from upstream."
This reverts commit f4404d7b5b.
2017-03-24 09:03:59 +13:00
zkbot
7d9bf65501 Auto merge of #2168 - str4d:2164-getblock-anchor, r=daira
Add anchor to output of getblock

Closes #2164.
2017-03-23 18:21:10 +00:00
zkbot
00e59e5935 Auto merge of #2175 - str4d:2074-txn-mempool, r=bitcartel
Bitcoin 0.12 mempool memory usage PRs

Cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#6410
- bitcoin/bitcoin#6453
- bitcoin/bitcoin#6013 (excludes changes to docs we deleted)

Part of #2074.
2017-03-23 17:29:35 +00:00
zkbot
3b11e24f92 Auto merge of #2183 - ebfull:rust-introduction, r=ebfull
Introduce Rust/librustzcash into the zcash build system

Introduces Rust into the build system and brings a trivial xor operation into the code (near where we will likely be working).
2017-03-21 03:40:12 +00:00
zkbot
c4a7c9f20f Auto merge of #2157 - arcalinea:1652_submitblock_documentation, r=daira
Document returned results of submitblock

documentation for #1652
2017-03-20 17:11:50 +00:00
Sean Bowe
802ea76b3a Allow Rust-language related assets to be disabled with --disable-rust. 2017-03-18 07:47:40 -06:00
Sean Bowe
6a0c7ceae9 Introduce librustzcash and Rust to depends system. 2017-03-17 11:46:41 -06:00
zkbot
7ab5912a78 Auto merge of #2184 - zcash:jackgavigan-COPYING-changes, r=bitcartel
Removed markdown from COPYING

Updated the Copyright statement at the top of the file from "2016" to "2016-2017" and removed markdown markup from the main text.
2017-03-16 23:09:46 +00:00
Jack Gavigan
6c9ebc6bdc Updated the Bitcoin Core copyright statement 2017-03-16 13:40:42 +00:00
zkbot
db0f7159c3 Auto merge of #2161 - arcalinea:2160_revise_release_process, r=str4d
Edit release-process.md for clarity

For #2160
2017-03-16 01:47:35 +00:00
Jack Grigg
542a7a40f1 Add tests for getmempoolinfo 2017-03-16 14:30:16 +13:00
Jack Gavigan
472dec5352 Removed markdown from COPYING
Updated the Copyright statement at the top of the file from "2016" to "2016-2017" and removed markdown markup from the main text.
2017-03-15 12:14:28 +00:00
Jack Grigg
43a03e3bfc Migrate IncrementalMerkleTree memory usage calls 2017-03-14 18:01:05 +13:00
Pavel Janík
30c163d99d Implement REST mempool API, add test and documentation. 2017-03-14 13:52:06 +13:00
Pieter Wuille
6bd1d60c97 Separate core memory usage computation in core_memusage.h 2017-03-14 13:45:05 +13:00
Pieter Wuille
bde5c8b0f1 Implement accurate memory accounting for mempool 2017-03-14 13:44:39 +13:00
Jay Graber
8144a213ed Edit release-process.md for clarity 2017-03-10 16:14:46 -08:00
zkbot
a28b17b7b7 Auto merge of #1636 - daira:fix-licensing-and-remove-qt, r=str4d
Remove QT code

This removes the QT wallet code, and updates license documentation accordingly.
2017-03-10 23:47:43 +00:00
Simon
abecfc422c Remove redundant gui options from build scripts 2017-03-10 10:35:23 -08:00
Simon
ec85287c45 Remove QT translation support files 2017-03-10 10:01:48 -08:00
Jack Grigg
0bc1e2c431 Add anchor to output of getblock
Closes #2164.
2017-03-10 20:09:40 +13:00
Daira Hopwood
6b41a88d20 Delete -rootcertificates from bash completion script.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-03-10 03:49:04 +00:00
Simon
07cf426404 Remove stale Qt comments and dead code 2017-03-09 17:04:59 -08:00
zkbot
00740e0358 Auto merge of #2162 - arcalinea:release_process_1.0.7-1, r=str4d
Release process 1.0.7 1
2017-03-09 00:11:56 +00:00
Jay Graber
0195a9fc0f Update debian package changelog for 1.0.7+1 (use + instead of - for debian versioning) 2017-03-08 16:00:02 -08:00
Jay Graber
f0046397ca Add updated release notes for v1.0.7-1 2017-03-08 16:00:02 -08:00
Jay Graber
82b6ec23db Update auto-generated manpages to 1.0.7-1 2017-03-08 15:59:52 -08:00
Jay Graber
0fe4b85708 Update version to 1.0.7-1 2017-03-08 12:50:33 -08:00
Jay Graber
24a24abf75 Add -t to git fetch for release-notes.py 2017-03-08 12:32:59 -08:00
Daira Hopwood
8247636d21 Remove unused packages and patches.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-03-07 19:40:09 +00:00
Daira Hopwood
f3b6c0e1cc .gitignore cache/ and venv-mnf/
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-03-07 19:15:08 +00:00
Daira Hopwood
d596658022 Remove NO_QT make option.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-03-07 19:15:08 +00:00
Daira Hopwood
648dcaffea Update which libraries are allowed to be linked to zcashd by symbol-check.py.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-03-07 19:15:08 +00:00
Daira Hopwood
e71162e0b4 Update documentation for QT removal.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-03-07 19:15:08 +00:00
Daira Hopwood
69a2bdde8f Remove some more QT-related stragglers.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-03-07 19:15:08 +00:00
Daira Hopwood
38ba3c666f Remove QT gunk from Makefiles.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-03-07 19:15:08 +00:00
Daira Hopwood
6a30bb41b3 Correct license text for LGPL.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-03-07 19:15:08 +00:00
Daira Hopwood
71d0bbc666 License updates for removal of src/qt.
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
2017-03-07 19:14:59 +00:00
Jay Graber
552d755339 Document returned results of submitblock 2017-03-06 13:18:58 -08:00
zkbot
f5fbf40375 Auto merge of #2153 - arcalinea:1.0.7_release_process, r=str4d
1.0.7 release
2017-03-04 06:06:28 +00:00