aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-09-27scripted-diff: Rename overloaded int GetArg to GetIntArgRussell Yanofsky
Improve readability of code, simplify future scripted diff cleanup PRs, and be more consistent with naming for GetBoolArg. This will also be useful for replacing runtime settings type checking with compile time checking. -BEGIN VERIFY SCRIPT- git grep -l GetArg | xargs sed -i 's/GetArg(\([^)]*\( [0-9]\+\|-1\|port\|BaseParams().RPCPort()\|Params().GetDefaultPort()\|_TIMEOUT\|Height\|_WORKQUEUE\|_THREADS\|_CONNECTIONS\|LIMIT\|SigOp\|Bytes\|_VERSION\|_AGE\|_CHECKS\|Checks() ? 1 : 0\|_BANTIME\|Cache\|BLOCKS\|LEVEL\|Weight\|Version\|BUFFER\|TARGET\|WEIGHT\|TXN\|TRANSACTIONS\|ADJUSTMENT\|i64\|Size\|nDefault\|_EXPIRY\|HEIGHT\|SIZE\|SNDHWM\|_TIME_MS\)\))/GetIntArg(\1)/g' -END VERIFY SCRIPT- Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
2021-09-27Merge bitcoin/bitcoin#23094: doc: Remove outdated commentsW. J. van der Laan
ee7891a0c412728cf8bec667f25263682a9baaaf doc: Remove outdated comments (Hennadii Stepanov) Pull request description: The first removed comment was introduced in #5288, the second one in #13503. Both are outdated since #14336. ACKs for top commit: duncandean: crACK ee7891a0 Tree-SHA512: a2d6071919e81c916bfc2178109bbc464417321bcc567ed0644448c5faea8e58cb08a7657afa1b6ffe1fb63e114a2a47b31c893e471839ba9d49a3986e68b2a7
2021-09-27Merge bitcoin/bitcoin#23061: Fix (inverse) meaning of -persistmempoolmerge-script
faa9c19a4b27e7fabf7c5deae1b4c4ca612ed01a doc: Add 23061 release notes (MarcoFalke) faff17bbde6dcb1482a6210bc48b3192603a446f Fix (inverse) meaning of -persistmempool (MarcoFalke) Pull request description: Passing `-persistmempool` is currently treated as `-nopersistmempool` ACKs for top commit: jnewbery: reACK faa9c19a4b27e7fabf7c5deae1b4c4ca612ed01a hebasto: ACK faa9c19a4b27e7fabf7c5deae1b4c4ca612ed01a, I have reviewed the code and it looks OK, I agree it can be merged. Tree-SHA512: f34a89a07745dabe340eb845b2a348b79c093e9056f7a21c17e1ba2e278177c9b4cf30e8095791fd645a7f90eb34850b2eee0c869b4f6ec02bf749c73b0e52ee
2021-09-27Merge bitcoin/bitcoin#23092: test: Remove Windows workaround in authproxymerge-script
fad02274ba28189f28f5af536b8ea0ecddf9df55 test: Remove Windows workaround in authproxy (MarcoFalke) Pull request description: Might no longer be needed after https://github.com/bitcoin/bitcoin/pull/23089 ACKs for top commit: hebasto: ACK fad02274ba28189f28f5af536b8ea0ecddf9df55, passed 3 consequential runs on my [personal CI](https://cirrus-ci.com/task/4897456077930496): Tree-SHA512: 3c408e068ad7590dc0e5922c0b4cd3bf927e22fe624b13b8ab38db848342d310c9c934f358638fd5234c7b5f10f95d3bddc676deb925dcbba54945e2e8229275
2021-09-27Merge bitcoin/bitcoin#23084: test: avoid non-determinism in asmap-addrman testmerge-script
5825b34783545f9470d5ab94b87c918980715675 test: avoid non-determinism in asmap-addrman test (Jon Atack) Pull request description: This is the same approach as for the addpeeraddress test in `test/functional/rpc_net.py` in commit 869f1368. The probability of collision when adding an addrman entry is expected to be 1/2^16 = 1/65536 for an address from a different /16. This change hopes to avoid these collisions by adding 1 tried entry before adding 1 new table one, instead of 2 tried entries followed by 2 new entries, which appears to have caused a collision in the CI. To verify the regression test still fails when expected: - `git checkout 181a120 && git cherry-pick ef242f5` - recompile bitcoind - git checkout this branch and run `test/functional/feature_asmap.py`. Expected output: ``` AssertionError: Unexpected stderr bitcoind: ./addrman.h:739: void CAddrMan::Check() const: Assertion `false' failed. != ``` Closes #23078. Co-authored-by: Martin Zumsande <mzumsande@gmail.com> ACKs for top commit: mzumsande: Re-ACK 5825b34783545f9470d5ab94b87c918980715675 Tree-SHA512: eb6624a196fa5617c84aad860c8f91e8a8f60fc9fe2d7168facc298ee38db5e93b7e988e11c2ac1b399dc2c6b8fad360fb10bdbf10e598a1878300388475a200
2021-09-26Merge bitcoin/bitcoin#23065: Allow UTXO locks to be written to wallet DBW. J. van der Laan
d96b000e94d72d041689c5c47e374df2ebc0e011 Make GUI UTXO lock/unlock persistent (Samuel Dobson) 077154fe698f5556ad6e26ef49c9024c2f07ff68 Add release note for lockunspent change (Samuel Dobson) 719ae927dcdb60c0f9902fa79796256035228c4e Update lockunspent tests for lock persistence (Samuel Dobson) f13fc16295c19a156f2974d2d73fba56d52fc161 Allow lockunspent to store the lock in the wallet DB (Samuel Dobson) c52789365e5dbcb25aa5f1775de4d318da79e5a7 Allow locked UTXOs to be store in the wallet database (Samuel Dobson) Pull request description: Addresses and closes #22368 As per that issue (and its predecessor #14907), there seems to be some interest in allowing unspent outputs to be locked persistently. This PR does so by adding a flag to lockunspent to store the change in the wallet database. Defaults to false, so there is no change in default behaviour. Edit: GUI commit changes default behaviour. UTXOs locked/unlocked via the GUI are now persistent. ACKs for top commit: achow101: ACK d96b000e94d72d041689c5c47e374df2ebc0e011 kristapsk: ACK d96b000e94d72d041689c5c47e374df2ebc0e011 lsilva01: Tested ACK https://github.com/bitcoin/bitcoin/pull/23065/commits/d96b000e94d72d041689c5c47e374df2ebc0e011 on Ubuntu 20.04 prayank23: ACK https://github.com/bitcoin/bitcoin/pull/23065/commits/d96b000e94d72d041689c5c47e374df2ebc0e011 Tree-SHA512: 957a5bbfe7f763036796906ccb1598feb6c14c5975838be1ba24a198840bf59e83233165cb112cebae909b6b25bf27275a4d7fa425923ef6c788ff671d7a89a8
2021-09-25Make GUI UTXO lock/unlock persistentSamuel Dobson
2021-09-25Add release note for lockunspent changeSamuel Dobson
2021-09-25Update lockunspent tests for lock persistenceSamuel Dobson
2021-09-25Allow lockunspent to store the lock in the wallet DBSamuel Dobson
2021-09-25Allow locked UTXOs to be store in the wallet databaseSamuel Dobson
2021-09-25doc: Remove outdated commentsHennadii Stepanov
They are outdated since #14336.
2021-09-25doc: Add 23061 release notesMarcoFalke
2021-09-25Merge bitcoin/bitcoin#23086: test: Add -testactivationheight tests to ↵merge-script
rpc_blockchain fa4ca8d5797adb9ad6aa0f150a5f187ebfb714c7 test: Add -testactivationheight tests to rpc_blockchain (MarcoFalke) Pull request description: Suggested: https://github.com/bitcoin/bitcoin/pull/22818#discussion_r712513991 ACKs for top commit: laanwj: Code review ACK fa4ca8d5797adb9ad6aa0f150a5f187ebfb714c7 theStack: Concept and code-review ACK fa4ca8d5797adb9ad6aa0f150a5f187ebfb714c7 Tree-SHA512: 41304db1a15c0c705a9cc2808c9f1d7831a321a8a7948a28ec5d3ee1ed3da6a0ce67cd50c99a33aaed86830c59608eb6ffadbeaba67d95245c490f9b6c277912
2021-09-25test: Remove Windows workaround in authproxyMarcoFalke
This reverts commit fab98992043f47fa7240d7c1217920d0c4f783a2.
2021-09-25Merge bitcoin/bitcoin#23089: ci: Increase the dynamic port range to the ↵merge-script
maximum on native Windows 097ac74fd22f706fb7d8d652dadea844dc8198b9 ci: Add more functional tests to the native Windows task (Hennadii Stepanov) 8e08a4b6ce13dcf20c026c832dc5810a54c8390b ci: Increase the dynamic port range to the maximum on native Windows (Hennadii Stepanov) Pull request description: Fixes #18548. The solution suggested in https://github.com/bitcoin/bitcoin/issues/18548#issuecomment-923944390. Also more functional tests added to the native Windows task. ACKs for top commit: MarcoFalke: concept ACK 097ac74fd22f706fb7d8d652dadea844dc8198b9 Tree-SHA512: 51f3cb5b4e707dd2e4fd6b3be7e3b9615ec4a2760f4e0de9312443edadedf148e94964c43352fd2c8f6842a2baf70084b559760e7b46fc654ea882b0bba21443
2021-09-25Merge bitcoin/bitcoin#22817: test: Avoid race after connect_nodesmerge-script
fa04f26aa77d2cf746db4a8a43068b7c5c9cd02b test: Avoid race after connect_nodes (MarcoFalke) Pull request description: Wait until the connection is fully established on both sides (verack). Fixes #22714 ACKs for top commit: kiminuo: utACK fa04f26aa77d2cf746db4a8a43068b7c5c9cd02b Tree-SHA512: bc2c44b44b688086ff84046924cf5251dd625584e93ce8fa17de27023855b32f3bb55109b846abbcec775e2836c7f3c5a81d6b4aff7c4ac065b9aefa044c1883
2021-09-24test: avoid non-determinism in asmap-addrman testJon Atack
This is the same approach as for the addpeeraddress test in `test/functional/rpc_net.py` in commit 869f1368. The probability of collision when adding an addrman entry is expected to be 1/2^16 = 1/65536 for an address from a different /16. This change hopes to avoid these collisions by adding 1 tried entry before adding 1 new table one, instead of 2 tried entries followed by 2 new entries, which appears to have caused a collision in the CI. To verify the regression test stills fails when expected: - git checkout 181a120 && git cherry-pick ef242f5 - recompile bitcoind - git checkout this branch and run test/functional/feature_asmap.py. Expected output: ``` AssertionError: Unexpected stderr bitcoind: ./addrman.h:739: void CAddrMan::Check() const: Assertion `false' failed. != ``` Co-authored-by: Martin Zumsande <mzumsande@gmail.com>
2021-09-24ci: Add more functional tests to the native Windows taskHennadii Stepanov
2021-09-24ci: Increase the dynamic port range to the maximum on native WindowsHennadii Stepanov
This change should mitigate "OSError: [WinError 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted".
2021-09-24Merge bitcoin/bitcoin#23025: bench: update nanobench add `-min_time`W. J. van der Laan
e148a5233292d156cda76cb20afb6641fc20f25e bench: fixed ubsan implicit conversion (Martin Ankerl) da4e2f1da0388d424659fa8c853fcaf37b4b5959 bench: various args improvements (Jon Atack) d312fd94a1083cdbf071f2888aab43c62d358151 bench: clean up includes (Jon Atack) 1f10f1663e53474038b9111c4264a250cffe7501 bench: add usage description and documentation (Martin Ankerl) d3c6f8bfa12f78635752878b28e66cec0c85d4a9 bench: introduce -min_time argument (Martin Ankerl) 9fef8329322277d9c14c8df1867cb3c61477c431 bench: make EvictionProtection.* work with any number of iterations (Martin Ankerl) 153e6860e84df0a3d52e5a3b2fe9c37b5e0b029a bench: change AddrManGood to AddrManAddThenGood (Martin Ankerl) 468b232f71562280aae16876bc257ec24f5fcccb bench: remove unnecessary & incorrect multiplication in MuHashDiv (Martin Ankerl) eed99cf272426e5957bee35dc8e7d0798aec8ec0 bench: update nanobench from 4.3.4 to 4.3.6 (Martin Ankerl) Pull request description: This PR updates the nanobench with the latest release from upstream, v4.3.6. It fixes the missing performance counters. Due to discussions on #22999 I have done some work that should make the benchmark results more reliable. It introduces a new flag `-min_time` that allows to run a benchmark for much longer then the default. When results are unreliable, choosing a large timeframe here should usually get repeatable results even when frequency scaling cannot be disabled. The default is now 10ms. For this to work I have changed the `AddrManGood` and `EvictionProtection` benchmarks so they work with any number of iterations. Also, this adds more usage documentation to `bench_bitcoin -h` and I've cherry-picked two changes from #22999 authored by Jon Atack ACKs for top commit: jonatack: re-ACK e148a5233292d156cda76cb20afb6641fc20f25e laanwj: Code review ACK e148a5233292d156cda76cb20afb6641fc20f25e Tree-SHA512: 2da6de19a5c85ac234b190025e195c727546166dbb75e3f9267e667a73677ba1e29b7765877418a42b1407b65df901e0130763936525e6f1450f18f08837c40c
2021-09-24Merge bitcoin/bitcoin#23047: test: Use MiniWallet in mempool_persistW. J. van der Laan
faae0988d6abb50039026a49543eef134eb9103f test: Check other fields are loaded correctly as well (MarcoFalke) fa4db9261725de8c0e5c73d13df1cddd6bbaeab0 test: Remove unused self.connect_nodes (MarcoFalke) fafb7b7a892b24405d6b6291d6d72f0e88462f2f test: pep8 (MarcoFalke) fa32cb2467056b3fd47f0b88215311faec8fd5a4 test: Use MiniWallet in mempool_persist (MarcoFalke) faca688a8579d7e30d056b6847789fdd56fc0bf4 test: Add MiniWallet get_descriptor function (MarcoFalke) Pull request description: ACKs for top commit: laanwj: Code review ACK faae0988d6abb50039026a49543eef134eb9103f Tree-SHA512: 6124f16ee1f3f416c50dc07aebe8846ff7e2b7c8e5dd84f9517cb5f1df021b9e57ed7c7e17bc099a37c663cd93f6d417c5e0622c0b359956403d53e705eb5549
2021-09-24test: Add -testactivationheight tests to rpc_blockchainMarcoFalke
2021-09-24Merge bitcoin/bitcoin#22818: test: Activate all regtest softforks at height ↵merge-script
1, unless overridden fa4db8671bb604e11b43a837f91de8866226f166 test: Activate all regtest softforks at height 1, unless overridden (MarcoFalke) faad1e5ffda255aecf1b0ea2152cd4f6805e678f Introduce -testactivationheight=name@height setting (MarcoFalke) fadb2ef2fa8561882db463f35df9b8a0e9609658 test: Add extra_args argument to TestChain100Setup constructor (MarcoFalke) faa46986aaec69e4cf016101ae517ce8778e2ac5 test: Remove version argument from build_next_block in p2p_segwit test (MarcoFalke) fa086ef5398b5ffded86e4f0d6633c523cb774e9 test: Remove unused ~TestChain100Setup (MarcoFalke) Pull request description: All softforks that are active at the tip of mainnet, should also be active from genesis in regtest. Otherwise their rules might not be enforced in user testing, thus making their testing less useful. To still allow tests to check pre-softfork rules, a runtime argument can change the activation height. ACKs for top commit: laanwj: Code review ACK fa4db8671bb604e11b43a837f91de8866226f166 theStack: re-ACK fa4db8671bb604e11b43a837f91de8866226f166 Tree-SHA512: 6397d46ff56ebc48c007a4cda633904d6ac085bc76b4ecf83097c546c7eec93ac0c44b88083b2611b9091c8d1fb8ee1e314065de078ef15e922c015de7ade8bf
2021-09-23Merge bitcoin/bitcoin#21526: validation: UpdateTip/CheckBlockIndex ↵W. J. van der Laan
assumeutxo support 673a5bd3377929a0a6a62eda8b560e47bc2cca0c test: validation: add unittest for UpdateTip behavior (James O'Beirne) 2705570109a2a90ecfd3f4180944498626fc2707 test: refactor: separate CreateBlock in TestChain100Setup (James O'Beirne) 298bf5d563cc740c6ae71750d86942e0278b22d6 test: refactor: declare NoMalleation const auto (James O'Beirne) 071200993f3a9412821ce5387851d659baf85327 move-only: unittest: add test/util/chainstate.h (James O'Beirne) 8f5710fd0ac5173b577e5d00708485170b321bcc validation: fix CheckBlockIndex for multiple chainstates (James O'Beirne) 5a807736dacfc3e6fa57231219336acf08be38fb validation: insert assumed-valid block index entries into candidates (James O'Beirne) 01a9b8fe719efab2c268dc738bc93cfbdf92edb7 validation: set BLOCK_ASSUMED_VALID during snapshot load (James O'Beirne) 42b2520db93fd9feb3df4101654391fa7d3e2140 chain: add BLOCK_ASSUMED_VALID for use with assumeutxo (James O'Beirne) b217020df78bc981d221fe04497c831120ef969f validation: change UpdateTip for multiple chainstates (James O'Beirne) 665072a36df2e4c88705fedd4ac7c955d7f6a488 doc: add comment for g_best_block (James O'Beirne) ac4051d891e2d5c8ac130da16b85b9d880b44720 refactor: remove unused assumeutxo methods (James O'Beirne) 9f6bb539359b98d5b39482ab8a28a68608f0c645 validation: add chainman ref to CChainState (James O'Beirne) Pull request description: This is part of the [assumeutxo project](https://github.com/bitcoin/bitcoin/projects/11) (parent PR: #15606) --- Modify UpdateTip and CheckBlockIndex for use with multiple chainstates. Includes a new unittest verifying `g_best_block` behavior (previously untested at the unit level) and various changes necessary for running and testing `ProcessNewBlock()`-like behavior on the background validation chainstate. This changeset introduces a new block index `nStatus` flag called `BLOCK_ASSUMED_VALID`, and it is applied to block index entries that are beneath the UTXO snapshot base block upon snapshot load. Once each block is validated (during async background validation), the flag is removed. This allows us to avoid (ab)using `BLOCK_VALID_*` flags for snapshot chain block entries, and preserves the original meaning of those flags. Note: this PR previously incorporated changes to `LoadBlockIndex()` and `RewindBlockIndex()` as noted in Russ' comments below, but once I generated the changes necessary to test the UpdateTip change, I decided to split this changes out into another PR due to the size of this one. ACKs for top commit: achow101: ACK 673a5bd3377929a0a6a62eda8b560e47bc2cca0c jonatack: Code-review re-ACK 673a5bd3377929a0a6a62eda8b560e47bc2cca0c reviewed diff, rebased to master/debug build/ran unit+functional tests naumenkogs: ACK 673a5bd3377929a0a6a62eda8b560e47bc2cca0c fjahr: Code review ACK 673a5bd3377929a0a6a62eda8b560e47bc2cca0c ariard: utACK 673a5bd3 ryanofsky: Code review ACK 673a5bd3377929a0a6a62eda8b560e47bc2cca0c. Just linker fix and split commit changes mentioned https://github.com/bitcoin/bitcoin/pull/21526#issuecomment-921064563 since last review benthecarman: ACK 673a5bd3377929a0a6a62eda8b560e47bc2cca0c Tree-SHA512: 0a6dc23d041b27ed9fd0ee1f3e5971b92fb1d2df2fc9b655d5dc48594235321ab1798d06de2ec55482ac3966a9ed56de8d56e9e29cae75bbe8690bafc2dda383
2021-09-23Merge bitcoin/bitcoin#23057: log: Consolidate timedata loggingW. J. van der Laan
64e1ddd255771e57a88a20f07dbde04a83bf0c75 log: call LogPrint only once with time data samples (Martin Zumsande) Pull request description: When timedata samples are logged, `LogPrint()` is currently invoked multiple times on the same log entry. This can lead to chaos in the log when other threads log concurrently, as in this example which motivated this PR: ``` 2021-09-20T00:28:57Z -48  -26  -11  -8  -6  Addrman checks started: new 37053, tried 83, total 37136 2021-09-20T00:28:57Z -3  -1  -1  -1  -1  +0  |  nTimeOffset = -3  (+0 minutes) ``` Fix this by building the log message in a string and logging it one `LogPrint()` call. I also changed the wording slightly so that it becomes understandable what is being logged, example: ``` 2021-09-21T21:03:24Z time data samples: -43 -18 -12 -4 -1 -1 +0 +0 +268 | median offset = -1 (+0 minutes) ``` ACKs for top commit: jnewbery: Tested ACK 64e1ddd255 laanwj: Tested ACK 64e1ddd255771e57a88a20f07dbde04a83bf0c75, new message lgtm Tree-SHA512: ffb7a93166cc8fd6a39200b9e03a9d1e8e975b7ded822ccddd015f553258b991162a5cb867501f426d3ebcfef4f32f0e06e17b18e6b01486b967595d102f8379
2021-09-23Merge bitcoin/bitcoin#23072: log: Remove unnecessary timing of Callbacks benchmerge-script
ab278007991b912299eaf794d87a636423521d27 log: Remove unnecessary timing logs for Callbacks bench (Douglas Chimento) Pull request description: Logging of Callbacks are no longer needed and records times that are not relevant for performance analysis. resolves #23071 ACKs for top commit: laanwj: Thanks. re-ACK ab278007991b912299eaf794d87a636423521d27 jonatack: Code review ACK ab278007991b912299eaf794d87a636423521d27 Tree-SHA512: be1ea780c4db9407a8799065a8824b9d3610abac72af5907809ed62d493d5a54e65735de45ec5fdd0edb85ef21ec6036105abe8ca00093942980f6f92e7fec50
2021-09-23Merge bitcoin/bitcoin#23045: build: Restrict check for CRC32C intrinsic to ↵W. J. van der Laan
aarch64 f2747d1602ec4e1128356b861b2167daf66a845b build: Restrict check for CRC32C intrinsic to aarch64 (W. J. van der Laan) Pull request description: `crc32c`'s hardware accelerated code doesn't handle ARM 32-bit at all, but only 64-bit. Make the check in `configure.ac` check for this architecture explicitly. This change does not affect non-ARM architectures. For the release binaries, the current `configure.ac` check happens to work: it enables it on aarch64 but disables it for armhf. However some combination of compiler version and settings can cause this check to succeed on armhf (as reported on IRC). So make the 64-bit platform requirement explicit. (details: while the check already explicitly checks the `__crc32d` intrinsic, which strictly doesn't exist on 32-bit ARM, this is not enough! gcc happens to helpfully emulate it: > These built-in intrinsics for the ARMv8-A CRC32 extension are available when the -march=armv8-a+crc switch is used "uint32_t __crc32d (uint32_t, uint64_t)" Form of expected instruction(s): Two crc32w r0, r0, r0 instructions for AArch32 ) ACKs for top commit: luke-jr: re-tACK f2747d1602ec4e1128356b861b2167daf66a845b jarolrod: ACK f2747d1602ec4e1128356b861b2167daf66a845b Tree-SHA512: e5f05f05eeec310ac42685621d86862735586be66dc378db404ec9414ac5aaea7c53d76d76d875b15b11924eee6714076120c07b077183fd7af898704fd81823
2021-09-23log: Remove unnecessary timing logs for Callbacks benchDouglas Chimento
Logging of Callbacks are no longer needed and records events that are not relevant for performance analysis.
2021-09-23Merge bitcoin/bitcoin#23036: test: use test_framework.p2p `P2P_SERVICES` ↵fanquake
constant in functional tests b69a106bcd8ddefdb810df6ebb3625c430197e04 test: use test_framework.p2p P2P_SERVICES in functional tests (Jon Atack) Pull request description: `P2P_SERVICES` is defined in `test/functional/test_framework/p2p.py`, so we can use it as a single definition for our functional tests. It may also be a tiny bit more efficient to use the constant rather than calculating `NODE_NETWORK | NODE_WITNESS` every time we need it in the tests. ACKs for top commit: laanwj: Code review ACK b69a106bcd8ddefdb810df6ebb3625c430197e04 klementtan: crACK b69a106bcd8ddefdb810df6ebb3625c430197e04 fanquake: ACK b69a106bcd8ddefdb810df6ebb3625c430197e04 - didn't look at the formatting changes. Tree-SHA512: f83e593663a69182986325d9ba2b4b787b87896d6648973f4f802f191a2573201b9e7d7e10e69662ef1965fa63268845726ed1aa5742a2e38dcccf4aebc6a961
2021-09-23Merge bitcoin/bitcoin#22855: RBF move 3/3: move followups + improve RBF ↵fanquake
documentation 0ef08f8bed537435f3f9db1e38b7d6f3551fe830 add missing includes in policy/rbf (glozow) c6abeb76fbb877f3f16d699c73a1828c7da2e6d1 make MAX_BIP125_RBF_SEQUENCE constexpr (glozow) 3cf46f6055f7cd2e5da81e0d29cafc51ad4aafba [doc] improve RBF documentation (glozow) c78eb8651b0949fefcafb22940512f4ef98d3358 [policy/refactor] pass in relay fee instead of using global (glozow) Pull request description: Followups to #22675 and documentation-only changes intended to clarify the code/logic concerning mempool Replace-by-Fee. ACKs for top commit: jnewbery: utACK 0ef08f8bed537435f3f9db1e38b7d6f3551fe830 fanquake: ACK 0ef08f8bed537435f3f9db1e38b7d6f3551fe830 Tree-SHA512: 6797ae758beca0c9673cb00ce85da48e9a4ac5cb5100074ca93e004cdb31d24d91a1a7721b57fc2f619addfeb4950d8caf45fee0f5b7528defbbd121eb4d271f
2021-09-23Merge bitcoin/bitcoin#23059: test: Revert "Add missing suppression ↵fanquake
signed-integer-overflow:addrman.cpp" fa5e8c1044cb03a46807d6da6fe8d5f45f7e2e12 Revert "test: Add missing suppression signed-integer-overflow:addrman.cpp" (MarcoFalke) Pull request description: Forgot to do this in #22734 ACKs for top commit: fanquake: ACK fa5e8c1044cb03a46807d6da6fe8d5f45f7e2e12 Tree-SHA512: cabd741b73c828ae3c40df37d80022039e41e571fa196eebcb41e51c582064a1463a3677eb3b0e997ed141b32003802019474d2b739f0b606b4a16da4f585faa
2021-09-23Merge bitcoin/bitcoin#23054: Use C++11 member initializer in CTxMemPoolEntryfanquake
fa08d4cfb1e3447a76093d46edc1c9de5ceee454 Use C++11 member initializer in CTxMemPoolEntry (MarcoFalke) Pull request description: This removes a bunch of boilerplate, makes the code easier to read. Also, C++11 member initialization avoids accidental uninitialized members. Can be reviewed with the git option "--word-diff-regex=." or with "git difftool --tool=meld". ACKs for top commit: jnewbery: Code review ACK fa08d4cfb1e3447a76093d46edc1c9de5ceee454 shaavan: Code Review ACK fa08d4cfb1e3447a76093d46edc1c9de5ceee454 Tree-SHA512: 2424861002fbcef2a3f01845662c115b973a7a5103f359305b5d9237c055eb003aa7646fc1cb30e6eaf90810d662f94cedc6f90795e30b56680f9c81f631d64b
2021-09-23Merge bitcoin/bitcoin#22798: doc: Fix RPC result documentationfanquake
fa10fbc6658fb8d87118cd550e4de406dca45f23 doc: Fix RPC result documentation (MarcoFalke) Pull request description: Fix: * Incorrectly named fields * Add missing ones * Add missing optional flag ACKs for top commit: fanquake: ACK fa10fbc6658fb8d87118cd550e4de406dca45f23 Tree-SHA512: 2b302e6f7ac8253a55882bc032ddda1932b728abddd12b0adb5fba814b12fb998a67b91e6dd124ebbe0ac16dccdace01332ade01c1dc00a3768647118dd3a2d2
2021-09-22log: call LogPrint only once with time data samplesMartin Zumsande
This prevents malformed log entries caused by other threads logging concurrently.
2021-09-22Merge bitcoin/bitcoin#23044: refactor: Remove unused validation includesmerge-script
fa45a1338adb127d69aee982920e29519bc1fed6 refactor: Remove unused validation includes (MarcoFalke) Pull request description: Unused includes will cause needless recompilation when headers are changed. Also, they pretend there are dependencies that don't exist. Fix both by removing them. ACKs for top commit: laanwj: Code review ACK fa45a1338adb127d69aee982920e29519bc1fed6 theStack: ACK fa45a1338adb127d69aee982920e29519bc1fed6 ♻️ Tree-SHA512: 69190fd09184b75bce34ce3f315a1817e09ea32779f9ddc2d4790c89b0887b6cebd88aba66fa054c43c9183fc66202a556d982dd7034fc389a75802d8aaac83a
2021-09-22Fix (inverse) meaning of -persistmempoolMarcoFalke
2021-09-22Revert "test: Add missing suppression signed-integer-overflow:addrman.cpp"MarcoFalke
This reverts commit facb534c37725ca446fd56d781b70ba26508bd2a.
2021-09-22Merge bitcoin/bitcoin#22790: test: add aarch64-apple-darwin platform entry ↵merge-script
to get_previous_releases f6e4db27ceb67157dc13d13f34351cb87fec2be5 test: add aarch64-apple-darwin platform entry to get_previous_releases (Zero-1729) Pull request description: Over the course of reviewing a PR, I had to edit `test/get_previous_releases.py` (after I ran `git clean -xdff`) to run the backwards compatibility tests (e.g. `wallet_upgradewallet`, `feature_backwards_compatibility`, etc.), as currently on master, running the script as indicated in [`test/README.md`](https://github.com/bitcoin/bitcoin/blob/master/test/README.md), for example, on an M1 machine results in the following error, as the `aarch64-apple-darwin*` platform entry is presently not recognised: > Output from an M1 machine running macOS v11.5.2 ```sh $ test/get_previous_releases.py -b v0.20.1 v0.19.1 v0.18.1 v0.17.2 v0.16.3 v0.15.2 Releases directory: releases Not sure which binary to download for aarch64-apple-darwin20.6.0 ``` As a quick fix, this PR adds the missing `aarch64-apple-darwin*` platform entry. Running the script now results in fetching the old binaries, as expected: ```sh $ test/get_previous_releases.py -b v0.20.1 v0.19.1 v0.18.1 v0.17.2 v0.16.3 v0.15.2 Releases directory: releases Fetching: https://bitcoincore.org/bin/bitcoin-core-0.20.1/bitcoin-0.20.1-osx64.tar.gz % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 20.9M 0 0 0 0 0 0 --:--:-- 0:00:02 --:--:-- 0 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 20.9M 100 20.9M 0 0 136k 0 0:02:37 0:02:37 --:--:-- 95607 Checksum matched … Checksum matched ``` After this patch, the backwards compatibility tests also run successfully, as expected. **Note**: I am open to other possible solutions. --- Steps to reproduce: > Ensure you take out the binaries in `releases` if they already exist. Try running `test/get_previous_releases.py -b v0.15.2` or similar to fetch the old release binaries. Top commit has no ACKs. Tree-SHA512: a238d909b70a61be622234bc49b05d2e91a8acfc5ea348d29f2c8a927fb793cb97365e558571e3f46d6a5650c4f3c6e28fa126c6e56b38e1eb98f7c3e3594d0f
2021-09-21Merge bitcoin/bitcoin#22734: addrman: Avoid crash on corrupt data, Force ↵merge-script
Check after deserialize fa3669f72f69662049b55ad1a482b4a0f9f7ae40 fuzz: Move all addrman fuzz targets to one file (MarcoFalke) fa7a883f5a219d5f3c2f992b090db4e6c279db12 addrman: Replace assert with throw on corrupt data (MarcoFalke) fa298971e6890715e2b0b93f2a7f445d32d6622f Refactor: Turn the internal addrman check helper into a forced check (MarcoFalke) fae5c633dc05a045aaac370b383e4799cb0e0590 move-only: Move CAddrMan::Check to cpp file (MarcoFalke) Pull request description: Assert should only be used for program internal logic errors, not to sanitize external user input. The assert was introduced via the debug-only runtime option `-checkaddrman` in commit 803ef70fd9f65ef800567ff9456fac525bc3e3c2, thus won't need a backport. Also, it doesn't really make sense to continue when the deserialized addrman doesn't pass the sanity check. For example, if `nLastSuccess` is negative, it would later result in integer overflows. Thus, this patch fixes #22931. Also, Fixes #22503 Fixes #22504 Fixes #22519 Closes #22498 Steps to test: ``` mkdir -p /tmp/test_235/regtest/ echo 'H4sIAAAAAAAAA/u1f+stZmUGYgELgwPRakfBKBgFo2AUjIJRMApGwSgYBaNgFIyCUTBswdyGpFnLjUKjP9e0bvjYusl6b+L2e7Vs2dd6N//Pua0/xQUALJAn93IQAAA=' | base64 --decode | zcat > /tmp/test_235/regtest/peers.dat ./src/qt/bitcoin-qt -regtest -datadir=/tmp/test_235/ -checkaddrman=1 -printtoconsole | grep -A2 'Loading P2P addresses' ``` Output before: ``` 2021-09-10T11:28:37Z init message: Loading P2P addresses… 2021-09-10T11:28:37Z ADDRMAN CONSISTENCY CHECK FAILED!!! err=-16 bitcoin-qt: addrman.cpp:765: void CAddrMan::Check() const: Assertion `false' failed. (program crashes) ``` Output after: ``` 2021-09-10T11:26:00Z init message: Loading P2P addresses… 2021-09-10T11:26:00Z Error: Invalid or corrupt peers.dat (Corrupt data. Consistency check failed with code -16: iostream error). If you believe this is a bug, please report it to https://github.com/bitcoin/bitcoin/issues. As a workaround, you can move the file ("/tmp/test_235/regtest/peers.dat") out of the way (rename, move, or delete) to have a new one created on the next start. (program exits) ``` ACKs for top commit: naumenkogs: ACK fa3669f72f69662049b55ad1a482b4a0f9f7ae40 jnewbery: Code review ACK fa3669f72f69662049b55ad1a482b4a0f9f7ae40 vasild: ACK fa3669f72f69662049b55ad1a482b4a0f9f7ae40 Tree-SHA512: 687e4a4765bbc66495152fa7a49d28ee84b405dc5370ba87b4016b5593e45f54c4ce5cae579e4d433e0e082d20fc263969fa602679c911accef0adb2d6213bd6
2021-09-21Use C++11 member initializer in CTxMemPoolEntryMarcoFalke
This removes a bunch of boilerplate, makes the code easier to read. Also, C++11 member initialization avoids accidental uninitialized members. Can be reviewed with the git option "--word-diff-regex=." or with "git difftool --tool=meld".
2021-09-21Merge bitcoin/bitcoin#22998: test: use MiniWallet for make_utxo helper in ↵merge-script
feature_rbf.py f680d27155374de658d40db0ba40460919aa1ba2 test: use MiniWallet for make_utxo helper in feature_rbf.py (Sebastian Falbesoner) 0f275246027266fa256d0a09251bb2c88d9bd72f test: scale amounts in test_doublespend_tree down by factor 10 (Sebastian Falbesoner) d1e2481274edf2ac14747be633d86ecd46814ef4 test: scale amounts in test_doublespend_chain down by factor 10 (Sebastian Falbesoner) Pull request description: This PR aims to further increase MiniWallet usage in the functional test feature_rbf.py by using it in the `make_utxo(...)` helper, which is the only part that needs a wallet for most sub-tests. In order to do that, the amounts for the utxos have to be scaled down in two sub-tests first (`test_doublespend_chain` and `test_doublespend_tree`, see first two commits), since we need amounts passed to `make_utxo` than can be funded by only one input. For creating UTXOs with a value of 50 BTC, we'd need to implement a method for consolidating multiple utxos into one first, which seems to be overkill. Note that after this PR's change, there is only one sub-test left (`test_rpc`) that needs the wallet compiled into bitcoind. ACKs for top commit: MarcoFalke: review ACK f680d27155374de658d40db0ba40460919aa1ba2 🦐 Tree-SHA512: 46c8c245086a9e79855c4ede2f8f412333cf2658136805196b203b3567c89398d77fcb80715c0bb72fdc84331cc67544b2fdc259193a3adcb2fc36e147c26fce
2021-09-21bench: fixed ubsan implicit conversionMartin Ankerl
The benchmarks can now run much longer due to the minimum of 10ms or directly with -min_time. With -min_time=20000 I could trigger two ubsan errors in the benchmarks, which are fixed in this commit by using unsigned type and adding "& 0xFF".
2021-09-21bench: various args improvementsJon Atack
- use ALLOW_BOOL for -list arg instead of ALLOW_ANY - touch up `-asymptote=<n1,n2,n3...>` help - pack Args struct a bit more efficiently - handle args in alphabetical order
2021-09-21bench: clean up includesJon Atack
Drops unneeded and adds missing includes
2021-09-21bench: add usage description and documentationMartin Ankerl
This adds some usage description with tips to `bench_bitcoin -h`.
2021-09-21bench: introduce -min_time argumentMartin Ankerl
When it is not easily possible to stabilize benchmark machine and code the argument -min_time can be used to specify a minimum duration that a benchmark should take. E.g. choose -min_time=1000 if you are willing to wait about 1 second for each benchmark result. The default is now set to 10ms instead of 0, which should make runs on fast machines more stable with negligible slowdown.
2021-09-21bench: make EvictionProtection.* work with any number of iterationsMartin Ankerl
Moves copying of the setup into the benchmark loop so it is possible to run the loop for an arbitrary number of times. The overhead due to copying the candidates inside the loop is about 3%.
2021-09-21bench: change AddrManGood to AddrManAddThenGoodMartin Ankerl
Moves some of the setup into the benchmark loop so it is possible to run the loop for an arbitrary number of times. Due to recent optimizations in #22974 the benchmark now runs much faster, so the inner loop now calls Good() 32 times as often to get better numbers. Renamed the benchmark to AddrManAddThenGood because that's now what is actually tested. To get the the number of just Good(), one needs to subtract the benchmark result of AddrManAdd.
2021-09-21build: Restrict check for CRC32C intrinsic to aarch64W. J. van der Laan
`crc32c`'s hardware accelerated code doesn't handle ARM 32-bit at all. Make the check in `configure.ac` check for this architecture explicitly. For the release binaries, the current `configure.ac` check happens to work: it enables it on aarch64 but disables it for armhf. However some combination of compiler version and settings might ostensibly cause this check to succeed on armhf (as reported on IRC). So make the 64-bit platform requirement explicit.