aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
AgeCommit message (Collapse)Author
2015-09-16Add ZeroMQ support. Notify blocks and transactions via ZeroMQJeff Garzik
Continues Johnathan Corgan's work. Publishing multipart messages Bugfix: Add missing zmq header includes Bugfix: Adjust build system to link ZeroMQ code for Qt binaries
2015-09-08Merge pull request #6579Wladimir J. van der Laan
afb0cca Add NODE_BLOOM service bit and bump protocol version (Matt Corallo)
2015-09-07Prune the -prune help to reflect that the wallet is no longer disabled.Gregory Maxwell
The wallet hasn't been disabled since 3201035f22fe451c808b0bb157d33a58f0d99c07.
2015-09-05Add NODE_BLOOM service bit and bump protocol versionMatt Corallo
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
2015-09-04Merge pull request #5677Wladimir J. van der Laan
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)
2015-09-03Move windows socket init to utility functionWladimir J. van der Laan
2015-09-03Fix race condition between starting HTTP server thread and setting EventBase()Wladimir J. van der Laan
Split StartHTTPServer into InitHTTPServer and StartHTTPServer to give clients a window to register their handlers without race conditions. Thanks @ajweiss for figuring this out.
2015-09-03Document options for new HTTP/RPC server in --helpWladimir J. van der Laan
2015-09-03evhttpd implementationWladimir J. van der Laan
- *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
2015-08-22Remove redundant whiteconnections optionPatrick Strateman
2015-08-11Move mempool rejections to new debug categoryWladimir J. van der Laan
Move mempool rejections to debug category `mempoolrej`, to make it possible to show them without enabling the entire category `mempool` which is high volume.
2015-08-05Merge pull request #6462Wladimir J. van der Laan
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)
2015-08-05Merge pull request #6489Wladimir J. van der Laan
f261f19 Give a better error message if system clock is bad (Casey Rodarmor)
2015-08-05limit total length of user agent commentsPavol Rusnak
Reworked-By: Wladimir J. van der Laan <laanwj@gmail.com>
2015-08-04Merge pull request #6503Pieter Wuille
19dd40a Consolidate individual references to the current maximum peer connection value of 125 into a single constant declaration. (Matt Quinn)
2015-08-04Merge pull request #6504Wladimir J. van der Laan
9ca7857 Rationalize currency unit to "BTC" (Ross Nicoll)
2015-08-03Rationalize currency unit to "BTC"Ross Nicoll
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.
2015-08-03Consolidate individual references to the current maximum peer connectionMatt Quinn
value of 125 into a single constant declaration.
2015-08-03Give a better error message if system clock is badCasey Rodarmor
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.
2015-08-03Merge pull request #6356Wladimir J. van der Laan
f0cba6f Delay initial pruning until after wallet init (Adam Weiss)
2015-07-31qt: Introduce PlatformStyleWladimir J. van der Laan
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.
2015-07-29Delay initial pruning until after wallet initAdam Weiss
Don't prune until any wallet rescanning has taken place to avoid potentially pruning blocks that the wallet rescan may need.
2015-07-27Merge pull request #5697Wladimir J. van der Laan
60c8bac Includes: Cleanup around net main and wallet (Jorge Timón) 9dd793f TRIVIAL: Missing includes (Jorge Timón)
2015-07-23TRIVIAL: Missing includesJorge Timón
2015-07-22Merge pull request #6149Wladimir J. van der Laan
27d7605 Buffer log messages and explicitly open logs (Adam Weiss)
2015-07-10Merge pull request #5288Wladimir J. van der Laan
e3cae52 Added -whiteconnections=<n> option (Josh Lehan)
2015-07-06Buffer log messages and explicitly open logsAdam Weiss
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.
2015-07-06Merge pull request #6335Wladimir J. van der Laan
9238ecb Policy: MOVEONLY: 3 functions to policy.o: (Luke Dashjr) 627b9de Policy: MOVEONLY: Create policy/policy.h with some constants (Jorge Timón)
2015-07-03Merge pull request #6329Wladimir J. van der Laan
0c37634 acceptnonstdtxn option to skip (most) "non-standard transaction" checks, for testnet/regtest only (Luke Dashjr)
2015-07-03acceptnonstdtxn option to skip (most) "non-standard transaction" checks, for ↵Luke Dashjr
testnet/regtest only
2015-07-02Merge pull request #6361Wladimir J. van der Laan
4716267 Use real number of cores for default -par, ignore virtual cores (Wladimir J. van der Laan)
2015-07-01Use real number of cores for default -par, ignore virtual coresWladimir J. van der Laan
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.
2015-06-30detach wallet from minerJonas Schnelli
2015-06-26Policy: MOVEONLY: Create policy/policy.h with some constantsJorge Timón
2015-06-24Testing infrastructure: mocktime fixesGavin Andresen
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.
2015-06-18Merge pull request #6272Wladimir J. van der Laan
edbdf88 tests: Extend RPC proxy tests (Wladimir J. van der Laan) baf0507 Improve proxy initialization (Wladimir J. van der Laan)
2015-06-15Merge pull request #6274Wladimir J. van der Laan
02a6702 Add option `-alerts` to opt out of alert system (Wladimir J. van der Laan)
2015-06-15Add option `-alerts` to opt out of alert systemWladimir J. van der Laan
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.
2015-06-14Added -whiteconnections=<n> optionJosh Lehan
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.
2015-06-12Merge pull request #6256Wladimir J. van der Laan
65b9454 Use best header chain timestamps to detect partitioning (Gavin Andresen)
2015-06-12Improve proxy initializationWladimir J. van der Laan
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.
2015-06-11Merge pull request #6221Wladimir J. van der Laan
c257a8c Prune: Support noncontiguous block files (Adam Weiss)
2015-06-11Merge pull request #6264Wladimir J. van der Laan
9b5659d Remove translation for -help-debug options (Wladimir J. van der Laan)
2015-06-10Merge pull request #6057Wladimir J. van der Laan
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)
2015-06-10Remove translation for -help-debug optionsWladimir J. van der Laan
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.
2015-06-10Merge pull request #6213Wladimir J. van der Laan
eebd4cc [init] add -blockversion help and extend -upnp help (Philip Kaufmann)
2015-06-10Merge pull request #5927Wladimir J. van der Laan
dce8360 Reduce checkpoints' effect on consensus. (Pieter Wuille)
2015-06-08Use best header chain timestamps to detect partitioningGavin Andresen
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
2015-06-04use const references where appropriatePhilip Kaufmann
2015-06-03Prune: Support noncontiguous block filesAdam Weiss
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.