Commit graph

37843 commits

Author SHA1 Message Date
TheCharlatan
05870b1c92
refactor: Remove gArgs access from validation.cpp
This is done in the context of the libbitcoinkernel project, wherein
reliance of libbitcoinkernel code on the global gArgs is incrementally
removed.
2023-05-30 16:52:50 +02:00
TheCharlatan
8789b11114
refactor: Add path argument to FindSnapshotChainstateDir
Remove access to the global gArgs for getting the directory in
utxo_snapshot.

This is done in the context of the libbitcoinkernel project, wherein
reliance of libbitcoinkernel code on the global gArgs is incrementally
removed.
2023-05-30 16:52:48 +02:00
TheCharlatan
ef95be334f
refactor: Add stop_at_height option in ChainstateManager
Remove access to the global gArgs for the stopatheight argument and
replace it by adding a field to the existing ChainstateManager Options
struct.

This should eventually allow users of the ChainstateManager to not rely
on the global gArgs and instead pass in their own options.
2023-05-30 16:52:47 +02:00
fanquake
214f8f18b3
Merge bitcoin/bitcoin#27774: refactor: Add [[nodiscard]] where ignoring a Result return type is an error
fa5680b752 fix includes for touched header files (iwyu) (MarcoFalke)
dddde27f6f Add [[nodiscard]] where ignoring a Result return type is an error (MarcoFalke)

Pull request description:

  Only add it for those where it is an error to ignore. Also, fix the gcc compile warning https://github.com/bitcoin/bitcoin/pull/25977#issuecomment-1564350880. Also, fix iwyu for touched header files.

ACKs for top commit:
  TheCharlatan:
    ACK fa5680b752
  stickies-v:
    ACK fa5680b752

Tree-SHA512: c3509103bfeae246e2cf565bc561fcd68d8118515bac5431ba5304c3a63c8254b9c4f40e268b6f6d6b79405675c5a960db9b4eb3bdd14aedca333dc1c9e76415
2023-05-30 15:32:19 +01:00
fanquake
9564f98fee
Merge bitcoin/bitcoin#27636: kernel: Remove util/system from kernel library, interface_ui from validation.
7d3b35004b refactor: Move system from util to common library (TheCharlatan)
7eee356c0a refactor: Split util::AnyPtr into its own file (TheCharlatan)
44de325d95 refactor: Split util::insert into its own file (TheCharlatan)
9ec5da36b6 refactor: Move ScheduleBatchPriority to its own file (TheCharlatan)
f871c69191 kernel: Add warning method to notifications (TheCharlatan)
4452707ede kernel: Add progress method to notifications (TheCharlatan)
84d71457e7 kernel: Add headerTip method to notifications (TheCharlatan)
447761c822 kernel: Add notification interface (TheCharlatan)

Pull request description:

  This pull request is part of the `libbitcoinkernel` project https://github.com/bitcoin/bitcoin/issues/27587 https://github.com/bitcoin/bitcoin/projects/18 and more specifically its "Step 2: Decouple most non-consensus code from libbitcoinkernel".

  ---

  It removes the kernel library's dependency on `util/system` and `interface_ui`. `util/system` contains networking and shell-related code that should not be part of the kernel library. The following pull requests prepared `util/system` for this final step: https://github.com/bitcoin/bitcoin/pull/27419 https://github.com/bitcoin/bitcoin/pull/27254 https://github.com/bitcoin/bitcoin/pull/27238.

  `interface_ui` defines functions for a more general node interface and has a dependency on `boost/signals2`. After applying the patches from this pull request, the kernel's reliance on boost is down to `boost::multiindex`.

  The approach implemented here introduces some indirection, which makes the code a bit harder to read. Any suggestions for improving or reworking this pull request to make it more concise, or even reworking it into a more proper interface, are appreciated.

ACKs for top commit:
  MarcoFalke:
    re-ACK 7d3b35004b (no change) 🎋
  stickies-v:
    Code Review ACK 7d3b35004b
  hebasto:
    re-ACK 7d3b35004b, only last two commits dropped since my [recent](https://github.com/bitcoin/bitcoin/pull/27636#pullrequestreview-1435394620) review.

Tree-SHA512: c8cfc698dc9d78e20191c444708f2d957501229abe95e5806106d1126fb9c5fbcee686fb55645658c0107ce71f10646f37a2fdf7fde16bbf22cbf1ac885dd08d
2023-05-30 14:57:22 +01:00
MarcoFalke
fafb4da121
fuzz: Avoid timeout in utxo_total_supply 2023-05-30 14:17:20 +02:00
MarcoFalke
fa3ab45203
ci: Enable float-divide-by-zero check 2023-05-30 12:01:38 +02:00
fanquake
f467b28ac3
Merge bitcoin/bitcoin#27673: log: don't log total disk read time in ConnectTip bench
bc862fad29 ConnectTip: don't log total disk read time in bench (Sjors Provoost)

Pull request description:

  The " Load block from disk" log introduced in #24216 incorrectly assumed `num_blocks_total` would be greater than 0. This is not guaranteed until the `ConnectBlock` call right below it.

  The total and average metric is not very useful because it does not distinguish between blocks read from disk and those loaded from memory. So rather than fixing the divide by zero issue, we just drop the metric.

  Fixes #27635

ACKs for top commit:
  MarcoFalke:
    lgtm ACK bc862fad29 🐓
  willcl-ark:
    tACK bc862fad29

Tree-SHA512: ff52ff8a8a93f1c82071ca84c57ce5839e14271943393deac0aa5555d63383708777ed96e7226be6dd71b63ed07dc27bad1634ee848e88e4d0b95d511a8267e7
2023-05-30 10:49:14 +01:00
MarcoFalke
fa123077bc
ci: Use podman for persistent workers 2023-05-30 10:27:23 +02:00
MarcoFalke
fa9c65a74c
ci: Prune dangling images on RESTART_CI_DOCKER_BEFORE_RUN 2023-05-30 08:51:53 +02:00
fanquake
5763b232e6
ci: return to using Ubuntu 22.04 in MSAN jobs
We no-longer need to use 23.04, now that we aren't installing clang-16
and friends.
2023-05-29 17:20:50 +01:00
fanquake
d3cbcbf626
ci: compile clang and compiler-rt in MSAN jobs
This works around https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1005341.
2023-05-29 17:20:50 +01:00
fanquake
796bd1d0d1
ci: use LLVM 16.0.4 in MSAN jobs 2023-05-29 17:20:49 +01:00
fanquake
883bc9f561
ci: remove extra CC & CXX from MSAN jobs
This is passed through from depends.
2023-05-29 17:20:47 +01:00
fanquake
2d4f4b8f29
ci: standardize custom libc++ usage in MSAN jobs
Use `-isystem` & `-nostd*` flags, which is the preferred way to use a
custom libc++ (ours is libc++ build with MSAN) with Clang, as opposed to
our current ad-hoc flags.

See: https://releases.llvm.org/16.0.0/projects/libcxx/docs/UsingLibcxx.html#using-a-custom-built-libc
for more info.
2023-05-29 17:19:42 +01:00
fanquake
6cf47a8f44
Merge bitcoin/bitcoin#27507: lint: stop ignoring LIEF imports
015cc5e588 lint: stop ignoring LIEF imports (fanquake)

Pull request description:

  Type stubs are now available as of 0.13.0.
  See https://github.com/lief-project/LIEF/issues/650.

ACKs for top commit:
  TheCharlatan:
    ACK 015cc5e588

Tree-SHA512: ebb754f293c2a61a0ef64c3552f7c700ceb3054b50fd3f1573e4a9e87773ddeba47bd9875f6ab055043012dbc20aeb71e4d76cd3da535c76651dfb1fbfc66e89
2023-05-29 17:11:31 +01:00
fanquake
fb4f047686
Merge bitcoin/bitcoin#27724: build: disable boost multi index safe mode in debug mode
59c8944749 build: disable boost multi index safe mode (willcl-ark)

Pull request description:

  Fixes #27586

  Disable boost multi index safe mode by default when configuring with
  --enable-debug.

  This option can cause transactions to take a long time to be accepted
  into the mempool under certain conditions; iterator destruction takes
  O(n) time vs O(1) as they are stored in a singly linked list. See
  27586 and the [boost docs](https://www.boost.org/doc/libs/1_58_0/boost/multi_index/detail/safe_mode.hpp) for more information.

  Re-enable it on the CI builds which previously had it enabled.

  Re-enable it on the msan fuzz task so that we have fuzz tasks testing
  with it enabled and disabled in this repo.

ACKs for top commit:
  hebasto:
    ~ACK 59c89447499bd9d6202269879555b8bc37373aa2~
  fanquake:
    ACK 59c8944749

Tree-SHA512: ed654f63dbebdd02e4414d1f81147d92a4d490dbb5a2e0376858e3129097645f3a2df45191d6b40c410a76e803b0d28796d1a01c1d2fd995b94e8b7eb3949027
2023-05-29 17:09:47 +01:00
fanquake
dfe658009d
Merge bitcoin/bitcoin#27759: Fix #includes in src/wallet
1f97572b9c Fix `#include`s in `src/wallet` (Hennadii Stepanov)

Pull request description:

  This PR is a minimum required changes to fix https://github.com/bitcoin/bitcoin/pull/27571#discussion_r1195497290.

ACKs for top commit:
  MarcoFalke:
    lgtm ACK 1f97572b9c

Tree-SHA512: de885210076d23f3394c42ca50e6ae2470c0ae6523399a2fa3ebb7c06383bdacef9c26166fa19747200396bed796c8772165e24416eb30ed8edd024e3394b2fe
2023-05-29 16:33:14 +01:00
fanquake
769dd1e826
Merge bitcoin/bitcoin#25975: contrib/init: Better systemd integration
689a65d878 contrib/init: Better systemd integration (Carl Dong)

Pull request description:

  ```
  1. Make logs available to journalctl (systemd's logging system) by not
     specifying -daemonwait, which rightfully has its own set of stdout
     and stderr descriptors (a user invoking with -daemonwait on the
     command line should not see any logs). It makes more sense not to
     daemonize in the systemd context anyway.

  2. Make systemd aware of when bitcoind is started and in steady state by
     specifying -startupnotify='systemd-notify --ready' and Type=notify.
     NotifyAccess=all is necessary so that the spawned thread for
     startupnotify is allowed to inform systemd of bitcoind's readiness.

     Note that NotifyAccess=exec won't work because it only allows
     sd_notify readiness signalling from Exec*= declarations in the
     .service file.

  Note that we currently don't allow multiple startupnotify commands, but
  users can override it in systemd via:

    # systemctl edit bitcoind

  By specifying something like:

    [Service]
    ExecStart=/usr/bin/bitcoind -pid=/run/bitcoind/bitcoind.pid \
                                -conf=/etc/bitcoin/bitcoin.conf \
                                -datadir=/var/lib/bitcoind \
                                -startupnotify='systemd-notify --ready; mycommandhere'
  ```

ACKs for top commit:
  real-or-random:
    ACK 689a65d878 tested this service file with 25.0

Tree-SHA512: 9a52ad5cf25886c0d8dabc986d8920602a056db25875b5edd910b387043b78bb78c76d6df82e6e322e3be3bfd5c35c80721cbc8308cec946060bd7586820e9c6
2023-05-29 13:43:42 +01:00
MarcoFalke
fa5680b752
fix includes for touched header files (iwyu) 2023-05-29 13:26:31 +02:00
MarcoFalke
dddde27f6f
Add [[nodiscard]] where ignoring a Result return type is an error 2023-05-29 13:12:45 +02:00
fanquake
a2e111b8a3
Merge bitcoin/bitcoin#27765: test: Throw error when -signetchallenge is non-hex
fa6b11a556 test: Throw error when -signetchallenge is non-hex (MarcoFalke)

Pull request description:

  Instead of silently parsing non-hex to an empty challenge, throw an error.

  Also, add missing includes while touching the file.

ACKs for top commit:
  kevkevinpal:
    ACK [fa6b11a](fa6b11a556)
  kallewoof:
    ACK fa6b11a
  TheCharlatan:
    Nice, ACK fa6b11a556

Tree-SHA512: 018ebbbf819ba7cdf0c6dd294fdfaa5ddb81b87058a8b9c57b96066d5b07e1656fd78f18e3cef375aebefa191fa515c2c70bc764880fa05f98f526334431a616
2023-05-29 10:48:53 +01:00
fanquake
b5ed656c3b
Merge bitcoin/bitcoin#27739: ci: Add missing set -e to 01_base_install.sh
fa12558d21 ci: Avoid leaking HOME var into CI pod (MarcoFalke)
aaaa432603 ci: Remove "default" test env (MarcoFalke)
fa7a87bc7c ci: Add missing set -e to 01_base_install.sh (MarcoFalke)

Pull request description:

  Otherwise errors are silently ignored

ACKs for top commit:
  TheCharlatan:
    ACK [fa12558](fa12558d21)
  hebasto:
    ACK fa12558d21

Tree-SHA512: dbf3f16302c83973b78f3a5e7793090bc9ac44fdf20d51a26b30a99a97369971661e9aed1cd810d80d49d60009651ca0a8aeb2bdc24198a143bf4fff0ec89901
2023-05-29 10:34:08 +01:00
fanquake
015cc5e588
lint: stop ignoring LIEF imports
Type stubs are now available as of 0.13.0.
See https://github.com/lief-project/LIEF/issues/650.
2023-05-29 10:23:52 +01:00
MarcoFalke
fa12558d21
ci: Avoid leaking HOME var into CI pod
This will lead to a duplicate install, see https://github.com/bitcoin/bitcoin/pull/27739#issuecomment-1564122573
2023-05-29 09:16:43 +02:00
MarcoFalke
aaaa432603
ci: Remove "default" test env
It is unclear what the point is of maintaining a "default", the meaning
of which is unclear.
2023-05-29 09:16:21 +02:00
MarcoFalke
fa7a87bc7c
ci: Add missing set -e to 01_base_install.sh
Also, set -x for easier debugging.

Also, do the same for ci/test/00_setup_env.sh
2023-05-29 09:16:10 +02:00
Carl Dong
689a65d878 contrib/init: Better systemd integration
1. Make logs available to journalctl (systemd's logging system) by not
   specifying -daemonwait, which rightfully has its own set of stdout
   and stderr descriptors (a user invoking with -daemonwait on the
   command line should not see any logs). It makes more sense not to
   daemonize in the systemd context anyway.

2. Make systemd aware of when bitcoind is started and in steady state by
   specifying -startupnotify='systemd-notify --ready' and Type=notify.
   NotifyAccess=all is necessary so that the spawned thread for
   startupnotify is allowed to inform systemd of bitcoind's readiness.

   Note that NotifyAccess=exec won't work because it only allows
   sd_notify readiness signalling from Exec*= declarations in the
   .service file.

3. Also make systemd aware of when bitcoind is stopping by specifying
   -shutdownnotify='systemd-notify --stopping'

Note that we currently don't allow multiple *notify commands, but users
can override it in systemd via:

  # systemctl edit bitcoind

By specifying something like:

  [Service]
  ExecStart=/usr/bin/bitcoind -pid=/run/bitcoind/bitcoind.pid \
                              -conf=/etc/bitcoin/bitcoin.conf \
                              -datadir=/var/lib/bitcoind \
                              -startupnotify='systemd-notify --ready; mystartupcommandhere' \
                              -shutdownnotify='systemd-notify --stopping; myshutdowncommandhere'
2023-05-28 13:10:30 -04:00
Andrew Chow
7d33ae755d
Merge bitcoin/bitcoin#27145: wallet: when a block is disconnected, update transactions that are no longer conflicted
89df7987c2 Add wallets_conflicts (Antoine Riard)
dced203162 wallet, tests: mark unconflicted txs as inactive (ishaanam)
096487c4dc wallet: introduce generic recursive tx state updating function (ishaanam)

Pull request description:

  This implements a fix for #7315. Previously when a block was disconnected any transactions that were conflicting with transactions mined in that block were not updated to be marked as inactive. The fix implemented here is described on the [Bitcoin DevWiki](https://github.com/bitcoin-core/bitcoin-devwiki/wiki/Wallet-Transaction-Conflict-Tracking#idea-refresh-conflicted). A test which tested the previous behavior has also been updated.

  Second attempt at #17543

ACKs for top commit:
  achow101:
    ACK 89df7987c2
  rajarshimaitra:
    tACK 89df7987c2.
  glozow:
    ACK 89df7987c2
  furszy:
    Tested ACK 89df7987

Tree-SHA512: 3133b151477e8818302fac29e96de30cd64c09a8fe3a7612074a34ba1a332e69148162e6cb3f1074d9d9c9bab5ef9996967d325d8c4c99ba42b5fe3b66a60546
2023-05-27 13:07:09 -04:00
fanquake
927b001502
Merge bitcoin/bitcoin#27766: fuzz: Change LIMIT_TO_MESSAGE_TYPE from a compile-time to a run-time setting
1111c9ac97 fuzz: Change LIMIT_TO_MESSAGE_TYPE from a compile-time to a run-time setting (MarcoFalke)

Pull request description:

  The `process_message_${msg_type}` fuzz targets have many issues:

  * In a context where each fuzz target must be a separate binary, this bloats the storage requirements by the number of message types.
  * The qa-assets repo for fuzz inputs also bloats, because each input in the type specific folder (`./process_message_${msg_type}`) is accompanied by a similar input in the general folder (`./process_message`) or a in another specific folder. The size seems to be ~3GB for the sum of all folders vs 0.3GB for the general folder.
  * Handling of different folders for each message type and one general folder for all message types (and unknown message types) is undocumented and unclear. Cross-pollination is encouraged, I guess, but who does it?
  * It is unclear if the fuzz target has any value at all, given that any bug that is found here should also be found by the `process_messages` fuzz target, and historically always has been? So maybe it can even be removed completely in the future?
  * (minor nit): When adding a new message type, the message type has to be added to this fuzz target as well.

  Fix all issues by turning the compile-time setting into a run-time setting, thus removing the extra executables and fuzz folders. The same approach is also taken by the `rpc` fuzz target.

  If someone wants to limit their fuzzing to a specific message type, they can still do it. For example,

  ```
  LIMIT_TO_MESSAGE_TYPE=inv FUZZ=process_message ./src/test/fuzz/fuzz

ACKs for top commit:
  dergoegge:
    ACK 1111c9ac97

Tree-SHA512: 9495538d9bc83b24671a44e9311a4e82ce5b2fa89e431e42772dcfa19f675a9fe2dd8cd3d3b15b154c8b7f400e57ee08a976d37e55a5425778ced0ee85fb984c
2023-05-27 10:23:21 +01:00
Andrew Chow
10c4a4613f
Merge bitcoin/bitcoin#27469: wallet: improve IBD sync time by skipping block scanning prior birth time
82bb7831fa wallet: skip block scan if block was created before wallet birthday (furszy)
a082434d12 refactor: single method to append new spkm to the wallet (furszy)

Pull request description:

  During initial block download, the node's wallet(s) scans every arriving block looking for data that it owns.
  This process can be resource-intensive, as it involves sequentially scanning all transactions within each
  arriving block.

  To avoid wasting processing power, we can skip blocks that occurred before the wallet's creation time,
  since these blocks are guaranteed not to contain any relevant wallet data.

  This has direct implications (an speed improvement) on the underlying blockchain synchronization process
  as well. The reason is that the validation interface queue is limited to 10 tasks per time. This means that no
  more than 10 blocks can be waiting for the wallet(s) to be processed while we are synchronizing the chain
  (activating the best chain to be more precise).
  Which can be a bottleneck if blocks arrive and are processed faster from the network than what they are
  processed by the wallet(s).

  So, by skipping not relevant blocks in the wallet's IBD scanning process, we will also improve the chain
  synchronization time.

ACKs for top commit:
  ishaanam:
    re-ACK 82bb7831fa
  achow101:
    re-ACK 82bb7831fa
  pinheadmz:
    ACK 82bb7831fa

Tree-SHA512: 70158c9657f1fcc396badad2c4410b7b7f439466142640b31a9b1a8cea4555e45ea254e48043c9b27f783d5e4d24d91855f0d79d42f0484b8aa83cdbf3d6c50b
2023-05-26 21:35:28 -04:00
brunoerg
5c832c3820 p2p, refactor: return std::optional<CNetAddr> in LookupHost 2023-05-26 13:41:07 -03:00
brunoerg
34bcdfc6a6 p2p, refactor: return vector/optional<CService> in Lookup 2023-05-26 13:40:02 -03:00
brunoerg
7799eb125b p2p, refactor: return std::vector<CNetAddr> in LookupHost 2023-05-26 13:38:22 -03:00
brunoerg
5c1774a563 p2p, refactor: return std::vector<CNetAddr> in LookupIntern 2023-05-26 13:38:21 -03:00
fanquake
8b59231641
Merge bitcoin/bitcoin#27761: p2p: Log addresses of stalling peers
fb02a3cd1a p2p: Log addresses of stalling peers (Martin Zumsande)

Pull request description:

  This was suggested in #27705 by ArmchairCryptologist.
  It allows node operators that have the `-logips` option enabled to better identify potentially misbehaving peers and maybe ban them.
  This is especially helpful in case of inbound peers for which (dis)connections aren't logged per default, so it's impossible to use the debug log to connect their `nodeId` to an address unless the very noisy `net` debugging is enabled.
  In case of outbound peers for which the address is potentially logged when establishing the connection, this just adds some convenience.

ACKs for top commit:
  stratospher:
    tACK fb02a3c.
  jamesob:
    github ACK fb02a3cd1a
  0xB10C:
    Untested ACK fb02a3cd1a
  instagibbs:
    utACK fb02a3cd1a

Tree-SHA512: 2080f794c715bd36143405828b4b0e1be859095caf8f8a0c20dd2a4b64d192d78fee0fa350a2bb7c39848718332c4dd4d8edb2cc8d22095b65afe710591f7ccb
2023-05-26 17:12:28 +01:00
MarcoFalke
1111c9ac97
fuzz: Change LIMIT_TO_MESSAGE_TYPE from a compile-time to a run-time setting 2023-05-26 17:14:23 +02:00
fanquake
7794d9d93f
Merge bitcoin/bitcoin#27735: test: Move test_chain_listunspent wallet check from mempool_packages to wallet_basic
ffffe622e9 test: Move test_chain_listunspent wallet check from mempool_packages to wallet_basic (MarcoFalke)

Pull request description:

  This fixes a bug.

  On master:

  ```
  $ ./test/functional/mempool_packages.py  --legacy-wallet
    File "./test/functional/mempool_packages.py", line 52, in run_test
      self.nodes[0].importaddress(self.wallet.get_address())
  test_framework.authproxy.JSONRPCException: Bech32m addresses cannot be imported into legacy wallets (-5)
  ```

  On this pull, all tests pass.

ACKs for top commit:
  glozow:
    ACK ffffe622e9, thanks for changing! Nice to remove wallet from another non-wallet test.

Tree-SHA512: 842c3b7c2e90285a155b8ed9924ef0c99f7773892be4f1847e5d7ece79c914ea5acee0d71de2ce46c354ee95fb74a03c20c0afb5e49c0b8e1c0ce406df963650
2023-05-26 14:53:23 +01:00
fanquake
66b08e7822
Merge bitcoin/bitcoin#27302: init: Error if ignored bitcoin.conf file is found
eefe56967b bugfix: Fix incorrect debug.log config file path (Ryan Ofsky)
3746f00be1 init: Error if ignored bitcoin.conf file is found (Ryan Ofsky)
398c3719b0 lint: Fix lint-format-strings false positives when format specifiers have argument positions (Ryan Ofsky)

Pull request description:

  Show an error on startup if a bitcoin datadir that is being used contains a `bitcoin.conf` file that is ignored. There are two cases where this could happen:

  - One case reported in [#27246 (comment)](https://github.com/bitcoin/bitcoin/issues/27246#issuecomment-1470006043) happens when a `bitcoin.conf` file in the default datadir (e.g. `$HOME/.bitcoin/bitcoin.conf`) has a `datadir=/path` line that sets different datadir containing a second `bitcoin.conf` file. Currently the second `bitcoin.conf` file is ignored with no warning.

  - Another way this could happen is if a `-conf=` command line argument points to a configuration file with a `datadir=/path` line and that path contains a `bitcoin.conf` file, which is currently ignored.

  This change only adds an error message and doesn't change anything about way settings are applied. It also doesn't trigger errors if there are redundant `-datadir` or `-conf` settings pointing at the same configuration file, only if they are pointing at different files and one file is being ignored.

ACKs for top commit:
  pinheadmz:
    re-ACK eefe56967b
  willcl-ark:
    re-ACK eefe56967b
  TheCharlatan:
    ACK eefe56967b

Tree-SHA512: 939a98a4b271b5263d64a2df3054c56fcde94784edf6f010d78693a371c38aa03138ae9cebb026b6164bbd898d8fd0845a61a454fd996e328fd7bcf51c580c2b
2023-05-26 13:33:42 +01:00
fanquake
4d13fe47be
Merge bitcoin/bitcoin#25977: refactor: Replace std::optional<bilingual_str> with util::Result
8aa8f73adc refactor: Replace std::optional<bilingual_str> with util::Result (Ryan Ofsky)
5f49cb1bc8 util: Add void support to util::Result (MarcoFalke)

Pull request description:

  Replace uses of `std::optional<bilingual_str>` with `util::Result` as suggested https://github.com/bitcoin/bitcoin/pull/25648#discussion_r936311768, https://github.com/bitcoin/bitcoin/pull/27632#discussion_r1192007516, https://github.com/bitcoin/bitcoin/pull/27632#discussion_r1194858242, https://github.com/bitcoin/bitcoin/pull/24313#discussion_r1204047087

ACKs for top commit:
  MarcoFalke:
    very nice ACK 8aa8f73adc 🏏
  TheCharlatan:
    ACK 8aa8f73adc
  hebasto:
    ACK 8aa8f73adc, I have reviewed the code and it looks OK.

Tree-SHA512: 6c2f218bc445184ce93ec2b907e61666a05f26f2c9447f69fcb504aa8291b0c693d913f659dfd19813a9e24615546c72cbe2ca419218fd867ff0694c4a1b6a30
2023-05-26 13:09:26 +01:00
fanquake
aa6cc5bec9
Merge bitcoin/bitcoin#27751: doc: Add doc/release-notes/release-notes-25.0.md
034cb5ad4d doc: Fix broken link in release notes (MacrabFalke)
fab19a8ae3 doc: Fix typo in doc/release-process.md URL (MarcoFalke)
faaa97bb38 doc: Add doc/release-notes/release-notes-25.0.md (MarcoFalke)

Pull request description:

  Also, fix a typo in another doc.

ACKs for top commit:
  fanquake:
    ACK 034cb5ad4d

Tree-SHA512: f487fadcefdf0257ab6be1550faaad36825be551d6ec83abd32d69784ce537144714b3a023f4e13003f5f1b5e6a944f6d63f278cdeca2299139c9043af1c726f
2023-05-26 11:10:43 +01:00
MacrabFalke
034cb5ad4d
doc: Fix broken link in release notes
Also, add missing unit "bytes"

Co-authored-by: stickies-v <69010457+stickies-v@users.noreply.github.com>
2023-05-26 09:47:15 +02:00
MarcoFalke
ffffe622e9
test: Move test_chain_listunspent wallet check from mempool_packages to wallet_basic 2023-05-26 09:02:55 +02:00
Martin Zumsande
fb02a3cd1a p2p: Log addresses of stalling peers
This allows node operators that have the -logips option enabled
to better identify potentially misbehaving peers and maybe
ban them.
2023-05-26 00:57:37 -04:00
Andrew Chow
7379a54ec4 bench: Remove incorrect LoadWallet call in WalletBalance
The WalletBalance benchmarks would incorrectly call LoadWallet after the
wallet has been setup. LoadWallet expects to be the first thing that is
called and for the CWallet to be in a fresh state. When it is not, it
results in bogus pointers which can cause segfaults during this
benchmark.
2023-05-25 14:40:42 -04:00
Andrew Chow
846b2fe67e tests: Move ADDRESS_BCRT1_UNSPENDABLE to wallet/test/util.h
This static address is usable for other wallet tests and benchmarks, so
make it available to them.
2023-05-25 14:40:42 -04:00
Andrew Chow
c61d3f02f5 tests, bench: Consolidate {Test,Bench}Un/LoadWallet helper
The wallet tests and benchmarks both had helper functions for loading
and unloading the wallet for the test that were almost identical.
These functions are consolidated and reused.
2023-05-25 14:40:26 -04:00
MarcoFalke
fa6b11a556
test: Throw error when -signetchallenge is non-hex 2023-05-25 19:24:05 +02:00
Hennadii Stepanov
1f97572b9c
Fix #includes in src/wallet 2023-05-25 15:52:08 +01:00
fanquake
25202cace9
Merge bitcoin/bitcoin#27721: depends: remove redundant stdlib option
4fe5f3c467 depends: remove redundant stdlib option (Cory Fields)

Pull request description:

  Like #27628, this is another dependency of #21778, though it doesn't become obvious until used with a newer clang.

  This should be a no-op.

  Use of -stdlib++-isystem gets rid of any system c++ header include paths and negates the need for this option. In newer versions of clangs the combo produces an annoying warning that actually causes problems during configure.

ACKs for top commit:
  fanquake:
    ACK 4fe5f3c467

Tree-SHA512: 904072f2b13dffbbeab2bc9ff20a74969888502fa1ea35d9030784dd397c6751e31233e6ec7dc34e9fd42574950be733b25d6653c2a93e214cc5e4eef2e0133a
2023-05-25 15:36:23 +01:00