85c579e script: add a slew of includes all around and drop includes from script.h (Cory Fields) db8eb54 script: move ToString and ValueString out of the header (Cory Fields) e9ca428 script: add ToByteVector() for converting anything with begin/end (Cory Fields) 066e2a1 script: move CScriptID to standard.h and add a ctor for creating them from CScripts (Cory Fields)
a873823 CAutoFile: Explicit Get() and remove unused methods (Wladimir J. van der Laan) fef24ca Add IsNull() to class CAutoFile and remove operator ! (Ruben Dario Ponticeli)
c0195b1 Bugfix: Remove default from -zapwallettxes description (inaccurate) (Luke Dashjr) 0a08aa8 Parameterise command line option defaults, so translations are independent of them (Luke Dashjr)
d4746d5 Add a SECURE style flag for ThreadSafeMessageBox, which indicates that the message contains sensitive information. This keeps the message from being output to the debug log by bitcoind. Fixes a possible security risk when starting bitcoind in server mode without the 'rpcpassword' option configured, resulting in the "suggested" password being output to the debug log. (Mark Friedenbach)
Mark Friedenbach [Thu, 16 Oct 2014 23:16:29 +0000 (16:16 -0700)]
Add a SECURE style flag for ThreadSafeMessageBox, which indicates that the message contains sensitive information. This keeps the message from being output to the debug log by bitcoind. Fixes a possible security risk when starting bitcoind in server mode without the 'rpcpassword' option configured, resulting in the "suggested" password being output to the debug log.
Pieter Wuille [Wed, 15 Oct 2014 19:39:33 +0000 (12:39 -0700)]
Merge pull request #5082
5f4bcf6 boost: drop boost dependency in version.cpp. (Cory Fields) 352058e boost: drop boost dependency in utilstrencodings.cpp (Cory Fields) e1c9467 boost: drop boost dependency in core.cpp (Cory Fields) e405aa4 boost: remove CPrivKey dependency from CECKey (Cory Fields) 5295506 boost: drop dependency on tuple in serialization (Cory Fields) 1d9b86d boost: drop dependency on is_fundamental in serialization (Cory Fields)
Cory Fields [Wed, 8 Oct 2014 18:27:07 +0000 (14:27 -0400)]
boost: drop dependency on is_fundamental in serialization
There's only one case where a vector containing a fundamental type is
serialized all-at-once, unsigned char. Anything else would lead to
strange results.
Pieter Wuille [Fri, 10 Oct 2014 20:13:47 +0000 (13:13 -0700)]
Fix rebuild-chainstate feature and improve its performance
Previous refactorings broke the ability to rebuild the chainstate by deleting the chainstate
directory, resulting in an incorrect "Incorrect or no genesis block found" error message. Fix
that.
Also, improve the performance of ActivateBestBlockStep by using the skiplist to only discover
a few potential blocks to connect at a time, instead of all blocks forever - as we likely bail
out after connecting a single one anyway.
Pieter Wuille [Tue, 7 Oct 2014 19:15:32 +0000 (21:15 +0200)]
Skip reindexed blocks individually
Instead of skipping to the last reindexed block in each file (which could
jump over processed out-of-order blocks), just skip each already processed
block individually.
Remember out-of-order block headers along with disk positions. This is
likely the simplest and least-impact way to make -reindex work with
headers first.
Many changes:
* Do not use 'getblocks', but 'getheaders', and use it to build a headers tree.
* Blocks are fetched in parallel from all available outbound peers, using a
limited moving window. When one peer stalls the movement of the window, it is
disconnected.
* No more orphan blocks. At all. We only ever request a block for which we have
verified the headers, and store it to disk immediately. This means that a
disk-fill attack would require PoW.
* Require protocol version 31800 for every peer (released in december 2010).
* No more syncnode (we sync from everyone we can, though limited to 1 during
initial *headers* sync).
* Introduce some extra named constants, comments and asserts.
d5fd094 build: fix qt test build when libprotobuf is in a non-standard path (Cory Fields) a7d1f03 build: fix dynamic boost check when --with-boost= is used (Cory Fields)
Cory Fields [Fri, 10 Oct 2014 17:11:47 +0000 (13:11 -0400)]
rpc-tests: don't spew non-errors to stdout
There's a brief race here, the process might've already exited and cleaned up
after itself. If that's the case, reading from the pidfile will harmlessly
fail. Keep those quiet.
6fd546d Remove CChainParams::NetworkID() (jtimon) cc97210 Add fTestnetToBeDeprecatedFieldRPC to CChainParams (jtimon) e11712d Move checkpoint data selection to chainparams (jtimon) 6de50c3 qt: add network-specific style object (Wladimir J. van der Laan)
Gavin Andresen [Tue, 7 Oct 2014 18:22:58 +0000 (14:22 -0400)]
Trigger -alertnotify if network is upgrading without you
This adds a -regetest-only undocumented (for regression testing only)
command-line option -blockversion=N to set block.nVersion.
Adds to the "has the rest of the network upgraded to a
block.nVersion we don't understand" code so it calls
-alertnotify when 51 of the last 100 blocks are up-version.
But it only alerts once, not with every subsequent new, upversion
block.
And adds a forknotify.py regression test to make sure it works.
Tested using forknotify.py:
Before adding CAlert::Notify, get:
Assertion failed: -alertnotify did not warn of up-version blocks
Before adding code to only alert once:
Assertion failed: -alertnotify excessive warning of up-version blocks
Pieter Wuille [Wed, 8 Oct 2014 22:49:37 +0000 (15:49 -0700)]
Merge pull request #4996
d0c4197 change exit(1) to an assert in CWallet::EncryptWallet (Philip Kaufmann) 870da77 fix possible memory leaks in CWallet::EncryptWallet (Philip Kaufmann) f606bb9 fix a possible memory leak in CWalletDB::Recover (Philip Kaufmann)
Pieter Wuille [Tue, 7 Oct 2014 00:22:47 +0000 (02:22 +0200)]
Make SCRIPT_VERIFY_STRICTENC compatible with BIP62
* Delete canonical_tests.cpp, and move the tests to script_tests.cpp.
* Split off SCRIPT_VERIFY_DERSIG from SCRIPT_VERIFY_STRICTENC (the BIP62 part of it).
* Change signature STRICTENC/DERSIG semantics to fail the script entirely rather than the CHECKSIG result (softfork safety, and BIP62 requirement).
* Add many autogenerated tests for several odd cases.
* Mention specific BIP62 rules in the script verification flags.
Pieter Wuille [Wed, 8 Oct 2014 21:57:31 +0000 (14:57 -0700)]
Merge pull request #4834
7c70438 Get rid of the dummy CCoinsViewCache constructor arg (Pieter Wuille) ed27e53 Add coins_tests with a large randomized CCoinViewCache test. (Pieter Wuille) 058b08c Do not keep fully spent but unwritten CCoins entries cached. (Pieter Wuille) c9d1a81 Get rid of CCoinsView's SetCoins and SetBestBlock. (Pieter Wuille) f28aec0 Use ModifyCoins instead of mutable GetCoins. (Pieter Wuille)
0b17964 Bugfix: Replace bashisms with standard sh in tests/tools (Luke Dashjr) ab72068 Bugfix: Replace bashisms with standard sh in gitian descriptors (Luke Dashjr) b77b4ed Bugfix: Replace bashisms with standard sh to fix build on non-BASH systems (Luke Dashjr) d6b0539 travis: add non-default shell testing to travis. (Cory Fields)