Commit graph

626 commits

Author SHA1 Message Date
Wladimir J. van der Laan dd8fe8215a
Merge pull request #6221
c257a8c Prune: Support noncontiguous block files (Adam Weiss)
2015-06-11 18:24:35 +02:00
Wladimir J. van der Laan 51870fc151
Merge pull request #6264
9b5659d Remove translation for -help-debug options (Wladimir J. van der Laan)
2015-06-11 10:50:01 +02:00
Wladimir J. van der Laan ac5476e2c1
Merge pull request #6057
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-10 12:32:31 +02:00
Wladimir J. van der Laan 9b5659d1c4 Remove translation for -help-debug options
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-10 11:59:23 +02:00
Wladimir J. van der Laan e54ff2fc0e
Merge pull request #6213
eebd4cc [init] add -blockversion help and extend -upnp help (Philip Kaufmann)
2015-06-10 11:39:06 +02:00
Wladimir J. van der Laan 8d9f0a6069
Merge pull request #5927
dce8360 Reduce checkpoints' effect on consensus. (Pieter Wuille)
2015-06-10 10:33:12 +02:00
Philip Kaufmann a9ac95c1bc use const references where appropriate 2015-06-04 19:34:18 +02:00
Adam Weiss c257a8c9a6 Prune: Support noncontiguous block files
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.
2015-06-03 13:25:33 -04:00
Wladimir J. van der Laan f00b62391b
Merge pull request #6203
d449772 Remove P2SH coinbase flag, no longer interesting (Luke Dashjr)
2015-06-02 09:11:13 +02:00
Philip Kaufmann eebd4cca19 [init] add -blockversion help and extend -upnp help 2015-06-01 14:38:44 +02:00
Wladimir J. van der Laan 8d05ec7bda
Merge pull request #6164
aa41bc8 Update help message to match the #4219 change (lpescher)
f60bb5e Update documentation to match the #4219 change (lpescher)
cb87386 Make command line option to show all debugging consistent with similar options (lpescher)
2015-06-01 11:26:59 +02:00
Luke Dashjr d449772cf6 Remove P2SH coinbase flag, no longer interesting 2015-05-31 06:53:48 +00:00
Jonas Schnelli 7e6569ea5b [squashme] improve/corrects prune mode detection test for required wallet rescans 2015-05-28 09:00:45 +02:00
Jonas Schnelli 3201035f22 [autoprune] allow wallet in pruned mode 2015-05-28 09:00:45 +02:00
Wladimir J. van der Laan c7c9af381c
Merge pull request #5669
da29ecb Consensus: MOVEONLY: Move CValidationState from main consensus/validation (jtimon)
27afcd8 Consensus: Refactor: Decouple CValidationState from main::AbortNode() (Cory Fields)
2015-05-27 15:00:02 +02:00
Wladimir J. van der Laan 0bcf04f046
Merge pull request #6153
8c35b6f Parameter interaction: disable upnp if -proxy set (Wladimir J. van der Laan)
2015-05-27 09:33:01 +02:00
Wladimir J. van der Laan e9af4e65b5
Merge pull request #5947
36cba8f Alert if it is very likely we are getting a bad chain (Gavin Andresen)
2015-05-26 10:41:17 +02:00
Wladimir J. van der Laan e1412d3e96
Merge pull request #6159
ffdda4e Catch errors on datadir lock and pidfile delete (Adam Weiss)
2015-05-24 10:57:22 +02:00
Adam Weiss ffdda4e8a7 Catch errors on datadir lock and pidfile delete
Prevents bad permissions (or other fs related problems) from resulting
in hard crashes with cryptic messages on startup and shutdown.
2015-05-22 14:15:22 -04:00
lpescher aa41bc84b1 Update help message to match the #4219 change 2015-05-19 22:35:11 -06:00
Wladimir J. van der Laan 8c35b6f3be Parameter interaction: disable upnp if -proxy set
To protect privacy, do not use UPNP when a proxy is set. The user may
still specify -listen=1 to listen locally (for a hidden service), so
don't rely on this happening through -listen.

Fixes #2927.
2015-05-18 11:22:39 +02:00
Wladimir J. van der Laan 77ed59df4d wallet: Introduce constant for -txconfirmtarget default 2015-05-18 09:00:24 +02:00
jtimon da29ecbcc6 Consensus: MOVEONLY: Move CValidationState from main consensus/validation 2015-05-15 16:05:28 +02:00
Wladimir J. van der Laan e47c94e64c
Merge pull request #6135
f13dac9 Comment edits and cleanup (BitcoinPRReadingGroup)
ff734e9 Alphabetic order in makefile (Jorge Timón)
5207f33 fix header include groups (Philip Kaufmann)
59b149f remove unneeded incude of wallet/db.h from rpcmining.cpp (Philip Kaufmann)
3703385 remove unused classes from db.h (Philip Kaufmann)
0a7bcb7 fix IDE/compiler warning "extra ';'" in validationinterface.h (Philip Kaufmann)
3b00e7c [Trivial] Update COPYING (sandakersmann)
dd9e688 Trivial: Corrected owner of DNS seeder (ayeowch)
a60bfd8 [init] better message when no wallet support is compiled in (Philip Kaufmann)
78f44b6 Capitalized P2P (sandakersmann)
8e9248d [Trivial] Cryptocurrency is one word (sandakersmann)
803f51e Typo in GetRawMemPool RPC method help: "]" --> "}" (Chris Arnesen)
605a735 addrman: update comments (Pavel Vasin)
2015-05-15 13:59:07 +02:00
Wladimir J. van der Laan 6fb90d8983
Merge pull request #6102
86a5f4b Relocate calls to CheckDiskSpace (Alex Morcos)
67708ac Write block index more frequently than cache flushes (Pieter Wuille)
b3ed423 Cache tweak and logging improvements (Pieter Wuille)
fc684ad Use accurate memory for flushing decisions (Pieter Wuille)
046392d Keep track of memory usage in CCoinsViewCache (Pieter Wuille)
540629c Add memusage.h (Pieter Wuille)
2015-05-15 13:43:02 +02:00
Gavin Andresen 36cba8f118
Alert if it is very likely we are getting a bad chain
Create a monitoring task that counts how many blocks have been found in the last four hours.

If very few or too many have been found, an alert is triggered.

"Very few" and "too many" are set based on a false positive rate of once every fifty years of constant running with constant hashing power, which works out to getting 5 or fewer or 48 or more blocks in four hours (instead of the average of 24).

Only one alert per day is triggered, so if you get disconnected from the network (or are being Sybil'ed) -alertnotify will be triggered after 3.5 hours but you won't get another -alertnotify for 24 hours.

Tested with a new unit test and by running on the main network with -debug=partitioncheck

Run test/test_bitcoin --log_level=message to see the alert messages:
    WARNING: check your network connection, 3 blocks received in the last 4 hours (24 expected)
    WARNING: abnormally high number of blocks generated, 60 blocks received in the last 4 hours (24 expected)

The -debug=partitioncheck debug.log messages look like:
    ThreadPartitionCheck : Found 22 blocks in the last 4 hours
    ThreadPartitionCheck : likelihood: 0.0777702
2015-05-14 14:58:44 -04:00
Gavin Andresen b4c219b622
Merge pull request #5964
9a1dcea Use CScheduler for net's DumpAddresses (Gavin Andresen)
ddd0acd Create a scheduler thread for lightweight tasks (Gavin Andresen)
68d370b CScheduler unit test (Gavin Andresen)
cfefe5b scheduler: fix with boost <= 1.50 (Cory Fields)
ca66717 build: make libboost_chrono mandatory (Cory Fields)
928b950 CScheduler class for lightweight task scheduling (Gavin Andresen)
e656560 [Qt] add defaultConfirmTarget constant to sendcoinsdialog (Philip Kaufmann)
2015-05-14 14:27:07 -04:00
Gavin Andresen 9a1dcea2df
Use CScheduler for net's DumpAddresses
Instead of starting Yet Another Thread to dump addresses,
use CScheduler to do it.
2015-05-14 12:50:42 -04:00
Gavin Andresen ddd0acd3db
Create a scheduler thread for lightweight tasks 2015-05-14 12:50:41 -04:00
Philip Kaufmann a60bfd810f [init] better message when no wallet support is compiled in 2015-05-14 01:02:00 -04:00
Pieter Wuille dce8360e44 Reduce checkpoints' effect on consensus.
Instead of only checking height to decide whether to disable script checks,
actually check whether a block is an ancestor of a checkpoint, up to which
headers have been validated. This means that we don't have to prevent
accepting a side branch anymore - it will be safe, just less fast to
do.

We still need to prevent being fed a multitude of low-difficulty headers
filling up our memory. The mechanism for that is unchanged for now: once
a checkpoint is reached with headers, no headers chain branching off before
that point are allowed anymore.
2015-05-13 12:52:57 -07:00
Alex Morcos 472b4c5dda Clean up parsing of bool command line args 2015-05-12 16:41:55 -04:00
Pieter Wuille b3ed4236be Cache tweak and logging improvements 2015-05-11 17:58:14 -07:00
Pieter Wuille fc684ad8af Use accurate memory for flushing decisions 2015-05-11 17:57:27 -07:00
Jonas Schnelli a1d0ec44d7 re-add -reindex help message
was suddenly removed with fc44231cb7 (probably not by purpose)
2015-05-08 19:59:01 +02:00
Wladimir J. van der Laan 12f3488253
Merge pull request #6047
a56054b Update key.cpp to use new libsecp256k1 (Pieter Wuille)
a591d98 Squashed 'src/secp256k1/' changes from 1897b8e..22f60a6 (Pieter Wuille)
2015-05-06 12:29:07 +02:00
Wladimir J. van der Laan 00820f921d
Merge pull request #6055
a8cdaf5 checkpoints: move the checkpoints enable boolean into main (Cory Fields)
11982d3 checkpoints: Decouple checkpoints from Params (Cory Fields)
6996823 checkpoints: make checkpoints a member of CChainParams (Cory Fields)
9f13a10 checkpoints: store mapCheckpoints in CCheckpointData rather than a pointer (Cory Fields)
2015-05-06 11:38:39 +02:00
Wladimir J. van der Laan fc44231cb7
trivial: Merge pruning help message after Transifex comment
The prune help message was broken in nonsensical parts. Merge it into
one, this is easier for translators.

Reported by yahoe.001 on transifex.
2015-05-04 18:48:38 +02:00
Wladimir J. van der Laan 04140457f4 Show an init message while activating best chain
Connecting the chain can take quite a while.
All the while it is still showing `Loading wallet...`.
Add an init message to inform the user what is happening.
2015-05-04 17:39:19 +02:00
Pieter Wuille a56054be65 Update key.cpp to use new libsecp256k1
libsecp256k1's API changed, so update key.cpp to use it.

Libsecp256k1 now has explicit context objects, which makes it completely thread-safe.
In turn, keep an explicit context object in key.cpp, which is explicitly initialized
destroyed. This is not really pretty now, but it's more efficient than the static
initialized object in key.cpp (which made for example bitcoin-tx slow, as for most of
its calls, libsecp256k1 wasn't actually needed).

This also brings in the new blinding support in libsecp256k1. By passing in a random
seed, temporary variables during the elliptic curve computations are altered, in such
a way that if an attacker does not know the blind, observing the internal operations
leaks less information about the keys used. This was implemented by Greg Maxwell.
2015-05-04 14:45:34 +02:00
Wladimir J. van der Laan 00e76db8c2
Merge pull request #6085
b05a89b Non-grammatical language improvements (Luke Dashjr)
7e6d23b Bugfix: Grammar fixes (Corinne Dashjr)
2015-05-04 08:01:58 +02:00
Corinne Dashjr 7e6d23b171 Bugfix: Grammar fixes 2015-05-01 11:21:27 +00:00
Cory Fields a8cdaf5c96 checkpoints: move the checkpoints enable boolean into main
This pertains to app-state, so it doesn't make sense to handle inside the
checkpoint functions.
2015-04-30 23:14:48 -04:00
Wladimir J. van der Laan 8a10000222
Merge pull request #6022
b74dcb3 Separate CTranslationInterface from CClientUIInterface (Jorge Timón)
2015-04-30 16:37:18 +02:00
mrbandrews f9ec3f0fad Add block pruning functionality
This adds a -prune=N option to bitcoind, which if set to N>0 will enable block
file pruning. When pruning is enabled, block and undo files will be deleted to
try to keep total space used by those files to below the prune target (N, in
MB) specified by the user, subject to some constraints:

- The last 288 blocks on the main chain are always kept (MIN_BLOCKS_TO_KEEP),
- N must be at least 550MB (chosen as a value for the target that could
  reasonably be met, with some assumptions about block sizes, orphan rates,
  etc; see comment in main.h),
- No blocks are pruned until chainActive is at least 100,000 blocks long (on
  mainnet; defined separately for mainnet, testnet, and regtest in chainparams
  as nPruneAfterHeight).

This unsets NODE_NETWORK if pruning is enabled.

Also included is an RPC test for pruning (pruning.py).

Thanks to @rdponticelli for earlier work on this feature; this is based in
part off that work.
2015-04-22 15:53:48 -04:00
Wladimir J. van der Laan b6ea3bcede
Merge pull request #5911
6be3562 rpc-tests: Add proxy test (Wladimir J. van der Laan)
67a7949 privacy: Stream isolation for Tor (Wladimir J. van der Laan)
2015-04-20 16:37:38 +02:00
Wladimir J. van der Laan 9e16cb108e Make 'Default: %u' spacing consistent in help message
Comment by pryds on Transifex.
2015-04-20 13:29:22 +02:00
Michael Ford c069234665 Fix typo in init.cpp interpration/interpretation 2015-04-20 13:29:21 +02:00
Wladimir J. van der Laan 67a7949397 privacy: Stream isolation for Tor
According to Tor's extensions to the SOCKS protocol
(https://gitweb.torproject.org/torspec.git/tree/socks-extensions.txt)
it is possible to perform stream isolation by providing authentication
to the proxy. Each set of credentials will create a new circuit,
which makes it harder to correlate connections.

This patch adds an option, `-proxyrandomize` (on by default) that randomizes
credentials for every outgoing connection, thus creating a new circuit.

    2015-03-16 15:29:59 SOCKS5 Sending proxy authentication 3842137544:3256031132
2015-04-17 13:26:47 +02:00
Jorge Timón b74dcb3b4a Separate CTranslationInterface from CClientUIInterface 2015-04-16 19:58:48 +02:00