aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-02-22sanity: Move OS random to sanity check functionWladimir J. van der Laan
Move the OS random test to a sanity check function that is called every time bitcoind is initialized. Keep `src/test/random_tests.cpp` for the case that later random tests are added, and keep a rudimentary test that just calls the sanity check.
2017-02-22squashme: comment that NUM_OS_RANDOM_BYTES should not be changed lightlyWladimir J. van der Laan
2017-02-21util: Specific GetOSRandom for Linux/FreeBSD/OpenBSDWladimir J. van der Laan
These are available in sandboxes without access to files or devices. Also [they are safer and more straightforward](https://en.wikipedia.org/wiki/Entropy-supplying_system_calls) to use than `/dev/urandom` as reading from a file has quite a few edge cases: - Linux: `getrandom(buf, buflen, 0)`. [getrandom(2)](http://man7.org/linux/man-pages/man2/getrandom.2.html) was introduced in version 3.17 of the Linux kernel. - OpenBSD: `getentropy(buf, buflen)`. The [getentropy(2)](http://man.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man2/getentropy.2) function appeared in OpenBSD 5.6. - FreeBSD and NetBSD: `sysctl(KERN_ARND)`. Not sure when this was added but it has existed for quite a while. Alternatives: - Linux has sysctl `CTL_KERN` / `KERN_RANDOM` / `RANDOM_UUID` which gives 16 bytes of randomness. This may be available on older kernels, however [sysctl is deprecated on Linux](https://lwn.net/Articles/605392/) and even removed in some distros so we shouldn't use it. Add tests for `GetOSRand()`: - Test that no error happens (otherwise `RandFailure()` which aborts) - Test that all 32 bytes are overwritten (initialize with zeros, try multiple times) Discussion: - When to use these? Currently they are always used when available. Another option would be to use them only when `/dev/urandom` is not available. But this would mean these code paths receive less testing, and I'm not sure there is any reason to prefer `/dev/urandom`. Closes: #9676
2017-02-21Merge #9727: Remove fallbacks for boost_filesystem < v3Wladimir J. van der Laan
056aba2 Remove fallbacks for boost_filesystem < v3 (Wladimir J. van der Laan)
2017-02-21Merge #9817: Fix segfault crash when shutdown the GUI in disablewallet modeWladimir J. van der Laan
312c4f1 Fix segfault crash when shutdown the GUI in disablewallet mode (Jonas Schnelli)
2017-02-21Fix segfault crash when shutdown the GUI in disablewallet modeJonas Schnelli
2017-02-21Merge #9798: Fix Issue #9775 (Check returned value of fopen)Wladimir J. van der Laan
40f11f8 Fix for issue #9775. Added check for open() returning a NULL pointer. (kirit93)
2017-02-21Merge #9813: Read/write mempool.dat as a binary.Wladimir J. van der Laan
171fc91 Read/write mempool.dat as a binary. (Pavel Janík)
2017-02-20Fix for issue #9775. Added check for open() returning a NULL pointer.kirit93
2017-02-20Read/write mempool.dat as a binary.Pavel Janík
mempool.dat is a binary file and thus it should be read/written as such. Fixes #9810.
2017-02-20Merge #9726: netbase: Do not print an error on connection timeouts through proxyWladimir J. van der Laan
3ddfe29 netbase: Do not print an error on connection timeouts through proxy (Wladimir J. van der Laan) 13f6085 netbase: Make InterruptibleRecv return an error code instead of bool (Wladimir J. van der Laan)
2017-02-20Merge #9619: Bugfix: RPC/Mining: GBT should return 1 MB sizelimit before ↵Wladimir J. van der Laan
segwit activates 279f944 QA: Test GBT size/weight limit values (Luke Dashjr) 9fc7f0b Bugfix: RPC/Mining: GBT should return 1 MB sizelimit before segwit activates (Luke Dashjr)
2017-02-20Merge #9760: [wallet] Remove importmulti always-true checkWladimir J. van der Laan
ec1267f [wallet] Remove importmulti always-true check (Russell Yanofsky)
2017-02-20Merge #9794: Minor update to qrencode package builderWladimir J. van der Laan
1bfe6b4 Use package name variable inside $(package)_file_name variable (Mitchell Cash)
2017-02-20Merge #9724: Qt/Intro: Add explanation of IBD processWladimir J. van der Laan
f6d18f5 Qt/Intro: Explain a bit more what will happen first time (Luke Dashjr) 50c5657 Qt/Intro: Storage shouldn't grow significantly with pruning enabled (Luke Dashjr) 9adb694 Qt/Intro: Move sizeWarningLabel text into C++ code (Luke Dashjr)
2017-02-19Merge #9795: doc: Update manpages for master (laanwj)Wladimir J. van der Laan
eb49101 doc: Update manpages for master (Wladimir J. van der Laan)
2017-02-19Merge #9791: Avoid VLA in hash.hWladimir J. van der Laan
5c8fd50 Avoid VLA in hash.h (Pieter Wuille)
2017-02-18Merge #9657: Improve rpc-tests.pyMarcoFalke
a6a3e58 Various review markups for rpc-tests.py improvements (John Newbery) 3de3ccd Refactor rpc-tests.py (John Newbery) afd38e7 Improve rpc-tests.py arguments (John Newbery) 91bffff Use argparse in rpc_tests.py (John Newbery) 1581ecb Use configparser in rpc-tests.py (John Newbery)
2017-02-18Merge #9696: [trivial] Fix recently introduced typos in commentsMarcoFalke
0c9b9b7 [trivial] Fix recently introduced typos in comments (practicalswift)
2017-02-18doc: Update manpages for masterWladimir J. van der Laan
(cherry picked from commit 268c390d02d99a4a93a0a01221e273d2b9695ff7)
2017-02-18Merge #9744: Remove unused module from rpc-testsMarcoFalke
a432aa0 Remove unused module from rpc-tests (Takashi Mitsuta)
2017-02-18Use package name variable inside $(package)_file_name variableMitchell Cash
2017-02-18Merge #9788: gitian: bump descriptors for masterMarcoFalke
8e5cca0 gitian: bump descriptors for master (Cory Fields)
2017-02-17Avoid VLA in hash.hPieter Wuille
2017-02-17gitian: bump descriptors for masterCory Fields
This was skipped for the 0.14 cycle.
2017-02-17Merge #9786: boost: remove iostreams includesWladimir J. van der Laan
3301587 boost: remove iostreams includes (Cory Fields)
2017-02-17Merge #9785: Avoid variable length arraysWladimir J. van der Laan
c801c82 Move BIP70_MAX_PAYMENTREQUEST_SIZE to header (Pieter Wuille) 914fad1 Make KEY_SIZE a compile-time constant (Pieter Wuille)
2017-02-17boost: remove iostreams includesCory Fields
They're unused and produce nasty deprecation warnings
2017-02-17Move BIP70_MAX_PAYMENTREQUEST_SIZE to headerPieter Wuille
2017-02-17Make KEY_SIZE a compile-time constantPieter Wuille
2017-02-17Various review markups for rpc-tests.py improvementsJohn Newbery
2017-02-17build: bump version to 0.14.99Wladimir J. van der Laan
Now that 0.14 branch has been split off, master is 0.14.99 (pre-0.15). Also clean out release notes.
2017-02-17[wallet] Remove importmulti always-true checkRussell Yanofsky
Remove "nLowestTimestamp <= chainActive.Tip()->GetBlockTimeMax()" check from importmulti, which is always true because nLowestTimestamp is set to the minimum of the most recent block time and all the imported key timestamps, which is necessarily lower than the maximum block time.
2017-02-17Merge #9761: Use 2 hour grace period for key timestamps in importmulti rescansWladimir J. van der Laan
e662af3 Use 2 hour grace period for key timestamps in importmulti rescans (Russell Yanofsky) 38d3e9e [qa] Extend import-rescan.py to test imports on pruned nodes. (Russell Yanofsky) c28583d [qa] Extend import-rescan.py to test specific key timestamps (Russell Yanofsky) 8be0866 [qa] Simplify import-rescan.py (Russell Yanofsky)
2017-02-17Merge #9778: Add two hour buffer to manual pruningWladimir J. van der Laan
91fb506 Add two hour buffer to manual pruning (Alex Morcos)
2017-02-17Merge #9779: Update nMinimumChainWork and defaultAssumeValid.Wladimir J. van der Laan
3f78e46 Update nMinimumChainWork and defaultAssumeValid. (Gregory Maxwell)
2017-02-17Merge #9777: Handle unusual maxsigcachesize gracefullyWladimir J. van der Laan
55c403b Ensure `-maxsigcachesize` is in valid range (John Newbery)
2017-02-17Ensure `-maxsigcachesize` is in valid rangeJohn Newbery
- If the -maxsigcachesize parameter is set to zero, setup a minimum sized sigcache (2 elements) rather than segfaulting. - Handle maxsigcachesize being negative - Handle maxsigcachesize being too large
2017-02-16Add two hour buffer to manual pruningAlex Morcos
2017-02-16Update nMinimumChainWork and defaultAssumeValid.Gregory Maxwell
2017-02-16QA: Test GBT size/weight limit valuesLuke Dashjr
2017-02-16Use 2 hour grace period for key timestamps in importmulti rescansRussell Yanofsky
Gregory Maxwell <greg@xiph.org> pointed out the lack of grace period in https://github.com/bitcoin/bitcoin/pull/9490#issue-199407998. The importwallet RPC which uses key timestamps in a similar way already has a 2 hour grace period.
2017-02-16Merge #9675: Fix typo and spelling inconsistency in CONTRIBUTING.mdWladimir J. van der Laan
36164fa Fix typo and spelling inconsistency in CONTRIBUTING.md (Koki Takahashi)
2017-02-16[qa] Extend import-rescan.py to test imports on pruned nodes.Russell Yanofsky
2017-02-16[qa] Extend import-rescan.py to test specific key timestampsRussell Yanofsky
2017-02-16[qa] Simplify import-rescan.pyRussell Yanofsky
Get rid of partial functions so the test can be more easily extended to add more variants of imports with options that affect rescanning (e.g. different key timestamps). Also change the second half of the test to send /to/ the imported addresses, instead of /from/ the imported addresses. The goal of this part of the test was to confirm that the wallet would pick up new transactions after an import regardless of whether or not a rescan happened during the import. But because the wallet can only do this reliably for incoming transactions and not outgoing transactions (which require the wallet to look up transaction inputs) the test previously was less meaningful than it should have been.
2017-02-16Merge #9763: [Trivial] Update comments referencing main.cppWladimir J. van der Laan
00e623d [Trivial] Update comments referencing main.cpp (CryptAxe)
2017-02-16[Trivial] Update comments referencing main.cppCryptAxe
2017-02-16Merge #9771: Add missing cs_wallet lock that triggers new lock held assertionWladimir J. van der Laan
07afcd6 Add missing cs_wallet lock that triggers new lock held assertion (Russell Yanofsky)
2017-02-16Merge #9764: wallet: Prevent "overrides a member function but is not marked ↵Wladimir J. van der Laan
'override'" warnings 6c5427d wallet: Prevent "overrides a member function but is not marked 'override'" warnings (Wladimir J. van der Laan)