Age | Commit message (Collapse) | Author |
|
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.
|
|
|
|
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
|
|
056aba2 Remove fallbacks for boost_filesystem < v3 (Wladimir J. van der Laan)
|
|
312c4f1 Fix segfault crash when shutdown the GUI in disablewallet mode (Jonas Schnelli)
|
|
|
|
40f11f8 Fix for issue #9775. Added check for open() returning a NULL pointer. (kirit93)
|
|
171fc91 Read/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.
|
|
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)
|
|
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)
|
|
ec1267f [wallet] Remove importmulti always-true check (Russell Yanofsky)
|
|
1bfe6b4 Use package name variable inside $(package)_file_name variable (Mitchell Cash)
|
|
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)
|
|
eb49101 doc: Update manpages for master (Wladimir J. van der Laan)
|
|
5c8fd50 Avoid VLA in hash.h (Pieter Wuille)
|
|
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)
|
|
0c9b9b7 [trivial] Fix recently introduced typos in comments (practicalswift)
|
|
(cherry picked from commit 268c390d02d99a4a93a0a01221e273d2b9695ff7)
|
|
a432aa0 Remove unused module from rpc-tests (Takashi Mitsuta)
|
|
|
|
8e5cca0 gitian: bump descriptors for master (Cory Fields)
|
|
|
|
This was skipped for the 0.14 cycle.
|
|
3301587 boost: remove iostreams includes (Cory Fields)
|
|
c801c82 Move BIP70_MAX_PAYMENTREQUEST_SIZE to header (Pieter Wuille)
914fad1 Make KEY_SIZE a compile-time constant (Pieter Wuille)
|
|
They're unused and produce nasty deprecation warnings
|
|
|
|
|
|
|
|
Now that 0.14 branch has been split off, master is 0.14.99 (pre-0.15).
Also clean out release notes.
|
|
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.
|
|
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)
|
|
91fb506 Add two hour buffer to manual pruning (Alex Morcos)
|
|
3f78e46 Update nMinimumChainWork and defaultAssumeValid. (Gregory Maxwell)
|
|
55c403b Ensure `-maxsigcachesize` is in valid range (John 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
|
|
|
|
|
|
|
|
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.
|
|
36164fa Fix typo and spelling inconsistency in CONTRIBUTING.md (Koki Takahashi)
|
|
|
|
|
|
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.
|
|
00e623d [Trivial] Update comments referencing main.cpp (CryptAxe)
|
|
|
|
07afcd6 Add missing cs_wallet lock that triggers new lock held assertion (Russell Yanofsky)
|
|
'override'" warnings
6c5427d wallet: Prevent "overrides a member function but is not marked 'override'" warnings (Wladimir J. van der Laan)
|