aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-04-20Merge bitcoin/bitcoin#26681: contrib: Bugfix for checking bad dns seeds ↵fanquake
without casting in `makeseeds.py` 3cc989da5c750e740705131bed05bbf93bfdf169 Fix checking bad dns seeds without casting (Yusuf Sahin HAMZA) Pull request description: - Since seed lines comes with `str` type, comparing `good` column directly with **0** (`int` type) in the if statement was not working at all. This is fixed by casting `int` type to the values in the `good` column of seeds text file. - Lines that starts with comment in the seeds text file are now ignored. - If statement for checking bad seeds are moved to the top of the `parseline` function as if a seed is bad; there is no point of going forward from there. Since this bug-fix eliminates bad seeds over **550k** in the first place, in my case; particular job for parsing all seeds speed is up by **600%** and whole script's speed is up by **%30**. Note that **stats** in the terminal are not going to include bad seeds after this fix, which would be the same if this bug were never there before. ACKs for top commit: achow101: ACK 3cc989da5c750e740705131bed05bbf93bfdf169 jonatack: ACK 3cc989da5c750e740705131bed05bbf93bfdf169 Tree-SHA512: 13c82681de4d72de07293f0b7f09721ad8514a2ad99b0584d1c94fa5f2818821df2000944f9514d6a222a5dccc82856d16c8c05aa36d905cfa7d4610c629fd38
2023-04-19Merge bitcoin/bitcoin#27448: ci: build libc++ in DEBUG mode in MSAN jobsfanquake
4de9c2a65f6770405f167c7392cd8371111bc4e8 ci: build libc++ with assertions in MSAN jobs (fanquake) 23b8b2026a8078f41b1afd84214c06b5e2cc95e8 ci: build libc++ in DEBUG mode in MSAN jobs (fanquake) Pull request description: Followup to #27447. See https://releases.llvm.org/16.0.0/projects/libcxx/docs/DesignDocs/DebugMode.html: > Libc++ provides a debug mode that enables special debugging checks meant to detect incorrect usage of the standard library. These checks are disabled by default, but they can be enabled by vendors when building the library by using LIBCXX_ENABLE_DEBUG_MODE. ACKs for top commit: MarcoFalke: lgtm ACK 4de9c2a65f6770405f167c7392cd8371111bc4e8 Tree-SHA512: 788c7f031ccf7a6ac96a87758e57f604cf4d9db0144f0ecc4931823111d2396e64ab260825d74f06b2770d0ac3e4e2c21c46f4def046cf3e1a44d705921ab6d2
2023-04-19ci: build libc++ with assertions in MSAN jobsfanquake
2023-04-19ci: build libc++ in DEBUG mode in MSAN jobsfanquake
2023-04-19Merge bitcoin/bitcoin#27447: depends: Remove `_LIBCPP_DEBUG` from depends ↵fanquake
DEBUG mode bc4fd49d09dec3791b0acd4ada285b2287361d14 depends: add _LIBCPP_ENABLE_ASSERTIONS to DEBUG mode (fanquake) cf266b2270081f05a277ba683f00de90a741112f depends: Remove _LIBCPP_DEBUG from depends DEBUG mode (fanquake) Pull request description: It was deprecated in LLVM 15, turned into compile-time error in LLVM 16: ```bash In file included from /usr/lib/llvm-16/bin/../include/c++/v1/cassert:19: /usr/lib/llvm-16/bin/../include/c++/v1/__assert:22:5: error: "Defining _LIBCPP_DEBUG is not supported anymore. Please use _LIBCPP_ENABLE_DEBUG_MODE instead." ^ 1 error generated. ``` and has been removed entirely in LLVM 17 (main): https://github.com/llvm/llvm-project/commit/ff573a42cd1f1d05508f165dc3e645a0ec17edb5. [Building libc++ in debug mode](https://releases.llvm.org/16.0.0/projects/libcxx/docs/DesignDocs/DebugMode.html), will also automatically set `_LIBCPP_ENABLE_DEBUG_MODE` (the new define), so adding it to depends doesn't seem useful, and would just result in redefinition errors. I'm wondering if as a followup, we could enable a DEBUG build of libc++ in our MSAN CI job? i.e https://github.com/fanquake/bitcoin/tree/msan_with_enable_debug_mode. Somewhat related to https://github.com/google/oss-fuzz/pull/9828, where it looks like we'll have to sort out getting a DEBUG build of LLVM, and can drop the commentary about re-enabling DEBUG=1. ACKs for top commit: MarcoFalke: lgtm Approach ACK bc4fd49d09dec3791b0acd4ada285b2287361d14 Tree-SHA512: 9c0f48fc428278fbf34fbb8f81e761e232506d7ab28e971cb9a9b9a81d549b4d8bbe51e2f7608d56e489428679231da5b7431443849b238a8a993ad241740282
2023-04-18Merge bitcoin/bitcoin#27484: doc: remove outdated version number usage from ↵Andrew Chow
release-process fde224a6610699a6a28cc27e299ac14cbf7e16ca doc: remove outdated version number usage from release-process (fanquake) Pull request description: We no-longer use the leading `0.` version number, and having a mixture is both in the release-process examples is needlessly confusing. ACKs for top commit: achow101: ACK fde224a6610699a6a28cc27e299ac14cbf7e16ca stickies-v: ACK fde224a6610699a6a28cc27e299ac14cbf7e16ca Tree-SHA512: c6693b01741921f6870244243640fe857e024bb8581ce57b2d870abf20d257309b97af61fe464427e31a60cda78cf23c1012c6b6a2246250f3670c4b813417d9
2023-04-18doc: remove outdated version number usage from release-processfanquake
We no-longer use the leading 0. version number, and having a mixture is both in the release-process examples is needlessly confusing.
2023-04-18depends: add _LIBCPP_ENABLE_ASSERTIONS to DEBUG modefanquake
See https://releases.llvm.org/16.0.0/projects/libcxx/docs/UsingLibcxx.html#assertions-mode for more info.
2023-04-18depends: Remove _LIBCPP_DEBUG from depends DEBUG modefanquake
It was deprecated in LLVM 15, turned into a compile-time error in LLVM 16: ```bash In file included from /usr/lib/llvm-16/bin/../include/c++/v1/cassert:19: /usr/lib/llvm-16/bin/../include/c++/v1/__assert:22:5: error: "Defining _LIBCPP_DEBUG is not supported anymore. Please use _LIBCPP_ENABLE_DEBUG_MODE instead." ^ 1 error generated. ``` and has been removed entirely in LLVM 17 (main), https://github.com/llvm/llvm-project/commit/ff573a42cd1f1d05508f165dc3e645a0ec17edb5. Building libc++ in debug mode, will also automatically set `_LIBCPP_ENABLE_DEBUG_MODE` (the new define), so adding it to depends doesn't seem useful, and would just result in redefinition errors. I'm wondering if as a followup, we could enable a DEBUG build of libc++ in our MSAN CI job? Somewhat related to https://github.com/google/oss-fuzz/pull/9828, where it looks like we'll have to sort out getting a DEBUG build of LLVM.
2023-04-18Merge bitcoin/bitcoin#27340: ci: Use Cirrus CI dockerfile envfanquake
fa4a46de0b3c1a5895e95dba7e95278932fbfc2c ci: Bump nowallet_libbitcoinkernel task to ubuntu:focal (MarcoFalke) fabc7d90a90d46af181bc08def43d861062f6dfa ci: Use credits in more tasks (MarcoFalke) facae3b149d7dfe84ef46c69c1d6fb586c08848d ci: Use Cirrus CI dockerfile env (MarcoFalke) Pull request description: Currently the CI env has many intermittent issues: * The Ubuntu package servers are frequently down * Occasionally other stuff is down, such as dnf, pip, or the android sdk * Installing packages is slower than downloading them, at least on Cirrus, which has a fast download speed Fix all issues by using the Cirrus CI dockerfile env. ACKs for top commit: josibake: code review ACK https://github.com/bitcoin/bitcoin/pull/27340/commits/fa4a46de0b3c1a5895e95dba7e95278932fbfc2c Tree-SHA512: fea5663f7b6dc1c4ea9f87188026ec542b9269bac8ee3398cd58d4df6c86a0af9d275f1876e03f92fb1f6166ec49b817d9e588e6fe1ed54b77592502c2eccd9d
2023-04-18Merge bitcoin/bitcoin#27477: test: add regression tests for #27468 (invalid ↵fanquake
URI segfaults) 6a77d290da589bd5620585def5bfc019e242e189 test: add regression tests for #27468 (invalid URI segfaults) (Sebastian Falbesoner) Pull request description: Prior to PR #27468 (commit 11422cc5720c8d73a87600de8fe8abb156db80dc) all call-sites of `GetQueryParameter(...)` in the REST module could trigger a crash. Add missing test cases for all possible code-paths as a regression test, as a foundation for possible follow-up fixes (which aim to resolve this issue in a more general and robust way). ACKs for top commit: stickies-v: ACK 6a77d290da589bd5620585def5bfc019e242e189 vasild: ACK 6a77d290da589bd5620585def5bfc019e242e189 Tree-SHA512: b5dd22d7d448f92236575ea950287259795a957a3f8e364682510c7c1ede5f9d67e7daccc5146c8d0817bcb71742d49273801574bd2bb96e44a9ae5a006ac2a7
2023-04-17test: add regression tests for #27468 (invalid URI segfaults)Sebastian Falbesoner
Prior to PR #27468 (commit 11422cc5720c8d73a87600de8fe8abb156db80dc) all call-sites of `GetQueryParameter(...)` in the REST module could trigger a crash. Add missing test cases for all possible code-paths as a regression test, as a foundation for possible follow-up fixes (which aim to resolve this issue in a more general and robust way).
2023-04-17Merge bitcoin/bitcoin#27471: test: fix bumpfee 'spend_one_input' occasional ↵fanquake
failure e07dd5fff9eb64d7615ab515b351e296c00b1861 test: fix bumpfee 'spend_one_input' occasional failure (furszy) Pull request description: CI test failure, in master: https://cirrus-ci.com/task/5975232842825728. In #27469 https://cirrus-ci.com/task/6452468402356224 Most of the subtests in `wallet_bumpfee.py` expect to find spendable UTXOs of 0.001 btc in the rbf wallet. They use the `spend_one_input()` method which fails if none of them exist. The sporadic failure comes from the recently added `test_feerate_checks_replaced_outputs` subtest that can spend all them. Leaving the next subtests with no 0.001 UTXOs to spend. To solve it, this PR moves the recently added case into a "context independent subtests" section. Which is placed at the end to not affect other cases. ACKs for top commit: achow101: ACK e07dd5fff9eb64d7615ab515b351e296c00b1861 pablomartin4btc: ACK https://github.com/bitcoin/bitcoin/commit/e07dd5fff9eb64d7615ab515b351e296c00b1861. Tree-SHA512: c150ed6fcfbb6f1502eaf6370a57aae0da991c0fc48e8bb3d446805f4336abba5d80ff0de26094914da95432dd0255030fe527001af4510dfdcefbc7230f14d6
2023-04-17Merge bitcoin/bitcoin#27462: depends: fix compiling bdb with clang-16 on aarch64fanquake
f8b8458276983f8fc1e2a47c4d00c1e30633067d depends: fix compiling bdb with clang-16 on aarch64 (fanquake) Pull request description: Compiling bdb with clang-16 on aarch64 (hardware) currently fails: ```bash make -C depends/ bdb CC=clang CXX=clang++ ... checking for mutexes... UNIX/fcntl configure: WARNING: NO SHARED LATCH IMPLEMENTATION FOUND FOR THIS PLATFORM. configure: error: Unable to find a mutex implementation ``` Looking at config.log we've got: ```bash configure:18704: checking for mutexes configure:18815: clang -o conftest -pipe -std=c11 -O2 -Wno-error=implicit-function-declaration -Wno-error=format-security -I/bitcoin/depends/aarch64-unknown-linux-gnu/include -D_GNU_SOURCE -D_REENTRANT -L/bitcoin/depends/aarch64-unknown-linux-gnu/lib conftest.c -lpthread >&5 conftest.c:45:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int] main() { ^ int conftest.c:50:2: warning: call to undeclared library function 'exit' with type 'void (int) __attribute__((noreturn))'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] exit ( ^ conftest.c:50:2: note: include the header <stdlib.h> or explicitly provide a declaration for 'exit' 1 warning and 1 error generated. ``` Clang-16 changed `-Wimplicit-function-declaration` and `-Wimplicit-int` warnings into errors, see: https://releases.llvm.org/16.0.0/tools/clang/docs/ReleaseNotes.html#potentially-breaking-changes. > The -Wimplicit-function-declaration and -Wimplicit-int warnings now > default to an error in C99, C11, and C17. As of C2x, support for implicit > function declarations and implicit int has been removed, and the > warning options will have no effect. Specifying -Wimplicit-int in > C89 mode will now issue warnings instead of being a noop. ACKs for top commit: hebasto: ACK f8b8458276983f8fc1e2a47c4d00c1e30633067d, tested on Ubuntu Lunar (`aarch64`) with: Tree-SHA512: 5ca078b1c00915446e9f0f2ecaa4342295a2097996554345753315d1c81c23000c57be14e1ac5506a87820f5114aba748456f2c2b6426b0810504d62d761a787
2023-04-17Merge bitcoin/bitcoin#27473: bugfix: Properly handle "unknown" Address TypeAndrew Chow
0d6383fda04a99726654945a737bbb1369e0e44a Don't return OutputType::UNKNOWN in ParseOutputType (Pttn) Pull request description: Fixes https://github.com/bitcoin/bitcoin/issues/27472 by also handling at the relevant places the case where ParseOutputType returns `OutputType::UNKNOWN`, and not just when it returns `std::nullopt`. ACKs for top commit: achow101: ACK 0d6383fda04a99726654945a737bbb1369e0e44a MarcoFalke: lgtm ACK 0d6383fda04a99726654945a737bbb1369e0e44a furszy: ACK https://github.com/bitcoin/bitcoin/commit/0d6383fda04a99726654945a737bbb1369e0e44a Tree-SHA512: 776793027b926283d3162e69fb9c8883c814b19bcce4574ccdf8e3140a1ec4ebc4aa8ccd1abae7ef3571f942d2e6c35305fd1244259540d90605106e01afc34c
2023-04-17Merge bitcoin/bitcoin#27468: bugfix: rest: avoid segfault for invalid URIfanquake
11422cc5720c8d73a87600de8fe8abb156db80dc bugfix: rest: avoid segfault for invalid URI (pablomartin4btc) Pull request description: Minimal fix to get it promptly into 25.0 release (suggested by [stickies-v](https://github.com/bitcoin/bitcoin/pull/27253#pullrequestreview-1385130381) and supported by [vasild](https://github.com/bitcoin/bitcoin/pull/27253#pullrequestreview-1385842606) ) Please check #27253 for reviewers comments and acks regarding this PR and read the commit comment message body for more details about the fix. ACKs for top commit: achow101: ACK 11422cc5720c8d73a87600de8fe8abb156db80dc stickies-v: re-ACK 11422cc Tree-SHA512: 5af6b53fb266a12b463f960910556d5e97bc88b3c2a4f437ffa343886b38749e1eb058cf7bc64d62e82e1acf6232a186bddacd8f3b4500c87bf9e550a0153386
2023-04-17bugfix: rest: avoid segfault for invalid URIpablomartin4btc
`evhttp_uri_parse` can return a nullptr, for example when the URI contains invalid characters (e.g. "%"). `GetQueryParameterFromUri` passes the output of `evhttp_uri_parse` straight into `evhttp_uri_get_query`, which means that anyone calling a REST endpoint in which query parameters are used (e.g. `rest_headers`) can cause a segfault. This bugfix is designed to be minimal and without additional behaviour change. Follow-up work should be done to resolve this in a more general and robust way, so not every endpoint has to handle it individually.
2023-04-17depends: fix compiling bdb with clang-16 on aarch64fanquake
Compiling bdb with clang-16 on aarch64 (hardware) currently fails: ```bash make -C depends/ bdb CC=clang CXX=clang++ ... checking for mutexes... UNIX/fcntl configure: WARNING: NO SHARED LATCH IMPLEMENTATION FOUND FOR THIS PLATFORM. configure: error: Unable to find a mutex implementation ``` Looking at config.log we've got: ```bash configure:18704: checking for mutexes configure:18815: clang -o conftest -pipe -std=c11 -O2 -Wno-error=implicit-function-declaration -Wno-error=format-security -I/bitcoin/depends/aarch64-unknown-linux-gnu/include -D_GNU_SOURCE -D_REENTRANT -L/bitcoin/depends/aarch64-unknown-linux-gnu/lib conftest.c -lpthread >&5 conftest.c:45:1: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int] main() { ^ int conftest.c:50:2: warning: call to undeclared library function 'exit' with type 'void (int) __attribute__((noreturn))'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] exit ( ^ conftest.c:50:2: note: include the header <stdlib.h> or explicitly provide a declaration for 'exit' 1 warning and 1 error generated. ``` Clang-16 changed `-Wimplicit-function-declaration` and `-Wimplicit-int` warnings into errors, see: https://releases.llvm.org/16.0.0/tools/clang/docs/ReleaseNotes.html#potentially-breaking-changes. > The -Wimplicit-function-declaration and -Wimplicit-int warnings now > default to an error in C99, C11, and C17. As of C2x, support for implicit > function declarations and implicit int has been removed, and the > warning options will have no effect. Specifying -Wimplicit-int in > C89 mode will now issue warnings instead of being a noop.
2023-04-16Don't return OutputType::UNKNOWN in ParseOutputTypePttn
Fixes https://github.com/bitcoin/bitcoin/issues/27472 Signed-off-by: Pttn <28868425+Pttn@users.noreply.github.com>
2023-04-15test: fix bumpfee 'spend_one_input' occasional failurefurszy
Most of the subtests in wallet_bumpfee.py expect to find spendable UTXOs of 0.001 btc in the rbf wallet (they use the 'spend_one_input()' method that tries to spend one of them and if it doesn't find any, it throws an exception). The sporadic failure comes from the recently added 'test_feerate_checks_replaced_outputs' subtest that can spend all them. Leaving the next subtests with no 0.001 UTXOs to spend. To solve it, this PR moves the recently added case into a "context independent subtests" section. Which is placed at the end to not affect other cases.
2023-04-15Merge bitcoin/bitcoin#27465: doc: fix typo in developer-notes.mdfanquake
f24f4fa3f114b1bd5b7e7ff9ebb0ef73bfc81eda Update developer-notes.md (Riahiamirreza) Pull request description: ACKs for top commit: fanquake: ACK f24f4fa3f114b1bd5b7e7ff9ebb0ef73bfc81eda Tree-SHA512: 10301170dff6f2f7b47a229ba99f4a4f4953c361be24996b6dc70343ad118879cd90ebb54d78cd31c852f577fb17f9726582fdd02ed5b6fd7b71566942e8b408
2023-04-15Merge bitcoin/bitcoin#27308: bumpfee: avoid making bumped transactions with ↵fanquake
too low fee when replacing outputs d52fa1b0a5a8eecbe1e296a44b72965717e9235b tests: Make sure that bumpfee feerate checks work when replacing outputs (Andrew Chow) be177c15a40199fac79d8ab96bb4b4d5a9b4fe22 bumpfee: Check the correct feerate when replacing outputs (Andrew Chow) Pull request description: When replacing the outputs of a transaction during `bumpfee`, it is possible to accidentally create a transaction that will not be accepted into the mempool as it does not meet the incremental relay fee requirements. This occurs because the size estimation used for checking the provided feerate does not account for the replaced outputs; it instead uses the original outputs. When the replaced outputs is significantly different from the original, there can be a large difference in estimated transaction sizes that can make a transaction miss the absolute fee requirements for the incremental relay fee. Unfortunately we do not currently inform the user when the bumped transaction fails to relay, so they could use `bumpfee` and think the transaction has been bumped when it actually has not. This issue is resolved by replacing the outputs before doing the size estimation, and also updating the feerate checker to use the actual fee values when calculating the required minimum fee. Also added a test for this scenario. ACKs for top commit: ishaanam: reACK d52fa1b0a5a8eecbe1e296a44b72965717e9235b Xekyo: reACK https://github.com/bitcoin/bitcoin/commit/d52fa1b0a5a8eecbe1e296a44b72965717e9235b Tree-SHA512: d18301b587465322dd3fb1bb86496c3675265a56072047576e2baa5cf907dd3b54778f30721f662f0c235709a5568427c18542eb7efbfb6fdd9f481fe676c66b
2023-04-15Merge bitcoin/bitcoin#27445: Update src/secp256k1 subtree to release v0.3.1fanquake
621c17869d3754559c03e4f2bee73885659e0c68 Respect and update FILES_ARGS in test/lint/lint-python.py (Pieter Wuille) 719a74989be3cfbc4422ec07cac199c295d28d05 Disable Python lint in src/secp256k1 (Pieter Wuille) c981671e9b206de4681a2e0d06996b800fcc985b Squashed 'src/secp256k1/' changes from bdf39000b9..4258c54f4e (Pieter Wuille) Pull request description: There is no strict need for any of the changes in v0.3.1 (compared to the v0.3.0 that's currently subtreed) for Bitcoin Core release builds, but if anyone may compile Bitcoin Core from source using Clang v14+, this will prevent known timing leaks in the signing/keygen logic. This also includes a CI fix from libsecp256k1 master (on top of 0.3.1) which fixes Wycheproof test vector generation. I also had to amend some of the linters to avoid enforcing their rules on the .py files in the secp256k1 subtree. ACKs for top commit: real-or-random: utACK 621c17869d3754559c03e4f2bee73885659e0c68 subtree matches. diff to linter script looks good fanquake: ACK 621c17869d3754559c03e4f2bee73885659e0c68 Tree-SHA512: 059722540a4fd387d9e231036e59685db373c085a346c7a9d2b87eac3ffe538099356b5f06fc2112a1df80e3818d80fe380f27a47901496e8092c836ea3ee14d
2023-04-14Update developer-notes.mdRiahiamirreza
2023-04-14Respect and update FILES_ARGS in test/lint/lint-python.pyPieter Wuille
2023-04-14Disable Python lint in src/secp256k1Pieter Wuille
2023-04-14Update src/secp256k1 to latest upstream master (v0.3.1 + CI fix)Pieter Wuille
2023-04-14Squashed 'src/secp256k1/' changes from bdf39000b9..4258c54f4ePieter Wuille
4258c54f4e Merge bitcoin-core/secp256k1#1276: autotools: Don't regenerate Wycheproof header automatically 06c67dea9f autotools: Don't regenerate Wycheproof header automatically 3bab71cf05 Merge bitcoin-core/secp256k1#1268: release cleanup: bump version after 0.3.1 656c6ea8d8 release cleanup: bump version after 0.3.1 346a053d4c Merge bitcoin-core/secp256k1#1269: changelog: Fix link 6a37b2a5ea changelog: Fix link ec98fcedd5 Merge bitcoin-core/secp256k1#1266: release: Prepare for 0.3.1 898e1c676e release: Prepare for 0.3.1 1d9a13fc26 changelog: Remove inconsistent newlines 0e091669a1 changelog: Catch up in preparation of 0.3.1 7b7503dac5 Merge bitcoin-core/secp256k1#1245: tests: Add Wycheproof ECDSA vectors 145078c418 Merge bitcoin-core/secp256k1#1118: Add x-only ecmult_const version with x specified as n/d e5de454609 tests: Add Wycheproof ECDSA vectors 0f8642079b Add exhaustive tests for ecmult_const_xonly 4485926ace Add x-only ecmult_const version for x=n/d a0f4644f7e Merge bitcoin-core/secp256k1#1252: Make position of * in pointer declarations in include/ consistent 4e682626a3 Merge bitcoin-core/secp256k1#1226: Add CMake instructions to release process 2d51a454fc Merge bitcoin-core/secp256k1#1257: ct: Use volatile "trick" in all fe/scalar cmov implementations 4a496a36fb ct: Use volatile "trick" in all fe/scalar cmov implementations 3d1f430f9f Make position of * in pointer declarations in include/ consistent 2bca0a5cbf Merge bitcoin-core/secp256k1#1241: build: Improve `SECP_TRY_APPEND_DEFAULT_CFLAGS` macro afd8b23b27 Merge bitcoin-core/secp256k1#1244: Suppress `-Wunused-parameter` when building for coverage analysis 1d8f367515 Merge bitcoin-core/secp256k1#1250: No need to subtract 1 before doing a right shift 3e43041be6 No need to subtract 1 before doing a right shift 3addb4c1e8 build: Improve `SECP_TRY_APPEND_DEFAULT_CFLAGS` macro 0c07c82834 Add CMake instructions to release process 464a9115b4 Merge bitcoin-core/secp256k1#1242: Set ARM ASM symbol visibility to `hidden` f16a709fd6 Merge bitcoin-core/secp256k1#1247: Apply Checks only in VERIFY mode. 70be3cade5 Merge bitcoin-core/secp256k1#1246: Typo 4ebd82852d Apply Checks only in VERIFY mode. d1e7ca192d Typo 5bb03c2911 Replace `SECP256K1_ECMULT_TABLE_VERIFY` macro by a function 9c8c4f443c Merge bitcoin-core/secp256k1#1238: build: bump CMake minimum requirement to 3.13 0cf2fb91ef Merge bitcoin-core/secp256k1#1243: build: Ensure no optimization when building for coverage analysis fd2a408647 Set ARM ASM symbol visibility to `hidden` 4429a8c218 Suppress `-Wunused-parameter` when building for coverage analysis 8e79c7ed11 build: Ensure no optimization when building for coverage analysis 96dd062511 build: bump CMake minimum requirement to 3.13 427bc3cdcf Merge bitcoin-core/secp256k1#1236: Update comment for secp256k1_modinv32_inv256 647f0a5cb1 Update comment for secp256k1_modinv32_inv256 5658209459 Merge bitcoin-core/secp256k1#1228: release cleanup: bump version after 0.3.0 28e63f7ea7 release cleanup: bump version after 0.3.0 git-subtree-dir: src/secp256k1 git-subtree-split: 4258c54f4ebfc09390168e8a43306c46b315134b
2023-04-14Merge bitcoin/bitcoin#27461: verify-commits: error and exit cleanly when git ↵Andrew Chow
is too old. 1fefcf27edcac7ebb87c1d3c68bcd9870e3ae78a verify-commits: error and exit cleanly when git is too old. (Cory Fields) Pull request description: Requested by fanquake. Rather than failing with a cryptic error with older git, fail gracefully and mention why. The new option semantics [are explained here](https://github.com/git/git/commit/1f0c3a29da3515d88537902cd267cc726020eea5). Note: my local git versions are currently too old to test the new functionality, so I've only verified the failure case. ACKs for top commit: josibake: ACK https://github.com/bitcoin/bitcoin/pull/27461/commits/1fefcf27edcac7ebb87c1d3c68bcd9870e3ae78a achow101: ACK 1fefcf27edcac7ebb87c1d3c68bcd9870e3ae78a Tree-SHA512: f3dc583edf6ff6ff9bf06f33de967e10b8423ce62e7370912ffdca8a4ca4bfe4c2e783e9ad76281ce9e6748a4643d187aa5cb4a6b9ec4c1582910f02b94b6e3c
2023-04-13Merge bitcoin/bitcoin#27374: p2p: skip netgroup diversity of new connections ↵Andrew Chow
for tor/i2p/cjdns b5585ba5f97a19d1b435d9ab69b5a55cfd45dd70 p2p: skip netgroup diversity of new connections for tor/i2p/cjdns networks (stratospher) Pull request description: Follow up for #27264. In order to make sure that our persistent outbound slots belong to different netgroups, distinct net groups of our peers are added to `setConnected`. We’d only open a persistent outbound connection to peers which have a different netgroup compared to those netgroups present in `setConnected`. Current `GetGroup()` logic assumes route-based diversification behaviour for tor/i2p/cjdns addresses (addresses are public key based and not route-based). Distinct netgroups possible (according to the current `GetGroup()` logic) for: 1. tor => 030f, 031f, .. 03ff (16 possibilities) 2. i2p => 040f, 041f, .. 04ff (16 possibilities) 3. cjdns => 05fc0f, 05fc1f, ... 05fcff (16 possibilities) `setConnected` is used in `ThreadOpenConnections()` before making [outbound](https://github.com/bitcoin/bitcoin/blob/84f4ac39fda7ffa5dc84e92d92dd1eeeb5e20f8c/src/net.cpp#L1846) and [anchor](https://github.com/bitcoin/bitcoin/blob/84f4ac39fda7ffa5dc84e92d92dd1eeeb5e20f8c/src/net.cpp#L1805) connections to new peers so that they belong to distinct netgroups. **behaviour on master** - if we run a node only on tor/i2p/cjdns - we wouldn't be able to open more than 16 outbound connections(manual, block-relay-only anchor, outbound full relay, block-relay-only connections) because we run out of possible netgroups. - see https://github.com/bitcoin/bitcoin/pull/27264#issuecomment-1481322628 - tested by changing `MAX_OUTBOUND_FULL_RELAY_CONNECTIONS` to 17 with `onlynet=onion` and observed how node wouldn't make more than 16 outbound connections. **behaviour on PR** - netgroup diversity checks are skipped for tor/i2p/cjdns addresses. - we don't insert tor/i2p/cjdns address in `setConnected` and `GetGroup` doesn't get called on tor/i2p/cjdns(see #27369) ACKs for top commit: achow101: ACK b5585ba5f97a19d1b435d9ab69b5a55cfd45dd70 mzumsande: ACK b5585ba5f97a19d1b435d9ab69b5a55cfd45dd70 vasild: ACK b5585ba5f97a19d1b435d9ab69b5a55cfd45dd70 Tree-SHA512: c120b3f9ca7f0be3f29ea665cd2f7dfb40cd1d7ec7058984252fb6e0295e414f736c5b4fba03c31188188a5ae4f543fb2654f6ee9776bad745c7ca72d23d5b9b
2023-04-13verify-commits: error and exit cleanly when git is too old.Cory Fields
2023-04-13Merge bitcoin-core/gui#726: Register `wallet::AddressPurpose` typeHennadii Stepanov
a45b54406dbce4fbf8a316a0e91615eb480da653 qt: Register `wallet::AddressPurpose` type (Hennadii Stepanov) Pull request description: This PR is a follow up of bitcoin/bitcoin#27217. Fixes #725. ACKs for top commit: achow101: ACK a45b54406dbce4fbf8a316a0e91615eb480da653 furszy: Tested ACK a45b54406dbce4fbf8a316a0e91615eb480da653 Tree-SHA512: c670f4bf56442613d3fe038b0ba21acfcd4c69aa5340072e9a77d83f5fab1bf2facd87a9e1f42d88f496d277b27b79e7090444d59a9b9e71f3b486e171daa669
2023-04-13Merge bitcoin/bitcoin#27459: ci: explicitly install libclang-rt-dev in ↵fanquake
valgrind jobs 2c60826b50126148194c3176e1c3521190ae352c ci: explicitly install libclang-rt-dev in valgrind jobs (fanquake) Pull request description: This fixes some cases, i.e under --no-install-recommends, where libclang-rt-dev wouldn't be installed, and configuring would then fail. Followup to #27444. Top commit has no ACKs. Tree-SHA512: d1ab0050731df47c21f6ac4f575a728b045b4617beaa1fa8b878050e07e5ddda18fb7d066c7b32bee5ed0ac0e878958a812d4c6b5bd704612755ccb3c172d7e2
2023-04-13qt: Register `wallet::AddressPurpose` typeHennadii Stepanov
2023-04-13ci: explicitly install libclang-rt-dev in valgrind jobsfanquake
This fixes some cases, i.e under --no-install-recommends, where libclang-rt-dev wouldn't be installed, and configuring would then fail. Followup to #27444.
2023-04-13Merge bitcoin/bitcoin#27444: ci: use Debian Bookworm and Valgrind 3.19 in ↵fanquake
Valgrind jobs e047ae84d264b4955eda15c545f964e6671c69cc valgrind: update supps for Debian Bookworm. (fanquake) ba29143d983adf49535cbdf55a78b603cc3acb93 ci: use Debian Bookworm and Valgrind 3.19 in Valgrind jobs (fanquake) Pull request description: Switch to using Debian Bookworm and [valgrind 3.19](https://packages.debian.org/bookworm/valgrind) in the Valgrind jobs. Also update the suppressions file. This originally contained a changed to build valgrind 3.20 from source (for improved aarch64 support), but I'll split that into it's own change. Top commit has no ACKs. Tree-SHA512: 73ec162d6e07f8a6767d15c0fc298ec6e1a2ba8ec8f9ea902dbfd0a1e3c491411781beec2f6de66fd15006475dbc024bc512f09aa94e2615b713ba873fac14de
2023-04-12Merge bitcoin/bitcoin#27279: Add "warnings", deprecate "warning" in ↵Andrew Chow
{create,load,unload,restore}wallet 7ccdd741fe1544c13b2a9b7baa5c5727e84d6e55 test: fix importmulti/importdescriptors assertion (Jon Atack) 19d888ce407f44d90785c456a1a3e2a6870e9245 rpc: move WALLET_FLAG_CAVEATS to the compilation unit of its caller (Jon Atack) 01df011ca2bf46ee4c988b03a130eea6df692325 doc: release note for wallet RPCs "warning" field deprecation (Jon Atack) 9ea8b3739a863b0ad87593639476b3cd712ff0dc test: createwallet "warning" field deprecation test (Jon Atack) 645d7f75ac1b40e4ea88119b3711f89943d35d6c rpc: deprecate "warning" field in {create,load,unload,restore}wallet (Jon Atack) 2f4a926e95e0379397859c3ba1b5711be5f09925 test: add test coverage for "warnings" field in createwallet (Jon Atack) 4a1e479ca612056761e6247dd5b715dcd6824413 rpc: add "warnings" field to RPCs {create,load,unload,restore}wallet (Jon Atack) 079d8cdda8eeebe199fb6592fca2630c37662731 rpc: extract wallet "warnings" fields to a util helper (Jon Atack) f73782a9032a462a71569e9424db9bf9eeababf3 doc: fix/improve warning helps in {create,load,unload,restore}wallet (Jon Atack) Pull request description: Based on discussion and concept ACKed in #27138, add a `warnings` field to RPCs createwallet, loadwallet, unloadwallet, and restorewallet as a JSON array of strings to replace the `warning` string field in these 4 RPCs. The idea is to more gracefully handle multiple warning messages and for consistency with other wallet RPCs. Then, deprecate the latter fields, which represent all the remaining RPC `warning` fields. The first commit https://github.com/bitcoin/bitcoin/pull/27279/commits/f73782a9032a462a71569e9424db9bf9eeababf3 implements https://github.com/bitcoin/bitcoin/pull/27138#issuecomment-1474789198 as an alternative to #27138. One of those two could potentially be backported to our currently supported releases. ACKs for top commit: achow101: ACK 7ccdd741fe1544c13b2a9b7baa5c5727e84d6e55 1440000bytes: utACK https://github.com/bitcoin/bitcoin/pull/27279/commits/7ccdd741fe1544c13b2a9b7baa5c5727e84d6e55 vasild: ACK 7ccdd741fe1544c13b2a9b7baa5c5727e84d6e55 pinheadmz: re-ACK 7ccdd741fe1544c13b2a9b7baa5c5727e84d6e55 Tree-SHA512: 314e0a4c41fa383d95e2817bfacf359d449e460529d235c3eb902851e2f4eacbabe646d9a5a4beabc4964cdfabf6397ed8301366a58d344a2f787f83b75e9d64
2023-04-12valgrind: update supps for Debian Bookworm.fanquake
Remove no-longer-required libstdc++ suppression. Remove unused (and versioned) GUI suppression.
2023-04-12ci: use Debian Bookworm and Valgrind 3.19 in Valgrind jobsfanquake
https://packages.debian.org/bookworm/valgrind
2023-04-12Merge bitcoin/bitcoin#27449: doc: update OpenBSD build docs for 7.3 ↵fanquake
(external signer support available) 6b17994ede6fe1961667d2e96127291b2a8b4f9d doc: update OpenBSD build docs for 7.3 (external signer support available) (Sebastian Falbesoner) Pull request description: With OpenBSD 7.3, the waitid(2) system call is implemented (see https://github.com/openbsd/src/commit/8112871f19bbd25e86c93d0f901071ca2335a352, first mentioned kernel improvement at https://www.openbsd.org/73.html). This means Boost.Process finally doesn't fail to compile anymore and we can remove the build hint about missing external signer support. Tested on my amd64 machine by reconfiguring / rebuilding master branch and successfully running the functional test wallet_signer.py. :heavy_check_mark: ACKs for top commit: fanquake: ACK 6b17994ede6fe1961667d2e96127291b2a8b4f9d - haven't tested, but looks good to me. Tree-SHA512: 5bbcecce4ced38d8221f2c906a54667e50317e9ded182554cf73bb7f2fce55a38e53730eca25f813cff1d2d65c94141eb158d40f83228d12dcf859c16a1798b9
2023-04-12Merge bitcoin/bitcoin#27217: wallet: Replace use of purpose strings with an enumfanquake
18fc71a3adee5de0f74ba6ff18f5ed31ba79a646 doc: Release note for purpose string restriction (Andrew Chow) e83babe3b85b22e2360a99f9827b2b0d107ad0fa wallet: Replace use of purpose strings with an enum (Andrew Chow) 2f8000513675467e62bee9d0f836d2fefcc479af wallet: add AddressPurpose enum to replace string values (Ryan Ofsky) 8741522e6c75a0ad0c96f44e5668befc1624fb0b wallet: Add wallet/types.h for simple public enum and struct types (Ryan Ofsky) Pull request description: Instead of storing and passing around fixed strings for the purpose of an address, use an enum. ACKs for top commit: josibake: reACK https://github.com/bitcoin/bitcoin/commit/18fc71a3adee5de0f74ba6ff18f5ed31ba79a646 Tree-SHA512: 82034f020e96b99b29da34dfdd7cfe58f8b7d2afed1409ea4a290c2cac69fc43e449e8b7b2afd874a9facf8f4cd6ebb80d17462317e60a6f011ed8f9eab5d4c5
2023-04-11doc: update OpenBSD build docs for 7.3 (external signer support available)Sebastian Falbesoner
With OpenBSD 7.3, the waitid(2) system call is implemented (see https://github.com/openbsd/src/commit/8112871f19bbd25e86c93d0f901071ca2335a352). This means Boost.Process finally doesn't fail to compile anymore and we can remove the build hint about missing external signer support. Tested on my amd64 machine by reconfiguring / rebuilding master branch and successfully running the functional test wallet_signer.py.
2023-04-11doc: Release note for purpose string restrictionAndrew Chow
2023-04-11wallet: Replace use of purpose strings with an enumAndrew Chow
Instead of storing and passing around fixed strings for the purpose of an address, use an enum. This also rationalizes the CAddressBookData struct, documenting all fields and making them public, and simplifying the representation to avoid bugs like https://github.com/bitcoin/bitcoin/pull/26761#discussion_r1134615114 and make it not possible to invalid address data like change addresses with labels. Co-authored-by: Ryan Ofsky <ryan@ofsky.org>
2023-04-11wallet: add AddressPurpose enum to replace string valuesRyan Ofsky
2023-04-11wallet: Add wallet/types.h for simple public enum and struct typesRyan Ofsky
Move isminetype and isminefilter there this commit, add WalletPurpose type next commit.
2023-04-11Merge bitcoin/bitcoin#26699: wallet, gui: bugfix, getAvailableBalance skips ↵Andrew Chow
selected coins 68eed5df8656bed1be6526b014e58d3123102b03 test,gui: add coverage for PSBT creation on legacy watch-only wallets (furszy) 306aab5bb471904faed325d9f3b38b7e891c7bbb test,gui: decouple widgets and model into a MiniGui struct (furszy) 2f76ac0383904123676f1b4eeba0f772a4c5cb5d test,gui: decouple chain and wallet initialization from test case (furszy) cd98b717398f7b13ace91ea9efac9ce1e60b4d62 gui: 'getAvailableBalance', include watch only balance (furszy) 74eac3a82fc948467d5a15a5af420b36ce8eb04a test: add coverage for 'useAvailableBalance' functionality (furszy) dc1cc1c35995dc09085b3d9270c445b7923fdb51 gui: bugfix, getAvailableBalance skips selected coins (furszy) Pull request description: Fixes https://github.com/bitcoin-core/gui/issues/688 and https://github.com/bitcoin/bitcoin/issues/26687. First Issue Description (https://github.com/bitcoin-core/gui/issues/688): The previous behavior for `getAvailableBalance`, when the coin control had selected coins, was to return the sum of them. Instead, we are currently returning the wallet's available total balance minus the selected coins total amount. Reason: Missed to update the `GetAvailableBalance` function to include the coin control selected coins on #25685. Context: Since #25685 we skip the selected coins inside `AvailableCoins`, the reason is that there is no need to waste resources walking through the entire wallet's txes map just to get coins that could have gotten by just doing a simple `mapWallet.find`). Places Where This Generates Issues (only when the user manually select coins via coin control): 1) The GUI balance check prior the transaction creation process. 2) The GUI "useAvailableBalance" functionality. Note 1: As the GUI uses a balance cache since https://github.com/bitcoin-core/gui/pull/598, this issue does not affect the regular spending process. Only arises when the user manually select coins. Note 2: Added test coverage for the `useAvailableBalance` functionality. ---------------------------------- Second Issue Description (https://github.com/bitcoin/bitcoin/issues/26687): As we are using a cached balance on `WalletModel::getAvailableBalance`, the function needs to include the watch-only available balance for wallets with private keys disabled. ACKs for top commit: Sjors: tACK 68eed5df8656bed1be6526b014e58d3123102b03 achow101: ACK 68eed5df8656bed1be6526b014e58d3123102b03 theStack: ACK 68eed5df8656bed1be6526b014e58d3123102b03 Tree-SHA512: 674f3e050024dabda2ff4a04b9ed3750cf54a040527204c920e1e38bd3d7f5fd4d096e4fd08a0fea84ee6abb5070f022b5c0d450c58fd30202ef05ebfd7af6d3
2023-04-11Merge bitcoin/bitcoin#26662: fuzz: Add HeadersSyncState targetfanquake
3153e7d779ac284f86e433af033d63f13f361b6f [fuzz] Add HeadersSyncState target (dergoegge) 53552affca381cdb5103ecdbcc7f3fb562e66ac4 [headerssync] Make m_commit_offset protected (dergoegge) Pull request description: This adds a fuzz target for the `HeadersSyncState` class. I am unsure how well this is able to cover the logic since it is just processing unserialized CBlockHeaders straight from the fuzz input (headers are sometimes made continuous). However, it does manage to get to the redownload phase so i thought it is better then not having fuzzing at all. It would also be nice to fuzz the p2p logic that is using `HeadersSyncState` (e.g. `TryLowWorkHeadersSync`, `IsContinuationOfLowWorkHeadersSync`) but that likely requires some more work (refactoring👻). ACKs for top commit: mzumsande: ACK 3153e7d779ac284f86e433af033d63f13f361b6f Tree-SHA512: 8a4630ceeeb30e4eeabaa8eb5491d98f0bf900efe7cda07384eaac9f2afaccfbcaa979cc1cc7f0b6ca297a8f5c17a7759f94809dd87eb87d35348d847c83e8ab
2023-04-11ci: Bump nowallet_libbitcoinkernel task to ubuntu:focalMarcoFalke
This is needed to work around https://github.com/bitcoin/bitcoin/pull/27340#issuecomment-1484988445 The only change should be that python3.7 is bumped to 3.8, but this is fine because ci/test/00_setup_env_native_qt5.sh still checks for python3.7 compatibility.
2023-04-11ci: Use credits in more tasksMarcoFalke
This should give faster feedback about the CI result, while still keeping expenses reasonable.