Commit Graph

40699 Commits

Author SHA1 Message Date
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
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
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
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
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
MarcoFalke
fa4c69669e
test: Fix failing univalue float test 2024-04-16 16:35:12 +02:00
merge-script
c7567d9223
Merge bitcoin/bitcoin#29886: doc: archive 27.0 release notes
c08754971d doc: archive 27.0 release notes (fanquake)

Pull request description:

ACKs for top commit:
  laanwj:
    ACK c08754971d
  stickies-v:
    ACK c08754971d

Tree-SHA512: ee910a35f0e74e02e8297ed655766995fbf5dc03ce3a9efd90986c22fea3693dedd0d2941fbcc94007cd77548985ac1c1d202644e822d1408f72faccb1472d80
2024-04-16 11:51:43 +01:00
fanquake
c08754971d
doc: archive 27.0 release notes 2024-04-16 09:10:33 +01:00
Sebastian Falbesoner
60ca5d5508 test: p2p: add test for rejected tx request logic (m_recent_rejects filter) 2024-04-15 22:48:32 +02:00
glozow
e9dc511a7e fixup: get all utxos up front in fill_mempool, discourage wallet mixing
Co-authored-by: Sebastian Falbesoner <sebastian.falbesoner@gmail.com>
2024-04-15 18:22:32 +02:00
glozow
07720b1cdd
Merge bitcoin/bitcoin#29869: rpc, bugfix: Enforce maximum value for setmocktime
c2e0489b71 [rpc, bugfix] Enforce maximum value for setmocktime (dergoegge)

Pull request description:

  The maximum value for our mocktime must be representable in nanoseconds, otherwise we end up with negative values returned from `NodeClock::now()`.

  Found through fuzzing:

  ```
  $ echo "c2V0bW9ja3RpbWVcZTptYf9w/3NldG3///////////////9p////ZP///ymL//////89////Nv9L////////LXkBAABpAA==" | base64 --decode > rpc-8cab9148ab4418ebd1923c213e9d3fe9c9b49b39.crash
  $ FUZZ=rpc ./src/test/fuzz/fuzz rpc-8cab9148ab4418ebd1923c213e9d3fe9c9b49b39.crash
  fuzz_libfuzzer: util/time.cpp:28: static NodeClock::time_point NodeClock::now(): Assertion `ret > 0s' failed.
  ```

ACKs for top commit:
  maflcko:
    re-ACK c2e0489b71
  brunoerg:
    crACK c2e0489b71
  glozow:
    ACK c2e0489b71

Tree-SHA512: d7e237ca37bedd74a6b085fb6e726a142705371044c77488f593f35afe70aeca756fdba86920294b1d322c7a9b2cde9ce4e1b7d410a6ccc1fd7c6f3a6e77200a
2024-04-15 15:06:17 +01:00
glozow
df609a344e
Merge bitcoin/bitcoin#29699: test: check disconnection when sending sendaddrv2 after verack
b4c9ace6ff test: check disconnection when sending sendaddrv2 after verack (brunoerg)

Pull request description:

  This PR adds test coverage for:
  71b63195b3/src/net_processing.cpp (L3796-L3807)

ACKs for top commit:
  maflcko:
    lgtm ACK b4c9ace6ff
  byaye:
    Tested ACK b4c9ace6ff

Tree-SHA512: 2ad49a269cb64794b8d626941cf532acafdbe6e97f3da5ccb52f3201a6773d2f5e3d7d62ce4289334b85d578790d4dd5833f6b8ba54bd49a8418a20aee0c3e5f
2024-04-15 15:04:07 +01:00
merge-script
22c86140f8
Merge bitcoin/bitcoin#29848: ci: use Clang 16 for Valgrind
ad21f22948 ci: use clang-16 for Valgrind (fanquake)

Pull request description:

  Switch to Ubuntu Noble.
  Valgrind 3.19 -> 3.22
  Clang 14 -> Clang 16

ACKs for top commit:
  maflcko:
    lgtm ACK ad21f22948

Tree-SHA512: ec79ef9faaec97e34529ae36fff7798f859daca6a1e3563bc50e5d56a56ee4525c736976158a6e950c5b9f810c498d54ab128df984f42441e706033906c2ea3e
2024-04-15 14:26:59 +01:00
StevenMia
b1ee4a557b chore: fix some typos in comments
Signed-off-by: StevenMia <flite@foxmail.com>
2024-04-15 20:12:54 +08:00
merge-script
58446e1d92
Merge bitcoin/bitcoin#28874: doc: fixup help output for -upnp and -natpmp
92f88a9629 doc: fixup NAT-PMP help doc (fanquake)
02395edca9 init: remove redundant upnp #ifdef (fanquake)

Pull request description:

  This is a very belated followup to #26896 (which removed the configure options for setting the upnp and natpmp runtime default) and corrects the `-help` docs for `-upnp` and `-natpmp`.

ACKs for top commit:
  davidgumberg:
    ACK 92f88a9629
  hernanmarino:
    ACK 92f88a9629

Tree-SHA512: 795dc8a8703bf322b5831d845de85f2428ee0dd45d3064b48ff47d147147381af26c0a9d00c596db12009b254763844b209989daf4e7470d20e8a1753b640966
2024-04-15 13:10:18 +01:00
merge-script
3abee5eceb
Merge bitcoin/bitcoin#29856: ci: Bump s390x to ubuntu:24.04
fadf7e90dc ci: Bump s390x to ubuntu:24.04 (MarcoFalke)

Pull request description:

  Now that most other CI tasks are rolled to 24.04, roll this one as well.
  Also, re-enable feature_init.

ACKs for top commit:
  fanquake:
    ACK fadf7e90dc - finished running after ~5 hours.

Tree-SHA512: d69f40227ba982eaaccc1e144ba05d3c8c4a096ac401077df3db5cf3276d1e146a438e4e0237dda876b3644fc7f0accd724a19e3c1cdb94c30c679899137280e
2024-04-15 10:04:42 +01:00
merge-script
d29fc3a245
Merge bitcoin/bitcoin#29823: minisketch: update subtree to 3472e2f5ec75ace39ce9243af6b3fee233a67492
4722b7c715 build: remove minisketch clz check (fanquake)
1eea10a6d2 Squashed 'src/minisketch/' changes from a571ba20f9..3472e2f5ec (fanquake)

Pull request description:

  https://github.com/sipa/minisketch/pull/81 will fix #29799.
  Minor build cleanups after https://github.com/sipa/minisketch/pull/80.

ACKs for top commit:
  dergoegge:
    utACK 4722b7c715
  hebasto:
    ACK 4722b7c715, I have verified the subtree update and reviewed the build system changes. Both look OK.

Tree-SHA512: eabd82e5a13cc4f32155319df97368f2e8c93320a4265b6c372efcb1ea4e756f6693df7c02498c8ea989ccd376a20277fa110c66d0754cb9bca5e54d18e0a965
2024-04-15 10:00:24 +01:00
dergoegge
c2e0489b71 [rpc, bugfix] Enforce maximum value for setmocktime 2024-04-15 09:51:06 +01:00
fanquake
ad21f22948
ci: use clang-16 for Valgrind
Switch to Ubuntu Noble.
2024-04-14 10:39:14 +01:00
MarcoFalke
fadf7e90dc
ci: Bump s390x to ubuntu:24.04
Re-enable feature_init
2024-04-12 16:30:45 +02:00
fanquake
4722b7c715
build: remove minisketch clz check 2024-04-12 14:28:34 +02:00
fanquake
e58e1323a8
Update minisketch subtree to latest master 2024-04-12 14:27:45 +02:00
fanquake
1eea10a6d2 Squashed 'src/minisketch/' changes from a571ba20f9..3472e2f5ec
3472e2f5ec Merge sipa/minisketch#81: Avoid overflowing shift by special casing inverse of 1
653d8b2e26 Avoid overflowing shift by special casing inverse of 1
33b7c200b9 Merge sipa/minisketch#80: Add c++20 version of CountBits
4a48f31a37 Merge sipa/minisketch#83: ci: Fix "s390x (big-endian)" task
82b6488acb Add c++20 version of CountBits
0498084d31 ci: Fix "s390x (big-endian)" task
71709dca9e Merge sipa/minisketch#82: ci: Fix `x86_64-w64-mingw32` task
9e6127fa98 Merge sipa/minisketch#74: Avoid >> above type width in BitWriter
ed420bc170 ci: Fix `x86_64-w64-mingw32` task
fe1040f227 Drop -Wno-shift-count-overflow compile flag
154bcd43bd Avoid >> above type width in BitWriter
67b87acdb6 Merge sipa/minisketch#78: ci: Update macOS image for CI
7de7250416 ci: Update macOS image for CI
83d812ea9f Merge sipa/minisketch#73: ci: Use correct variable to designate C++ compiler
e051a7d690 ci: Install wine32 package for Windows tests
2d2c695d78 build: Drop unused `CC` variable
1810fcbd11 ci: Use correct variable to designate C++ compiler
022b959049 Merge sipa/minisketch#77: Add missing include
08443c4892 Add missing include

git-subtree-dir: src/minisketch
git-subtree-split: 3472e2f5ec75ace39ce9243af6b3fee233a67492
2024-04-12 14:27:45 +02:00
Hennadii Stepanov
dd3e0fa125
build: Fix false positive CHECK_ATOMIC test for clang-15 2024-04-12 09:52:06 +02:00
merge-script
0de63b8b46
Merge bitcoin/bitcoin#29849: Fix typos in subprocess.hpp
13f5391bbb Fix typos in `subprocess.hpp` (Hennadii Stepanov)

Pull request description:

  Resolves one item in the https://github.com/bitcoin/bitcoin/pull/28981#pullrequestreview-1991272752:
  >    - Remove linter exclusions and fix all issues.

  Based on upstream https://github.com/arun11299/cpp-subprocess/pull/101.

ACKs for top commit:
  fanquake:
    ACK 13f5391bbb

Tree-SHA512: 2ee27a5b7d1ba6f47a5148add155c918eadaaffb94a4b5dd3edea00e63440b87291c559361bf25a8db1567debff78cf7e9466dc34f14331ca1d426994837df93
2024-04-11 16:18:39 +02:00
glozow
bdb33ec519
Merge bitcoin/bitcoin#29735: AcceptMultipleTransactions: Fix workspace not being set as client_maxfeerate failure
4ba1d0b553 fuzz: Add coverage for client_maxfeerate (Greg Sanders)
91d7d8f22a AcceptMultipleTransactions: Fix workspace client_maxfeerate (Greg Sanders)
f3aa5bd5eb fill_mempool: assertions and docsctring update (Greg Sanders)
a3da63e8fe Move fill_mempool to util function (Greg Sanders)
73b68bd8b4 fill_mempool: remove subtest-specific comment (Greg Sanders)

Pull request description:

  Bug causes an `Assume()` failure due to the expectation that the individual result should be invalid when done over `submitpackage` via rpc.

  Bug introduced by https://github.com/bitcoin/bitcoin/pull/28950 , and I discovered it rebasing https://github.com/bitcoin/bitcoin/pull/28984 since it's easier to hit in that test scenario.

  Tests in place were only checking `AcceptSingleTransaction`-level checks due to package evaluation only triggering when minfee is too high for the parent transaction.

  Added test along with fix, moving the fill_mempool utility into a common area for re-use.

ACKs for top commit:
  glozow:
    reACK 4ba1d0b553
  theStack:
    ACK 4ba1d0b553
  ismaelsadeeq:
    re-ACK 4ba1d0b553  via [diff](4fe7d150eb..4ba1d0b553)

Tree-SHA512: 3729bdf7f25d04e232f173ccee04ddbb2afdaafa3d04292a01cecf58fb11b3b2bc133e8490277f1a67622b62d17929c242dc980f9bb647896beea4332ee35306
2024-04-11 14:46:52 +02:00
Hennadii Stepanov
13f5391bbb
Fix typos in subprocess.hpp 2024-04-11 14:03:37 +02:00
fanquake
a0dc2ebcda
guix: replace GCC unaligned VMOV patch with binutils patch
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`.
2024-04-10 13:59:43 +02:00
merge-script
3f6a6da3b0
Merge bitcoin/bitcoin#29844: depends: remove no longer needed patch for Boost::Process
95c594f4e9 depends: remove no longer needed patch for Boost::Process (Sebastian Falbesoner)

Pull request description:

  As Boost::Process has been replaced by cpp-subprocess (PR #28981), this patch touches an unused code part and is hence not needed anymore.

ACKs for top commit:
  hebasto:
    ACK 95c594f4e9, I have reviewed the code and it looks OK.
  fanquake:
    ACK 95c594f4e9

Tree-SHA512: 0309b826f8c260e4180624f17302e51329fc4bd7a5431997d6d27d468dd5f7dbcd9db6a742efaba33ba30dbe361830eb1446fdbec927505ccf42412f9211934e
2024-04-10 12:31:02 +02:00
Sebastian Falbesoner
95c594f4e9 depends: remove no longer needed patch for Boost::Process
As Boost::Process has been replaced by cpp-subprocess (PR #28981), this
patch touches an unused code part and is hence not needed anymore.
2024-04-10 12:20:31 +02:00
merge-script
0a9cfd1752
Merge bitcoin/bitcoin#28981: Replace Boost.Process with cpp-subprocess
d5a715536e build: remove boost::process dependency for building external signer support (Sebastian Falbesoner)
70434b1c44 external_signer: replace boost::process with cpp-subprocess (Sebastian Falbesoner)
cc8b9875b1 Add `cpp-subprocess` header-only library (Hennadii Stepanov)

Pull request description:

  Closes https://github.com/bitcoin/bitcoin/issues/24907.

  This PR is based on **theStack**'s [work](https://github.com/bitcoin/bitcoin/issues/24907#issuecomment-1466087049).

  The `subprocess.hpp` header has been sourced from the [upstream repo](https://github.com/arun11299/cpp-subprocess) with the only modification being the removal of convenience functions, which are not utilized in our codebase.

  Windows-related changes will be addressed in subsequent follow-ups.

ACKs for top commit:
  achow101:
    reACK d5a715536e
  Sjors:
    re-tACK d5a715536e
  theStack:
    Light re-ACK d5a715536e
  fanquake:
    ACK d5a715536e - with the expectation that this code is going to be maintained as our own. Next PRs should:

Tree-SHA512: d7fb6fecc3f5792496204190afb7d85b3e207b858fb1a75efe483c05260843b81b27d14b299323bb667c990e87a07197059afea3796cf218ed8b614086bd3611
2024-04-10 12:03:06 +02:00
merge-script
e31956980e
Merge bitcoin/bitcoin#29820: refactor, bench, fuzz: Drop unneeded UCharCast calls
56e1e5dd10 refactor, bench, fuzz: Drop unneeded `UCharCast` calls (Hennadii Stepanov)

Pull request description:

  The `CKey::Set()` template function handles `std::byte` just fine: b5d21182e5/src/key.h (L105)

  Noticed in https://github.com/bitcoin/bitcoin/pull/29774#discussion_r1546288181.

ACKs for top commit:
  maflcko:
    lgtm ACK 56e1e5dd10
  laanwj:
    Seems fine, code review ACK 56e1e5dd10
  hernanmarino:
    ACK 56e1e5dd10

Tree-SHA512: 0f6b6e66692e70e083c7768aa4859c7db11aa034f555d19df0e5d33b18c0367ba1c886bcb6be3fdea78248a3cf8285576120812da55b995ef5e6c94a9dbd9f7c
2024-04-09 22:16:28 +02:00
merge-script
0b4218e43c
Merge bitcoin/bitcoin#29834: build: Change MAC_OSX macro to __APPLE__ in crypto
a71eadf66b Change MAC_OSX macro to __APPLE__ in crypto package (Lőrinc)

Pull request description:

  Split out from https://github.com/bitcoin/bitcoin/pull/29450#issuecomment-2044405345 to avoid the uncertainties and simplify review.

ACKs for top commit:
  theuni:
    ACK a71eadf66b
  fanquake:
    ACK a71eadf66b

Tree-SHA512: b6a7bd7ca95585dd9110cefe7c1213f4a1a72bdfc88670abf4a0d9a8bbc12e093544524adce46aa9ca714c472d417f74ca4a678af682ed2488053059434eaa02
2024-04-09 17:09:02 +02:00
Greg Sanders
4ba1d0b553 fuzz: Add coverage for client_maxfeerate 2024-04-09 14:53:34 +02:00
Greg Sanders
91d7d8f22a AcceptMultipleTransactions: Fix workspace client_maxfeerate
If we do not set the Failure for the workspace when
there is a client_maxfeerate related error, we hit
an Assume() to the contrary. Properly set it.
2024-04-09 14:53:34 +02:00
Greg Sanders
f3aa5bd5eb fill_mempool: assertions and docsctring update 2024-04-09 14:53:34 +02:00
Greg Sanders
a3da63e8fe Move fill_mempool to util function 2024-04-09 14:47:39 +02:00
glozow
bf031a517c
Merge bitcoin/bitcoin#29752: refactor: Use typesafe Wtxid in compact block encodings
a8203e9412 refactor: Simplify `extra_txn` to be a vec of CTransactionRef instead of a vec of pair<Wtxid, CTransactionRef> (AngusP)
c3c18433ae refactor: Use typesafe Wtxid in compact block encoding message, instead of ambiguous uint256. (AngusP)

Pull request description:

  The first commit replaces `uint256` with typesafe `Wtxid` (or `Txid`) types introduced in #28107.

  The second commit then simplifies the extra tx `vector` to just be of `CTransactionRef`s instead of a `std::pair<Wtxid, CTransactionRef>`, as it's easy to get a `Wtxid` from a transaction ref.

ACKs for top commit:
  glozow:
    ACK a8203e9412
  dergoegge:
    ACK a8203e9412

Tree-SHA512: b4ba1423a8059f9fc118782bd8a668213d229c822f22b01267de74d6ea97fe4f2aad46b5da7c0178ecc9905293e9a0eafba1d75330297c055e27fd53c8c8ebfd
2024-04-09 14:17:28 +02:00
Lőrinc
a71eadf66b Change MAC_OSX macro to __APPLE__ in crypto package 2024-04-09 11:21:57 +02:00
fanquake
f348ec7c2a
Merge bitcoin/bitcoin#29821: fuzz: Some test/fuzz/test_runner.py improvements
47cedee776 fuzz: Introduce `BITCOINFUZZ` environment variable (Hennadii Stepanov)
1573e9a11e fuzz, refactor: Deduplicate fuzz binary path creation (Hennadii Stepanov)

Pull request description:

  These changes are split from https://github.com/bitcoin/bitcoin/pull/29774 and can be beneficial on their own.

  The new `BITCOINFUZZ` environment variable complements the already existing set of variables used by tests: b5d21182e5/test/functional/test_framework/test_framework.py (L238-L243)

ACKs for top commit:
  maflcko:
    lgtm ACK 47cedee776
  davidgumberg:
    utACK 47cedee776

Tree-SHA512: 45809cfd13dc4a45c44cc433184352e84726cb95bea80fd8f581c59a0b8b0a5495260ff66922f9c57c38adbdbdd102439238f370fd49d6ea27a241a5e6249895
2024-04-09 10:58:16 +02:00
fanquake
383457333a
Merge bitcoin/bitcoin#29832: Revert "ci: Temporarily disable bpfcc-tools"
c15170c27d Revert "ci: Temporarily disable bpfcc-tools" (fanquake)

Pull request description:

  This reverts commit fac012c726.

  Closes #29804.

ACKs for top commit:
  maflcko:
    lgtm ACK c15170c27d
  hebasto:
    ACK c15170c27d.

Tree-SHA512: df7fc92175d8509481ef3afe26c7ac993af1bd0a5489d985e59a591d1ad4e580930691fda1768c2caa5a35d538d7cfa38ceba0f581c2ed95c1f7477012de9f26
2024-04-09 10:57:19 +02:00
fanquake
71f96c274f
Merge bitcoin/bitcoin#29786: Drop Windows Socket dependency for randomenv.cpp
03b87a3e64 Drop Windows Socket dependency for `randomenv.cpp` (Hennadii Stepanov)

Pull request description:

  This change drops a dependency on the ws2_32 library for our libbitcoinkernel by switching to [`GetComputerName`](https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-getcomputernamew) function.

ACKs for top commit:
  sipsorcery:
    utACK 03b87a3e64.
  laanwj:
    Code review ACK 03b87a3e64.
  fanquake:
    ACK 03b87a3e64

Tree-SHA512: a4abd5499176634d5f3fbf4e794a7504c40232fb73bd7f41955fbfb2cc7c44bc7ea4518c5203836e52f552c30414c6c3e1b24f0922641dbf1c8377981c0ffaf0
2024-04-09 10:21:27 +02:00