Commit Graph

10689 Commits

Author SHA1 Message Date
Jack Grigg 077ddc1187
Add libevent to zcash-gtest 2017-03-24 09:03:59 +13:00
Wladimir J. van der Laan 7fd5d4e30e
Revert "rpc-tests: re-enable rpc-tests for Windows"
This reverts commit bd30c3dced21fca869a14c75081f15195762afe1.

Disable windows RPC tests for now. These should be re-enabled once a
suitable Wine version is used on Travis.
2017-03-24 09:03:59 +13:00
Wladimir J. van der Laan 167b6231c9
Move windows socket init to utility function 2017-03-24 09:03:59 +13:00
Cory Fields 91295c4b4d
libevent: Windows reuseaddr workaround in depends
Make it possible to reuse sockets.
This is necessary to make the RPC tests work in WINE.
2017-03-24 09:03:59 +13:00
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
Jack Grigg dec148f498
Fix prioritisetransaction RPC test
Part of #1884.
2017-03-23 18:57:46 +13:00
Jack Grigg b7e5b7d5ee
Simplify z_importkey by making rescan a string
Transparently handles older boolean values as well.
2017-03-23 15:57:11 +13:00
Jack Grigg 493d8d81fb
Expand on reasons for mining being paused 2017-03-23 15:16:04 +13:00
Jack Grigg af370021a0
Metrics: Improve mining status 2017-03-23 14:08:36 +13:00
Jack Grigg dd20d04679
Metrics: Move local solution rate into stats 2017-03-23 14:08:33 +13:00
Jack Grigg 07be8f7eb9
Use AtomicTimer for more accurate local solution rate 2017-03-23 14:07:52 +13:00
Jack Grigg 73bf85b44f
Implement an AtomicTimer 2017-03-23 14:07:29 +13: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
Jack Grigg a31ba7a0cb
Usability improvements for z_importkey
- Add height parameter to z_importkey to reduce rescan range
- Change semantics of rescan parameter, so users can explicitly force a rescan
  for existing keys.

Closes #2032
2017-03-16 19:34:41 +13: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