aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-05-18ci: Document the false positive error for g++-9MarcoFalke
2023-05-18Merge bitcoin/bitcoin#27690: ci: Use credits for ARM taskfanquake
fa3761d19d716c2a5b25c76d092b1afbf65ec1d0 ci: Reduce tsan CPU and memory for faster scheduling (MarcoFalke) aaaa07bc845f0b8741270552e77b9694802fb0e3 ci: Use credits for ARM task (MarcoFalke) Pull request description: After https://github.com/bitcoin/bitcoin/pull/27562 the task should finish in less than 10 minutes, so also using credits for it will be cheap and improve dev experience. ACKs for top commit: fanquake: ACK fa3761d19d716c2a5b25c76d092b1afbf65ec1d0 Tree-SHA512: 98ba76eaa63bcbab674076bb9877b3a20d1b90e6d51e2fd7b97ae245414e984d734006b15ea60228a1f4f9bc72fbe2a1a8910fd05e7c52dd2a8b223bfaa25b50
2023-05-18Merge bitcoin/bitcoin#27682: build: Bump minimum supported Clang to clang-10fanquake
fa199ee614a7ed99c6caf329093a3573ea5a664b ci: Drop NO_WERROR=1 for clang-10 build (MarcoFalke) fad2c200f46196af69ccd98b6b637d23ceaf8c45 build: Bump minimum Clang to clang-10 (MarcoFalke) fad7cfee8d6d7bdebd8db950cef09264c91dbb3c doc: Remove outdated CentOS comment (MarcoFalke) Pull request description: It doesn't make sense to support a minimum clang version that is difficult to install on all supported operating systems, which generally ship a later version: * Ubuntu Focal 20.04: https://packages.ubuntu.com/focal/clang-10 and https://packages.ubuntu.com/focal/clang-12 * Debian Bullseye: https://packages.debian.org/bullseye/clang-13 * CentOS 8 Stream: All Clang versions from 11.0 to 15.0 Also, it allows to drop build code, which means it won't waste review when rolling over into cmake (`cmake/module/CheckStdFilesystem.cmake`). ACKs for top commit: hebasto: ACK fa199ee614a7ed99c6caf329093a3573ea5a664b fanquake: ACK fa199ee614a7ed99c6caf329093a3573ea5a664b Tree-SHA512: c1a0e8f191a6db866b8be3c9d254dc3f576fa021e2eaaeb68f3354554a8b38eaa90bbf9871ff92351b715e62a6b7b98cf94eba6dc53d7c951bddb6ad49ba7716
2023-05-17Merge bitcoin/bitcoin#25193: indexes: Read the locator's top block during ↵Ryan Ofsky
init, allow interaction with reindex-chainstate 97844d9268b87b5d09b1091bfd0326ed18ce5b91 index: Enable reindex-chainstate with active indexes (Martin Zumsande) 60bec3c82d09ec208bf0028ad32499e251ad205e index: Use first block from locator instead of looking for fork point (Martin Zumsande) Pull request description: This makes two improvements to the index init phase: **1) Prevent index corruption in case a reorg happens when the index was switched off**: This is done by reading in the top block stored in the locator instead of looking for a fork point already in `BaseIndex::Init()`. Before, we'd just go back to the fork point by calling `FindForkInGlobalIndex()`, which would have corrupted the coinstatsindex because its saved muhash needs to be reverted step by step by un-applying all blocks in between, which wasn't done before. This is now being done a bit later in `ThreadSync()`, which has existing logic to call the custom `Rewind()` method when going back along the chain to the forking point (thanks ryanofsky for pointing this out to me!). **2) Allow using the `-reindex-chainstate` option without needing to disabling indexes**: With `BaseIndex::Init()` not calling `FindForkInGlobalIndex()` anymore, we can allow `reindex-chainstate` with active indexes. `reindex-chainstate` deletes the chain and rebuilds it later in `ThreadImport`, so there is no chain available during `BaseIndex::Init()`, which would lead to problems (see #24789). But now we'll only need the chain a bit later in `BaseIndex::ThreadSync`, which will wait for the reindex-chainstate in `ThreadImport` to finish and will continue syncing after that. ACKs for top commit: ryanofsky: Code review ACK 97844d9268b87b5d09b1091bfd0326ed18ce5b91. Just simple rebase since last review Tree-SHA512: e24973fc22e0b87a49026f4820aecb0a4e415f4d381bade9969dd31cf97afecfea0449dce7fcc797343b792199cc8287276d1f5ffa4433dcb54fb24a808db6fb
2023-05-17index: Enable reindex-chainstate with active indexesMartin Zumsande
This is achieved by letting the index sync thread wait until reindex-chainstate is finished. This also disables the pruning check when reindexing the chainstate (which is incompatible with prune mode) because there would be no chain at this point in init.
2023-05-17index: Use first block from locator instead of looking for fork pointMartin Zumsande
The index sync code has logic to go back the chain to the forking point, while also updating index-specific state, which is necessary to prevent possible corruption of the coinstatsindex. Also add a test for this (a reorg happens while the index is deactivated) that would not pass before this change.
2023-05-17ci: Reduce tsan CPU and memory for faster schedulingMarcoFalke
2023-05-17ci: Use credits for ARM taskMarcoFalke
2023-05-17Merge bitcoin/bitcoin#27668: guix: document when certain patches can be droppedfanquake
a09269a146b1e32a0e7979692f4455cc2f6faeae guix: document when certain guix patches can be dropped (fanquake) Pull request description: Additional notes for when patches can be dropped. ACKs for top commit: hebasto: ACK a09269a146b1e32a0e7979692f4455cc2f6faeae, I have reviewed the changes and they look OK. jarolrod: ACK a09269a146b1e32a0e7979692f4455cc2f6faeae Tree-SHA512: c1876b9a4e3cf73645d25c9077cef19a9b6b7fe2eda5dc9d82fd3ca3f9105453406c1b197e6635035b6ce19c9f255c070bebed5563f68913033d04627202155a
2023-05-17Merge bitcoin/bitcoin#27571: ci: Run iwyu on all src filesfanquake
ddddf4957b02c83ed9b6c46b35d8ae1e137889d2 ci: Run iwyu on all src files (MarcoFalke) Pull request description: This makes it easier to look at the CI output of a file without having to manually add it first to the list. ACKs for top commit: hebasto: ACK ddddf4957b02c83ed9b6c46b35d8ae1e137889d2 Tree-SHA512: 342b52838ae45ea343731c30058cdd5595d5ea5601a1f396de4466ccdd63f7ab07b3a193df3669e4dca7cb535557dcc98f866b3cf986b98176b20ecead123868
2023-05-17ci: Drop NO_WERROR=1 for clang-10 buildMarcoFalke
This partially reverts commit 71383f2fad065378393ef55b6d65e14c656b7301. This should be fine, because if warnings are issues again in the future, it can be disabled again, along with a list of the false warnings.
2023-05-17Merge bitcoin-core/gui#729: test: Add missed headerHennadii Stepanov
36e2d51b8f6bb0125911c831ba2b6fd022fca708 qt, test: Add missed header (Hennadii Stepanov) Pull request description: Should fix MSVC link errors like [that](https://api.cirrus-ci.com/v1/task/4870882892447744/logs/build.log): ``` addressbooktests.obj : error LNK2019: unresolved external symbol "void __cdecl ConfirmMessage(class QString *,class std::chrono::duration<__int64,struct std::ratio<1,1000> >)" (?ConfirmMessage@@YAXPEAVQString@@V?$duration@_JU?$ratio@$00$0DOI@@std@@@chrono@std@@@Z) referenced in function "void __cdecl `anonymous namespace'::EditAddressAndSubmit(class EditAddressDialog *,class QString const &,class QString const &,class QString)" (?EditAddressAndSubmit@?A0x2e52698e@@YAXPEAVEditAddressDialog@@AEBVQString@@1V3@@Z) [C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build\build_msvc\test_bitcoin-qt\test_bitcoin-qt.vcxproj] wallettests.obj : error LNK2001: unresolved external symbol "void __cdecl ConfirmMessage(class QString *,class std::chrono::duration<__int64,struct std::ratio<1,1000> >)" (?ConfirmMessage@@YAXPEAVQString@@V?$duration@_JU?$ratio@$00$0DOI@@std@@@chrono@std@@@Z) [C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build\build_msvc\test_bitcoin-qt\test_bitcoin-qt.vcxproj] C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build\build_msvc\x64\Release\test_bitcoin-qt.exe : fatal error LNK1120: 1 unresolved externals [C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build\build_msvc\test_bitcoin-qt\test_bitcoin-qt.vcxproj] ``` ACKs for top commit: fanquake: ACK 36e2d51b8f6bb0125911c831ba2b6fd022fca708 Tree-SHA512: 84685598fbf8857c0284ff660d953b93da3c2f47ba4ac0d3591b5009a6bcdb76898031fd70f289c4256ce389e485bd259ca145f9f862f085795e374dfa88705d
2023-05-17build: Bump minimum Clang to clang-10MarcoFalke
2023-05-17doc: Remove outdated CentOS commentMarcoFalke
No longer applicable after CONFIG_SHELL must be explicitly set to dash after commit fafc55a489d8f654dd7732b699c9bf51b5136b4b.
2023-05-16Merge bitcoin/bitcoin#27667: ci: Remove unused errtrace trap ERRfanquake
fad09b703f5c6d8524a09eef771eb4525f9f3225 ci: Remove unused errtrace trap ERR (MarcoFalke) Pull request description: This was added in commit 069752b72613b772a9536a3e7f15fa75097f2946, presumably at a time when the functional tests wouldn't capture stderr. Now that all tests capture and print stderr on failure, it can be removed. Reference: * Unit tests capture via `2>&1`: https://github.com/bitcoin/bitcoin/blob/d7700d3a26478d9b1648463c188648c7047b1c60/src/Makefile.test.include#L421 * Functional tests capture as well: https://github.com/bitcoin/bitcoin/blob/d7700d3a26478d9b1648463c188648c7047b1c60/test/functional/test_framework/test_node.py#L356 ACKs for top commit: fanquake: ACK fad09b703f5c6d8524a09eef771eb4525f9f3225 hebasto: ACK fad09b703f5c6d8524a09eef771eb4525f9f3225, tested on Ubuntu 22.04: I can still see warnings from the sanitizers in both unit and functional tests. Tree-SHA512: 1e786eee432a7a50eb9f78b06b2b157321cc16f91b613e3b476e9e51572592fe4bcf4dc15df176e5f019f24497ac68cf332d2037b55b57498c93f4e19613163c
2023-05-16qt, test: Add missed headerHennadii Stepanov
Should fix MSVC link errors.
2023-05-16Merge bitcoin/bitcoin#27674: ci: Fix "Number of CPUs" outputfanquake
5d49d987319f262ecbef6ff688fc674ed3b5fa43 ci: Fix "Number of CPUs" output (Hennadii Stepanov) Pull request description: This PR is a follow-up to https://github.com/bitcoin/bitcoin/pull/27616: - on [master](https://api.cirrus-ci.com/v1/task/5809898840129536/logs/ci.log): ``` Number of CPUs \(nproc\): $(nproc) ``` - this [PR](https://api.cirrus-ci.com/v1/task/6495994095861760/logs/ci.log): ``` Number of CPUs (nproc): 32 ``` ACKs for top commit: MarcoFalke: lgtm ACK 5d49d987319f262ecbef6ff688fc674ed3b5fa43 Tree-SHA512: d97ee3587dbadb604a381aa9990b58d75441307fc98e7ae674436f8318200c8faef7171348655cdcc3ed360c8ca22eacf063cb430b826a40cb0952a436c511f3
2023-05-16ci: Fix "Number of CPUs" outputHennadii Stepanov
2023-05-16Merge bitcoin/bitcoin#26422: build: Use newest `config.{guess,sub}` availablefanquake
ea7b8528490d330f0f4e34e9b26ab00ba528f546 build: Use newest `config.{guess,sub}` available (Hennadii Stepanov) Pull request description: Fixes cross-compiling on old systems. See https://github.com/bitcoin/bitcoin/issues/26420#issuecomment-1295886891. Guix builds: ``` ab58f8db4fb50c2af08be646e4a57491ff853bf41319fe3e962bb928ace2c1be guix-build-ea7b8528490d/output/aarch64-linux-gnu/SHA256SUMS.part c4a42a7dbfb15aa910ce269c3f3158df758eba01dd855cf6529c960d9b8bd76b guix-build-ea7b8528490d/output/aarch64-linux-gnu/bitcoin-ea7b8528490d-aarch64-linux-gnu-debug.tar.gz add5f80b0c8ee216c1d8db31e13656c45f11fe5c967324b8fcedd64d0d408938 guix-build-ea7b8528490d/output/aarch64-linux-gnu/bitcoin-ea7b8528490d-aarch64-linux-gnu.tar.gz ba807ae5b29aca611a35700a968a4f9010528d6cdb6412f98c707aa0e9510e8b guix-build-ea7b8528490d/output/arm-linux-gnueabihf/SHA256SUMS.part fe127eff1fc8389ef00ae39d1446640512120d2f247a2ee64c06290116265729 guix-build-ea7b8528490d/output/arm-linux-gnueabihf/bitcoin-ea7b8528490d-arm-linux-gnueabihf-debug.tar.gz ac75f0aba2e0801fc6b59405bff09884837e0ff8b6fa9fc1225e8325a4ec78a4 guix-build-ea7b8528490d/output/arm-linux-gnueabihf/bitcoin-ea7b8528490d-arm-linux-gnueabihf.tar.gz dee402db94829bd5ce029ca02d75e008f8a18a44fd88e8ecd00b3ce586f223f4 guix-build-ea7b8528490d/output/arm64-apple-darwin/SHA256SUMS.part bbf985dbd1ca875fbb0a03c21698d4b6797c27be45e3a31a3229daee0ecbcbf4 guix-build-ea7b8528490d/output/arm64-apple-darwin/bitcoin-ea7b8528490d-arm64-apple-darwin-unsigned.dmg 3cca89e532a2b637185ca316168b0f6fac2fce8795b486d530ee966a844716f1 guix-build-ea7b8528490d/output/arm64-apple-darwin/bitcoin-ea7b8528490d-arm64-apple-darwin-unsigned.tar.gz 487c68e1a71f6254d48f8d322a46c94e671e00b5930fbfe689804cd8e379c8e9 guix-build-ea7b8528490d/output/arm64-apple-darwin/bitcoin-ea7b8528490d-arm64-apple-darwin.tar.gz db663cf3216871f4c87b687a839cb5cf18b5d9906b74d4c19e8ad422d904aa87 guix-build-ea7b8528490d/output/dist-archive/bitcoin-ea7b8528490d.tar.gz 09121bcd36d72ad26364182c678f2edaaf5b5e635ed43a6964ad7e4be1335075 guix-build-ea7b8528490d/output/powerpc64-linux-gnu/SHA256SUMS.part e8638959b501c3d70421dcdc6579c5d77c5786abed7ad3d6051c628fd8f17c6b guix-build-ea7b8528490d/output/powerpc64-linux-gnu/bitcoin-ea7b8528490d-powerpc64-linux-gnu-debug.tar.gz b1aee39067d5010b4e63dc916232eb1582299d7acb56afacf5c9a5b75dcd8b82 guix-build-ea7b8528490d/output/powerpc64-linux-gnu/bitcoin-ea7b8528490d-powerpc64-linux-gnu.tar.gz 9ed3d0e710847068cb2064e51e3f4c14166ad86f5c297adcf0a4d24cd4e2a723 guix-build-ea7b8528490d/output/powerpc64le-linux-gnu/SHA256SUMS.part 19f99e41f41d9525a412872e61687452ab5ac23c5c964ef34b8c31a9d71adabc guix-build-ea7b8528490d/output/powerpc64le-linux-gnu/bitcoin-ea7b8528490d-powerpc64le-linux-gnu-debug.tar.gz bd669150ce6830ffbd8523acf75b6daf894c9449c6ce3073a9ce89156d9268f9 guix-build-ea7b8528490d/output/powerpc64le-linux-gnu/bitcoin-ea7b8528490d-powerpc64le-linux-gnu.tar.gz 5e42cb1fee7b5b046da37f62674a1662a6135f9644f5ea0288876334c3e8d34a guix-build-ea7b8528490d/output/riscv64-linux-gnu/SHA256SUMS.part 8767a84e04e0cd27318305d31a5a897cdc5f56d8505416dd01753bb35c8980b0 guix-build-ea7b8528490d/output/riscv64-linux-gnu/bitcoin-ea7b8528490d-riscv64-linux-gnu-debug.tar.gz 00f1abcc64a7010f194dab847c04481e10991128b919b513aa9eb2911d03a243 guix-build-ea7b8528490d/output/riscv64-linux-gnu/bitcoin-ea7b8528490d-riscv64-linux-gnu.tar.gz ae7add2e3ea0663fdd9d2c61c737e4bb4155d42932a0a5ce8cbbbcee627f01f3 guix-build-ea7b8528490d/output/x86_64-apple-darwin/SHA256SUMS.part ba6b4a2f6a97e382a10ffec605f025d8724ac2dc0a441dbb42be79e915e98738 guix-build-ea7b8528490d/output/x86_64-apple-darwin/bitcoin-ea7b8528490d-x86_64-apple-darwin-unsigned.dmg 67914f29d9e81ee50b340c3ac05b336b98766b59b8cce153493786b04a51f18a guix-build-ea7b8528490d/output/x86_64-apple-darwin/bitcoin-ea7b8528490d-x86_64-apple-darwin-unsigned.tar.gz 1d813d0e905a324f48beb2ce1da980e372c529b0eadb521662063f283fbc9bf6 guix-build-ea7b8528490d/output/x86_64-apple-darwin/bitcoin-ea7b8528490d-x86_64-apple-darwin.tar.gz 4e3d176ad9059e59e9b21919001ced2710c74229536b27ef65acef514287f7e5 guix-build-ea7b8528490d/output/x86_64-linux-gnu/SHA256SUMS.part cbe31f4a60aac1a72bcdedccf39c18da21a5a4e257e77c0832ad93ce722923dd guix-build-ea7b8528490d/output/x86_64-linux-gnu/bitcoin-ea7b8528490d-x86_64-linux-gnu-debug.tar.gz d5f3cf53adf1d964cded3461b66199c4917715af0d84cac78c97acc92432b059 guix-build-ea7b8528490d/output/x86_64-linux-gnu/bitcoin-ea7b8528490d-x86_64-linux-gnu.tar.gz 9b1877d00fd447222839615cfeb089a8237f1d5d80cd2b819dd66621df8f2375 guix-build-ea7b8528490d/output/x86_64-w64-mingw32/SHA256SUMS.part 2fb88e40dd399a2dedb1a44c5bd1091899b00a6d3b8d99149f622a0069205560 guix-build-ea7b8528490d/output/x86_64-w64-mingw32/bitcoin-ea7b8528490d-win64-debug.zip 074ce203494dc15c916c151426438f09982a270f389cd139d3f28a75aea51af8 guix-build-ea7b8528490d/output/x86_64-w64-mingw32/bitcoin-ea7b8528490d-win64-setup-unsigned.exe 2aa8ff735ce96580fb915757ccce79dc2a19afb043a6c93d3749023ca647666d guix-build-ea7b8528490d/output/x86_64-w64-mingw32/bitcoin-ea7b8528490d-win64-unsigned.tar.gz 0ac19e1901506c47d5b20297d468dbaa93e8572232671a16d08355988df8e7c3 guix-build-ea7b8528490d/output/x86_64-w64-mingw32/bitcoin-ea7b8528490d-win64.zip ``` ACKs for top commit: fanquake: ACK ea7b8528490d330f0f4e34e9b26ab00ba528f546 Tree-SHA512: 75c154d2195e2e8cf2e2786c08bc5096b07027715f559fc81c1ce221ce74c2732e745b74809d7c4a9f909a1018399a07329abd993e50ecec91dd95518fce0b39
2023-05-16Merge bitcoin/bitcoin#27041: Build: Improve handling of suppressed logging ↵fanquake
in Makefiles 1b1ffbd014b931afb9435ec10911b9a7c130d3e5 Build: Log when test -f fails in Makefile (TheCharlatan) 541012e621386cd824eed81295206a34ba3ba497 Build: Use AM_V_GEN in Makefiles where appropriate (TheCharlatan) Pull request description: This PR triages some behavior around Makefile recipe echoing suppression. When generating new files as part of the Makefile the recipe is sometimes suppressed with $(AM_V_GEN) and sometimes with `@`. We should prefer $(AM_V_GEN), since this also prints the lines in silent mode. This is arguably more in style with the current recipe echoing. Before: `Generated test/data/script_tests.json.h` Now: ` GEN test/data/script_tests.json.h` A side effect of this change is that the recipe for generating build.h is now echoed on each make run. Arguably this makes its generation more transparent. Sometimes the error emitted by `test -f` is currently thrown without any logging. This makes it a bit harder to debug. Instead, print a helpful log message to point the developer in the right direction. Alternatively this could have been implemented by just removing the recipe echo suppression (@), but the subsequent make output became too noisy. ACKs for top commit: fanquake: ACK 1b1ffbd014b931afb9435ec10911b9a7c130d3e5 Tree-SHA512: e31869fab25e72802b692ce6735f9561912caea903c1577101b64c9cb115c98de01a59300e8ffe7b05b998345c1b64a79226231d7d1453236ac338c62dc9fbb3
2023-05-16guix: document when certain guix patches can be droppedfanquake
2023-05-16Merge bitcoin/bitcoin#27664: docs: fix spelling errorsfanquake
e9dcac1ec7b4e00a08a943caa250c4ff00981b8b add `lief` to `spelling.ignore-words` (brunoerg) 258f93000b0522368a315100526ea8e59d0280cd test: fix spelling in `interface_usdt_utxocache` (brunoerg) Pull request description: Add `lief` to `spelling.ignore-words` since it's the name of a Python lib and fix spelling error in `interface_usdt_utxocache` (s/eariler/earlier) ACKs for top commit: fanquake: ACK e9dcac1ec7b4e00a08a943caa250c4ff00981b8b Tree-SHA512: f42cdbb74144c5d289d70bb9bac1179650bb32594678e15f4e18e4b2f68009999d60ff69494d4e68650d82fc1838e67515ed2f922ee84db98735ef906911ec40
2023-05-16Merge bitcoin/bitcoin#27665: walletdb: Remove unused CreateMockWalletDatabasefanquake
0282b2126dcc1216a25417db0716a3a28489b72d walletdb: Remove unused CreateMockWalletDatabase (Andrew Chow) Pull request description: This has been superseded by the MockableDatabase. Remove to avoid confusion as to which type of mock database to use for testing. I thought this was included in #26715, maybe it got lost in a rebase. ACKs for top commit: furszy: utACK 0282b212 brunoerg: crACK 0282b2126dcc1216a25417db0716a3a28489b72d Tree-SHA512: 18445c4d8a4e2609ef7471c6d75297f43694b79e768f6c993a5addb1dc0e88bd12bac263c9d8e903d828ddf6bf50434f9e2f72048f4fc528e98fed8ee65123ca
2023-05-16ci: Remove unused errtrace trap ERRMarcoFalke
2023-05-15walletdb: Remove unused CreateMockWalletDatabaseAndrew Chow
This has been superseded by the MockableDatabase. Remove to avoid confusion as to which type of mock database to use for testing.
2023-05-15add `lief` to `spelling.ignore-words`brunoerg
2023-05-15test: fix spelling in `interface_usdt_utxocache`brunoerg
2023-05-15Merge bitcoin/bitcoin#27661: doc, test: Document steps to reproduce TSan ↵fanquake
warning for `libdb` f03a708c1190852862c2e3ade5ee01797f291dd4 doc, test: Document steps to reproduce TSan warning for `libdb` (Hennadii Stepanov) Pull request description: Requested [here](https://github.com/bitcoin/bitcoin/pull/27658#issuecomment-1547767101). ACKs for top commit: MarcoFalke: lgtm ACK f03a708c1190852862c2e3ade5ee01797f291dd4 Tree-SHA512: 0c61c05d75d074df0686502739341fdbef8dd5a2d2f6cdfdd85bd0014ac43efb6fab112ee66d8d0f33f8f4695aeffc12a05923181260d81511d4e4d53b7686f2
2023-05-15doc, test: Document steps to reproduce TSan warning for `libdb`Hennadii Stepanov
2023-05-15Merge bitcoin/bitcoin#26715: Introduce `MockableDatabase` for wallet unit testsfanquake
33e2b82a4fc990253ff77655f437c7aed336bc55 wallet, bench: Remove unused database options from WalletBenchLoading (Andrew Chow) 80ace042d8fece9be50bfef1be64c6e5720e87e6 tests: Modify records directly in wallet ckey loading test (Andrew Chow) b3bb17d5d07f51ac2e501e4a7a3bbcd17144070f tests: Update DuplicateMockDatabase for MockableDatabase (Andrew Chow) f0eecf5e408238c64b77b0a4974ba2b9edb17487 scripted-diff: Replace CreateMockWalletDB with CreateMockableWalletDB (Andrew Chow) 075962bc25a90661612fe4613cd50ea1cae21f52 wallet, tests: Include wallet/test/util.h (Andrew Chow) 14aa4cb1e44f089a6022a2b14a98bca4a7dd9a01 wallet: Move DummyDatabase to salvage (Andrew Chow) f67a385556c60b2e4788a378196a395fca0539f5 wallet, tests: Replace usage of dummy db with mockable db (Andrew Chow) 33c6245ac1ecdfe25b1ee4fd9e93c43393634ae3 Introduce MockableDatabase for wallet unit tests (Andrew Chow) Pull request description: For the wallet's unit tests, we currently use either `DummyDatabase` or memory-only versions of either BDB or SQLite. The tests that use `DummyDatabase` just need a `WalletDatabase` so that the `CWallet` can be constructed, while the tests using the memory-only databases just need a backing data store. There is also a `FailDatabase` that is similar to `DummyDatabase` except it fails be default or can have a configured return value. Having all of these different database types can make it difficult to write tests, particularly tests that work when either BDB or SQLite is disabled. This PR unifies all of these different unit test database classes into a single `MockableDatabase`. Like `DummyDatabase`, most functions do nothing and just return true. Like `FailDatabase`, the return value of some functions can be configured on the fly to test various failure cases. Like the memory-only databases, records can actually be written to the `MockableDatabase` and be retrieved later, but all of this is still held in memory. Using `MockableDatabase` completely removes the need for having BDB or SQLite backed wallets in the unit tests for the tests that are not actually testing specific database behaviors. Because `MockableDatabase`s can be created by each unit test, we can also control what records are stored in the database. Records can be added and removed externally from the typical database modification functions. This will give us greater ability to test failure conditions, particularly those involving corrupted records. Possible alternative to #26644 ACKs for top commit: furszy: ACK 33e2b82 TheCharlatan: ACK 33e2b82a4fc990253ff77655f437c7aed336bc55 Tree-SHA512: c2b09eff9728d063d2d4aea28a0f0e64e40b76483e75dc53f08667df23bd25834d52656cd4eafb02e552db0b9e619cfdb1b1c65b26b5436ee2c971d804768bcc
2023-05-15Merge bitcoin/bitcoin#27656: build, doc: Adjust comment after PR27254fanquake
3ece0ebf627ee569a9680bf2663697db7a6ae309 build, doc: Adjust comment after PR27254 (Hennadii Stepanov) Pull request description: This is a follow up for https://github.com/bitcoin/bitcoin/pull/27254. ACKs for top commit: TheCharlatan: ACK 3ece0ebf627ee569a9680bf2663697db7a6ae309 Tree-SHA512: 36c627524304f0ea964383488acb9b16d0b553cc9cf3bce7a12aec65a7905b13e4582b7b7ec6d1efa32cd3c623969bc00f805ff31d9e6eec86a614e75796c8ff
2023-05-15Merge bitcoin/bitcoin#27616: ci: Remove CI_EXEC bloatfanquake
fa01c3c59cbe28be0751c2956609907ecfbcbe49 ci: Remove CI_EXEC bloat (MarcoFalke) fa8a428c92df1455e99c759d31debada1ba1419e move-only: Move almost all CI_EXEC code to 06_script_b.sh (MarcoFalke) Pull request description: `CI_EXEC` has many issues: * It is roughly equivalent to `bash -c "$*"`, meaning that the full command will be treated as a single string, ignoring tokens. * It must be put in front of (almost) every command, making it easy to forget, hard to debug the resulting failure, and the code verbose. Fix all issues by removing it almost completely. ACKs for top commit: TheCharlatan: ACK fa01c3c59cbe28be0751c2956609907ecfbcbe49 Tree-SHA512: 4a65d61f5c35ca945d31f270dba3e96305fd83333a7713f0452c67f02a78e1901113e9f18d21e1dc016403c0033eb32038a9308d0a0ded7ee6b970d18381a1c2
2023-05-14build, doc: Adjust comment after PR27254Hennadii Stepanov
2023-05-14Merge bitcoin/bitcoin#27493: depends: no-longer nuke libc++abi.so* in ↵fanquake
native_clang package 9ae854da193f3c4bda38a75e96f9b989b289baab depends: no-longer nuke libc++abi.so* in native_clang package (fanquake) Pull request description: We weren't copying it over in any case. ACKs for top commit: hebasto: ACK 9ae854da193f3c4bda38a75e96f9b989b289baab theuni: Sure. utACK no-op 9ae854da193f3c4bda38a75e96f9b989b289baab. Tree-SHA512: 3cc7f18f27c1b498f930bc1a09283aa04ba673d3c1a5220d8462213f0a06b74bc34989f23404402850de518cba35ddab900a54f7f0fac112fc86664e4155f8cb
2023-05-14Merge bitcoin/bitcoin#27628: build: Fix shared lib linking for darwin with lldfanquake
67aacc73ea427f89f005ae17d5fd1572409e649e build: cleanup comments after adding yet another libtool hack (Cory Fields) 283d95516a11166631818dd448ed53a2374b5db8 build: Fix shared lib linking for darwin with lld (Cory Fields) Pull request description: Solves one of the last remaining blockers for #21778. Fixes lld linking shared libs for macos via libtool. lld fails one of libtool's earliest checks [because it happens to output a warning that contains a specific string](https://git.savannah.gnu.org/cgit/libtool.git/tree/m4/libtool.m4#n999): > # If there is a non-empty error log, and "single_module" > # appears in it, assume the flag caused a linker warning And here is the test being run: > x86_64-apple-darwin-ld: warning: Option `-single_module' is deprecated in ld64: > x86_64-apple-darwin-ld: warning: Unnecessary option: this is already the default Because the warning is printed the test fails. So libtool falls back to a very primitive and broken link-line for shared libs. Arguably this should be worked-around in upstream lld by changing the warning string, as otherwise every libtool project will fail to link with it. Like many other libtool hacks, the solution is to simply disable the check and hard-code the answer we know to be correct. ACKs for top commit: hebasto: re-ACK 67aacc73ea427f89f005ae17d5fd1572409e649e Tree-SHA512: 792e4d208a3a4921edb5f267f43ecd052b5b650df0db5cb2788ee1e4f3c4087413f354b22e407ff5fa2f99a22a16154ec6826d14c6654a57c00aae3b3e744bca
2023-05-13ci: Run iwyu on all src filesMarcoFalke
This makes it easier to look at the CI output of a file without having to manually add it first.
2023-05-12build: cleanup comments after adding yet another libtool hackCory Fields
2023-05-12build: Fix shared lib linking for darwin with lldCory Fields
libtool gets a false-positive from the warning produced by lld -single_module because it is already the default and unneeded. Skip the check unconditionally for Darwin linkers.
2023-05-11Merge bitcoin/bitcoin#27629: doc: remove version number from bips.mdAndrew Chow
308caf326db5619141f0c224fa48410293d59330 doc: remove version number from bips.md (fanquake) Pull request description: This always just needs "bumping" (see previous rc type pulls), and the version number is already whichever version of the code you acquired bips.md with. ACKs for top commit: MarcoFalke: lgtm ACK 308caf326db5619141f0c224fa48410293d59330 achow101: ACK 308caf326db5619141f0c224fa48410293d59330 theStack: ACK 308caf326db5619141f0c224fa48410293d59330 hebasto: ACK 308caf326db5619141f0c224fa48410293d59330 Tree-SHA512: fcb98e7cdc0c1f8960bfba86be09c2badb36b613060fae394a56e1561c69d28f433434f573c8b1ae1d71ae326277dea2a4841d5c08ad39f8e8848300743146e7
2023-05-11doc: remove version number from bips.mdfanquake
This always just needs "bumping", and the version number is already whichever version of the code you acquired bips.md with.
2023-05-11Merge bitcoin/bitcoin#27610: Improve performance of p2p inv to send queuesfanquake
5b3406094f2679dfb3763de4414257268565b943 net_processing: Boost inv trickle rate (Anthony Towns) 228e9201efb5574b1b96bb924de1d2e8dd1317f3 txmempool: have CompareDepthAndScore sort missing txs first (Anthony Towns) Pull request description: Couple of performance improvements when draining the inventory-to-send queue: * drop txs that have already been evicted from the mempool (or included in a block) immediately, rather than at the end of processing * marginally increase outgoing trickle rate during spikes in tx volume ACKs for top commit: willcl-ark: ACK 5b34060 instagibbs: ACK https://github.com/bitcoin/bitcoin/pull/27610/commits/5b3406094f2679dfb3763de4414257268565b943 darosior: utACK 5b3406094f2679dfb3763de4414257268565b943 glozow: code review ACK 5b3406094f2679dfb3763de4414257268565b943 dergoegge: utACK 5b3406094f2679dfb3763de4414257268565b943 Tree-SHA512: 155cd3b5d150ba3417c1cd126f2be734497742e85358a19c9d365f4f97c555ff9e846405bbeada13c3575b3713c3a7eb2f780879a828cbbf032ad9a6e5416b30
2023-05-11depends: no-longer nuke libc++abi.so* in native_clang packagefanquake
We weren't copying it over in any case.
2023-05-11Merge bitcoin/bitcoin#27125: refactor, kernel: Decouple ArgsManager from ↵fanquake
blockstorage 5ff63a09a9edd1204b2cc56cf6f48a44adab7bb3 refactor, blockstorage: Replace stopafterblockimport arg (TheCharlatan) 18e5ba7c8002bcd473ee29ce4b5bfc56df6142a4 refactor, blockstorage: Replace blocksdir arg (TheCharlatan) 02a0899527ba3d31329e56c791c9dbf36075bb84 refactor, BlockManager: Replace fastprune from arg with options (TheCharlatan) a498d699e3fdac5bfdb33020a1fd6c4a79989752 refactor/iwyu: Complete includes for blockmanager_args (TheCharlatan) f0bb1021f0d60f5f19176e67a66fcf7c325f88d1 refactor: Move functions to BlockManager methods (TheCharlatan) cfbb2124939822e95265a39242ffca3d86bac6e8 zmq: Pass lambda to zmq's ZMQPublishRawBlockNotifier (TheCharlatan) 8ed4ff8e05d61a8e954d72cebdc2e1d1ab24fb84 refactor: Declare g_zmq_notification_interface as unique_ptr (TheCharlatan) Pull request description: The libbitcoin_kernel library should not rely on the `ArgsManager`, but rather use option structs that can be passed to the various classes it uses. This PR removes reliance on the `ArgsManager` from the `blockstorage.*` files. Like similar prior work, it uses the options struct in the `BlockManager` that can be populated with `ArgsManager` values. Some related prior work: https://github.com/bitcoin/bitcoin/pull/26889 https://github.com/bitcoin/bitcoin/pull/25862 https://github.com/bitcoin/bitcoin/pull/25527 https://github.com/bitcoin/bitcoin/pull/25487 Related PR removing blockstorage globals: https://github.com/bitcoin/bitcoin/pull/25781 ACKs for top commit: ryanofsky: Code review ACK 5ff63a09a9edd1204b2cc56cf6f48a44adab7bb3. Since last ACK just added std::move and fixed commit title. Sorry for the noise! mzumsande: Code Review ACK 5ff63a09a9edd1204b2cc56cf6f48a44adab7bb3 Tree-SHA512: 4bde8fd140a40b97eca923e9016d85dcea6fad6fd199731f158376294af59c3e8b163a0725aa47b4be3519b61828044e0a042deea005e0c28de21d8b6c3e1ea7
2023-05-10Merge bitcoin/bitcoin#19690: util: improve FindByte() performanceAndrew Chow
72efc26439da9a1344a19569fb0cab01f82ae7d1 util: improve streams.h:FindByte() performance (Larry Ruane) 604df63f6c70b9692b067777ddb38d946ac0b2fc [bench] add streams findbyte (gzhao408) Pull request description: This PR is strictly a performance improvement; there is no functional change. The `CBufferedFile::FindByte()` method searches for the next occurrence of the given byte in the file. Currently, this is done by explicitly inspecting each byte in turn. This PR takes advantage of `std::find()` to do the same more efficiently, improving its CPU runtime by a factor of about 25 in typical use. ACKs for top commit: achow101: re-ACK 72efc26439da9a1344a19569fb0cab01f82ae7d1 stickies-v: re-ACK 72efc26439da9a1344a19569fb0cab01f82ae7d1 Tree-SHA512: ddf0bff335cc8aa34f911aa4e0558fa77ce35d963d602e4ab1c63090b4a386faf074548daf06ee829c7f2c760d06eed0125cf4c34e981c6129cea1804eb3b719
2023-05-10refactor, blockstorage: Replace stopafterblockimport argTheCharlatan
Add a stop_after_block_import field to the BlockManager options. Use this field instead of the global gArgs. This should allow users of the BlockManager to not rely on the global Args.
2023-05-10refactor, blockstorage: Replace blocksdir argTheCharlatan
Add a blocks_dir field to the BlockManager options. Move functions relying on the global gArgs to get the blocks_dir into the BlockManager class. This should eventually allow users of the BlockManager to not rely on the global Args and instead pass in their own options.
2023-05-10refactor, BlockManager: Replace fastprune from arg with optionsTheCharlatan
Remove access to the global gArgs for the fastprune argument and replace it by adding a field to the existing BlockManager Options struct. When running `clang-tidy-diff` on this commit, there is a diagnostic error: `unknown type name 'uint64_t' [clang-diagnostic-error] uint64_t prune_target{0};`, which is fixed by including cstdint. This should eventually allow users of the BlockManager to not rely on the global gArgs and instead pass in their own options.
2023-05-10refactor/iwyu: Complete includes for blockmanager_argsTheCharlatan
2023-05-10refactor: Move functions to BlockManager methodsTheCharlatan
This is a commit in preparation for the next few commits. The functions are moved to methods to avoid their re-declaration for the purpose of passing in BlockManager options. The functions that were now moved into the BlockManager should no longer use the params as an argument, but instead use the member variable. In the moved ReadBlockFromDisk and UndoReadFromDisk, change the function signature to accept a reference to a CBlockIndex instead of a raw pointer. The pointer is expected to be non-null, so reflect that in the type. To allow for the move of functions to BlockManager methods all call sites require an instantiated BlockManager, or a callback to one.
2023-05-10zmq: Pass lambda to zmq's ZMQPublishRawBlockNotifierTheCharlatan
The lambda captures a reference to the chainman unique_ptr to retrieve block data. An assert is added on the chainman to ensure that the lambda is not used while the chainman is uninitialized. This is done in preparation for the following commits where blockstorage functions are made BlockManager methods.