aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-01-14doc: Rework 14707 release notesMarcoFalke
2022-01-14doc: move-only release note snippetsMarcoFalke
Can be reviewed with --color-moved=dimmed-zebra --color-moved-ws=ignore-all-space
2022-01-13Merge bitcoin/bitcoin#24035: test: use MiniWallet for mempool_accept.pyMarcoFalke
aa8a65e4a88bfbd83ac756a87bfb8faf52fb675d test: use MiniWallet for mempool_accept.py (Sebastian Falbesoner) b24f6c6855bdd09bf445faeebe9d54c3d07a46d9 test: MiniWallet: support default `from_node` for creating txs (Sebastian Falbesoner) f30041c9143d0added18105c9f0c4ae3f340efbc test: create txs with current `nVersion` (2) by default (Sebastian Falbesoner) 2f7978682245ada40e7f72c6f28bf2379fdc8ce2 test: refactor: add constant for sequence number `SEQUENCE_FINAL` (Sebastian Falbesoner) Pull request description: This PR enables one more of the non-wallet functional tests (mempool_accept.py) to be run even with the Bitcoin Core wallet disabled by using the MiniWallet instead, as proposed in #20078. It also includes some other minor changes that came up while working on the replacement: * [commit 1/4] replace magic number 0xffffffff for a tx's nSequence with a new constant `SEQUENCE_FINAL` * [commit 2/4] create `CTransaction` instances with the current nVersion=2 by default, in order to use BIP68 for tests * [commit 3/4] support default `from_node` parameter for creating txs (this is a stripped down version of PR #24025) ACKs for top commit: MarcoFalke: re-ACK aa8a65e4a88bfbd83ac756a87bfb8faf52fb675d 📊 Tree-SHA512: 34cd085ea4147ad5bd3f3321c84204064ceb95f382664c7fe29062c1bbc79d9d9465c5e46d35e11c416f2f3cd46030c90a09b518c829c73ae40d060be5e4c9cb
2022-01-13Merge bitcoin/bitcoin#23607: rpc: Pass const char* to ↵laanwj
evhttp_connection_get_peer for new libevent c62d763fc313585d79ad833c9d729f6acf2652aa Necessary improvements to make configure work without libevent installed (Perlover) 091ccc38c2e589b649648cbcc99aca4802f98775 The evhttp_connection_get_peer function from libevent changes the type of the second parameter. Fixing the problem. (Perlover) Pull request description: The second parameter of evhttp_connection_get_peer in libevent already has type as `const char **` The compilation of bitcoind with the fresh libevent occurs errors Details: https://github.com/bitcoin/bitcoin/issues/23606 ACKs for top commit: laanwj: Code review ACK c62d763fc313585d79ad833c9d729f6acf2652aa luke-jr: tACK c62d763fc313585d79ad833c9d729f6acf2652aa Tree-SHA512: d1c8062d90bd0d55c582dae2c3a7e5ee1b6c7ca872bf4aa7fe6f45a52ac4a8f59464215759d961f8efde0efbeeade31b08daf9387d7d50d7622baa1c06992d83
2022-01-13test: use MiniWallet for mempool_accept.pySebastian Falbesoner
This test can now be run even with the Bitcoin Core wallet disabled.
2022-01-13Merge bitcoin/bitcoin#24048: build: Improve error message when pkg-config is ↵laanwj
not installed 18f304d988117f2675e7393adda9f960fbf3cb3a build: Improve error message when pkg-config is not installed (Hennadii Stepanov) Pull request description: Fixes bitcoin/bitcoin#24037. With this PR: ``` # ./autogen.sh configure.ac:16: error: PKG_PROG_PKG_CONFIG macro not found. Please install pkg-config and re-run autogen.sh configure.ac:16: the top level autom4te: /usr/bin/m4 failed with exit status: 1 aclocal: error: /usr/bin/autom4te failed with exit status: 1 autoreconf: aclocal failed with exit status: 1 ``` ACKs for top commit: laanwj: Tested ACK 18f304d988117f2675e7393adda9f960fbf3cb3a jarolrod: ACK 18f304d988117f2675e7393adda9f960fbf3cb3a Tree-SHA512: ba845f44c966fea6cf7cee0db9cacc431072e2005ad065c8f2bbe3cffd8415c3af6ed443cccf9606df7de4df2ff3e72636afb5f3776d2a96af8572aab7018549
2022-01-12Merge bitcoin/bitcoin#24041: util: Restore GetIntArg saturating behaviorMarcoFalke
b5c9bb5cb9f4a8db57b33ef7399310c7d6de5822 util: Restore GetIntArg saturating behavior (James O'Beirne) Pull request description: The new locale-independent atoi64 method introduced in #20452 parses large integer values higher than maximum representable value as 0 instead of the maximum value, which breaks backwards compatibility. This commit restores compatibility and adds test coverage for this case in terms of the related GetIntArg and strtoll functions. Specifically, command line or bitcoin.conf integer values greater than `9223372036854775807` (`2**63-1`) used to be parsed as `9223372036854775807` before #20452. Then #20452 caused them to be parsed as `0`. And after this PR they will be parsed as `9223372036854775807` again. This change is a stripped-down alternative version of #23841 by jamesob ACKs for top commit: jamesob: Github ACK https://github.com/bitcoin/bitcoin/pull/24041/commits/b5c9bb5cb9f4a8db57b33ef7399310c7d6de5822 vincenzopalazzo: ACK https://github.com/bitcoin/bitcoin/pull/24041/commits/b5c9bb5cb9f4a8db57b33ef7399310c7d6de5822 MarcoFalke: review ACK b5c9bb5cb9f4a8db57b33ef7399310c7d6de5822 🌘 Tree-SHA512: 4e8abdbabf3cf4713cf5a7c5169539159f359ab4109a4e7e644cc2e9b2b0c3c532fad9f6b772daf015e1c5340ce59280cd9a41f2730afda6099cbf636b7d23ae
2022-01-12build: Improve error message when pkg-config is not installedHennadii Stepanov
2022-01-12Merge bitcoin-core/gui#517: refactor, qt: Use std::chrono for parameters of ↵Hennadii Stepanov
QTimer methods 51250b0906e56b39488304208ad119c951b4ae7d refactor, qt: Use std::chrono for input_filter_delay constant (Hennadii Stepanov) f3bdc143b67e8a5e763071a0774f6d994ca35c57 refactor, qt: Add SHUTDOWN_POLLING_DELAY constant (Hennadii Stepanov) 0e193deb523a4fa04e0ee69bd66f917895802ac9 refactor, qt: Use std::chrono for non-zero arguments in QTimer methods (Hennadii Stepanov) 6f0da958116ecc0e06332fad2f490e37b6884166 refactor, qt: Use std::chrono in ConfirmMessage parameter (Hennadii Stepanov) 33d520ac538fcd6285fd958578f1bd26295592e4 refactor, qt: Use std::chrono for MODEL_UPDATE_DELAY constant (Hennadii Stepanov) Pull request description: Since Qt 5.8 `QTimer` methods have overloads that accept `std::chrono::milliseconds` arguments: - [`QTimer::singleShot`](https://doc.qt.io/archives/qt-5.9/qtimer.html#singleShot-8) - [`QTimer::start`](https://doc.qt.io/archives/qt-5.9/qtimer.html#start-2) ACKs for top commit: promag: Code review ACK 51250b0906e56b39488304208ad119c951b4ae7d. shaavan: reACK 51250b0906e56b39488304208ad119c951b4ae7d Tree-SHA512: aa843bb2322a84c0c2bb113d3b48d7bf02d7f09a770779dcde312c32887f973ef9445cdef42f39edaa599ff0f3d0457454f6153aa130efadd989e413d39c6062
2022-01-12Merge bitcoin-core/gui#523: scripted-diff: Rename functions to drop mention ↵Hennadii Stepanov
of boost 3c4f5d2a2024a71523a2e43e8144cdb0818dee6f scripted-diff: Rename functions to drop mention of boost (Hennadii Stepanov) Pull request description: Nothing specific to Boost is in `GUIUtil::qstringToBoostPath` and `GUIUtil::boostPathToQString` functions. Related to bitcoin/bitcoin#20744. ACKs for top commit: laanwj: Concept and code review ACK 3c4f5d2a2024a71523a2e43e8144cdb0818dee6f promag: Code review ACK 3c4f5d2a2024a71523a2e43e8144cdb0818dee6f 👋 Tree-SHA512: 0c8790979783a067811f7699b4ce4c204f6e0818d5f32986ec24b2c71583b4496d7a0e0c0361dd77c7e641a75d983fee35cd51ef722bbca9a5f13194efb3b4c0
2022-01-12Merge bitcoin/bitcoin#24042: build: Point Guix to the current top of the ↵fanquake
"version-1.4.0" branch a229451590b2e5ef3c8a22c17f9656d1fb86ae7f build: Point Guix to the current top of the "version-1.4.0" branch (Hennadii Stepanov) Pull request description: On master (c561f2f06ed25f08f7776ac41aeb2999ebe79550) the commit in Guix repo from bitcoin/bitcoin#23778 seems unavailable: ``` $ git checkout fa17abf1af09570708daa28dd40ffbc932ebe25c fatal: reference is not a tree: fa17abf1af09570708daa28dd40ffbc932ebe25c ``` This PR points Guix to the current top of the "version-1.4.0" branch. Fixes #24040. ACKs for top commit: MarcoFalke: Approach ACK a229451590b2e5ef3c8a22c17f9656d1fb86ae7f fanquake: ACK a229451590b2e5ef3c8a22c17f9656d1fb86ae7f - from what I've seen on the mailing list there shouldn't be any more force pushing. Tree-SHA512: c58f846fb0afd51b5c2dd33034e9d593aec5d5b49e9f2232af70ae1224da8408ad4e05aa314609350d92a6400e354a816b988226e3572198c3f839ab33913164
2022-01-12refactor, qt: Use std::chrono for input_filter_delay constantHennadii Stepanov
2022-01-12Merge bitcoin/bitcoin#24024: Remove cs_main lock annotation from ↵MarcoFalke
ChainstateManager.m_blockman ce95fb36af7db6582216adc64f2a66aaa06b55b3 Remove cs_main lock annotation from ChainstateManager.m_blockman (Ryan Ofsky) Pull request description: `BlockManager` is a large data structure, and `cs_main` is not required to take its address or access every part of it. Individual `BlockManager` fields and methods which do require `cs_main` like `m_block_index` and `LookupBlockIndex` are already annotated separately, and these other annotations describe locking requirements more accurately and do a better job enforcing thread safety. Since `cs_main` is not needed to access the address of the m_block object, this commit drops `cs_main` LOCK calls which were added pointlessly to satisfy this annotation in the past. Code changes were made by dongcarl, I just wrote the commit description ACKs for top commit: MarcoFalke: cr ACK ce95fb36af7db6582216adc64f2a66aaa06b55b3 dongcarl: crACK ce95fb36af7db6582216adc64f2a66aaa06b55b3 jonatack: ACK ce95fb36af7db6582216adc64f2a66aaa06b55b3 per `git range-diff db1f04f 5a1c413 ce95fb3` change since last push is rebase and dropping braces on the member initialization Tree-SHA512: b18a6ebcc70bea750485f04d4feb7bb28450fea2176e513be9cc242e9f63b24254c5659e74eb6d6045c706a3aaeb94688937b25b7ca7653f8aa3cf8c18845d5a
2022-01-12Merge bitcoin/bitcoin#24039: bug fix: prevent UnicodeDecodeError when ↵MarcoFalke
opening log file in feature_init.py 9d3e95d77c7d4f228909be696efcd42383cd24e3 [bugfix] prevent UnicodeDecodeError errors when opening log file in feature_init.py (sogoagain) Pull request description: Should fix #23989 To fix a bug, I modified `feature_init.py` to open the log file as a byte stream when opening it. thank you. ACKs for top commit: MarcoFalke: review ACK 9d3e95d77c7d4f228909be696efcd42383cd24e3 Tree-SHA512: 6e3e57cac5f4865b3894ee4e9fcd9eb2690e824af20e34b4595722bd7043b0c3fe417cc1bfcff25fbab95c66418d3fce13434bd63d0244875a867d08853a5644
2022-01-11util: Restore GetIntArg saturating behaviorJames O'Beirne
The new locale-independent atoi64 method introduced in #20452 parses large integer values higher than maximum representable value as 0 instead of the maximum value, which breaks backwards compatibility. This commit restores compatibility and adds test coverage for this case in terms of the related GetIntArg and strtoll functions. Co-authored-by: Ryan Ofsky <ryan@ofsky.org>
2022-01-11build: Point Guix to the current top of the "version-1.4.0" branchHennadii Stepanov
2022-01-12[bugfix] prevent UnicodeDecodeError errors when opening log file in ↵sogoagain
feature_init.py open log file as a raw byte stream in feature_init.py (fixes #23989)
2022-01-11scripted-diff: Rename functions to drop mention of boostHennadii Stepanov
-BEGIN VERIFY SCRIPT- FILES=$(git ls-files src/qt) sed -i 's/boostPathToQString/PathToQString/g' -- $FILES sed -i 's/qstringToBoostPath/QStringToPath/g' -- $FILES -END VERIFY SCRIPT-
2022-01-11test: MiniWallet: support default `from_node` for creating txsSebastian Falbesoner
If no `from_node` parameter is passed explicitely to the `create_self_transfer` method, the test node passed in the course of creating the MiniWallet instance is used. This seems to be the main use-case in most of the current functional tests, i.e. in many instances the calls can be shortened.
2022-01-11test: create txs with current `nVersion` (2) by defaultSebastian Falbesoner
This enables testing of BIP68 without the need of explicitly setting nVersion to 2. This is e.g. useful for transactions created with MiniWallet.
2022-01-11test: refactor: add constant for sequence number `SEQUENCE_FINAL`Sebastian Falbesoner
2022-01-11Remove cs_main lock annotation from ChainstateManager.m_blockmanRyan Ofsky
BlockManager is a large data structure, and cs_main is not required to take its address or access every part of it. Individual BlockManager fields and methods which do require cs_main like m_block_index and LookupBlockIndex are already annotated separately, and these other annotations describe locking requirements more accurately and do a better job enforcing thread safety. Since cs_main is not needed to access the address of the m_block object, this commit drops cs_main LOCK calls which were added pointlessly to satisfy this annotation in the past. Co-authored-by: Carl Dong <contact@carldong.me>
2022-01-11Merge bitcoin/bitcoin#23497: Add `src/node/` and `src/wallet/` code to ↵MarcoFalke
`node::` and `wallet::` namespaces e5b6aef61221b621ad77b5f075a16897e08835bf Move CBlockFileInfo::ToString method where class is declared (Russell Yanofsky) f7086fd8ff084ab0dd656d75b7485e59263bdfd8 Add src/wallet/* code to wallet:: namespace (Russell Yanofsky) 90fc8b089d591cabff60ee829a33f96c37fd27ba Add src/node/* code to node:: namespace (Russell Yanofsky) Pull request description: There are no code changes, this is just adding `namespace` and `using` declarations and `node::` or `wallet::` qualifiers in some places. Motivations for this change are: - To make it easier to see when node and wallet code is being accessed places where it shouldn't be. For example if GUI code is accessing node and wallet internals or if wallet and node code are referencing each other. - To make source code organization clearer ([#15732](https://github.com/bitcoin/bitcoin/issues/15732)), being able to know that `wallet::` code is in `src/wallet/`, `node::` code is in `src/node/`, `init::` code is in `src/init/`, `util::` code is in `src/util/`, etc. Reviewing with `git log -p -n1 -U0 --word-diff-regex=.` can be helpful to verify this is only updating declarations, not changing code. ACKs for top commit: achow101: ACK e5b6aef61221b621ad77b5f075a16897e08835bf MarcoFalke: Concept ACK e5b6aef61221b621ad77b5f075a16897e08835bf 🍨 Tree-SHA512: 3797745c90246794e2d55a2ee6e8b0ad5c811e4e03a242d3fdfeb68032f8787f0d48ed4097f6b7730f540220c0af99ef423cd9dbe7f76b2ec12e769a757a2c8d
2022-01-11Merge bitcoin/bitcoin#24026: Block unsafe std::string fs::path conversion ↵fanquake
copy_file calls 3a45dc36a663ea67f13e7d5c413518b9385ec594 Change type of `backup_file` parameter in RestoreWallet/restoreWallet (Hennadii Stepanov) 213172c7348091794b173c2edf5f7f3bbe010912 refactor: Block unsafe std::string fs::path conversion copy_file calls (Hennadii Stepanov) Pull request description: This PR is an optional prerequisite for bitcoin/bitcoin#20744 "Use std::filesystem. Remove Boost Filesystem & System" which: - makes further code changes safer - prevents [some](https://cirrus-ci.com/task/6525835388649472) test failures on native Windows ACKs for top commit: ryanofsky: Code review ACK 3a45dc36a663ea67f13e7d5c413518b9385ec594. Looks great! Thanks for debugging and fixing this and making #20744 smaller! Tree-SHA512: c6dfaef6b45b9c268bc9ee9b943b9d679152c9d565ca4f86da8d33f8eb9b3cdbe9ba6df7b7578eacc0d00db6551048beff97419f86eb4b1d3182c43e2b4eb9a5
2022-01-11Change type of `backup_file` parameter in RestoreWallet/restoreWalletHennadii Stepanov
`fs::path` looks more native than `std::string` for a parameter which represents a backup file. This change eliminates back-and-forth type conversions.
2022-01-10refactor: Block unsafe std::string fs::path conversion copy_file callsHennadii Stepanov
There is no change in behavior. This just helps prepare for the transition from boost::filesystem to std::filesystem by avoiding copy_file calls that will be unsafe after the transition to std::filesystem to due lack of a boost::filesystem::path::imbue equivalent and inability to set a predictable locale.
2022-01-10Merge bitcoin/bitcoin#23884: doc: Remove outdated scriptChange TODO commentAndrew Chow
fa8e01a5b8c67fcb8acaaf58a17ed24710415b6c doc: Remove outdated scriptChange TODO comment (MarcoFalke) Pull request description: This was added in commit bf798734db4539a39edd6badf54a1c3aecf193e5 (raw multisig). Raw multisig isn't a thing, so remove the TODO. ACKs for top commit: S3RK: ACK fa8e01a5b8c67fcb8acaaf58a17ed24710415b6c achow101: ACK fa8e01a5b8c67fcb8acaaf58a17ed24710415b6c Tree-SHA512: 01d521ca3605ab130c43531da4922ea85461ca5e7436267a34fb5df348009e086b3c66d85532c62255d9a0ba43db56424884808e773d0ef0177035dfb25d6a6c
2022-01-10Merge bitcoin/bitcoin#23994: Consolidate all uses of the fast range mapping ↵MarcoFalke
technique in util/fastrange.h efab28b06bfaa50c41337e84136cb58437e7ba00 Add FastRange32 function and use it throughout the codebase (Pieter Wuille) 96ecd6fa3e0f53c3a25eb7c328220b819f8dde03 scripted-diff: rename MapIntoRange to FastRange64 (Pieter Wuille) c6d15c45d971fb25551b7a66a2615e3f0bee999b [moveonly] Move MapIntoRange() to separate util/fastrange.h (Pieter Wuille) Pull request description: Several places in the codebase use the fast range mapping technique described in https://lemire.me/blog/2016/06/27/a-fast-alternative-to-the-modulo-reduction/, some for 32-bit ranges, some for 64-bit ones. Move all of these to `util/fastrange.h`, and give them a consistent name. ACKs for top commit: Sjors: ACK efab28b06bfaa50c41337e84136cb58437e7ba00 shaavan: reACK efab28b06bfaa50c41337e84136cb58437e7ba00 MarcoFalke: review ACK efab28b06bfaa50c41337e84136cb58437e7ba00 🍸 Tree-SHA512: 3190a25ef21d17f0ab2afcd9b8d5a1813fdfac0d93996878017e84ff62eee412c823d6149ae8e92cfc3214458641e83ace4b022b4a0fe0679f78dbaee21c6227
2022-01-10Merge bitcoin/bitcoin#23724: build: add systemtap's sys/sdt.h as depends for ↵fanquake
GUIX builds with USDT tracepoints 6200fbf54fa919899d99f1cdd5ef88ec8b074cd6 build: rename --enable-ebpf to --enable-usdt (0xb10c) e158a2a7aa501da635cb34414abd0c092216e5f4 build: add systemtap's sys/sdt.h as depends (0xb10c) Pull request description: There has been light conceptual agreement on including the Userspace, Statically Defined Tracing tracepoints in Bitcoin Core release builds. This, for example, enables user to hook into production deployments, if they need to. Binaries don't have to be switched out. This is possible because we don't do [expensive computations](https://github.com/bitcoin/bitcoin/blob/master/doc/tracing.md#no-expensive-computations-for-tracepoints) only needed for the tracepoints. The tracepoints are NOPs when not used. Systemtap's `sys/sdt.h` header is required to build Bitcoin Core with USDT support. The header file defines the `DTRACE_PROBE` macros used in [`src/util/trace.h`](https://github.com/bitcoin/bitcoin/blob/master/src/util/trace.h). This PR adds Systemtap 4.5 (May 2021) as dependency. GUIX builds for Linux hosts now include the tracepoints. Closes https://github.com/bitcoin/bitcoin/issues/23297. ACKs for top commit: fanquake: ACK 6200fbf54fa919899d99f1cdd5ef88ec8b074cd6 - tested enabling / disabling and with/without SDT from depends. We can follow up with #23819, #23907 and #23296, and if any serious issues arise before feature freeze, it is easy for us to flip depends such that USDT becomes opt-in, rather than opt-out, and thus, releases would be tracepoint free. Tree-SHA512: 0263f44892bf8450e8a593e4de7a498243687f8d81269e1c3283fa8354922c7cf93fddef4b92cf5192d33798424aa5812e03e68ef8de31af078a32dd34021382
2022-01-09refactor, qt: Add SHUTDOWN_POLLING_DELAY constantHennadii Stepanov
A named constant is better for the code readability. Also it could be reused in an alternative GUI implementation (e.g., QML-based).
2022-01-09refactor, qt: Use std::chrono for non-zero arguments in QTimer methodsHennadii Stepanov
2022-01-09refactor, qt: Use std::chrono in ConfirmMessage parameterHennadii Stepanov
2022-01-09refactor, qt: Use std::chrono for MODEL_UPDATE_DELAY constantHennadii Stepanov
2022-01-09Merge bitcoin-core/gui#441: Add Create Unsigned button to SendConfirmationDialogHennadii Stepanov
742918c8ef353993a07c060f476a160e8272a9ef qt: hide Create Unsigned button behind an expert mode option (Andrew Chow) 5c3b800acd3ceb75ff6bbac8d0e2e1aaa95b0728 qt: Add Create Unsigned button to SendConfirmationDialog (Andrew Chow) Pull request description: Instead of having different buttons or changing button behavior for making a PSBT, just have SendConfirmationDialog return whether the user wants a PSBT or a broadcasted transaction. Since this dialog is used by both the bumpFeeAction and the SendCoinsDialog, changes to both to support the different behavior is needed. They will check the return value of the SendConfirmationDialog for whether a PSBT needs to be created instead of checking whether private keys are disabled. Strings used in this dialog are being slightly modified to work with both private keys enabled and disabled wallets. Moved from https://github.com/bitcoin/bitcoin/pull/18789 ACKs for top commit: jarolrod: ACK 742918c ryanofsky: Code review ACK 742918c8ef353993a07c060f476a160e8272a9ef. Just suggested changes since last review. Looks great! hebasto: ACK 742918c8ef353993a07c060f476a160e8272a9ef, tested on Linux Mint 20.2 (Qt 5.12.8). Tree-SHA512: dd29f4364c7b4f15befe8fe63257b26187918786b005e0f8336183270b1a162680b93f6ced60f0285c6e607c084cc0d24950fc68a8f9c056521ede614041be66
2022-01-08Merge bitcoin/bitcoin#24002: refactor: add thread safety lock assertion to ↵MarcoFalke
WriteBlockIndexDB() 1823766fc69a3d57767af11f182826533465f621 refactor: add thread safety lock assertion to WriteBlockIndexDB() (Jon Atack) Pull request description: New helper function `BlockManager::WriteBlockIndexDB()` added in #23974 has a thread safety lock annotation in its declaration but is missing the corresponding run-time lock assertion in its definition. Per doc/developer-notes.md: "Combine annotations in function declarations with run-time asserts in function definitions." ACKs for top commit: MarcoFalke: cr ACK 1823766fc69a3d57767af11f182826533465f621 Tree-SHA512: b915e6b105c38b8bbe04ad810aefa68e940a13b8dd265e79563a2aaefc93ffa031d56a7f3c481a5ada90de7c2ddd3b419dcfa46c22fa26c22f95eda15cd243bc
2022-01-07Merge bitcoin/bitcoin#22093: build: Try posix-specific CXX first for mingw32 ↵laanwj
host 2fda0c785188ae94fba921c1b8f6f2c005faf1d4 doc: Drop no longer required notes for Windows builds (Hennadii Stepanov) f09ed92be132ebcb91b459c87d640a14b4b54336 build: Try posix-specific CXX first for mingw32 host (Hennadii Stepanov) Pull request description: On master (1186910b6b7ba7c7e5193c76f33f25825e6cc0b7), when cross-compiling for Windows using our depends build system, we must manually choose the POSIX thread model for the `x86_64-w64-mingw32-g++` compiler. This PR improves the build system to make this choice automa**g**ically. ACKs for top commit: jarolrod: re-ACK 2fda0c785188ae94fba921c1b8f6f2c005faf1d4 shaavan: tACK 2fda0c785188ae94fba921c1b8f6f2c005faf1d4 Tree-SHA512: ad3bbdfe84b3c8eb56e102aa0abdc76fd864b2724ac59c9a12a798c57d1c5a1172682172588019d5d1715801a9f201fd9424effbd858e8dc30607c23c0d5941f
2022-01-07Add FastRange32 function and use it throughout the codebasePieter Wuille
2022-01-07refactor: add thread safety lock assertion to WriteBlockIndexDB()Jon Atack
The new helper function, BlockManager::WriteBlockIndexDB(), has a thread safety lock annotation in its declaration but is missing the corresponding run-time lock assertion in its definition. Per doc/developer-notes.md: "Combine annotations in function declarations with run-time asserts in function definitions."
2022-01-07Merge bitcoin/bitcoin#23778: release: Guix 1.4.0 & GCC 10.3fanquake
84f9931cb44932751415f2ca48501ba01eed39a6 guix: use upstream python-requests (2.26.0) (fanquake) 187dc1ec0c867ffcf44f607bbb928909d86a81ca build: use python-asn1crypto from upstream (fanquake) b1e8f0b96edf87b0ee68e85ea50c62e459ed8cb8 guix: use uptream nsis-x86_64 (fanquake) 3ccfba1c7f0515997b502103c515f9856d21c3c4 guix: use GCC 10 (over GCC 8) to build releases (fanquake) Pull request description: Guix's `core-updates-frozen` branch has been merged back into `master`, and a [`version-1.4.0`](https://git.savannah.gnu.org/cgit/guix.git/log/?h=version-1.4.0) branch has been created. This is great, as it means the next Guix release is on the horizon, and it contains a number of changes I'd like to take advantage of. In particular, is migrating the version of GCC we use for releases from GCC 8 to GCC 10.3.0 (which is also the new Guix default GCC). This is my preferred method of unblocking progress in #20744, which is currently stalled due to support for `std::filesystem` for Windows not arriving in GCC until version 9, whereas it's usable on Linux starting with GCC 8. The current set of changes in that PR [attempt to backport support](https://github.com/bitcoin/bitcoin/pull/20744/commits/9604eda1abe6ffc02c97e3434c3c2c4ce1250794) for `std::filesystem`, for Windows, to GCC 8, similar to what is currently done by Debian, however that is somewhat convoluted, and using GCC 10 with our current Guix version would require updating at least one Guix patch to GCC, so is not completely straightforward either. Other changes included here: * Dropping our `--no-*` patch for mingw binutils ld, as we can take advantage of the `--disable-*` flags that are now available in binutlils 2.37. The security check tests are updated accordingly. * Dropping our current patch for NSIS, as it's been integrated upstream, however given we are building v3.05, we need a different one (https://github.com/kichik/nsis/commit/229b6136c41ba5caba25936f4927476d20aa283f) for compiling against GCC 10. * Removing our `python-asn1crypto` package definition, as an identical package is available in Guix. Over time we should look at trying to get the rest of the python packages we define here upstreamed. * Adding a patch for `python-elfsteem` to fix an issue in the example code when using Python 3.9+. * Our base glibc (`2.24`) now inherits from glibc-2.31. Guix has removed packages of glibc < 2.29, and the current version of glibc is `2.33`. However glibc-2.31 is the newest version that still contains a workaround for installing sunrpc data, which we need, so inheriting from that version seemed like the most straightforward solution. * As mentioned, Guix has removed glibcs < 2.29, so we add our own package definition for glibc 2.27, which we use for our RISC-V toolchain (also inheriting from 2.31). The guix commit hash currently points to the head of the `version-1.4.0` branch. This can be updated to an official release tag when one is available. Looking for Concept ACKs on migrating to using GCC 10.3 for building releases. Keeping in mind issues like #20005, however that particular bug should be fixed in GCC 10.3.0+, according to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95189. Guix Builds: ```bash bash-5.1# find guix-build-$(git rev-parse --short=12 HEAD)/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum ea56ef38bd94dbcb11b9d10e2f10c205109daad03fea4313f79892fc497ba68d guix-build-84f9931cb449/output/aarch64-linux-gnu/SHA256SUMS.part 01123ab23e5a09dc06a897837389e859d302ba2b18fbe827936ec8983765e7df guix-build-84f9931cb449/output/aarch64-linux-gnu/bitcoin-84f9931cb449-aarch64-linux-gnu-debug.tar.gz 7a24e25c2237e5aeb14508b91c5c6954572814e1767e892c164494f32d73b0c0 guix-build-84f9931cb449/output/aarch64-linux-gnu/bitcoin-84f9931cb449-aarch64-linux-gnu.tar.gz 0e1dba0233da1f487222b128964980d50393e61a6971bcf4c71951c29fdf3993 guix-build-84f9931cb449/output/arm-linux-gnueabihf/SHA256SUMS.part 8cd4c6f42abc81427f1d2500f86daced2a4ee78882dd9d03b5a0211a1d96306e guix-build-84f9931cb449/output/arm-linux-gnueabihf/bitcoin-84f9931cb449-arm-linux-gnueabihf-debug.tar.gz c180db6bffb1a54b6dc65929d86d5eba9adf876a28ad320590ed230233e57299 guix-build-84f9931cb449/output/arm-linux-gnueabihf/bitcoin-84f9931cb449-arm-linux-gnueabihf.tar.gz 4efcda7b63646eb46dabea7122fb026f2c063d2919a9dcbbffbc0929b9c56ced guix-build-84f9931cb449/output/dist-archive/bitcoin-84f9931cb449.tar.gz 1e35e96034fed00674f362d6471fb402dd2758cec2860ded4fd7e37c38935a44 guix-build-84f9931cb449/output/powerpc64-linux-gnu/SHA256SUMS.part 96a0b7f54d3b3935c134f8c2aaaf11a314b54c9d7924ba751503caa16bd1c840 guix-build-84f9931cb449/output/powerpc64-linux-gnu/bitcoin-84f9931cb449-powerpc64-linux-gnu-debug.tar.gz ae05137b6fb3494120f5413bf8a94ca3c1b0c047e1f512e6c2c5a0b1f122f075 guix-build-84f9931cb449/output/powerpc64-linux-gnu/bitcoin-84f9931cb449-powerpc64-linux-gnu.tar.gz c22e5fbcdcdbfa5d385537e2c1dab55004d9e94396ebccef0bc3d216edfacbbe guix-build-84f9931cb449/output/powerpc64le-linux-gnu/SHA256SUMS.part 52602b41e81a921435d93f2a3ae29549aa65a4147cdbf1ed7d9e4a44c4dc902a guix-build-84f9931cb449/output/powerpc64le-linux-gnu/bitcoin-84f9931cb449-powerpc64le-linux-gnu-debug.tar.gz a2cc7e9385452163a7bda99f6f9aa630fd35d4ba13d4fd9a4dd7e8062206650d guix-build-84f9931cb449/output/powerpc64le-linux-gnu/bitcoin-84f9931cb449-powerpc64le-linux-gnu.tar.gz e75fadf1b1c7e4ae3d52e7a8051a881de17bd4d9d32c1ca29ca0ddbb8028ee51 guix-build-84f9931cb449/output/riscv64-linux-gnu/SHA256SUMS.part 3b643c33842a15befb5d36d13b598a5e628c11b95671336c8dea51b5eed9c79a guix-build-84f9931cb449/output/riscv64-linux-gnu/bitcoin-84f9931cb449-riscv64-linux-gnu-debug.tar.gz e9a1ee7451502508cde73dc300aca8a421e379ac08c3f4adaf8c768fbfa942ac guix-build-84f9931cb449/output/riscv64-linux-gnu/bitcoin-84f9931cb449-riscv64-linux-gnu.tar.gz c0508a0872cf1415a47983d2ebbc9e5a46282ce7b6453afac544e0d1315b7bf9 guix-build-84f9931cb449/output/x86_64-apple-darwin/SHA256SUMS.part 7c02267cb91e2649088af5e96f81142beaad67f6a1a0588355174a4157b31458 guix-build-84f9931cb449/output/x86_64-apple-darwin/bitcoin-84f9931cb449-osx-unsigned.dmg 46dbf5a911abfa63e3c5aa8440289da5fdea89da013253c08768ce58b798a99d guix-build-84f9931cb449/output/x86_64-apple-darwin/bitcoin-84f9931cb449-osx-unsigned.tar.gz ab2e2360f18cb1b80bfd37f1a9508a938e89237767120472f932402cc809f0eb guix-build-84f9931cb449/output/x86_64-apple-darwin/bitcoin-84f9931cb449-osx64.tar.gz f58aa000692f7ea09ab8e7ec159a806d3a665f0f70558e62a53d56afb361eb02 guix-build-84f9931cb449/output/x86_64-linux-gnu/SHA256SUMS.part 78a76aef8469b07a41588e019a6dfa890c36fd5becf2c8d73a71c9e72bcabde6 guix-build-84f9931cb449/output/x86_64-linux-gnu/bitcoin-84f9931cb449-x86_64-linux-gnu-debug.tar.gz 5e6e0040b37ff035de41c8fcfee5d498bd19fa489024704dd4caa0ab9f566450 guix-build-84f9931cb449/output/x86_64-linux-gnu/bitcoin-84f9931cb449-x86_64-linux-gnu.tar.gz d6e6af70f277d9c9ef9b4773ec05920355ac07ebec71ff3e179676047329964b guix-build-84f9931cb449/output/x86_64-w64-mingw32/SHA256SUMS.part 37f24f6899e7803ed07bd0f5eb3f0fb6237ac1254dd72f446e9e4e488a927c8e guix-build-84f9931cb449/output/x86_64-w64-mingw32/bitcoin-84f9931cb449-win-unsigned.tar.gz 14f7d1c14a5fc3b4c336d301f936c5578d6e31d61ec720dfc9d4129445d1e2a2 guix-build-84f9931cb449/output/x86_64-w64-mingw32/bitcoin-84f9931cb449-win64-debug.zip c8049dcc0308a76f21dd781e8561ebbafa84034fbf8e3afa7d4017866d7fd195 guix-build-84f9931cb449/output/x86_64-w64-mingw32/bitcoin-84f9931cb449-win64-setup-unsigned.exe fb1e6580c25b073118f121aabaa04aa09643bc97cfeaea7c9a24bbe65c33cbb6 guix-build-84f9931cb449/output/x86_64-w64-mingw32/bitcoin-84f9931cb449-win64.zip ``` ACKs for top commit: hebasto: re-ACK 84f9931cb44932751415f2ca48501ba01eed39a6 Tree-SHA512: 2f5f4f6bb1f55a048dba88523f235320e51c4af963355abf6a86b7035623b2100ae3dc44396c76fbeea89ae9cfbc5342abd3e2c41760ede8b689d7757d6e7f25
2022-01-06Move CBlockFileInfo::ToString method where class is declaredRussell Yanofsky
CBlockFileInfo class is declared in src/chain.h, so move ToString definition to src/chain.cpp instead of src/node/blockstorage.cpp
2022-01-07Merge bitcoin/bitcoin#23974: Make blockstorage globals private members of ↵fanquake
BlockManager fa68a6c2fc6754c160e0f98007785602201b3c47 scripted-diff: Rename touched member variables (MarcoFalke) facd3df21f344dd84e5f28862056700c1fded17c Make blockstorage globals private members of BlockManager (MarcoFalke) faa8c2d7d75f8d9782709e73e00e35851e233392 doc: Clarify nPruneAfterHeight for signet (MarcoFalke) fad381b2f8e1beb18f748fbeb820e63545b9b0fd test: Load genesis block to allow flush (MarcoFalke) fab262174b96854d2df5bee7da578990c9e9cb1e Move blockstorage-related unload to BlockManager::Unload (MarcoFalke) fa467f3913918701c765f9bc754203b4591b894f move-only: Create WriteBlockIndexDB helper (MarcoFalke) fa88cfd3f9896d5b56ea6c111a23f90a79253c18 Move functions to BlockManager (MarcoFalke) Pull request description: Globals aren't too nice because they hide dependencies, also they make testing harder. Fix that by removing some. ACKs for top commit: Sjors: ACK fa68a6c2fc6754c160e0f98007785602201b3c47 ryanofsky: Code review ACK fa68a6c2fc6754c160e0f98007785602201b3c47. Nice changes! Tree-SHA512: 6abc5929a5e43a05e238276721d46a64a44f23dca18c2caa9775437a32351d6815d88b88757254686421531d0df13861bbd3a202e13a3192798d87a96abef65d
2022-01-06Add src/wallet/* code to wallet:: namespaceRussell Yanofsky
2022-01-06Add src/node/* code to node:: namespaceRussell Yanofsky
2022-01-07Merge bitcoin/bitcoin#23996: test: set ban after mocking timefanquake
c9374af10227be3e4c9d4fb5fbd1027841361f14 test: set ban after mocking time (brunoerg) Pull request description: Fixes #23988 Set ban after mocking time to avoid intermittent failures related to the assertion of ban_duration and time_remaining. See: https://cirrus-ci.com/task/6754020390862848?logs=ci#L4652 ACKs for top commit: mzumsande: Tested ACK c9374af10227be3e4c9d4fb5fbd1027841361f14 vincenzopalazzo: ACK https://github.com/bitcoin/bitcoin/pull/23996/commits/c9374af10227be3e4c9d4fb5fbd1027841361f14 Tree-SHA512: fac3ac91a045bb46334d7c568f6a53a3b0a45b306914a54ea13bcc845734eaaad1ff295ff3ab158037fd9d08df77344058331336110b8f7888832b16b0589be5
2022-01-06test: set ban after mocking timebrunoerg
2022-01-06scripted-diff: rename MapIntoRange to FastRange64Pieter Wuille
-BEGIN VERIFY SCRIPT- sed -i -e 's/MapIntoRange/FastRange64/' src/blockfilter.cpp src/test/fuzz/golomb_rice.cpp src/util/fastrange.h -END VERIFY SCRIPT-
2022-01-06[moveonly] Move MapIntoRange() to separate util/fastrange.hPieter Wuille
2022-01-06Merge bitcoin/bitcoin#23938: ci: Clone entire bitcoin-core/qa-assets repo ↵MarcoFalke
only when run fuzzing 0b7c55f157514e1845934fff3f9c66e862c526ca ci: Clone entire bitcoin-core/qa-assets repo only when run fuzzing (Hennadii Stepanov) Pull request description: This PR speeds up CI tasks that run unit tests but do not run fuzzing. On my machine: ``` $ time git clone --depth=1 https://github.com/bitcoin-core/qa-assets Cloning into 'qa-assets'... remote: Enumerating objects: 289750, done. remote: Counting objects: 100% (289750/289750), done. remote: Compressing objects: 100% (207687/207687), done. remote: Total 289750 (delta 16863), reused 275449 (delta 12092), pack-reused 0 Receiving objects: 100% (289750/289750), 1.39 GiB | 4.79 MiB/s, done. Resolving deltas: 100% (16863/16863), done. Updating files: 100% (294515/294515), done. real7m43,417s user2m39,771s sys0m43,272s ``` ACKs for top commit: MarcoFalke: cr ACK 0b7c55f157514e1845934fff3f9c66e862c526ca Tree-SHA512: 8f8dd63e361c3d9c64a2b31f207f59beea7d2e4142363f7762ec724a61152323fda0c6b98a36386e15f2ca4ef3f7412da763baef65e862fc7f48cdeda8c40e09
2022-01-06ci: Clone entire bitcoin-core/qa-assets repo only when run fuzzingHennadii Stepanov
2022-01-06Merge bitcoin/bitcoin#23963: test: run feature_pruning.py without wallet ↵MarcoFalke
compiled 0754e9c01bd3d57aa241e313ba34c18c4897ba98 test: run feature_pruning.py without wallet compiled (Sebastian Falbesoner) Pull request description: Only one small part of the pruning test (sub-test `wallet_test`) is wallet-related, hence we can run all other parts without wallet compiled. ACKs for top commit: MarcoFalke: cr ACK 0754e9c01bd3d57aa241e313ba34c18c4897ba98 Tree-SHA512: 856856903d21d64953ed0102cc2a96f55975c4b7d8e93e57b82c266024967160df64df2b6068be089efc05e883e8d6d12e7327053420d4c640b9d8cc5bcb1c58