aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #6579Wladimir J. van der Laan2015-09-081-0/+3
|\ | | | | | | afb0cca Add NODE_BLOOM service bit and bump protocol version (Matt Corallo)
| * Add NODE_BLOOM service bit and bump protocol versionMatt Corallo2015-09-051-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Lets nodes advertise that they offer bloom filter support explicitly. The protocol version bump allows SPV nodes to assume that NODE_BLOOM is set if NODE_NETWORK is set for pre-70011 nodes. Also adds an option to turn bloom filter support off for nodes which advertise a version number >= 70011. Nodes attempting to use bloom filters on such protocol versions are banned, and a later upgade should drop nodes of an older version which attempt to use bloom filters. Much code stolen from Peter Todd. Implements BIP 111
* | Prune the -prune help to reflect that the wallet is no longer disabled.Gregory Maxwell2015-09-071-1/+1
|/ | | | The wallet hasn't been disabled since 3201035f22fe451c808b0bb157d33a58f0d99c07.
* Merge pull request #5677Wladimir J. van der Laan2015-09-041-22/+45
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | d528025 Revert "rpc-tests: re-enable rpc-tests for Windows" (Wladimir J. van der Laan) 1e700c9 doc: update deps in build-unix.md after libevent (Wladimir J. van der Laan) 26c9b83 Move windows socket init to utility function (Wladimir J. van der Laan) 4be0b08 libevent: Windows reuseaddr workaround in depends (Cory Fields) 3a174cd Fix race condition between starting HTTP server thread and setting EventBase() (Wladimir J. van der Laan) 6d2bc22 Document options for new HTTP/RPC server in --help (Wladimir J. van der Laan) be33f3f Implement RPCTimerHandler for Qt RPC console (Wladimir J. van der Laan) 57d85d9 doc: mention SSL support dropped for RPC in release notes (Wladimir J. van der Laan) 40b556d evhttpd implementation (Wladimir J. van der Laan) ee2a42b tests: GET requests cannot have request body, use POST in rest.py (Wladimir J. van der Laan) 6e996d3 tests: fix qt payment test (Cory Fields) 3140ef9 build: build-system changes for libevent (Wladimir J. van der Laan) a9af234 libevent: add depends (Cory Fields) 6a21dd5 Remove rpc_boostasiotocnetaddr test (Wladimir J. van der Laan) 8f9301c qa: Remove -rpckeepalive tests from httpbasics (Wladimir J. van der Laan) 51fcfc0 doc: remove documentation for rpcssl (Wladimir J. van der Laan)
| * Move windows socket init to utility functionWladimir J. van der Laan2015-09-031-9/+4
| |
| * Fix race condition between starting HTTP server thread and setting EventBase()Wladimir J. van der Laan2015-09-031-1/+3
| | | | | | | | | | | | | | Split StartHTTPServer into InitHTTPServer and StartHTTPServer to give clients a window to register their handlers without race conditions. Thanks @ajweiss for figuring this out.
| * Document options for new HTTP/RPC server in --helpWladimir J. van der Laan2015-09-031-2/+6
| |
| * evhttpd implementationWladimir J. van der Laan2015-09-031-11/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - *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
* | Remove redundant whiteconnections optionPatrick Strateman2015-08-221-29/+0
|/
* Move mempool rejections to new debug categoryWladimir J. van der Laan2015-08-111-1/+1
| | | | | | Move mempool rejections to debug category `mempoolrej`, to make it possible to show them without enabling the entire category `mempool` which is high volume.
* Merge pull request #6462Wladimir J. van der Laan2015-08-051-0/+7
|\ | | | | | | | | 7b79cbd limit total length of user agent comments (Pavol Rusnak) 557f8ea implement uacomment config parameter which can add comments to user agent as per BIP-0014 (Pavol Rusnak)
| * limit total length of user agent commentsPavol Rusnak2015-08-051-0/+7
| | | | | | | | Reworked-By: Wladimir J. van der Laan <[email protected]>
* | Merge pull request #6489Wladimir J. van der Laan2015-08-051-0/+12
|\ \ | | | | | | | | | f261f19 Give a better error message if system clock is bad (Casey Rodarmor)
| * | Give a better error message if system clock is badCasey Rodarmor2015-08-031-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | Fixes #2007 This checks to see if the system clock appears to be bad and gives a helpful error message. If the user's clock is set incorrectly, hopefully they'll abort, fix it, and then save themselves a fruitless resync.
* | | Merge pull request #6503Pieter Wuille2015-08-041-2/+2
|\ \ \ | | | | | | | | | | | | 19dd40a Consolidate individual references to the current maximum peer connection value of 125 into a single constant declaration. (Matt Quinn)
| * | | Consolidate individual references to the current maximum peer connectionMatt Quinn2015-08-031-2/+2
| | | | | | | | | | | | | | | | value of 125 into a single constant declaration.
* | | | Merge pull request #6504Wladimir J. van der Laan2015-08-041-6/+8
|\ \ \ \ | |/ / / |/| | | | | | | 9ca7857 Rationalize currency unit to "BTC" (Ross Nicoll)
| * | | Rationalize currency unit to "BTC"Ross Nicoll2015-08-031-6/+8
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | Previously various user-facing strings have used inconsistent currency units "BTC", "btc" and "bitcoins". This adds a single constant and uses it for each reference to the currency unit. Also adds a description of the unit for --maxtxfee, and adds the missing "amount" field description to the (deprecated) move RPC command.
* | | Merge pull request #6356Wladimir J. van der Laan2015-08-031-11/+16
|\ \ \ | |/ / |/| | | | | f0cba6f Delay initial pruning until after wallet init (Adam Weiss)
| * | Delay initial pruning until after wallet initAdam Weiss2015-07-291-11/+16
| | | | | | | | | | | | | | | Don't prune until any wallet rescanning has taken place to avoid potentially pruning blocks that the wallet rescan may need.
* | | qt: Introduce PlatformStyleWladimir J. van der Laan2015-07-311-0/+3
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | Introduce a PlatformStyle to handle platform-specific customization of the UI. This replaces 'scicon', as well as #ifdefs to determine whether to place icons on buttons. The selected PlatformStyle defaults to the platform that the application was compiled on, but can be overridden from the command line with `-uiplatform=<x>`. Also fixes the warning from #6328.
* | Merge pull request #5697Wladimir J. van der Laan2015-07-271-0/+5
|\ \ | | | | | | | | | | | | 60c8bac Includes: Cleanup around net main and wallet (Jorge Timón) 9dd793f TRIVIAL: Missing includes (Jorge Timón)
| * | TRIVIAL: Missing includesJorge Timón2015-07-231-0/+5
| | |
* | | Merge pull request #6149Wladimir J. van der Laan2015-07-221-2/+7
|\ \ \ | |/ / |/| | | | | 27d7605 Buffer log messages and explicitly open logs (Adam Weiss)
| * | Buffer log messages and explicitly open logsAdam Weiss2015-07-061-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prevents stomping on debug logs in datadirs that are locked by other instances and lost parameter interaction messages that can get wiped by ShrinkDebugFile(). The log is now opened explicitly and all emitted messages are buffered until this open occurs. The version message and log cut have also been moved to the earliest possible sensible location.
* | | Merge pull request #5288Wladimir J. van der Laan2015-07-101-10/+44
|\ \ \ | |/ / |/| | | | | e3cae52 Added -whiteconnections=<n> option (Josh Lehan)
| * | Added -whiteconnections=<n> optionJosh Lehan2015-06-141-10/+44
| | | | | | | | | | | | | | | | | | This sets aside a number of connection slots for whitelisted peers, useful for ensuring your local users and miners can always get in, even if your limit on inbound connections has already been reached.
* | | Merge pull request #6335Wladimir J. van der Laan2015-07-061-0/+1
|\ \ \ | | | | | | | | | | | | | | | | 9238ecb Policy: MOVEONLY: 3 functions to policy.o: (Luke Dashjr) 627b9de Policy: MOVEONLY: Create policy/policy.h with some constants (Jorge Timón)
| * | | Policy: MOVEONLY: Create policy/policy.h with some constantsJorge Timón2015-06-261-0/+1
| | | |
* | | | Merge pull request #6329Wladimir J. van der Laan2015-07-031-0/+6
|\ \ \ \ | | | | | | | | | | | | | | | 0c37634 acceptnonstdtxn option to skip (most) "non-standard transaction" checks, for testnet/regtest only (Luke Dashjr)
| * | | | acceptnonstdtxn option to skip (most) "non-standard transaction" checks, for ↵Luke Dashjr2015-07-031-0/+6
| | | | | | | | | | | | | | | | | | | | testnet/regtest only
* | | | | Merge pull request #6361Wladimir J. van der Laan2015-07-021-2/+2
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | 4716267 Use real number of cores for default -par, ignore virtual cores (Wladimir J. van der Laan)
| * | | | | Use real number of cores for default -par, ignore virtual coresWladimir J. van der Laan2015-07-011-2/+2
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To determine the default for `-par`, the number of script verification threads, use [boost::thread::physical_concurrency()](http://www.boost.org/doc/libs/1_58_0/doc/html/thread/thread_management.html#thread.thread_management.thread.physical_concurrency) which counts only physical cores, not virtual cores. Virtual cores are roughly a set of cached registers to avoid context switches while threading, they cannot actually perform work, so spawning a verification thread for them could even reduce efficiency and will put undue load on the system. Should fix issue #6358, as well as some other reported system overload issues, especially on Intel processors. The function was only introduced in boost 1.56, so provide a utility function `GetNumCores` to fall back for older Boost versions.
* / | | | detach wallet from minerJonas Schnelli2015-06-301-7/+2
|/ / / /
* | / / Testing infrastructure: mocktime fixesGavin Andresen2015-06-241-0/+3
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | New, undocumented-on-purpose -mocktime=timestamp command-line argument to startup with mocktime set. Needed because time-related blockchain sanity checks are done on startup, before a test has a chance to make a setmocktime RPC call. And changed the setmocktime RPC call so calling it will not result in currently connected peers being disconnected due to inactivity timeouts.
* | | Merge pull request #6272Wladimir J. van der Laan2015-06-181-18/+23
|\ \ \ | | | | | | | | | | | | | | | | edbdf88 tests: Extend RPC proxy tests (Wladimir J. van der Laan) baf0507 Improve proxy initialization (Wladimir J. van der Laan)
| * | | Improve proxy initializationWladimir J. van der Laan2015-06-121-18/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Simplify and make the code in AppInit2 more clear. This provides a straightforward flow, gets rid of .count() (which makes it possible to override an earlier provided proxy option to nothing), as well as comments the different cases.
* | | | Merge pull request #6274Wladimir J. van der Laan2015-06-151-0/+3
|\ \ \ \ | |_|_|/ |/| | | | | | | 02a6702 Add option `-alerts` to opt out of alert system (Wladimir J. van der Laan)
| * | | Add option `-alerts` to opt out of alert systemWladimir J. van der Laan2015-06-151-0/+3
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | Make it possible to opt-out of the centralized alert system by providing an option `-noalerts` or `-alerts=0`. The default remains unchanged. This is a gentler form of #6260, in which I went a bit overboard by removing the alert system completely. I intend to add this to the GUI options in another pull after this.
* | | Merge pull request #6256Wladimir J. van der Laan2015-06-121-1/+1
|\ \ \ | |/ / |/| | | | | 65b9454 Use best header chain timestamps to detect partitioning (Gavin Andresen)
| * | Use best header chain timestamps to detect partitioningGavin Andresen2015-06-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The partition checking code was using chainActive timestamps to detect partitioning; with headers-first syncing, it should use (and with this pull request, does use) pIndexBestHeader timestamps. Fixes issue #6251
* | | Merge pull request #6221Wladimir J. van der Laan2015-06-111-17/+36
|\ \ \ | | | | | | | | | | | | c257a8c Prune: Support noncontiguous block files (Adam Weiss)
| * | | Prune: Support noncontiguous block filesAdam Weiss2015-06-031-17/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some corner cases, it may be possible for recent blocks to end up in the same block file as much older blocks. Previously, the pruning code would stop looking for files to remove upon first encountering a file containing a block that cannot be pruned, now it will keep looking for candidate files until the target is met and all other criteria are satisfied. This can result in a noncontiguous set of block files (by number) on disk, which is fine except for during some reindex corner cases, so make reindex preparation smarter such that we keep the data we can actually use and throw away the rest. This allows pruning to work correctly while downloading any blocks needed during the reindex.
* | | | Merge pull request #6264Wladimir J. van der Laan2015-06-111-25/+26
|\ \ \ \ | | |_|/ | |/| | | | | | 9b5659d Remove translation for -help-debug options (Wladimir J. van der Laan)
| * | | Remove translation for -help-debug optionsWladimir J. van der Laan2015-06-101-25/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not translate -help-debug options, Many technical terms, and only a very small audience, so is unnecessary stress to translators. Brings the code up to date with translation string policy in `doc/translation_strings_policy.md`. Also remove no-longer-relevant "In this mode -genproclimit controls how many blocks are generated immediately." (as of #5957) from regtest help.
* | | | Merge pull request #6057Wladimir J. van der Laan2015-06-101-6/+15
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | 7e6569e [squashme] improve/corrects prune mode detection test for required wallet rescans (Jonas Schnelli) 7a12119 [RPC] disable import functions in pruned mode (Jonas Schnelli) 3201035 [autoprune] allow wallet in pruned mode (Jonas Schnelli)
| * | | [squashme] improve/corrects prune mode detection test for required wallet ↵Jonas Schnelli2015-05-281-1/+1
| | | | | | | | | | | | | | | | rescans
| * | | [autoprune] allow wallet in pruned modeJonas Schnelli2015-05-281-6/+15
| | | |
* | | | Merge pull request #6213Wladimir J. van der Laan2015-06-101-3/+3
|\ \ \ \ | | | | | | | | | | | | | | | eebd4cc [init] add -blockversion help and extend -upnp help (Philip Kaufmann)
| * | | | [init] add -blockversion help and extend -upnp helpPhilip Kaufmann2015-06-011-3/+3
| | | | |