Commit graph

724 commits

Author SHA1 Message Date
Luke Dashjr d5f46832de Unify package name to as few places as possible without major changes 2015-12-14 02:11:10 +00:00
Jonas Schnelli 26af1ac7cb
Merge pull request #7006
f71bfef add UI help for -resetguisettings (Jonas Schnelli)
ae98388 [Qt] add startup option to reset Qt settings (Jonas Schnelli)
2015-11-25 09:05:19 +01:00
Jonas Schnelli f71bfefcb0
add UI help for -resetguisettings 2015-11-18 21:50:32 +01:00
Gregory Maxwell 87ee0e2dbc
Merge pull request #6986
6bc9e40 Chainparams: Explicit CChainParams arg for miner: (Jorge Timón)
598e494 Chainparams: Explicit CChainParams arg for main (pre miner): (Jorge Timón)
2015-11-16 17:00:11 -08:00
Pieter Wuille 6e18268616 Switch to libsecp256k1-based validation for ECDSA 2015-11-15 16:06:57 +01:00
Patick Strateman bbf49da408 Fix comment for blocksonly parameter interactions 2015-11-14 05:14:01 -08:00
Patick Strateman 59441a0445 Display DEFAULT_WHITELISTALWAYSRELAY in help text 2015-11-14 05:12:05 -08:00
Patick Strateman 71a2683f4b Use DEFAULT_BLOCKSONLY and DEFAULT_WHITELISTALWAYSRELAY constants 2015-11-14 05:10:59 -08:00
Patick Strateman 762b13b4d8 Add help text for blocksonly and whitelistalwaysrelay 2015-11-14 04:54:01 -08:00
Patick Strateman 3a964973fe Add whitelistalwaysrelay option 2015-11-14 04:52:21 -08:00
Gregory Maxwell dbd2c135dd
Merge pull request #6990
a264c32 http: speed up shutdown (Wladimir J. van der Laan)
2015-11-13 11:30:00 -08:00
Wladimir J. van der Laan a264c32e33
http: speed up shutdown
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.
2015-11-13 11:10:48 +01:00
MarcoFalke b27e81f115 [net] Cleanup maxuploadtarget
* 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
2015-11-12 20:45:57 +01:00
Wladimir J. van der Laan bd629d77ed
Merge pull request #6639
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)
2015-11-12 19:24:59 +01:00
Wladimir J. van der Laan 09c1ae1c01 torcontrol improvements and fixes
- 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
2015-11-12 17:58:15 +01:00
Wladimir J. van der Laan eb6172a8ca
Merge pull request #6918
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)
2015-11-12 17:37:52 +01:00
Jorge Timón 6bc9e4056b Chainparams: Explicit CChainParams arg for miner:
-BitcoinMiner
-CreateNewBlock
-GenerateBitcoins
-ProcessBlockFound
2015-11-11 13:21:17 +01:00
Wladimir J. van der Laan 8f4e67f152 net: Automatically create hidden service, listen on Tor
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.
2015-11-10 17:29:56 +01:00
MarcoFalke e20d9245e5 [trivial] init: Use defaults MIN_RELAY_TX_FEE & TRANSACTION_MAXFEE 2015-11-09 21:12:55 +01:00
Wladimir J. van der Laan 6176e9bf3d
Merge pull request #6962
6dd3a44 translations: Don't translate markdown or force English grammar (MarcoFalke)
2015-11-09 12:09:33 +01:00
MarcoFalke 6dd3a44ce2 translations: Don't translate markdown or force English grammar 2015-11-09 11:40:52 +01:00
Wladimir J. van der Laan 3694b74fa9
Merge pull request #6887
53238ff Clarify what minrelaytxfee does (MarcoFalke)
abd8b76 [qt] Properly display required fee instead of minTxFee (MarcoFalke)
2015-11-05 12:11:11 +01:00
Wladimir J. van der Laan 8a95a18562
Merge pull request #6669
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)
2015-11-04 12:30:50 +01:00
Wladimir J. van der Laan aa03fb35c4
Merge pull request #6927
de0499d Fix ZMQ Notification initialization and shutdown (João Barbosa)
2015-11-04 12:10:46 +01:00
Wladimir J. van der Laan aca0c00ae1
Merge pull request #6905
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)
2015-11-04 11:45:33 +01:00
João Barbosa de0499d3b8 Fix ZMQ Notification initialization and shutdown
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.
2015-11-04 10:36:00 +00:00
MarcoFalke 53238ff0b1 Clarify what minrelaytxfee does 2015-11-03 08:53:37 +01:00
Pieter Wuille 830e3f3d02 Make sigcache faster and more efficient 2015-10-31 01:15:11 +01:00
Luke Dashjr a6efc01908 Bugfix: Omit wallet-related options from -help when wallet is disabled 2015-10-30 00:32:08 +01:00
MarcoFalke 6342a4889b Init: Use DEFAULT_TRANSACTION_MINFEE in help message 2015-10-29 16:52:40 +01:00
Wladimir J. van der Laan b2ce2c1f0f
Merge pull request #6870
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)
2015-10-29 13:30:42 +01:00
MarcoFalke 040c0ea093 Init: Cleanup error and warning strings
Also update doc/translation_strings_policy.md
2015-10-28 22:11:43 +01:00
Pieter Wuille e06c14fb59
Merge pull request #6776
ab1f560 Support -checkmempool=N, which runs checks on average once every N transactions (Pieter Wuille)
2015-10-28 02:25:06 +01:00
Wladimir J. van der Laan 2b625510d3
Merge pull request #6881
7bbc7c3 Add option for microsecond precision in debug.log (Suhas Daftuar)
2015-10-26 21:04:41 +01:00
Suhas Daftuar 7bbc7c314f Add option for microsecond precision in debug.log 2015-10-26 15:05:37 -04:00
Jonas Schnelli 872fee3fcc
Introduce -maxuploadtarget
* -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
2015-10-26 15:37:30 +01:00
Wladimir J. van der Laan c719cefc41
Merge pull request #6856
d3b09f6 Do not allow blockfile pruning during reindex. (Alex Morcos)
2015-10-23 14:41:30 +02:00
Wladimir J. van der Laan 3b20e239c6
Merge pull request #6722
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)
2015-10-21 08:50:16 +02:00
Pieter Wuille ab1f56072a Support -checkmempool=N, which runs checks on average once every N transactions 2015-10-20 18:59:08 +02:00
Wladimir J. van der Laan e26a3f6713
Merge pull request #6235
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)
2015-10-20 17:06:28 +02:00
Jorge Timón 55a89751fa Chainparams: Translations: DRY: options and error strings
Also remove SelectBaseParamsFromCommandLine and SelectParamsFromCommandLine
2015-10-20 14:28:43 +02:00
Alex Morcos d3b09f6bac Do not allow blockfile pruning during reindex.
Also clarify startup message.
2015-10-19 14:43:04 -04:00
Matt Corallo 794a8cec5d Implement on-the-fly mempool size limitation.
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).
2015-10-13 01:39:27 -07:00
Pieter Wuille 49b6fd5663 Add Mempool Expire function to remove old transactions
(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)
2015-10-13 00:44:03 -07:00
Luke Dashjr 5f9260f458 Bugfix: If genproclimit is omitted to RPC setgenerate, don't change it; also show correct default in getmininginfo 2015-10-01 23:16:42 +00:00
Luke Dashjr 420a82f1ae Bugfix: Describe dblogsize option correctly (it refers to the wallet database, not memory pool) 2015-10-01 23:16:42 +00:00
Luke Dashjr caa3d42f06 Bugfix: RPC: blockchain: Display correct defaults in help for verifychain method 2015-10-01 23:16:42 +00:00
Wladimir J. van der Laan 34dc03d8e0
Merge pull request #6664
51ff777 [trivial] Fix rpc message "help generate" (MarcoFalke)
4c3cab1 [trivial] init cleanup (MarcoFalke)
2015-09-24 18:21:18 +02:00
Wladimir J. van der Laan a3babc826d
Merge pull request #6647
1c1b1b3 [uacomment] Sanitize per BIP-0014 (MarcoFalke)
2015-09-22 11:36:50 +02:00
Wladimir J. van der Laan 5e21388c48
Merge pull request #6695
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)
2015-09-21 17:16:40 +02:00