Commit Graph

40808 Commits

Author SHA1 Message Date
Ava Chow 3310a965bd
Merge bitcoin/bitcoin#29850: net: Decrease nMaxIPs when learning from DNS seeds
f2e3662e57 net: Decrease nMaxIPs when learning from DNS seeds (laanwj)

Pull request description:

  Limit number of IPs learned from a single DNS seed to 32, to prevent the results from one DNS seed from dominating AddrMan. Note that the number of results from a UDP DNS query is bounded to 33 already, but it is possible for it to use TCP where a larger number of results can be returned.

  Closes #16070.

ACKs for top commit:
  Sjors:
    utACK f2e3662e57
  achow101:
    ACK f2e3662e57
  1440000bytes:
    utACK f2e3662e57
  mzumsande:
    utACK f2e3662e57

Tree-SHA512: 3f108c2baba7adfedb8019daaf60aa00e628b38d3942e1319c7183a4683670be01929ced9e6372c8e983c902e8633f81fbef12d7cdcaadd7f77ed729c1019942
2024-04-22 12:16:15 -04:00
glozow b3106be84f
Merge bitcoin/bitcoin#29898: test: Fix intermittent issue in p2p_handshake.py
6b02c11d66 test: Fix intermittent issue in p2p_handshake.py (stratospher)

Pull request description:

  When establishing outbound connections [`TestNode` --------> `P2PConnection`], `P2PConnection` listens for a single connection from `TestNode` on a [port which is fixed based on `p2p_idx`](312f54278f/test/functional/test_framework/p2p.py (L746)).

  If we reuse the same port when disconnecting and establishing connections again, we might hit this scenario where:
  - disconnection is done on python side for `P2PConnection`
  - disconnection not complete on c++ side for `TestNode`
  - we're trying to establish a new connection on same port again

  Prevent this scenario from happening by ensuring disconnection on c++ side for TestNode as well.

  One way to reproduce this on master would be adding a sleep statement before disconnection happens on c++ side.

  ```diff
  diff --git a/src/net.cpp b/src/net.cpp
  index e388f05b03..62507d1f39 100644
  --- a/src/net.cpp
  +++ b/src/net.cpp
  @@ -2112,6 +2112,7 @@ void CConnman::SocketHandlerConnected(const std::vector<CNode*>& nodes,
                   if (!pnode->fDisconnect) {
                       LogPrint(BCLog::NET, "socket closed for peer=%d\n", pnode->GetId());
                   }
  +                std::this_thread::sleep_for(std::chrono::milliseconds(1000));
                   pnode->CloseSocketDisconnect();
               }
               else if (nBytes < 0)
  ```

ACKs for top commit:
  maflcko:
    lgtm ACK 6b02c11d66
  mzumsande:
    Tested ACK 6b02c11d66
  BrandonOdiwuor:
    Tested ACK 6b02c11d66
  theStack:
    Tested ACK 6b02c11d66
  glozow:
    ACK 6b02c11d66

Tree-SHA512: 69509edb61ba45739fd585b6cc8a254f412975c124a5b5a52688288ecaaffd264dd76019b8290cc34c26c3ac2dfe477965ee5a11d7aabdd8e4d2a75229a4a068
2024-04-22 17:06:20 +01:00
Ava Chow 04c90f1059
Merge bitcoin/bitcoin#27679: ZMQ: Support UNIX domain sockets
21d0e6c7b7 doc: release notes for PR 27679 (Matthew Zipkin)
791dea204e test: cover unix sockets in zmq interface (Matthew Zipkin)
c87b0a0ff4 zmq: accept unix domain socket address for notifier (Matthew Zipkin)

Pull request description:

  This is a follow-up to https://github.com/bitcoin/bitcoin/pull/27375, allowing ZMQ notifications to be published to a UNIX domain socket.

  Fortunately, libzmq handles unix sockets already, all we really have to do to support it is allow the format in the actual option.

  [libzmq](https://libzmq.readthedocs.io/en/latest/zmq_ipc.html) uses the prefix `ipc://` as opposed to `unix:` which is [used by Tor](https://gitlab.torproject.org/tpo/core/tor/-/blob/main/doc/man/tor.1.txt?ref_type=heads#L1475) and now also by [bitcoind](a85e5a7c9a/doc/release-notes-27375.md?plain=1#L5) so we need to switch that internally.

  As far as I can tell, [LND](d20a764486/zmq.go (L38)) supports `ipc://` and `unix://` (notice the double slashes).

  With this patch, LND can connect to bitcoind using unix sockets:

  Example:

  *bitcoin.conf*:
  ```
  zmqpubrawblock=unix:/tmp/zmqsb
  zmqpubrawtx=unix:/tmp/zmqst
  ```

  *lnd.conf*:
  ```
  bitcoind.zmqpubrawblock=ipc:///tmp/zmqsb
  bitcoind.zmqpubrawtx=ipc:///tmp/zmqst
  ```

ACKs for top commit:
  laanwj:
    Code review ACK 21d0e6c7b7
  tdb3:
    crACK for 21d0e6c7b7.  Changes lgtm. Will follow up with some testing within the next few days as time allows.
  achow101:
    ACK 21d0e6c7b7
  guggero:
    Tested and code review ACK 21d0e6c7b7

Tree-SHA512: ffd50222e80dd029d903e5ddde37b83f72dfec1856a3f7ce49da3b54a45de8daaf80eea1629a30f58559f4b8ded0b29809548c0638cd1c2811b2736ad8b73030
2024-04-22 11:24:43 -04:00
Brandon Odiwuor 55b13ecd2e doc: explain what the wallet password does 2024-04-22 18:07:23 +03:00
Pieter Wuille b22901dfa9 Avoid explicitly computing diagram; compare based on chunks 2024-04-22 09:36:36 -04:00
MarcoFalke fa6c300a99
test: Fix intermittent timeout in p2p_tx_download.py 2024-04-22 15:03:03 +02:00
glozow ba7c67f609
Merge bitcoin/bitcoin#29879: fuzz: explicitly cap the vsize of RBFs for diagram checks
016ed248ba fuzz: explicitly cap the vsize of RBFs for diagram checks (Greg Sanders)

Pull request description:

  In master we are hitting a case where vsize transactions much larger than max standard size are causing an overflow in not-yet-exposed RBF diagram checking code: https://github.com/bitcoin/bitcoin/pull/29757#issuecomment-2049220195

  `ConsumeTxMemPoolEntry` is creating entries with tens of thousands of sigops cost, causing the resulting RBFs to be "overly large".

  To fix this I cause the fuzz test to stop adding transactions to the mempool when we reach a potential overflow of `int32_t`.

ACKs for top commit:
  glozow:
    ACK 016ed248ba
  marcofleon:
    ACK 016ed248ba. I ran libFuzzer on `package_rbf` on the current master branch until the overflow was encountered. Then I built the PR branch and ran the fuzzer using the crash input.

Tree-SHA512: b3ffc98d2c4598eb3010edd58b9370aab1441aafbb1044c83b2b90c17dfe9135b8de9dba475dd0108863c1ffedede443cd978e95231a41cf1f0715629197fa51
2024-04-22 12:33:06 +01:00
Hennadii Stepanov 6f5954acac
ci: Drop no longer needed `-I` flag in "tidy" task 2024-04-21 14:30:38 +01:00
glozow 67c0d93982
Merge bitcoin/bitcoin#29827: test: p2p: add test for rejected tx request logic (`m_recent_rejects` filter)
60ca5d5508 test: p2p: add test for rejected tx request logic (`m_recent_rejects` filter) (Sebastian Falbesoner)
e9dc511a7e fixup: get all utxos up front in fill_mempool, discourage wallet mixing (glozow)

Pull request description:

  Motivated by the discussion in #28970 (https://github.com/bitcoin/bitcoin/pull/28970#discussion_r1553911167), this PR adds test coverage for the logic around the `m_recent_rejects` filter, in particular that the filter is cleared after a new block comes in:
  f0794cbd40/src/net_processing.cpp (L2199-L2206)

  As expected, the second part of the test fails if the following patch is applied:
  ```diff
  diff --git a/src/net_processing.cpp b/src/net_processing.cpp
  index 6996af38cb..5cb1090e70 100644
  --- a/src/net_processing.cpp
  +++ b/src/net_processing.cpp
  @@ -2202,7 +2202,7 @@ bool PeerManagerImpl::AlreadyHaveTx(const GenTxid& gtxid)
           // or a double-spend. Reset the rejects filter and give those
           // txs a second chance.
           hashRecentRejectsChainTip = m_chainman.ActiveChain().Tip()->GetBlockHash();
  -        m_recent_rejects.reset();
  +        //m_recent_rejects.reset();
       }

       const uint256& hash = gtxid.GetHash();
  ```
  I'm still not sure in which file this test fits best, and if there is already test coverage for the first part of the test somewhere. Happy for any suggestions.

ACKs for top commit:
  maflcko:
    ACK 60ca5d5508 🍳
  glozow:
    code review ACK 60ca5d5508
  instagibbs:
    ACK 60ca5d5508

Tree-SHA512: 9cab43858e8f84db04a708151e6775c9cfc68c20ff53096220eac0b2c406f31aaf9223e8e04be345e95bf0a3f6dd15efac50b0ebeb1582a48a4560b3ab0bcba5
2024-04-19 16:22:46 +01:00
fanquake b8e084b978
guix: remove no-longer-used bzip2 2024-04-19 13:01:10 +01:00
fanquake bd6e1d6718
depends: switch qrencode to .tar.gz 2024-04-19 13:01:10 +01:00
fanquake 4a9b71b900
depends: switch libxcb_util_wm to .tar.gz 2024-04-19 13:01:10 +01:00
fanquake fad989852d
depends: switch libxcb_util_render to .tar.gz 2024-04-19 13:01:10 +01:00
fanquake ce28cb31b4
depends: switch libxcb_util_keysyms to .tar.gz 2024-04-19 13:01:10 +01:00
fanquake 00a6896346
depends: switch libxcb_util_image to .tar.gz 2024-04-19 13:01:10 +01:00
fanquake 8e9190c6aa
depends: switch libxcb_util to .tar.gz 2024-04-19 13:01:09 +01:00
fanquake b845029d46
depends: switch xproto to .tar.gz 2024-04-19 13:01:09 +01:00
fanquake 5996c30384
depends: switch libXau to .tar.gz 2024-04-19 13:01:09 +01:00
fanquake e7a8dd5931
depends: switch fontconfig to .tar.gz 2024-04-19 13:01:09 +01:00
fanquake 58c423def3
depends: switch boost to .tar.gz 2024-04-19 13:01:09 +01:00
stratospher 6b02c11d66 test: Fix intermittent issue in p2p_handshake.py
If we reuse the same port when disconnecting and establishing connections
again, we might hit this scenario:
- disconnection is done on python side for P2PConnection
- disconnection is not complete on c++ side for TestNode
- we're trying to establish a new connection on same port again

Prevent this scenario from happening by ensuring disconnection on c++
side for TestNode as well.
2024-04-19 00:33:45 +05:30
Sergi Delgado Segura fd81a37239 net: attempts to connect to all resolved addresses when connecting to a node
Prior to this, when establishing a network connection via CConnman::ConnectNode,
if the connection needed address resolution, a single address would be picked
at random from the resolved addresses and our node will try to connect to it. However,
this would lead to the behavior of ConnectNode being unpredictable when the address
was resolved to various ips (e.g. the address resolving to IPv4 and IPv6, but we only
support one of them).

This patches the aforementioned behavior by going over all resolved IPs until we find one
we can connect to or until we exhaust them.
2024-04-18 10:05:57 -04:00
Hennadii Stepanov 18fd522ca9
ci, msvc: Add "Run fuzz binaries" step 2024-04-18 10:27:55 +01:00
Hennadii Stepanov 52933d7283
fuzz: Pass `SystemRoot` environment variable to subprocess
See https://docs.python.org/3/library/subprocess.html
2024-04-18 10:27:46 +01:00
Hennadii Stepanov 23cb8207cd
ci, msvc: Add "Clone fuzz corpus" step 2024-04-18 10:27:34 +01:00
Hennadii Stepanov 19dceddf4b
build, msvc: Build `fuzz.exe` binary 2024-04-18 10:27:25 +01:00
Hennadii Stepanov 4c078d7bd2
build, msvc: Enable preprocessor conformance mode
See:
- https://learn.microsoft.com/en-us/cpp/build/reference/zc-preprocessor
- https://learn.microsoft.com/en-us/cpp/preprocessor/preprocessor-experimental-overview

Otherwise, the "traditional" MSVC preprocessor fails to parse the
`FUZZ_TARGET` and `DETAIL_FUZZ` macros because of behavior changes
highlighted in the docs mentioned above.
2024-04-18 10:27:12 +01:00
Hennadii Stepanov 09f5a74198
fuzz: Re-implement `read_stdin` in portable way 2024-04-18 10:18:44 +01:00
merge-script c05c214f2e
Merge bitcoin-core/gui#808: Change example address from legacy (P2PKH) to bech32m (P2TR)
c6d1b8de89 gui: change example address from legacy (P2PKH) to bech32m (P2TR) (Sebastian Falbesoner)

Pull request description:

  Legacy addresses are less and less common these days and not recommended to use, so it seems senseful to also reflect that in the example addresses and update to the most recent address / output type (bech32m / P2TR). Also, as I couldn't see any value in computing these at runtime, they are pre-generated. This was done with the following Python script, executed in `./test/functional` (it's also included in the commit body, though without the she-bang):
  ```python
  #!/usr/bin/env python3
  from test_framework.segwit_addr import CHARSET, decode_segwit_address, encode_segwit_address
  from test_framework.messages import sha256

  output_key = sha256(b'bitcoin dummy taproot output key')
  for network, hrp in [('mainnet', 'bc'), ('signet', 'tb'), ('testnet', 'tb'), ('regtest', 'bcrt')]:
      dummy_address = encode_segwit_address(hrp, 1, output_key)
      while decode_segwit_address(hrp, dummy_address) != (None, None):
          last_char = CHARSET[(CHARSET.index(dummy_address[-1]) + 1) % 32]
          dummy_address = dummy_address[:-1] + last_char
      print(f'{network:7} example address: {dummy_address}')
  ```

  Note that the last bech32 character is modified in order to make the checksum fail.

  master (mainnet):

  ![image](https://github.com/bitcoin-core/gui/assets/91535/8c94cc1e-5649-47ed-8b2d-33b18654f6a2)

  PR (mainnet):

  ![image](https://github.com/bitcoin-core/gui/assets/91535/1ce208a6-1218-4850-93e0-5323c73e9049)

ACKs for top commit:
  maflcko:
    lgtm ACK c6d1b8de89
  pablomartin4btc:
    tACK c6d1b8de89

Tree-SHA512: a53c267a3e0d29b9c41bf043b123e7152fbf297e2322d74ce047ba2582b54768187162d462cc334e91a84874731c2e0793726ad44d9970c10ecfe70a1d4f3f1c
2024-04-18 10:05:05 +01:00
merge-script aaab5fb3c5
Merge bitcoin-core/gui#806: refactor: Misc int sign change fixes
05416422d3 refactor: Avoid implicit-integer-sign-change in processNewTransaction (MarcoFalke)
321f105d08 refactor: Avoid implicit-signed-integer-truncation-or-sign-change in FreedesktopImage (MarcoFalke)
6d8eecd33a refactor: Avoid implicit-integer-sign-change in createTransaction (MarcoFalke)

Pull request description:

  This is allowed by the language. However, the `integer` sanitizer complains about it. Thus, fix it, so that the `integer` sanitizer can be used in the future to catch unintended sign changes.

  Fixes #805.

ACKs for top commit:
  pablomartin4btc:
    tACK 05416422d3
  hebasto:
    ACK 05416422d3, I have reviewed the code and it looks OK.

Tree-SHA512: eaa941479bd7bee196eb8b31d93b8e1db122410cf62e8ec4cbbec35cfd14cc766081c3df5dd14a228e21ad2678d8b8ba0d2649e5934c994a90ae96d8b264b4ce
2024-04-18 09:46:04 +01:00
Ryan Ofsky 65951e0418
index: race fix, lock cs_main while 'm_synced' is subject to change
This ensures that the index does not miss any 'new block' signals
occurring in-between reading the 'next block' and setting 'm_synced'.
Because, if this were to happen, the ignored blocks would never be
indexed, thus stalling the index forever.
2024-04-17 17:24:05 -03:00
Ryan Ofsky dbd2000b34
Merge bitcoin/bitcoin#28340: security: restrict abis in bitcoind.service
0244416aac security: restrict abis in bitcoind.service (Charlie)

Pull request description:

  [As noted here](https://www.freedesktop.org/software/systemd/man/systemd.exec.html#MemoryDenyWriteExecute=), it's a good idea to pair `MemoryDenyWriteExecute=true` with `SystemCallArchitectures=native` because `MemoryDenyWriteExecute` can be circumvented in some operating systems which support multiple ABIs like x86/x86-64.
  This helps restrict the possible application binary interfaces (ABIs) that can be used when running bitcoind through systemd, reducing the attack surface area.

ACKs for top commit:
  laanwj:
    ACK 0244416aac . This is a sensible security feature.
  0xB10C:
    ACK 0244416aac

Tree-SHA512: 77a35b0674d8d67d857cd20ae1b8cd011f82d6f5ed21bc106cbe45bfa937e786ddc1bf7261e3bdb8c289df1224e91658760905d2c8f37cc4c6506ef8037ad158
2024-04-17 13:00:42 -04:00
Ava Chow 003785c961
Merge bitcoin/bitcoin#28373: doc: Add example of mixing private and public keys in descriptors
24b67fa9f6 doc: Add example of mixing private and public keys in descriptors (Anton A)

Pull request description:

  closes: #27414

ACKs for top commit:
  achow101:
    ACK 24b67fa9f6
  alfonsoromanz:
    Re ACK 24b67fa9f6

Tree-SHA512: 8c063f23199ac0ff35909f786a5b0de1b4a9b15d1e93bdcdac10cb4bd2002c12e99b6fb1c2e56d16971e7622b67d910b79088429df92c48279be2d7797049911
2024-04-17 11:29:50 -04:00
merge-script 5562f698b7
Merge bitcoin/bitcoin#29875: chore: fix some typos in comments
b1ee4a557b chore: fix some typos in comments (StevenMia)

Pull request description:

  Fixes typos.

ACKs for top commit:
  fanquake:
    ACK b1ee4a557b

Tree-SHA512: 29a93db2091337ac6fd1e403f12b2c96be4c22e783a60dbf5b3e3988b962246b58705ca3c1274ed1ad2623f7632ac7eb90ca1e8b7e7992bc9d2f046f73cdf4d6
2024-04-17 14:02:22 +01:00
merge-script dd9007d5bd
Merge bitcoin/bitcoin#29859: build: Fix false positive `CHECK_ATOMIC` test
dd3e0fa125 build: Fix false positive `CHECK_ATOMIC` test for clang-15 (Hennadii Stepanov)

Pull request description:

  On the master branch @ 0de63b8b46, a building `bitcoind` with clang-15 for `i686-pc-linux-gnu` fails to link:
  ```
    CXXLD    bitcoind
  /usr/bin/ld: libbitcoin_wallet.a(libbitcoin_wallet_a-wallet.o): in function `std::remove_volatile<double>::type std::__atomic_impl::load<double>(double const*, std::memory_order)':
  /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/atomic_base.h:948: undefined reference to `__atomic_load'
  /usr/bin/ld: libbitcoin_wallet.a(libbitcoin_wallet_a-wallet.o): in function `void std::__atomic_impl::store<double>(double*, std::remove_volatile<double>::type, std::memory_order)':
  /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/atomic_base.h:940: undefined reference to `__atomic_store'
  /usr/bin/ld: libbitcoin_wallet.a(libbitcoin_wallet_a-wallet.o): in function `void std::__atomic_impl::store<double>(double*, std::remove_volatile<double>::type, std::memory_order)':
  /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/atomic_base.h:940: undefined reference to `__atomic_store'
  /usr/bin/ld: /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/atomic_base.h:940: undefined reference to `__atomic_store'
  /usr/bin/ld: libbitcoin_wallet.a(libbitcoin_wallet_a-wallet.o): in function `std::remove_volatile<double>::type std::__atomic_impl::load<double>(double const*, std::memory_order)':
  /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/atomic_base.h:948: undefined reference to `__atomic_load'
  /usr/bin/ld: libbitcoin_wallet.a(libbitcoin_wallet_a-wallet.o): in function `void std::__atomic_impl::store<double>(double*, std::remove_volatile<double>::type, std::memory_order)':
  /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/atomic_base.h:940: undefined reference to `__atomic_store'
  /usr/bin/ld: libbitcoin_wallet.a(libbitcoin_wallet_a-backup.o): in function `void std::__atomic_impl::store<double>(double*, std::remove_volatile<double>::type, std::memory_order)':
  /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/atomic_base.h:940: undefined reference to `__atomic_store'
  /usr/bin/ld: /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/atomic_base.h:940: undefined reference to `__atomic_store'
  /usr/bin/ld: /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/atomic_base.h:940: undefined reference to `__atomic_store'
  /usr/bin/ld: /usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/atomic_base.h:940: undefined reference to `__atomic_store'
  /usr/bin/ld: libbitcoin_wallet.a(libbitcoin_wallet_a-backup.o):/usr/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/atomic_base.h:940: more undefined references to `__atomic_store' follow
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  ```

  due to false positive `CHECK_ATOMIC` test in the `configure` script.

  This PR fixes this test.

ACKs for top commit:
  maflcko:
    review ACK dd3e0fa125
  fanquake:
    ACK dd3e0fa125

Tree-SHA512: b60acf8d83fc84cc3280d95028395d341ed9ed2fcf38ae0a101d50aa19cc35540e9763aa36668c4dc1e1bc7e1f33dbda0e662df39c9e414a284ef91d7fc55fba
2024-04-17 14:00:40 +01:00
merge-script 3b70ce231e
Merge bitcoin/bitcoin#29846: guix: replace GCC unaligned VMOV patch with binutils patch
a0dc2ebcda guix: replace GCC unaligned VMOV patch with binutils patch (fanquake)

Pull request description:

  Rather than invasively patching GCC, given we have binutils 2.38 available, we can patch it to flip the default for
  `-muse-unaligned-vector-move`.

  A 1 line binutils patch, is much more maintainable than the ~300 line patch into GCC. It's also a slight inprovement in regards to patching out ualigned instructions in the release binaries. For comparison:
  Master:
  ```bash
  objdump -D bin/*.exe | rg "vmova|vmovdqa|vmovaps|vmovapd|vmovdqa64|vmovdqa32"
  141b8be20: c5 f8 28 1a                 vmovaps(%rdx), %xmm3
  1420564b3: c5 79 29 36                 vmovapd%xmm14, (%rsi)
  1403060f3: c5 79 29 36                 vmovapd%xmm14, (%rsi)
  140792b13: c5 79 29 36                 vmovapd%xmm14, (%rsi)
  140cb0693: c5 79 29 36                 vmovapd%xmm14, (%rsi)
  1415ea0f3: c5 79 29 36                 vmovapd%xmm14, (%rsi)
  ```

  This PR:
  ```bash
  objdump -D bin/*.exe | rg "vmova|vmovdqa|vmovaps|vmovapd|vmovdqa64|vmovdqa32"
  141b8be20: c5 f8 28 1a                 vmovaps(%rdx), %xmm3
  1420564b3: c5 79 29 36                 vmovapd%xmm14, (%rsi)
  1403060f3: c5 79 29 36                 vmovapd%xmm14, (%rsi)
  140792b13: c5 79 29 36                 vmovapd%xmm14, (%rsi)
  140cb0693: c5 79 29 36                 vmovapd%xmm14, (%rsi)
  ```

ACKs for top commit:
  laanwj:
    Code review ACK a0dc2ebcda

Tree-SHA512: b3b6dcd2efaaa825d32c768302651d26a120a3e47b93fafb862a1884ff68fd96edb42ea9bc9974c005c8f5a1d15c217deec0ed462cc4a3365cab1bad5a0b5fef
2024-04-17 12:22:11 +01:00
fanquake 1a9aa8d4ee
build: better scope usage of -Wl,-headerpad_max_install_names
If we aren't using install_name_tool when cross-compiling, we don't need
to test for / add it to LDFLAGS when that is the case.
2024-04-17 11:40:25 +01:00
fanquake 3bee51427a
build: don't use install_name_tool for macOS deploy when cross-compiling
This is only needed when compiling on macOS. This means we can also
better scope the usage of `-headerpad_max_install_names`.
2024-04-17 11:40:25 +01:00
fanquake 78b6b5c485
build: don't pass strip to macOS deploy if cross-compiling
This could only be called in code paths that cannot be hit.
2024-04-17 11:40:25 +01:00
glozow 8cd9475321
Merge bitcoin/bitcoin#29893: test: fix intermittent failure in p2p_compactblocks_hb.py
1ae5b208d3 test: fix intermittent failure in p2p_compactblocks_hb.py (Martin Zumsande)

Pull request description:

  Fixes #29860

  As a result of node1 receiving a block, it sends out SENDCMPCT messages to some of its peers to update the high-bandwidth status. We need to wait until those are received and processed by the peers to avoid intermittent failures. Before, we'd only wait until all peers have synced with the new block (within `generate`) which is not sufficient.

  I could reproduce the failure by adding a `std::this_thread::sleep_for(std::chrono::milliseconds(1000));` sleep to the [net_processing code](c7567d9223/src/net_processing.cpp (L3763)) that processes `NetMsgType::SENDCMPCT`.

ACKs for top commit:
  instagibbs:
    ACK 1ae5b208d3
  alfonsoromanz:
    Tested ACK 1ae5b208d3
  glozow:
    ACK 1ae5b208d3

Tree-SHA512: 47c29616e73a5e0ff966fc231e4f672c1a6892511e5c10a3905b30ad6b2a3d1267fa0a88bd8f64b523fe580199d22a43545c84e361879e5096483152065c4b9a
2024-04-17 11:28:42 +01:00
merge-script c8e3b94744
Merge bitcoin/bitcoin#29892: test: Fix failing univalue float test
fa4c69669e test: Fix failing univalue float test (MarcoFalke)

Pull request description:

  Currently the test may fail for some compilers, because `1e-8` may not be possible to represent exactly/consistently.

  ```
  $ ./src/univalue/test/object
  object: univalue/test/object.cpp:424: void univalue_readwrite(): Assertion `v.read("0.00000000000000000000000000000000000001e+30 ") && v.get_real() == 1e-8' failed.
  Aborted (core dumped)
  ```

  Fixes https://github.com/bitcoin/bitcoin/pull/27256#discussion_r1567356943

ACKs for top commit:
  laanwj:
    ACK fa4c69669e
  stickies-v:
    ACK fa4c69669e , thanks for fixing!

Tree-SHA512: dea4f4f843381d5e8ffaa812b2290a11e081b29f8777d041751c4aa9942e60f1f8d2d1a652d9a52b41dec470a490c9fe26ca9bc762dd593c3521b328a8af2826
2024-04-17 08:57:34 +01:00
merge-script 5c10d12e77
Merge bitcoin/bitcoin#29828: guix: remove `gcc-toolchain static` from Windows build
05da2460db guix: remove gcc-toolchain static from Windows build (fanquake)

Pull request description:

  The libs in this dir are the following:
  ```bash
  ls /gnu/store/2vnbkrdin4rrf7ygnr80mlcglin4qqa4-gcc-toolchain-12.3.0-static/lib/
  libanl.a           libc.a             libdl.a         libm.a
  libBrokenLocale.a  libcrypt.a         libg.a          libmcheck.a
  libpthread.a       librt.a
  libresolv.a        libutil.a
  ```

  These do not need to be propogated into the Windows build environment.

  Guix Build (aarch64):
  ```bash
  450c0c4f45f9cb7ed7fc2ef6e7557b6a23004b82c951399da3b7635e8451a076  guix-build-05da2460db89/output/dist-archive/bitcoin-05da2460db89.tar.gz
  5df68ab18636090c387bc90297356d0e148b02931d3a99c0f6d33cd268aa072b  guix-build-05da2460db89/output/x86_64-w64-mingw32/SHA256SUMS.part
  13e979f60d9296aa11081fbbb360404da9fbb797bb4663ed2d1189d800659b4f  guix-build-05da2460db89/output/x86_64-w64-mingw32/bitcoin-05da2460db89-win64-debug.zip
  d1cc78437a96f012a59af7c757bef592f163559e523d45014d7804d0be29a8b8  guix-build-05da2460db89/output/x86_64-w64-mingw32/bitcoin-05da2460db89-win64-setup-unsigned.exe
  33a9cfd4475677646bb32c9c45c25bd796ca5adb126590bf556d4e6f9592c676  guix-build-05da2460db89/output/x86_64-w64-mingw32/bitcoin-05da2460db89-win64-unsigned.tar.gz
  5d2ee251668d3d31bf378826ab06f98542dd20926cdee2df5c3315e11222a519  guix-build-05da2460db89/output/x86_64-w64-mingw32/bitcoin-05da2460db89-win64.zip
  ```

  Somewhat similar to #29673.

ACKs for top commit:
  laanwj:
    ACK 05da2460db
  hebasto:
    ACK 05da2460db,

Tree-SHA512: bf514a726a22e2bfae4de645b10d90a66fe090971340c4299aeb9b2ff9cf536ca6cfed274d312ea5d5a172775cbda6db0e609492ec603f5aee55c8de81462cc0
2024-04-17 08:56:45 +01:00
Matthew Zipkin 21d0e6c7b7
doc: release notes for PR 27679 2024-04-16 14:14:42 -04:00
Matthew Zipkin 791dea204e
test: cover unix sockets in zmq interface 2024-04-16 14:14:42 -04:00
Matthew Zipkin c87b0a0ff4
zmq: accept unix domain socket address for notifier 2024-04-16 14:14:37 -04:00
Ryan Ofsky 312f54278f
Merge bitcoin/bitcoin#29726: assumeutxo: Fix -reindex before snapshot was validated
b7ba60f81a test: add coverage for -reindex and assumeutxo (Martin Zumsande)
e57f951805 init, validation: Fix -reindex option with an existing snapshot (Martin Zumsande)

Pull request description:

  In c711ca186f logic was introduced that `-reindex` and `-reindex-chainstate` will delete the snapshot chainstate.
  This doesn't work currently, instead of deleting the snapshot chainstate the node crashes with an assert (this can be triggered by applying the added test commit on master).
  Fix this, and another bug that would prevent the new active chainstate from having a mempool after `-reindex` has deleted the snapshot (also covered by the test).

ACKs for top commit:
  fjahr:
    re-ACK b7ba60f81a
  hernanmarino:
    crACK b7ba60f81a . Good fix
  BrandonOdiwuor:
    re-ACK b7ba60f81a
  byaye:
    Tested ACK b7ba60f81a

Tree-SHA512: c168f36997d7677d590af37b10427870f5d30123abf1c76032a16661e486735373bfa7e049e6aca439526fbcb6d619f970bf9d042196c851bf058a75a32fafdc
2024-04-16 13:03:23 -04:00
Martin Zumsande 1ae5b208d3 test: fix intermittent failure in p2p_compactblocks_hb.py
As a result of node1 receiving a block, it sends out
SENDCMPCT messages to its peers to update the status.
We need to wait until those are received and
processed by the peers to avoid intermittent failures.
2024-04-16 12:20:47 -04:00
Sjors Provoost 4357158c47
wallet: return and display signer error
Both RPC and GUI now render a useful error message instead of (silently) failing.

Replace bool with util::Result<void> to clarify that this either succeeds or returns an error message.
2024-04-16 17:47:43 +02:00
Sjors Provoost dc55531087
wallet: compare address returned by displayaddress
Update external signer documentation to reflect this requirement, which HWI already implements.
2024-04-16 17:47:43 +02:00
Sjors Provoost 6c1a2cc09a
test: use h marker for external signer mock
Consistent with #26076
2024-04-16 17:47:43 +02:00