The blockmaxsize option was marked as deprecated in V0.15.1, and code
was added to convert provided blockmaxsize into blockmaxweight. However,
this code was incorrectly implemented, and blockmaxsize was silently
ignored.
No users have complained about blockmaxsize being ignored, so just
remove it in V0.17.
GitHub-Pull: #12756
Rebased-From: 4757c04
A risk exists where a malicious DNS seeder eclipses a node by returning an enormous number of IP addresses. In this commit we mitigate this risk by limiting the number of IP addresses addrman learns to 256 per DNS seeder.
GitHub-Pull: #12626
Rebased-From: 46e7f80
41c29f6d1d qa: Fix python TypeError in script.py (MarcoFalke)
7460945e0b [qa] Delete cookie file before starting node (Suhas Daftuar)
0a76ed232a qa: Cache only chain and wallet for regtest datadir (MarcoFalke)
6c26df06ad [qa] Ensure bitcoind processes are cleaned up when tests end (Suhas Daftuar)
df38b130d9 [tests] Test starting bitcoind with -h and -version (John Newbery)
4bdb0ce517 [tests] Fix intermittent rpc_net.py failure. (John Newbery)
0e98f96e42 test: Use wait_until in tests where time was used for polling (Ben Woosley)
1286f3e49a test: Use wait_until to ensure ping goes out (Ben Woosley)
cfebd400ef [test] Round target fee to 8 decimals in assert_fee_amount (Karl-Johan Alm)
Pull request description:
Similar to #12967 this contains all relevant bugfixes and improvements to the functional test suite.
I didn't include fixes to make the tests run on Windows, since that is still an ongoing effort and doesn't seem worth to backport.
As all of these are clean cherry-picks, I suggest reviewers redo the cherry-picks to get the same branch and then run the extended test suite.
Tree-SHA512: 70e1bc28d5572f93796f1ac4d97d77e8146869c15dcc1e3b65a730fa2641283050f769cefd9791d800c758e0a92f11fd55ed0797ccec87b897c7e701d0187f34
If a cookie file exists in a datadir prior to node startup, it must have
been leftover from a prior unclean shutdown. As bitcoind will overwrite
it anyway, delete it before starting up to prevent the test framework
from inadvertently trying to connect using stale credentials.
Github-Pull: #12902
Rebased-From: 75d0e4c5444249f0cf81ed0494e2c2717170b695
rpc_net.py would intermittently fail on Travis, probably
due to assuming that two consecutive RPC calls were atomic.
Fix this by only testing that amounts are bounded above and
below rather than equal.
Github-Pull: #12804
Rebased-From: 5a67c0524e5dc98d0e387f189545bc99863916d4
The output would produce arbitrary number of decimal points, sometimes resulting in 9 decimals:
AssertionError: Fee of 0.00000415 BTC too low! (Should be 0.000006175 BTC)
The above looks like the expected fee is 6175 sats when in reality it's 618.
Github-Pull: #12486
Rebased-From: 42e1b5d9797b65d3ce13a7cbace15fbedbcd4018
faf316a43 test: Update trust git root (Wladimir J. van der Laan)
Pull request description:
Marco Falke's old key expired, causing a travis error while verifying
commits 36afd4db44 and before:
gpg: Good signature from "Marco Falke <marco.falke@tum.de>" [unknown]
gpg: aka "Marco Falke <falke.marco@gmail.com>" [unknown]
gpg: Note: This key has expired!
Primary key fingerprint: B8B3 F1C0 E58C 15DB 6A81 D30C 3648 A882 F431 6B9B
Subkey fingerprint: FE09 B823 E6D8 3A3B C798 3EAA 2D7F 2372 E50F E137
Update the trusted root commit to the commit after that, to fix
this issue.
(cherry picked from commit 7deba93bdc76616011a9f493cbc203d60084416f)
Tree-SHA512: c86cc23d087af54a1448545c122fc67a0c556b5eac8ac7d16eeec8c42d8d0d81b7b5041f9a175787604aa47883b68403cfa01c10a52db64e35be52e559b20ec8
Marco Falke's old key expired, causing a travis error while verifying
commits 36afd4db44 and before:
gpg: Good signature from "Marco Falke <marco.falke@tum.de>" [unknown]
gpg: aka "Marco Falke <falke.marco@gmail.com>" [unknown]
gpg: Note: This key has expired!
Primary key fingerprint: B8B3 F1C0 E58C 15DB 6A81 D30C 3648 A882 F431 6B9B
Subkey fingerprint: FE09 B823 E6D8 3A3B C798 3EAA 2D7F 2372 E50F E137
Update the trusted root commit to the commit after that, to fix
this issue.
(cherry picked from commit 7deba93bdc76616011a9f493cbc203d60084416f)
25afebc2ba depends: Switch expat download to GitHub (fanquake)
Pull request description:
@droark [mentioned](https://github.com/bitcoin/bitcoin/pull/12402#issuecomment-370098383) the expat download was failing when trying to gitian build 0.16.
I tried locally and also saw issues:
```
make download
Checksum missing or mismatched for expat source. Forcing re-download.
Fetching expat-2.2.1.tar.bz2 from https://downloads.sourceforge.net/project/expat/expat/2.2.1
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0
100 652 100 652 0 0 361 0 0:00:01 0:00:01 --:--:-- 0
/Users/xxx/Github/bitcoin/depends/work/download/expat-2.2.1/expat-2.2.1.tar.bz2.temp: FAILED
shasum: WARNING: 1 computed checksum did NOT match
Fetching expat-2.2.1.tar.bz2 from https://bitcoincore.org/depends-sources
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0
curl: (22) The requested URL returned error: 404 Not Found
make[1]: *** [/Users/xxx/Github/bitcoin/depends/sources/download-stamps/.stamp_fetched-expat-expat-2.2.1.tar.bz2.hash] Error 22
make: *** [download-linux] Error 2
```
This switches to downloading from GitHub, as we are doing in master.
Tree-SHA512: 0e3072ce4d8fee3e2bc434afc7469968c21e01ca35aa2ccbffc25f8e9b00af2e4a5f3f9e4cd5c0cd8e72a10b16205236eb0536380849109a739c09358dbc1394
835a21b Squashed 'src/leveldb/' changes from c521b3ac65..64052c76c5 (MarcoFalke)
Pull request description:
The leveldb bump is the same branch/commit as in #12451
Tree-SHA512: 585a55747c75e990c9fd73399e98e548c01bef8b960c0a99844326de43663d004d2211b4689518f2d3e51cc48a732e9c92082939c356793143db411224fa75fa
This faulty translation contained Chinese messages, and as en_US is our
source language, having a separate translation for it is pointless, remove it.
Tree-SHA512: 8493876926355890aa3b713851ed53d37ffe601280f7e0f45461abfe9671af10dc5c6ce966adb89b663486a46df43b0a36b797da7e1cd719597a7e15914bd4a2
util_tests.cpp needs to include the signal.h header on FreeBSD.
Reported by denis2342 on IRC.
Github-Pull: #12447
Rebased-From: dd7e42cbb4390788705031ffa0bc893d26f0597e
Tree-SHA512: 10ead029bb59f5d69e37b5679c710f22d64051de26e1ec8342eec4e4dec4d76249e16dff78d192972bcb8d139d99c7555a7cb2fe43b2b911103eab6d6f943b79
About time, before tagging final.
Tree-SHA512: d54d77a501d227183be7b136025e5ac5e883cd140867368aa552aae89680d536f35f7619f58506069b083c7f718506d42f871fb95e2dcb76ab01cd2159c664be
Add a unit test for LockDirectory, introduced in #11281.
Github-Pull: #12422
Rebased-From: 1d4cbd26e4220982f7f2f60e447199d6f62ae254
Tree-SHA512: 8186f4b22c65153e30ec1e0b68be20fd59d34e1fe565d99f3b5a302780125953b867fb14c37144de3fd7baf5751df94bf3901eebbb7b820491ca452706d4e205
This commit fixes problems with calling LockDirectory multiple times on
the same directory, or from multiple threads. It also fixes the build on
OpenBSD.
- Wrap the boost::interprocess::file_lock in a std::unique_ptr inside
the map that keeps track of per-directory locks. This fixes a build
issue with the clang 4.0.0+boost-1.58.0p8 version combo on OpenBSD
6.2, and should have no observable effect otherwise.
- Protect the locks map using a mutex.
- Make sure that only locks that are successfully acquired are inserted
in the map.
- Open the lock file for appending only if we know we don't have the
lock yet - The `FILE* file = fsbridge::fopen(pathLockFile, "a");`
wipes the 'we own this lock' administration, likely because it opens
a new fd for the locked file then closes it.
Github-Pull: #12422
Rebased-From: fc888bfcacb875c45bc8f9d7ca1357ab70a30490
Tree-SHA512: c8b8942fad9ea9d9e55f8e5e360f7cf3a8b00cd17e6bc5ec5895e1e6ddcbca796e62e82856e82f0562869a624d75ad510e108077461bb47a87b2b52be0aba866
New global variables were introduced in #11403 and not setting them causes:
test_bitcoin: wallet/wallet.cpp:4259: CTxDestination GetDestinationForKey(const CPubKey&, OutputType): Assertion `false' failed.
unknown location(0): fatal error in "importwallet_rescan": signal: SIGABRT (application abort requested)
It's possible to reproduce the failure reliably by running:
src/test/test_bitcoin --log_level=test_suite --run_test=wallet_tests/importwallet_rescan
Failures happen nondeterministically because boost test framework doesn't run
tests in a specified order, and tests that run previously can set the global
variables and mask the bug.
Github-Pull: #12424
Rebased-From: b7f6002ed5d12b461eb56b768d06f2468cd0c12e
Tree-SHA512: 1cc64db3b1d886d793e9d194b318dde3d5f628bde778a50513de4bf54dcfc77152885e72608927e3e490d253350ca0381847539a904cb31862f3a6fceac88dc1
This resolves a bug introduced in
66aa1d58a1 where, if when responding
to a series of transaction requests in a getdata we hit the send
buffer limit and set fPauseSend, we will skip one transaction per
call to ProcessGetData.
Bug found by Cory Fields (@theuni).
Github-Pull: #12392
Rebased-From: c4af7387634765d254d1432746385cf35917d367
Tree-SHA512: d2f7707eb9f925a655f66e5e77ce406c5266f7b2feccd5bcdabf6d5bc27a3f6578e753fac83d9c8c3fd7cf7de6fee086eee2f95f77af99ea2c4e5ae77c322c58
Output bech32 addresses in dumpwallet if address type is not as legacy
Github-Pull: #12315
Rebased-From: 45eea40aa88f047111a9b1151fe4d1bad5c560e2
Tree-SHA512: 3426292ddaeaafebc25fe84802011f5569a0cbb47fcc3209e7f00f64fc6eb1e637732722bbd02dce8d46be87d0f3687ce8370e71e9286bf7d00afc0a895faecb
This resolves an issue where getrawmempool() can race mempool
notification signals. Intuitively we use mempool.cs as a "read
lock" on the mempool with cs_main being the write lock, so holding
the read lock intermittently while doing write operations is
somewhat strange.
This also avoids the introduction of cs_main in getrawmempool()
which reviewers objected to in the previous fix in #12273
Github-Pull: #12368
Rebased-From: 85aa8398f5d13c659299b81cdae377462b4f8316
Tree-SHA512: 90a505a96cecc065e8575d816f3bb35040df8672efc315f45eb3f2ea086e8ea6ee2c99eed03d0fe2215c8d3ee947a7b120e3c57a25185d03550c9075573ab032
The HTTP worker thread counter, as well as the RAII object that was used
to maintain it, is unused now, so can be removed.
Signed-off-by: Wladimir J. van der Laan <laanwj@gmail.com>
Github-Pull: #12366
Rebased-From: 11e01515fe0fbc7823d4111ad6e016a02c485a78
Tree-SHA512: 87055c4c14986973f4c1604db264fb5a9de21bb481e9d39b201774e2d17ed92a7d1617449471c13f56e0f1f09a8aebdf1254a71d6c7b856c880a5b71e0c3ba9d
This function, which waits for all threads to exit, is no longer needed
now that threads are joined instead.
Signed-off-by: Wladimir J. van der Laan <laanwj@gmail.com>
Github-Pull: #12366
Rebased-From: f94665466ed50e868c98b1a1c708ad5767727bb6
Tree-SHA512: 5cda90b4c081424d637031c0bbf168f177667733ff20b6f77eac84e503f7fad6fab3eb897f191edd819f18b270e3ecea78974978abd102d323f42d9d06216e53