aboutsummaryrefslogtreecommitdiff
path: root/src/init.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #6990Gregory Maxwell2015-11-131-1/+1
|\ | | | | | | a264c32 http: speed up shutdown (Wladimir J. van der Laan)
| * http: speed up shutdownWladimir J. van der Laan2015-11-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This continues/fixes #6719. `event_base_loopbreak` was not doing what I expected it to, at least in libevent 2.0.21. What I expected was that it sets a timeout, given that no other pending events it would exit in N seconds. However, what it does was delay the event loop exit with 10 seconds, even if nothing is pending. Solve it in a different way: give the event loop thread time to exit out of itself, and if it doesn't, send loopbreak. This speeds up the RPC tests a lot, each exit incurred a 10 second overhead, with this change there should be no shutdown overhead in the common case and up to two seconds if the event loop is blocking. As a bonus this breaks dependency on boost::thread_group, as the HTTP server minds its own offspring.
* | [net] Cleanup maxuploadtargetMarcoFalke2015-11-121-2/+2
| | | | | | | | | | | | | | * log: nMaxOutboundLimit is in bytes * log: Hide misleading -maxuploadtarget=0 warning * qa : Minor cleanup to maxuploadtarget rpc tests * net: Use DEFAULT_MAX_UPLOAD_TARGET = 0
* | Merge pull request #6639Wladimir J. van der Laan2015-11-121-0/+11
|\ \ | | | | | | | | | | | | | | | | | | | | | 58ef0ff doc: update docs for Tor listening (Wladimir J. van der Laan) 68ccdc4 doc: Mention Tor listening in release notes (Wladimir J. van der Laan) 09c1ae1 torcontrol improvements and fixes (Wladimir J. van der Laan) 2f796e5 Better error message if Tor version too old (Peter Todd) 8f4e67f net: Automatically create hidden service, listen on Tor (Wladimir J. van der Laan)
| * | torcontrol improvements and fixesWladimir J. van der Laan2015-11-121-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Force AUTHCOOKIE size to be 32 bytes: This provides protection against an attack where a process pretends to be Tor and uses the cookie authentication method to nab arbitrary files such as the wallet - torcontrol logging - fix cookie auth - add HASHEDPASSWORD auth, fix fd leak when fwrite() fails - better error reporting when cookie file is not ok - better init/shutdown flow - stop advertizing service when disconnected from tor control port - COOKIE->SAFECOOKIE auth
| * | net: Automatically create hidden service, listen on TorWladimir J. van der Laan2015-11-101-0/+9
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Starting with Tor version 0.2.7.1 it is possible, through Tor's control socket API, to create and destroy 'ephemeral' hidden services programmatically. https://stem.torproject.org/api/control.html#stem.control.Controller.create_ephemeral_hidden_service This means that if Tor is running (and proper authorization is available), bitcoin automatically creates a hidden service to listen on, without user manual configuration. This will positively affect the number of available .onion nodes. - When the node is started, connect to Tor through control socket - Send `ADD_ONION` command - First time: - Make it create a hidden service key - Save the key in the data directory for later usage - Make it redirect port 8333 to the local port 8333 (or whatever port we're listening on). - Keep control socket connection open for as long node is running. The hidden service will (by default) automatically go away when the connection is closed.
* | Merge pull request #6918Wladimir J. van der Laan2015-11-121-1/+2
|\ \ | |/ |/| | | | | | | 69d373f Don't wipe the sigcache in TestBlockValidity (Pieter Wuille) 0b9e9dc Evict sigcache entries that are seen in a block (Pieter Wuille) 830e3f3 Make sigcache faster and more efficient (Pieter Wuille)
| * Make sigcache faster and more efficientPieter Wuille2015-10-311-1/+2
| |
* | [trivial] init: Use defaults MIN_RELAY_TX_FEE & TRANSACTION_MAXFEEMarcoFalke2015-11-091-2/+2
| |
* | Merge pull request #6962Wladimir J. van der Laan2015-11-091-4/+5
|\ \ | | | | | | | | | 6dd3a44 translations: Don't translate markdown or force English grammar (MarcoFalke)
| * | translations: Don't translate markdown or force English grammarMarcoFalke2015-11-091-4/+5
| | |
* | | Merge pull request #6887Wladimir J. van der Laan2015-11-051-1/+1
|\ \ \ | |/ / |/| | | | | | | | 53238ff Clarify what minrelaytxfee does (MarcoFalke) abd8b76 [qt] Properly display required fee instead of minTxFee (MarcoFalke)
| * | Clarify what minrelaytxfee doesMarcoFalke2015-11-031-1/+1
| | |
* | | Merge pull request #6669Wladimir J. van der Laan2015-11-041-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | 6342a48 Init: Use DEFAULT_TRANSACTION_MINFEE in help message (MarcoFalke) a9c73a1 [wallet] Add comments for doxygen (MarcoFalke) 6b0e622 [wallet] Refactor to use new MIN_CHANGE (MarcoFalke)
| * | | Init: Use DEFAULT_TRANSACTION_MINFEE in help messageMarcoFalke2015-10-291-1/+1
| | | |
* | | | Merge pull request #6927Wladimir J. van der Laan2015-11-041-2/+0
|\ \ \ \ | | | | | | | | | | | | | | | de0499d Fix ZMQ Notification initialization and shutdown (João Barbosa)
| * | | | Fix ZMQ Notification initialization and shutdownJoão Barbosa2015-11-041-2/+0
| | |_|/ | |/| | | | | | | | | | | | | | | | | | Moves the call Initialize() from init.cpp to CreateWithArguments() and handles the return value. Moves the call Shutdown() from init.cpp to destructor. Changes Initialize() and Shutdown() to protected members.
* | | | Merge pull request #6905Wladimir J. van der Laan2015-11-041-9/+13
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | | | | | a6efc01 Bugfix: Omit wallet-related options from -help when wallet is disabled (Luke Dashjr) 5f9260f Bugfix: If genproclimit is omitted to RPC setgenerate, don't change it; also show correct default in getmininginfo (Luke Dashjr) 420a82f Bugfix: Describe dblogsize option correctly (it refers to the wallet database, not memory pool) (Luke Dashjr) caa3d42 Bugfix: RPC: blockchain: Display correct defaults in help for verifychain method (Luke Dashjr)
| * | | Bugfix: Omit wallet-related options from -help when wallet is disabledLuke Dashjr2015-10-301-0/+4
| | | |
| * | | Bugfix: If genproclimit is omitted to RPC setgenerate, don't change it; also ↵Luke Dashjr2015-10-011-2/+2
| | | | | | | | | | | | | | | | show correct default in getmininginfo
| * | | Bugfix: Describe dblogsize option correctly (it refers to the wallet ↵Luke Dashjr2015-10-011-1/+1
| | | | | | | | | | | | | | | | database, not memory pool)
| * | | Bugfix: RPC: blockchain: Display correct defaults in help for verifychain methodLuke Dashjr2015-10-011-6/+6
| | | |
* | | | Merge pull request #6870Wladimir J. van der Laan2015-10-291-13/+12
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 040c0ea Init: Cleanup error and warning strings (MarcoFalke) 6782f58 [trivial] Latest config.guess (MarcoFalke) bf68191 [trivial] rpcnet: fix typo (MarcoFalke) 95f4291 [trivial] Rewrite help text for feature enabled by default (MarcoFalke)
| * | | | Init: Cleanup error and warning stringsMarcoFalke2015-10-281-13/+12
| | | | | | | | | | | | | | | | | | | | Also update doc/translation_strings_policy.md
* | | | | Merge pull request #6776Pieter Wuille2015-10-281-1/+4
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | ab1f560 Support -checkmempool=N, which runs checks on average once every N transactions (Pieter Wuille)
| * | | | | Support -checkmempool=N, which runs checks on average once every N transactionsPieter Wuille2015-10-201-1/+4
| | | | | |
* | | | | | Merge pull request #6881Wladimir J. van der Laan2015-10-261-0/+2
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | 7bbc7c3 Add option for microsecond precision in debug.log (Suhas Daftuar)
| * | | | | | Add option for microsecond precision in debug.logSuhas Daftuar2015-10-261-0/+2
| | |_|/ / / | |/| | | |
* | | | | | Introduce -maxuploadtargetJonas Schnelli2015-10-261-0/+4
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * -maxuploadtarget can be set in MiB * if <limit> - ( time-left-in-24h-cycle / 600 * MAX_BLOCK_SIZE ) has reach, stop serve blocks older than one week and filtered blocks * no action if limit has reached, no guarantee that the target will not be surpassed * add outbound limit informations to rpc getnettotals
* | | | | Merge pull request #6856Wladimir J. van der Laan2015-10-231-1/+1
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | d3b09f6 Do not allow blockfile pruning during reindex. (Alex Morcos)
| * | | | Do not allow blockfile pruning during reindex.Alex Morcos2015-10-191-1/+1
| |/ / / | | | | | | | | | | | | Also clarify startup message.
* | | | Merge pull request #6722Wladimir J. van der Laan2015-10-211-0/+8
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 58254aa Fix stale comment in CTxMemPool::TrimToSize. (Matt Corallo) 2bc5018 Fix comment formatting tabs (Matt Corallo) 8abe0f5 Undo GetMinFee-requires-extra-call-to-hit-0 (Matt Corallo) 9e93640 Drop minRelayTxFee to 1000 (Matt Corallo) 074cb15 Add reasonable test case for mempool trimming (Matt Corallo) d355cf4 Only call TrimToSize once per reorg/blocks disconnect (Matt Corallo) 794a8ce Implement on-the-fly mempool size limitation. (Matt Corallo) e6c7b36 Print mempool size in KB when adding txn (Matt Corallo) 241d607 Add CFeeRate += operator (Matt Corallo) e8bcdce Track (and define) ::minRelayTxFee in CTxMemPool (Matt Corallo) 9c9b66f Fix calling mempool directly, instead of pool, in ATMP (Matt Corallo) 49b6fd5 Add Mempool Expire function to remove old transactions (Pieter Wuille) 78b82f4 Reverse the sort on the mempool's feerate index (Suhas Daftuar)
| * | | Implement on-the-fly mempool size limitation.Matt Corallo2015-10-131-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After each transaction which is added to mempool, we first call Expire() to remove old transactions, then throwing away the lowest-feerate transactions. After throwing away transactions by feerate, we set the minimum relay fee to the maximum fee transaction-and-dependant-set we removed, plus the default minimum relay fee. After the next block is received, the minimum relay fee is allowed to decrease exponentially. Its halflife defaults to 12 hours, but is decreased to 6 hours if the mempool is smaller than half its maximum size, and 3 hours if the mempool is smaller than a quarter its maximum size. The minimum -maxmempool size is 40*-limitdescendantsize, as it is easy for an attacker to play games with the cheapest -limitdescendantsize transactions. -maxmempool defaults to 300MB. This disables high-priority transaction relay when the min relay fee adjustment is >0 (ie when the mempool is full). When the relay fee adjustment drops below the default minimum relay fee / 2 it is set to 0 (re-enabling priority-based free relay).
| * | | Add Mempool Expire function to remove old transactionsPieter Wuille2015-10-131-0/+1
| |/ / | | | | | | | | | | | | | | | (note the 9x multiplier on (void*)'s for CTxMemPool::DynamicMemoryUsage was accidentally introduced in 5add7a7 but should have waited for this commit which adds the extra index)
* | | Merge pull request #6235Wladimir J. van der Laan2015-10-201-3/+2
|\ \ \ | |/ / |/| | | | | | | | 55a8975 Chainparams: Translations: DRY: options and error strings (Jorge Timón) f3525e2 Chainparams: Replace CBaseChainParams::Network enum with string constants (suggested by Wladimir) (Jorge Timón)
| * | Chainparams: Translations: DRY: options and error stringsJorge Timón2015-10-201-3/+2
| | | | | | | | | | | | Also remove SelectBaseParamsFromCommandLine and SelectParamsFromCommandLine
* | | Merge pull request #6664Wladimir J. van der Laan2015-09-241-6/+6
|\ \ \ | | | | | | | | | | | | | | | | 51ff777 [trivial] Fix rpc message "help generate" (MarcoFalke) 4c3cab1 [trivial] init cleanup (MarcoFalke)
| * | | [trivial] init cleanupMarcoFalke2015-09-121-6/+6
| | | |
* | | | Merge pull request #6647Wladimir J. van der Laan2015-09-221-2/+9
|\ \ \ \ | | | | | | | | | | | | | | | 1c1b1b3 [uacomment] Sanitize per BIP-0014 (MarcoFalke)
| * | | | [uacomment] Sanitize per BIP-0014MarcoFalke2015-09-161-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * SanitizeString() can be requested to be more strict * Throw error when SanitizeString() changes uacomments * Fix tests
* | | | | Merge pull request #6695Wladimir J. van der Laan2015-09-211-5/+3
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ddf98d1 Make RPC tests cope with server-side timeout between requests (Wladimir J. van der Laan) 2190ea6 rpc: Split option -rpctimeout into -rpcservertimeout and -rpcclienttimeout (Wladimir J. van der Laan) 8b2d6ed http: Disable libevent debug logging, if not explicitly enabled (Wladimir J. van der Laan) 5ce43da init: Ignore SIGPIPE (Wladimir J. van der Laan)
| * | | | | rpc: Split option -rpctimeout into -rpcservertimeout and -rpcclienttimeoutWladimir J. van der Laan2015-09-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The two timeouts for the server and client, are essentially different: - In the case of the server it should be a lower value to avoid clients clogging up connection slots - In the case of the client it should be a high value to accomedate slow responses from the server, for example for slow queries or when the lock is contended Split the options into `-rpcservertimeout` and `-rpcclienttimeout` with respective defaults of 30 and 900.
| * | | | | http: Disable libevent debug logging, if not explicitly enabledWladimir J. van der Laan2015-09-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a option "-debug=libevent" to enable libevent debugging for troubleshooting. Libevent logging is redirected to our own log.
| * | | | | init: Ignore SIGPIPEWladimir J. van der Laan2015-09-181-3/+1
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ignore SIGPIPE on all non-win32 OSes, otherwise an unexpectedly disconnecting RPC client will terminate the application. This problem was introduced with the libhttp-based RPC server. Fixes #6660.
* | | | | Track transaction packages in CTxMemPoolEntrySuhas Daftuar2015-09-191-0/+4
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Associate with each CTxMemPoolEntry all the size/fees of descendant mempool transactions. Sort mempool by max(feerate of entry, feerate of descendants). Update statistics on-the-fly as transactions enter or leave the mempool. Also add ancestor and descendant limiting, so that transactions can be rejected if the number or size of unconfirmed ancestors exceeds a target, or if adding a transaction would cause some other mempool entry to have too many (or too large) a set of unconfirmed in- mempool descendants.
* | | | Add ZeroMQ support. Notify blocks and transactions via ZeroMQJeff Garzik2015-09-161-1/+35
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | 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)