Commit Graph

35450 Commits

Author SHA1 Message Date
Cory Fields
192325a77d kernel: move RunCommandParseJSON to its own file
Because libbitcoinkernel does not include this new object, this has the
side-effect of eliminating the unnecessary boost::process dependency.
2022-10-04 13:51:40 +00:00
glozow
b2da6dd943
Merge bitcoin/bitcoin#26138: test: Avoid race in disconnect_nodes helper
faeea28753 test: Avoid race in disconnect_nodes helper (MacroFake)

Pull request description:

  Also wait for the other node to notice the closed socket. Otherwise, the other node is not able to use the connect helper.

  Fixes https://github.com/bitcoin/bitcoin/issues/26014

ACKs for top commit:
  stickies-v:
    ACK faeea2875
  glozow:
    ACK faeea28753

Tree-SHA512: 2f0fa6812c0519aba3eaf21f0c70073b768fcd4dad23989d57e138ee9057a7da1a6b281645e9bff4051259cdca51568700e066491ac6b6daae99f30e395159ca
2022-09-28 16:21:19 +01:00
glozow
9fcdb9f3a0
Merge bitcoin/bitcoin#26172: p2p: ProcessHeadersMessage(): fix received_new_header
bdcafb9133 p2p: ProcessHeadersMessage(): fix received_new_header (Larry Ruane)

Pull request description:

  Follow-up to #25717. The commit "Utilize anti-DoS headers download strategy" changed how this bool variable is computed, so that its value is now the opposite of what it should be.

  Prior to #25717:
  ```
  bool received_new_header{WITH_LOCK(::cs_main, return m_chainman.m_blockman.LookupBlockIndex(headers.back().GetHash()) == nullptr)};
  ```
  After #25717 (simplified):
  ```
  {
      LOCK(cs_main);
      last_received_header = m_chainman.m_blockman.LookupBlockIndex(headers.back().GetHash());
  }
  bool received_new_header{last_received_header != nullptr};
  ```

ACKs for top commit:
  dergoegge:
    ACK bdcafb9133
  glozow:
    ACK bdcafb9133, I believe this is correct and don't see anything to suggest the switch was intentional.
  stickies-v:
    ACK bdcafb9133

Tree-SHA512: 35c12762f1429585a0b1c15053e310e83efb28c3d8cbf4092fad9fe81c893f6d766df1f2b20624882acb9654d0539a0c871f587d7090dc2a198115adf59db3ec
2022-09-27 11:02:44 +01:00
MacroFake
eeac05aa22
Merge bitcoin/bitcoin#26156: test: check that listdescriptors descriptor strings are sorted
810c3dc7ef doc, rpc: mention that `listdescriptors` result is sorted by string representation (Sebastian Falbesoner)
d99af861d0 test: check that `listdescriptors` descriptor strings are sorted (Sebastian Falbesoner)

Pull request description:

  This small PR adds a test for the change introduced in PR #25931 ("rpc: sort listdescriptors result", commit 50996241f2). The correctness of the test can easily be verified by commenting out the `std::sort` call in the `listdescriptors` RPC implementation:
  ```diff
  diff --git a/src/wallet/rpc/backup.cpp b/src/wallet/rpc/backup.cpp
  index 09c74ea2da..3ed1a69b26 100644
  --- a/src/wallet/rpc/backup.cpp
  +++ b/src/wallet/rpc/backup.cpp
  @@ -1829,9 +1829,11 @@ RPCHelpMan listdescriptors()
           });
       }

  +    /*
       std::sort(wallet_descriptors.begin(), wallet_descriptors.end(), [](const auto& a, const auto& b) {
           return a.descriptor < b.descriptor;
       });
  +    */

       UniValue descriptors(UniValue::VARR);
       for (const WalletDescInfo& info : wallet_descriptors) {

  ```
  leading to a fail of the functional test `wallet_listdescriptors.py`.

ACKs for top commit:
  jarolrod:
    ACK 810c3dc7ef
  aureleoules:
    ACK 810c3dc7ef

Tree-SHA512: 31770e3149b8a0251ecfa8662a2270c149f778eb910985f48a91d6a5d288b7b1c2244f9f1b798ebe3f1aa9f0b935cb4d6f12d5d28f78bcde3c4a61af76d11d0a
2022-09-27 09:27:00 +00:00
Sebastian Falbesoner
810c3dc7ef doc, rpc: mention that listdescriptors result is sorted by string representation 2022-09-26 15:16:01 +02:00
fanquake
f227e153e8
Merge bitcoin/bitcoin#26161: build: remove unused MSVC defines
73ae72e603 build: remove unused MSVC defines (fanquake)

Pull request description:

  Most of these aren't unused in the codebase at all, let alone for MSVC.

ACKs for top commit:
  sipsorcery:
    tACK 73ae72e603.

Tree-SHA512: 6a8aef69902d5941fba741777c19176b96d11a4c75cf27bdf3881019fc650e8f60dd7960a1bc9469a24c4575f7d34cf675afdcf4bcb240c32cab1c9c6ab286db
2022-09-26 11:20:13 +01:00
MacroFake
ec13810a00
Merge bitcoin/bitcoin#26159: build: Remove stdlib.h from header checks
553ff452c0 build: remove stdlib.h from header checks (fanquake)
a63d4cb26a refactor: use <cstdlib> over stdlib.h (fanquake)

Pull request description:

  We already use a mix of `<cstlib>` and `stdlib.h` unconditionally throughout
  the codebase.

  Us checking this header also duplicates work already done by autotools.
  Currently stdlib.h is checked for 3 times during a ./configure run, after
  this change, at least it's only twice.

  Similar to #26150.

ACKs for top commit:
  kristapsk:
    ACK 553ff452c0
  TheCharlatan:
    ACK 553ff452c0

Tree-SHA512: 0a43d39d3df180a1614dbd3a1ee1531b0969ffe4a0c09dfe9d2f3f0ec16196b5fd7523309f6722936a8c8b20908508724e1903e939dd81c3b4538d85d0f42953
2022-09-25 11:45:41 +00:00
MacroFake
0cfbb171bd
Merge bitcoin/bitcoin#26130: Bugfix: Wallet: Lock cs_wallet for SignMessage
a60d9eb9e6 Bugfix: Wallet: Lock cs_wallet for SignMessage (Luke Dashjr)

Pull request description:

  cs_desc_main is typically locked within scope of a cs_wallet lock, but:

  CWallet::IsLocked locks cs_wallet
  ...called from DescriptorScriptPubKeyMan::GetKeys
  ...called from DescriptorScriptPubKeyMan::GetSigningProvider which locks cs_desc_main first, but has no access to cs_wallet ...called from DescriptorScriptPubKeyMan::SignMessage ...called from CWallet::SignMessage which can access and lock cs_wallet

  Resolve the out of order locks by grabbing cs_wallet in CWallet::SignMessage first

  -------------

  Note this is currently only an issue for the GUI (which lacks sufficient testing apparently), but can be reproduced by #26082 (CI fails as a result)

ACKs for top commit:
  achow101:
    ACK a60d9eb9e6
  w0xlt:
    ACK a60d9eb9e6

Tree-SHA512: 60f6959b0ceaf4d9339ba1a47154734034b637c41b1f9e26748a2dbbc3a2a95fc3696019103c55ae70c91d910ba8f3d7f4e27d263030eb60b689f290c4d82ea9
2022-09-24 14:02:13 +00:00
Larry Ruane
bdcafb9133 p2p: ProcessHeadersMessage(): fix received_new_header
Follow-up to #25717. The commit "Utilize anti-DoS headers download
strategy" changed how this bool variable is computed, so that its value
is now the opposite of what it should be.
2022-09-24 00:07:46 -06:00
fanquake
73ae72e603
build: remove unused MSVC defines
Most of these aren't unused in the codebase at all, let alone for MSVC.
2022-09-23 16:30:24 +01:00
fanquake
553ff452c0
build: remove stdlib.h from header checks
We already use a mix of <cstdlib> and stdlib.h unconditionally throughout
the codebase.

Us checking this header also duplicates work already done by autotools.
Currently stdlib.h is checked for 3 times during a ./configure run, after
this change, at least it's only twice.
2022-09-23 10:49:33 +01:00
fanquake
a63d4cb26a
refactor: use <cstdlib> over stdlib.h
We currently use both. Consolidate on the former.
2022-09-23 10:48:47 +01:00
Sebastian Falbesoner
d99af861d0 test: check that listdescriptors descriptor strings are sorted
Tests the change introduced in PR #25931 ("rpc: sort listdescriptors
result", commit 50996241f2).
2022-09-22 19:29:43 +02:00
fanquake
100949af0e
Merge bitcoin/bitcoin#26012: fuzz: Avoid timeout in bitdeque fuzz target
fa4ba04c15 fuzz: Remove no-op call to get() (MacroFake)
fa642286b8 fuzz: Avoid timeout in bitdeque fuzz target (MacroFake)

Pull request description:

  I'd guess that any bug should be discoverable within `10` ops. However, `900` seems also better than no limit at all, which causes timeouts such as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=50892

ACKs for top commit:
  sipa:
    ACK fa4ba04c15

Tree-SHA512: f6bd25e78d5f04c6f88e9300c2fa3d0993a0911cb0fd1b414077adc0edde1a06ad72af5e2f50f0ab1324f91999ae57d879686c545b2e6c19ae7f637a8804bd48
2022-09-22 14:55:43 +01:00
fanquake
590d206444
Merge bitcoin/bitcoin#26150: build: remove stdio.h from header checks
55aad5f3a9 build: remove stdio.h from header checks (fanquake)
b95633121b refactor: use <cstdio> over stdio.h (fanquake)

Pull request description:

  We already use a mix of `<cstdio>` and `stdio.h` unconditionally throughout
  the codebase.

  Us checking this header also duplicates work already done by autotools.
  Currently `stdio.h` is checked for 3 times during a ./configure run, after
  this change, at least it's only twice.

ACKs for top commit:
  TheCharlatan:
    ACK 55aad5f3a9
  kristapsk:
    ACK 55aad5f3a9

Tree-SHA512: a83cc724528ab92aacfa53048b12fcccec3962637ca7fad30f6c610365edeb0e951f74e37832ad7d3f79ca9b8d7203cb10165c89d0e4b63eeda7a970dab82dfb
2022-09-22 14:45:13 +01:00
Andrew Chow
2b2c970627
Merge bitcoin/bitcoin#26149: Fix assert failure in miniscript string parsing
648f6950cd Correct sanity-checking script_size calculation (Pieter Wuille)

Pull request description:

  Fix a bug in the script_size sanity-check in the miniscript string parser, found by oss-fuzz in https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=51636, and introduced in e8cc2e4afc (#25540).

  This bug would cause an assertion failure when feeding a miniscript with a `thresh(k,...)` fragment, with k >= 128, to an RPC.

ACKs for top commit:
  darosior:
    utACK 648f6950cd
  achow101:
    ACK 648f6950cd

Tree-SHA512: d86a0721758cd1e42ef02050b542f0935efdc19447a1ca76a3ade96352a6ee8261eef3d4a5cbdec77bf0ad14dfed42e9eb6bd4246b816a9f6f06d786900da9e7
2022-09-21 13:17:07 -04:00
fanquake
74e54cc2a3
Merge bitcoin/bitcoin#25917: depends: libnatpmp 07004b97cf691774efebe70404cf22201e4d330d
65471008e0 depends: libnatpmp 07004b97cf691774efebe70404cf22201e4d330d (fanquake)

Pull request description:

  This pulls in two changes I've upstreamed:
  Support for pkg-config: https://github.com/miniupnp/libnatpmp/pull/19
  Suppressing a deprecation warning: https://github.com/miniupnp/libnatpmp/pull/28

  and other upstream bug fixes.

  Somewhat related to #22644.

  Guix Build (arm64):
  ```bash
  4a4b8e1cb5070482e53b3b869c5f6e19b892619184cf58315a3af368e13a52a2  guix-build-65471008e0a4/output/arm-linux-gnueabihf/SHA256SUMS.part
  88b51f0f261f84b58da60a5c8df251b551379b811a255df9982ff496c70fc8b7  guix-build-65471008e0a4/output/arm-linux-gnueabihf/bitcoin-65471008e0a4-arm-linux-gnueabihf-debug.tar.gz
  33a564914be6f4134d8e8a5f31a2bb97798a79bae8f75151b35564238d6f288e  guix-build-65471008e0a4/output/arm-linux-gnueabihf/bitcoin-65471008e0a4-arm-linux-gnueabihf.tar.gz
  ea429260a2b5ac333f70b2b8b8697a4f76eee79cf6998d18c7de7b60818d8fe5  guix-build-65471008e0a4/output/arm64-apple-darwin/SHA256SUMS.part
  304677e040592a0aee947c733657ea6c4dd8613f7c3a9834314a68e5f7a53325  guix-build-65471008e0a4/output/arm64-apple-darwin/bitcoin-65471008e0a4-arm64-apple-darwin-unsigned.dmg
  da171a60370ad1da6cfc1566fc4e16d09f6e896002b0ac9758fb4044eb1033c1  guix-build-65471008e0a4/output/arm64-apple-darwin/bitcoin-65471008e0a4-arm64-apple-darwin-unsigned.tar.gz
  45c439319a9e2c07de8796dcfd182cdeb5600ad31f8f6b6dc383cc2914f49ab8  guix-build-65471008e0a4/output/arm64-apple-darwin/bitcoin-65471008e0a4-arm64-apple-darwin.tar.gz
  120311e7c807b2641b5e7024e1b85fac0800680bccd924016f417b026aa90d25  guix-build-65471008e0a4/output/dist-archive/bitcoin-65471008e0a4.tar.gz
  5272264317c93359c158c688cf0d0b6e70a6d9ec4b2e447b9fb9fcaf1950f6bc  guix-build-65471008e0a4/output/powerpc64-linux-gnu/SHA256SUMS.part
  98a0d14b8d05974d70f0d5243bfc2fec6aea30b9d8375f950f42a21d5e034065  guix-build-65471008e0a4/output/powerpc64-linux-gnu/bitcoin-65471008e0a4-powerpc64-linux-gnu-debug.tar.gz
  8e07410ad2e7e204c5e84a81894c5398b34f36cc9e1ba386bf0963f09755818b  guix-build-65471008e0a4/output/powerpc64-linux-gnu/bitcoin-65471008e0a4-powerpc64-linux-gnu.tar.gz
  47ae8b948127f03e43a4c7e83a3611b650e26da50936ea9ce0247e01b29463f3  guix-build-65471008e0a4/output/powerpc64le-linux-gnu/SHA256SUMS.part
  04e92527df8c7bb9f78c29b152d920830be0ef26d01e0ee1b32d52bb68fc9717  guix-build-65471008e0a4/output/powerpc64le-linux-gnu/bitcoin-65471008e0a4-powerpc64le-linux-gnu-debug.tar.gz
  ddb09291c9e270343b56e66fae33fd792eb2ec7e5a138337ec1608642dd3a983  guix-build-65471008e0a4/output/powerpc64le-linux-gnu/bitcoin-65471008e0a4-powerpc64le-linux-gnu.tar.gz
  de3cfcf47abed3d4d3881086eba94ee2c34d9078dc53639cc6321c2bd1041073  guix-build-65471008e0a4/output/riscv64-linux-gnu/SHA256SUMS.part
  fecd6a307b66fd54fa5792ce14e1a4d50df5646cdf6cc51d5b355fb1384f5105  guix-build-65471008e0a4/output/riscv64-linux-gnu/bitcoin-65471008e0a4-riscv64-linux-gnu-debug.tar.gz
  f2c5a85fb17ad9605809b4ac01eba56cd573744697b9c942d293b42a623a2832  guix-build-65471008e0a4/output/riscv64-linux-gnu/bitcoin-65471008e0a4-riscv64-linux-gnu.tar.gz
  4cd0b05e96491d9b0fe7eff78aab885a2f0d62f141950117759fecceaeba5412  guix-build-65471008e0a4/output/x86_64-apple-darwin/SHA256SUMS.part
  bae30549d8044e1aa11bae6d57321a7a3a765c8b87ead9cdcc8abf9f22a564a3  guix-build-65471008e0a4/output/x86_64-apple-darwin/bitcoin-65471008e0a4-x86_64-apple-darwin-unsigned.dmg
  435187b492d6df77d4fa7cd0f77ad08c587c4bd463295be802b6e222ee92a2fa  guix-build-65471008e0a4/output/x86_64-apple-darwin/bitcoin-65471008e0a4-x86_64-apple-darwin-unsigned.tar.gz
  b9cf808ec88368a9b0e1883253a9d8c6f123bf7f61df40e34e5e4b8959846d65  guix-build-65471008e0a4/output/x86_64-apple-darwin/bitcoin-65471008e0a4-x86_64-apple-darwin.tar.gz
  b9d9a46f7d3188cd517a180fd24fdb38b8c695175fe9ac75c3b3eb2450d9f5d5  guix-build-65471008e0a4/output/x86_64-linux-gnu/SHA256SUMS.part
  fd601d6821fbe5faa1eb44b9f07046187f491a83fbf1e0fd603be212bfea3385  guix-build-65471008e0a4/output/x86_64-linux-gnu/bitcoin-65471008e0a4-x86_64-linux-gnu-debug.tar.gz
  98ae9d653a8fdeda055468dbf674ee46b0727e1c5b768b1765fc4451defed36e  guix-build-65471008e0a4/output/x86_64-linux-gnu/bitcoin-65471008e0a4-x86_64-linux-gnu.tar.gz
  821de40cbc96c27bb1f0fbcfb46c4e801f202c2dfd7aa9ad88daf6ced2be90e5  guix-build-65471008e0a4/output/x86_64-w64-mingw32/SHA256SUMS.part
  0f2425ea0a17c9aa80cf7d2eb316b9ebe76f49de777635ac37f9e6e21bcd650e  guix-build-65471008e0a4/output/x86_64-w64-mingw32/bitcoin-65471008e0a4-win64-debug.zip
  046ede05868c153ec1d87b8dad4b6494913ea3e952edee86b068d367c57fa7ec  guix-build-65471008e0a4/output/x86_64-w64-mingw32/bitcoin-65471008e0a4-win64-setup-unsigned.exe
  62b6e5ebb085735838ada1f328d6e092d7fb726caad6e049340bfa783897cfa1  guix-build-65471008e0a4/output/x86_64-w64-mingw32/bitcoin-65471008e0a4-win64-unsigned.tar.gz
  265f9814a7fa3333395f34a5dceafd11d50d170aa5303386aa6f8244542d070a  guix-build-65471008e0a4/output/x86_64-w64-mingw32/bitcoin-65471008e0a4-win64.zip
  ```

ACKs for top commit:
  theuni:
    Simple bump ACK 65471008e0. From a quick glance the upstream changes appear to be minimal and sane.
  hebasto:
    ACK 65471008e0

Tree-SHA512: 61541b7dcde611f5bafe5b77977403dab86fe24f0bf4bfb79ab7123bac8b7c4dcad53993d18ab40964756699a77952c8ecc5a0416055c9e436fc34867f7f9cf6
2022-09-21 17:04:16 +01:00
fanquake
55aad5f3a9
build: remove stdio.h from header checks
We already use a mix of <cstdio> and stdio.h unconditionally throughout
the codebase.

Us checking this header also duplicates work already done by autotools.
Currently stdio.h is checked for 3 times during a ./configure run, after
this change, at least it's only twice.
2022-09-21 16:53:18 +01:00
fanquake
b95633121b
refactor: use <cstdio> over stdio.h
We currently use both. Consolidate on the former.
2022-09-21 16:53:11 +01:00
fanquake
4e15a288c3
Merge bitcoin/bitcoin#26135: build: remove strings.h from header checks
eb6026b90f build: remove strings.h from header checks (fanquake)

Pull request description:

  We don't include `strings.h` anywhere.

  This is also already checked for by autoconf, so us checking for it just means a 3rd existence check during `./configure`.

ACKs for top commit:
  TheCharlatan:
    Code review ACK eb6026b90f
  hebasto:
    ACK eb6026b90f, tested on macOS 12.6:

Tree-SHA512: 4036c21b2f659140e9f471b4d24336fe925c6c010e2ced36e1f606d9c76dea236d086d15a884eb8f95381b39322abeecab973b10532527005fdadd095411e358
2022-09-21 16:29:50 +01:00
Andrew Chow
25cd47de71
Merge bitcoin/bitcoin#25933: wallet: AvailableCoins, simplify output script type acquisition
58b7df3caa wallet: AvailableCoins, simplify output script type acquisition (furszy)

Pull request description:

  There is an unnecessary `ExtractDestination()` call and subsequent result parse into an `CScriptID`.

  The `Solver()` call, which we are already doing below anyway, retrieves the script type and, in the P2SH case, the program id.

ACKs for top commit:
  achow101:
    ACK 58b7df3caa
  aureleoules:
    re-ACK 58b7df3caa
  rajarshimaitra:
    ACK 58b7df3caa
  w0xlt:
    ACK 58b7df3caa

Tree-SHA512: 51080766877c34cb2232ee3a1cb6b6a62b829c9297c67b99577742b94854a737a74d248015a4603ca9b6cd0a3c9e1d6d78673ff3cc9fc65dd82deea72dc537fd
2022-09-21 11:27:37 -04:00
Pieter Wuille
648f6950cd Correct sanity-checking script_size calculation 2022-09-21 09:17:45 -04:00
fanquake
80d1598133
Merge bitcoin/bitcoin#26099: build: remove duplicate / unneeded libs from bench_bitcoin
ff7c81f63a build: remove duplicate / unneeded libs from bench_bitcoin (fanquake)

Pull request description:

  EVENT_*_LIBS are already in LDADD.
  Move wallet libs into the wallet conditional, similar to zmq.

ACKs for top commit:
  theuni:
    ACK ff7c81f63a

Tree-SHA512: 6bd92f03478d56cd38645e38c0e6c4614cdf9c745124069d0d1d80483d76f5c656e1749061455ba04c619684513a063dda3f8f4bd09fe7b66911714d83592f25
2022-09-21 11:25:47 +01:00
fanquake
b1f44ecdcd
Merge bitcoin/bitcoin#25737: rpc: treat univalue type check error as RPC_TYPE_ERROR, not RPC_MISC_ERROR
e68d380797 rpc: remove unneeded RPCTypeCheckArgument checks (furszy)
55566630c6 rpc: treat univalue type check error as RPC_TYPE_ERROR, not RPC_MISC_ERROR (furszy)

Pull request description:

  Same rationale as #26039, tackling another angle of the problem.

  #### Context
  We have the same univalue type error checking code spread/duplicated few times:
  `RPCTypeCheckObj`, `RPCTypeCheckArgument`, `UniValue::checkType`.

  In the first two functions, we are properly returning an `RPC_TYPE_ERROR` while in `UniValue::checkType`
  we are throwing an `std::runtime_error` which is caught by the RPC server request handler, who invalidly
  treats it as `RPC_MISC_ERROR` (which is a generic error return code that provides no information to the user).

  #### Proposed Changes

  Throw a custom exception from `Univalue::checkType` (instead of a plain
  `std::runtime_error`) and catch it on the RPC server request handler.

  So we properly return `RPC_TYPE_ERROR` (-3) on every arg type error and
  not the general `RPC_MISC_ERROR` (-1).

  This will allow us to remove all the `RPCTypeCheckArgument` calls. As them are redundant since #25629.

Top commit has no ACKs.

Tree-SHA512: 4e4c41851fd4e2b01a2d8b94e71513f9831f810768ebd89684caca4901e87d3677980003949bcce441f9ca607a1b38a5894839b6c492f5947b8bab8cd9423ba6
2022-09-21 11:19:44 +01:00
fanquake
3c537f1cc8
Merge bitcoin/bitcoin#25873: depends: Boost 1.80.0
cc8dff5f8f depends: Boost 1.80.0 (fanquake)

Pull request description:

  Mostly misc bug fixes and improvements, to the continually decreasing parts of Boost that we actually use. See: https://www.boost.org/users/history/version_1_80_0.html.

  Includes some boring upstreamed changes, i.e https://github.com/boostorg/multi_index/pull/57, https://github.com/boostorg/signals2/pull/60 that aid #24742. Getting Boost modules to drop their usage of deprecated (redirect) headers means we can prune them from our depends tree.

  Also a requirement for #25696.

  Guix Build (x86_64):
  ```bash
  e793a5ac9372b8fce6e19916be840eee99735bccdedf44b9bca006fd9ac8c395  guix-build-cc8dff5f8ff8/output/aarch64-linux-gnu/SHA256SUMS.part
  001e0382f2b05e12f0ec5eaf09e001e31313ee3ab5367b0ba135ea2d7b863bf6  guix-build-cc8dff5f8ff8/output/aarch64-linux-gnu/bitcoin-cc8dff5f8ff8-aarch64-linux-gnu-debug.tar.gz
  a50229534b41eebd6c44001b56eb2be35b50d5f3a3b161a8fa46d7558b79693e  guix-build-cc8dff5f8ff8/output/aarch64-linux-gnu/bitcoin-cc8dff5f8ff8-aarch64-linux-gnu.tar.gz
  d54d16ae4d5ef2bb0d0dcebbd6d1ec4b0f0976063bf66222a320e68340f902d5  guix-build-cc8dff5f8ff8/output/arm-linux-gnueabihf/SHA256SUMS.part
  04c464043af256ee05d565040df9bb438151d4e041aa46f800fc567eba111c2f  guix-build-cc8dff5f8ff8/output/arm-linux-gnueabihf/bitcoin-cc8dff5f8ff8-arm-linux-gnueabihf-debug.tar.gz
  097cd2f633bf6d3b8e922d81ce9f6dfe793589418e394abfa4e183861f5ad236  guix-build-cc8dff5f8ff8/output/arm-linux-gnueabihf/bitcoin-cc8dff5f8ff8-arm-linux-gnueabihf.tar.gz
  30c8074725b0701b1a781685f50a23ba038297b2633599f40792157daadc13cb  guix-build-cc8dff5f8ff8/output/arm64-apple-darwin/SHA256SUMS.part
  df6036e89c7e8746badcbcf805ec4f84070847833c562bc2185c15904b1b909a  guix-build-cc8dff5f8ff8/output/arm64-apple-darwin/bitcoin-cc8dff5f8ff8-arm64-apple-darwin-unsigned.dmg
  8421c957b2b83c4afc3bc7f65f93798755acc99ac5921bd89b367c22c5b064d8  guix-build-cc8dff5f8ff8/output/arm64-apple-darwin/bitcoin-cc8dff5f8ff8-arm64-apple-darwin-unsigned.tar.gz
  076e8e185bc01dd43feb3fcbcec04eff5ca435b0fdf47c6f05008feec1cf11ac  guix-build-cc8dff5f8ff8/output/arm64-apple-darwin/bitcoin-cc8dff5f8ff8-arm64-apple-darwin.tar.gz
  03de7ffcf8d98c61c3a5b763e9bcc6310c9895950f49768da2eeba4871d8478a  guix-build-cc8dff5f8ff8/output/dist-archive/bitcoin-cc8dff5f8ff8.tar.gz
  80ffe674a5fa86cfcf3f47eb8103dbfbc97dd74f793cf785c1347469f19b281f  guix-build-cc8dff5f8ff8/output/powerpc64-linux-gnu/SHA256SUMS.part
  8ce2024c3fa65e6cd613ef526f90c5904675012b22eb39ccf94081d91e14340a  guix-build-cc8dff5f8ff8/output/powerpc64-linux-gnu/bitcoin-cc8dff5f8ff8-powerpc64-linux-gnu-debug.tar.gz
  89dc31c0306b0f1c79e13e5f705b73233695a802fd4946aac03364c45e7de984  guix-build-cc8dff5f8ff8/output/powerpc64-linux-gnu/bitcoin-cc8dff5f8ff8-powerpc64-linux-gnu.tar.gz
  7ed1b82ba3d4c1a8ddc24c6f650aa6b2d1be08580b2ec32cfec0fd682828d797  guix-build-cc8dff5f8ff8/output/powerpc64le-linux-gnu/SHA256SUMS.part
  01c7f706b236b342f4e0b5043c5788168806338cdaefd5541b04118665c7e40b  guix-build-cc8dff5f8ff8/output/powerpc64le-linux-gnu/bitcoin-cc8dff5f8ff8-powerpc64le-linux-gnu-debug.tar.gz
  01767af5b190d0be4a075a5d038644b7dd0d1fc5f0b69698acaca92bfef960d0  guix-build-cc8dff5f8ff8/output/powerpc64le-linux-gnu/bitcoin-cc8dff5f8ff8-powerpc64le-linux-gnu.tar.gz
  414de662e0bb3df6a5c8fc1a3576c90a943998b802d97070e31bde434fc6a7f1  guix-build-cc8dff5f8ff8/output/riscv64-linux-gnu/SHA256SUMS.part
  db55ddf8051e6dc80180f3eee12a7370bed1140959c34fb5de8d88f0344b23e2  guix-build-cc8dff5f8ff8/output/riscv64-linux-gnu/bitcoin-cc8dff5f8ff8-riscv64-linux-gnu-debug.tar.gz
  bb19f15545d5a52e800ffb7f141915ab7083fb4fab9a80269f6714b28a294502  guix-build-cc8dff5f8ff8/output/riscv64-linux-gnu/bitcoin-cc8dff5f8ff8-riscv64-linux-gnu.tar.gz
  d9241782d6e596ae02500ffe062501f80b064357bece5d10f7fd4d218240c3a1  guix-build-cc8dff5f8ff8/output/x86_64-apple-darwin/SHA256SUMS.part
  1c3258a573e849a8efe6fce535a4f8737fb3a076ebe74ee29ca1e84a9113d24f  guix-build-cc8dff5f8ff8/output/x86_64-apple-darwin/bitcoin-cc8dff5f8ff8-x86_64-apple-darwin-unsigned.dmg
  7e6d562dd636fcacae88bedca45b49a879901c0fc1309ea1812aba59bbbcb5d0  guix-build-cc8dff5f8ff8/output/x86_64-apple-darwin/bitcoin-cc8dff5f8ff8-x86_64-apple-darwin-unsigned.tar.gz
  c4bc9c27466504417a4bd581cc024b8c5a370a51c8349c1f067752c98c2c14bc  guix-build-cc8dff5f8ff8/output/x86_64-apple-darwin/bitcoin-cc8dff5f8ff8-x86_64-apple-darwin.tar.gz
  59aaf11181373efd2e281004ce968967a26fa95f90c5a25f44cc4c687e9ddb0a  guix-build-cc8dff5f8ff8/output/x86_64-linux-gnu/SHA256SUMS.part
  fbcde4bfe21314104c7e6036e1f7f4b3ef0e41a7546fef5d1f2a6456b955778d  guix-build-cc8dff5f8ff8/output/x86_64-linux-gnu/bitcoin-cc8dff5f8ff8-x86_64-linux-gnu-debug.tar.gz
  b1302146a0e96f7faa150d764aa0ca92b46e887a886532ee7fc2b2cc63f174c5  guix-build-cc8dff5f8ff8/output/x86_64-linux-gnu/bitcoin-cc8dff5f8ff8-x86_64-linux-gnu.tar.gz
  319b52c1a62a9cdad2e3f1fac8dd22458be2a9c1e6a0d60b33cb27272d69e52a  guix-build-cc8dff5f8ff8/output/x86_64-w64-mingw32/SHA256SUMS.part
  11300b916588cb060ac06e074b94bc5da852ab36446df903045ad593dce5056b  guix-build-cc8dff5f8ff8/output/x86_64-w64-mingw32/bitcoin-cc8dff5f8ff8-win64-debug.zip
  045fcb6ca721bdefb7490b3452f28449cb2b0449721dbbb20c174be76f96e1a3  guix-build-cc8dff5f8ff8/output/x86_64-w64-mingw32/bitcoin-cc8dff5f8ff8-win64-setup-unsigned.exe
  38c826537c8054a35103e5ab7ca4f97ca98551f23bcbadb0532f6ca3444e0731  guix-build-cc8dff5f8ff8/output/x86_64-w64-mingw32/bitcoin-cc8dff5f8ff8-win64-unsigned.tar.gz
  7c5f75c5a0b9b98540c8c779a6fc6f5e98d7de792d3a218e4ad7a68fa4027385  guix-build-cc8dff5f8ff8/output/x86_64-w64-mingw32/bitcoin-cc8dff5f8ff8-win64.zip
  ```

  Guix Build (arm64):
  ```bash
  d54d16ae4d5ef2bb0d0dcebbd6d1ec4b0f0976063bf66222a320e68340f902d5  guix-build-cc8dff5f8ff8/output/arm-linux-gnueabihf/SHA256SUMS.part
  04c464043af256ee05d565040df9bb438151d4e041aa46f800fc567eba111c2f  guix-build-cc8dff5f8ff8/output/arm-linux-gnueabihf/bitcoin-cc8dff5f8ff8-arm-linux-gnueabihf-debug.tar.gz
  097cd2f633bf6d3b8e922d81ce9f6dfe793589418e394abfa4e183861f5ad236  guix-build-cc8dff5f8ff8/output/arm-linux-gnueabihf/bitcoin-cc8dff5f8ff8-arm-linux-gnueabihf.tar.gz
  30c8074725b0701b1a781685f50a23ba038297b2633599f40792157daadc13cb  guix-build-cc8dff5f8ff8/output/arm64-apple-darwin/SHA256SUMS.part
  df6036e89c7e8746badcbcf805ec4f84070847833c562bc2185c15904b1b909a  guix-build-cc8dff5f8ff8/output/arm64-apple-darwin/bitcoin-cc8dff5f8ff8-arm64-apple-darwin-unsigned.dmg
  8421c957b2b83c4afc3bc7f65f93798755acc99ac5921bd89b367c22c5b064d8  guix-build-cc8dff5f8ff8/output/arm64-apple-darwin/bitcoin-cc8dff5f8ff8-arm64-apple-darwin-unsigned.tar.gz
  076e8e185bc01dd43feb3fcbcec04eff5ca435b0fdf47c6f05008feec1cf11ac  guix-build-cc8dff5f8ff8/output/arm64-apple-darwin/bitcoin-cc8dff5f8ff8-arm64-apple-darwin.tar.gz
  03de7ffcf8d98c61c3a5b763e9bcc6310c9895950f49768da2eeba4871d8478a  guix-build-cc8dff5f8ff8/output/dist-archive/bitcoin-cc8dff5f8ff8.tar.gz
  80ffe674a5fa86cfcf3f47eb8103dbfbc97dd74f793cf785c1347469f19b281f  guix-build-cc8dff5f8ff8/output/powerpc64-linux-gnu/SHA256SUMS.part
  8ce2024c3fa65e6cd613ef526f90c5904675012b22eb39ccf94081d91e14340a  guix-build-cc8dff5f8ff8/output/powerpc64-linux-gnu/bitcoin-cc8dff5f8ff8-powerpc64-linux-gnu-debug.tar.gz
  89dc31c0306b0f1c79e13e5f705b73233695a802fd4946aac03364c45e7de984  guix-build-cc8dff5f8ff8/output/powerpc64-linux-gnu/bitcoin-cc8dff5f8ff8-powerpc64-linux-gnu.tar.gz
  7ed1b82ba3d4c1a8ddc24c6f650aa6b2d1be08580b2ec32cfec0fd682828d797  guix-build-cc8dff5f8ff8/output/powerpc64le-linux-gnu/SHA256SUMS.part
  01c7f706b236b342f4e0b5043c5788168806338cdaefd5541b04118665c7e40b  guix-build-cc8dff5f8ff8/output/powerpc64le-linux-gnu/bitcoin-cc8dff5f8ff8-powerpc64le-linux-gnu-debug.tar.gz
  01767af5b190d0be4a075a5d038644b7dd0d1fc5f0b69698acaca92bfef960d0  guix-build-cc8dff5f8ff8/output/powerpc64le-linux-gnu/bitcoin-cc8dff5f8ff8-powerpc64le-linux-gnu.tar.gz
  414de662e0bb3df6a5c8fc1a3576c90a943998b802d97070e31bde434fc6a7f1  guix-build-cc8dff5f8ff8/output/riscv64-linux-gnu/SHA256SUMS.part
  db55ddf8051e6dc80180f3eee12a7370bed1140959c34fb5de8d88f0344b23e2  guix-build-cc8dff5f8ff8/output/riscv64-linux-gnu/bitcoin-cc8dff5f8ff8-riscv64-linux-gnu-debug.tar.gz
  bb19f15545d5a52e800ffb7f141915ab7083fb4fab9a80269f6714b28a294502  guix-build-cc8dff5f8ff8/output/riscv64-linux-gnu/bitcoin-cc8dff5f8ff8-riscv64-linux-gnu.tar.gz
  d9241782d6e596ae02500ffe062501f80b064357bece5d10f7fd4d218240c3a1  guix-build-cc8dff5f8ff8/output/x86_64-apple-darwin/SHA256SUMS.part
  1c3258a573e849a8efe6fce535a4f8737fb3a076ebe74ee29ca1e84a9113d24f  guix-build-cc8dff5f8ff8/output/x86_64-apple-darwin/bitcoin-cc8dff5f8ff8-x86_64-apple-darwin-unsigned.dmg
  7e6d562dd636fcacae88bedca45b49a879901c0fc1309ea1812aba59bbbcb5d0  guix-build-cc8dff5f8ff8/output/x86_64-apple-darwin/bitcoin-cc8dff5f8ff8-x86_64-apple-darwin-unsigned.tar.gz
  c4bc9c27466504417a4bd581cc024b8c5a370a51c8349c1f067752c98c2c14bc  guix-build-cc8dff5f8ff8/output/x86_64-apple-darwin/bitcoin-cc8dff5f8ff8-x86_64-apple-darwin.tar.gz
  59aaf11181373efd2e281004ce968967a26fa95f90c5a25f44cc4c687e9ddb0a  guix-build-cc8dff5f8ff8/output/x86_64-linux-gnu/SHA256SUMS.part
  fbcde4bfe21314104c7e6036e1f7f4b3ef0e41a7546fef5d1f2a6456b955778d  guix-build-cc8dff5f8ff8/output/x86_64-linux-gnu/bitcoin-cc8dff5f8ff8-x86_64-linux-gnu-debug.tar.gz
  b1302146a0e96f7faa150d764aa0ca92b46e887a886532ee7fc2b2cc63f174c5  guix-build-cc8dff5f8ff8/output/x86_64-linux-gnu/bitcoin-cc8dff5f8ff8-x86_64-linux-gnu.tar.gz
  319b52c1a62a9cdad2e3f1fac8dd22458be2a9c1e6a0d60b33cb27272d69e52a  guix-build-cc8dff5f8ff8/output/x86_64-w64-mingw32/SHA256SUMS.part
  11300b916588cb060ac06e074b94bc5da852ab36446df903045ad593dce5056b  guix-build-cc8dff5f8ff8/output/x86_64-w64-mingw32/bitcoin-cc8dff5f8ff8-win64-debug.zip
  045fcb6ca721bdefb7490b3452f28449cb2b0449721dbbb20c174be76f96e1a3  guix-build-cc8dff5f8ff8/output/x86_64-w64-mingw32/bitcoin-cc8dff5f8ff8-win64-setup-unsigned.exe
  38c826537c8054a35103e5ab7ca4f97ca98551f23bcbadb0532f6ca3444e0731  guix-build-cc8dff5f8ff8/output/x86_64-w64-mingw32/bitcoin-cc8dff5f8ff8-win64-unsigned.tar.gz
  7c5f75c5a0b9b98540c8c779a6fc6f5e98d7de792d3a218e4ad7a68fa4027385  guix-build-cc8dff5f8ff8/output/x86_64-w64-mingw32/bitcoin-cc8dff5f8ff8-win64.zip
  ```

ACKs for top commit:
  gruve-p:
    ACK cc8dff5f8f
  hebasto:
    ACK cc8dff5f8f
  jarolrod:
    ACK cc8dff5f8f

Tree-SHA512: d34a4c3e84efe9cade6de9d7ba5aafc0a5c6efce83e313552a248f2b1eb49dc032a50cf4f1c7eb4767e754a7b67f75a129be19e36a892776b16001c31f6725be
2022-09-21 11:14:36 +01:00
fanquake
97f865bb76
Merge bitcoin/bitcoin#25989: init: abort if i2p/cjdns are chosen via -onlynet but are unreachable
68209a7b5c rpc: make addpeeraddress work with cjdns addresses (Martin Zumsande)
a8a9ed67cc init: Abort if i2p/cjdns are chosen via -onlynet but unreachable (Martin Zumsande)

Pull request description:

  If the networks i2p / cjdns are chosen via `-onlynet` but the user forgot to provide `-i2psam` / `-cjdnsreachable`, no outbound connections will be made - it would be nice to inform the user about that.
  The solution proposed here mimics existing behavior for `-onlynet=onion` and non-specified `-onion`/`-proxy` where we already abort with an InitError - if reviewers would prefer to just print a warning, please say so.

  The second commit adds CJDNS support to the debug-only `addpeeraddress` RPC allowing to add CJDNS addresses to addrman for testing and debug purposes. (if `-cjdnsreachable=1`)

  This is the result of an [IRC discussion](https://bitcoin-irc.chaincode.com/bitcoin-core-dev/2022-09-01#848066;) with vasild.

ACKs for top commit:
  vasild:
    ACK 68209a7b5c
  dergoegge:
    ACK 68209a7b5c

Tree-SHA512: 6db9787f01820190f14f90a0b39e4206603421eb7521f792879094d8bbf4d4d0bfd70665eadcc40994ac7941a15ab5a8d65c4779fba5634c0e6fa66eb0972b8d
2022-09-21 11:00:47 +01:00
MacroFake
7184fb866f
Merge bitcoin/bitcoin#26143: test: wait for the expected basic block filter index in interface_rest
aee29c5d9e test: wait for the expected basic block filter index in `interface_rest` (brunoerg)

Pull request description:

  Fixes #26098

  Wait for the expected 'basic block filter index' to not cause issues when calling `/blockfilterheaders/basic/`, like:
  9bd842a592/src/rest.cpp (L423-L424)

Top commit has no ACKs.

Tree-SHA512: 36abe28a76cd01ce7ac1ae9258ce1a9a5473d985c498d915c1130256bc800d0d1207708a195b78bbcb00478ec9c373a2fbfeb26c1fddeb35abe8b253e0308058
2022-09-21 09:55:07 +02:00
Andrew Chow
9e2a2b88d5
Merge bitcoin/bitcoin#26132: wallet: Fix nNextResend data race in ResubmitWalletTransactions
fad61573ed Fix nNextResend data race in ResubmitWalletTransactions (MacroFake)

Pull request description:

  Now that `ResubmitWalletTransactions` is called from more than one thread, it is no longer thread-safe.

  Introduced in 5291933fed.

ACKs for top commit:
  achow101:
    ACK fad61573ed
  jonatack:
    ACK fad61573ed
  stickies-v:
    However, I think the current data race UB fix in fad61573e is the most critical to get into v24, so: ACK fad61573e - but open to further improvements.

Tree-SHA512: 54da2ed1c5f44e33588ac1d21ce26908fcf0bfe785c28ba8f6a479389b5ab7a0b32b016d4c482a2ccb405e0686efb61ffe23e427f5e589dc7d2b3c7469978977
2022-09-20 18:48:06 -04:00
brunoerg
aee29c5d9e test: wait for the expected basic block filter index in interface_rest 2022-09-20 14:10:34 -03:00
MacroFake
9bd842a592
Merge bitcoin/bitcoin#26127: test: check that bumping tx with already spent coin fails
74eb194f81 test: check that bumping tx with already spent coin fails (Sebastian Falbesoner)

Pull request description:

  This PR adds missing coverage for the `bumpfee` RPC,  for the case that a wallet transaction is passed with an input that is already spent:
  0b02ce914e/src/wallet/feebumper.cpp (L182-L186)

  This is achieved by simply creating a transaction with a wallet and then mining it (I'm not aware of any other scenario how this could be achieved). Additionally, two RPC throw checks are changed in the test to be more specific:
  0b02ce914e/src/wallet/feebumper.cpp (L42-L45)
  0b02ce914e/src/wallet/feebumper.cpp (L47-L50)

ACKs for top commit:
  glozow:
    ACK 74eb194f81

Tree-SHA512: 487d0e30a7cc5e2a5f63424ab6aed2963e05e47e2649fb1ad2289c4b48ad488f2dae5c27bf50e532e7eb2f2f5bf0340ed7dda985d14473f31dec0d757bb56324
2022-09-20 18:44:35 +02:00
Andrew Chow
fc4017552c
Merge bitcoin/bitcoin#26116: rpc: Allow importmulti watchonly imports with locked wallet
2c03465dfa test: Test watchonly imports with passphrase-locked wallet (Aurèle Oulès)
1fcf9e6e81 rpc: Allow importmulti watchonly imports with locked wallet (Aurèle Oulès)

Pull request description:

  Allows watch-only imports on locked wallets with `importmulti`.
  Also adds a test.

  Fixes #17867.

ACKs for top commit:
  achow101:
    ACK 2c03465dfa
  kristapsk:
    re-ACK 2c03465dfa
  theStack:
    re-ACK 2c03465dfa

Tree-SHA512: 9978d6e59a230c0d160efd312c671cf59458797387d6622b6bf5c9e0681c1fcfebedb3d834fa9314dc5a1eda97e3295696352eacbeab9b43a46b942990087035
2022-09-20 12:00:02 -04:00
MacroFake
faeea28753
test: Avoid race in disconnect_nodes helper 2022-09-20 15:48:05 +02:00
fanquake
5b6f0f31fa
Merge bitcoin/bitcoin#26036: net: add NetEventsInterface::g_msgproc_mutex
d575a675cc net_processing: add thread safety annotation for m_highest_fast_announce (Anthony Towns)
0ae7987f68 net_processing: add thread safety annotations for PeerManagerImpl members accessed only via the msgproc thread (Anthony Towns)
a66a7ccb82 net_processing: add thread safety annotations for Peer members accessed only via the msgproc thread (Anthony Towns)
bf12abe454 net: drop cs_sendProcessing (Anthony Towns)
1e78f566d5 net: add NetEventsInterface::g_msgproc_mutex (Anthony Towns)

Pull request description:

  There are many cases where we assume message processing is single-threaded in order for how we access node-related memory to be safe. Add an explicit mutex that we can use to document this, which allows the compiler to catch any cases where we try to access that memory from other threads and break that assumption.

ACKs for top commit:
  MarcoFalke:
    review ACK d575a675cc 📽
  dergoegge:
    Code review ACK d575a675cc
  w0xlt:
    ACK d575a675cc
  vasild:
    ACK d575a675cc modulo the missing runtime checks

Tree-SHA512: b886d1aa4adf318ae64e32ccaf3d508dbb79d6eed3f1fa9d8b2ed96f3c72a3d38cd0f12e05826c9832a2a1302988adfd2b43ea9691aa844f37d8f5c37ff20e05
2022-09-20 14:18:23 +01:00
fanquake
eb6026b90f
build: remove strings.h from header checks
We don't include strings.h anywhere.

This is also already checked for by autoconf, so us checking for it just
means a 3rd existence check during ./configure.
2022-09-20 12:06:36 +01:00
MacroFake
fad61573ed
Fix nNextResend data race in ResubmitWalletTransactions 2022-09-20 11:49:57 +02:00
MacroFake
71ac70d877
Merge bitcoin/bitcoin#26095: script: bump codespell to 2.2.1, update ignored words and fix spelling
b6a65568df Fix issues identified by codespell 2.2.1 and update ignored words (Jon Atack)
8f2010de6e Bump codespell version to 2.2.1 (Jon Atack)

Pull request description:

  as well as one in `test/lint/lint-locale-dependence.py` not seen by the spelling linter.

  Can be tested locally by running `test/lint/lint-spelling.py` on this branch versus on master and by checking the CI linter result.

ACKs for top commit:
  satsie:
    ACK b6a65568df

Tree-SHA512: ab4ba029a9a5de5926fa5d336bd3b21245acf0649c6aa69a48c223bd22327e13beb32e970f66f54db58cd318731b643e1c7ace9a89776ed2a069cddc02363b71
2022-09-20 11:22:22 +02:00
MacroFake
d76a423809
Merge bitcoin/bitcoin#26067: util: improve bitcoin-wallet exit codes
fa2b8ae0a2 util: improve bitcoin-wallet exit codes (MacroFake)

Pull request description:

  Refactors `bitcoin-wallet` so that it doesn't return a non-zero exit code by default, and makes the option handling more inline with the other binaries. i.e outputting `Error: too few parameters` if you don't pass any options.

  Fixing this means we can check the process output in `gen-manpages.py`; which addresses the remaining [review comment](https://github.com/bitcoin/bitcoin/pull/24263#discussion_r806126705) from #24263.

Top commit has no ACKs.

Tree-SHA512: 80bd8098faefb4401ca1e4d49937ef6c960cf60ce0e7fb9dc38904fbc2fd92e319ec04570381da84943b7477845bf6be00e977f4c0451b247a6698662ce8f1bf
2022-09-20 09:54:04 +02:00
Luke Dashjr
a60d9eb9e6 Bugfix: Wallet: Lock cs_wallet for SignMessage
cs_desc_main is typically locked within scope of a cs_wallet lock, but:

CWallet::IsLocked locks cs_wallet
...called from DescriptorScriptPubKeyMan::GetKeys
...called from DescriptorScriptPubKeyMan::GetSigningProvider which locks cs_desc_main first, but has no access to cs_wallet
...called from DescriptorScriptPubKeyMan::SignMessage
...called from CWallet::SignMessage which can access and lock cs_wallet

Resolve the out of order locks by grabbing cs_wallet in CWallet::SignMessage first
2022-09-20 00:46:27 +00:00
Sebastian Falbesoner
74eb194f81 test: check that bumping tx with already spent coin fails 2022-09-19 20:01:49 +02:00
glozow
0b02ce914e
Merge bitcoin/bitcoin#26124: docs: Add 371 to bips.md
d3d6a18f71 docs: Add 371 to bips.md (Andrew Chow)

Pull request description:

ACKs for top commit:
  fanquake:
    ACK d3d6a18f71

Tree-SHA512: dc25742c4fe46d4bb80023802823e61b8081964c5ccd6627dcbe531727e0442926b402cf909937ccf5713a0d0f917cb0eab2c743330afb57216b54325d7431f0
2022-09-19 17:55:09 +01:00
Andrew Chow
d3d6a18f71 docs: Add 371 to bips.md 2022-09-19 12:20:09 -04:00
MacroFake
9843a8c1f3
Merge bitcoin/bitcoin#26119: doc: Move -permitbaremultisig to the relay help category
faf5bb87da doc: Move -permitbaremultisig to the relay help category (MacroFake)

Pull request description:

  This transaction relay setting doesn't have anything to do with establishing p2p connections.

ACKs for top commit:
  glozow:
    concept ACK faf5bb87da
  luke-jr:
    utACK faf5bb87da, but (nit) prefer to keep it on a single line

Tree-SHA512: 436fcff5191c346fe16b3208411886e3239fb5819322673a45cf0c0f9a3070563d312da8bb5d5f6060b36d305e59e5b58928526d5042cb3dac29ce7740d17c1c
2022-09-19 18:12:34 +02:00
MacroFake
6e11e20340
Merge bitcoin/bitcoin#26121: build: Bump version to 24.99
0567b5650e build: Bump version to 24.99 (fanquake)

Pull request description:

  24.x has been branched off: https://github.com/bitcoin/bitcoin/tree/24.x.

  On the master branch, bump to 24.99 (pre-25.0).

ACKs for top commit:
  theStack:
    ACK 0567b5650e

Tree-SHA512: 5207363c707d9fe2b392cafc823fd31b99f06f87b0ad0a20841c78fd6e3ad6f030d9ebf995b1ab3b3843a1dca7f86e65889120ee0f490cb80d175de666f5ff75
2022-09-19 18:10:12 +02:00
fanquake
0567b5650e
build: Bump version to 24.99
On the master branch, bump to 24.99 (pre-25.0).
2022-09-19 16:48:08 +01:00
fanquake
9f650062fc
Merge bitcoin/bitcoin#26005: Wallet: Fix error handling (copy_file failure in RestoreWallet, and in general via interfaces)
c3e536555a Bugfix: Wallet: Return util::Error rather than non-error nullptr when CreateWallet/LoadWallet/RestoreWallet fail (Luke Dashjr)
335ff98c8a Bugfix: Wallet: Wrap RestoreWallet content in a try block to ensure exceptions become returned errors and incomplete wallet directory is removed (Luke Dashjr)

Pull request description:

  Bug 1: `copy_file` can throw exceptions, but `RestoreWallet` is expected to return a nullptr with a populated `errors` parameter. This is fixed by wrapping `copy_file` and `LoadWallet` (for good measure) in a `try` block, and converting any exceptions to the intended return style.

  Bug 2: `util::Result` turns what would have been a `false` unique_ptr into a `true` nullptr result, which leads to nullptr dereferences in at least the 3 cases of wallet creation/loading/restoring. This is fixed by keeping the pointer as a plain `std::unique_ptr` until actually returning it (ie, after the nullptr check).

  Fixes https://github.com/bitcoin-core/gui/issues/661

ACKs for top commit:
  achow101:
    ACK c3e536555a

Tree-SHA512: 4291b3dbbb147acea2e63a704324c9371bc16ecb4237f8753729b0b0a6e55c9758ad61bfe8bd432fd7b0bae95d8b63a9831e61ac8b8d5c0197b550a2e0f4a105
2022-09-19 16:10:47 +01:00
Martin Zumsande
68209a7b5c rpc: make addpeeraddress work with cjdns addresses
This allows us to add cjdns addresses to addrman for
testing and debug purposes (if -cjdnsreachable is true)
2022-09-19 11:06:43 -04:00
Martin Zumsande
a8a9ed67cc init: Abort if i2p/cjdns are chosen via -onlynet but unreachable
...because -i2psam or -cjdnsreachable are not provided.
This mimics existing behavior for -onlynet=onion and non-specified proxy.
2022-09-19 11:06:43 -04:00
glozow
55e1deb745
Merge bitcoin/bitcoin#25540: miniscript: avoid wasteful computation, prevent memory blowup when fuzzing
e8cc2e4afc Make miniscript string parsing account for exact script size as bound (Pieter Wuille)
4cb8f9a92c Permit delaying duplicate key check in miniscript::Node construction (Pieter Wuille)

Pull request description:

  As reported in https://github.com/bitcoin/bitcoin/pull/24860#discussion_r893109311, the current code to construct a `miniscript::Node` could cause a blowup on large fuzzer inputs. This is because:
  1. The duplicate key check is redundantly done at parsing time, since we will recursively create miniscript nodes and the constructor will unconditionally look for duplicate across this node's keys and all its sub-nodes'.
  2. We don't put an upper bound on the size of the inputs to consider for parsing.

  To avoid wasteful computation, and prevent the blowup on some fuzzer inputs, limit the size of reasonable inputs and only perform the check for duplicate keys once when parsing.
  Regarding the duplicate key check bypass in the constructor we iterated on different approaches, and eventually settled on passing a dummy argument. Albeit less elegant, all other approaches required getting rid of `std::make_shared` and adding an allocation *per node created*.

  This PR contains code from Pieter Wuille (see commits).

  Fixes https://github.com/bitcoin/bitcoin/pull/25824.

ACKs for top commit:
  darosior:
    ACK e8cc2e4afc -- it's my own PR but most of the code here was written by sipa. I've reviewed and tested it.
  sipa:
    ACK e8cc2e4afc (for the few parts of the code that aren't mine)

Tree-SHA512: c21de39b3eeb484393758629882fcf8694a9bd1b8f15ae22efcec1582efc9c2309c5a0c2d90f361dd8e233d704a07dcd5fb982f4a48a002c4d8789e1d78bb526
2022-09-19 15:51:53 +01:00
MacroFake
faf5bb87da
doc: Move -permitbaremultisig to the relay help category 2022-09-19 14:09:34 +02:00
Aurèle Oulès
2c03465dfa
test: Test watchonly imports with passphrase-locked wallet 2022-09-19 13:54:55 +02:00