Commit graph

41421 commits

Author SHA1 Message Date
merge-script
e40df5468d
Merge bitcoin/bitcoin#30216: build: Fix building fuzz binary on on SunOS / illumos
3299abce94 build: Fix building `fuzz` binary on on SunOS / illumos (Hennadii Stepanov)

Pull request description:

  On master branch @ 457e1846d2, building the `fuzz` binary fails:
  ```
  $ ./autogen.sh
  $ ./configure
  $ gmake -C src test/fuzz/fuzz
  < snip >
    CXX      test/fuzz/fuzz-http_request.o
  test/fuzz/http_request.cpp:13:10: fatal error: event2/buffer.h: No such file or directory
     13 | #include <event2/buffer.h>
        |          ^~~~~~~~~~~~~~~~~
  compilation terminated.
  gmake: *** [Makefile:17138: test/fuzz/fuzz-http_request.o] Error 1
  gmake: Leaving directory '/export/home/hebasto/git/bitcoin/src'
  ```

  The testing system:
  ```
  $ uname -a
  SunOS openindiana 5.11 illumos-82079dec87 i86pc i386 i86pc
  ```

  This PR fixes this issue.

ACKs for top commit:
  maflcko:
    ACK 3299abce94

Tree-SHA512: 43048cf0d3db47d71263da179e07225afd901ed2039ee4d17314ff7b581ab36f41282fde3b1210926cecda546320dc573937c564520f61fbb236c2b9914ed0d4
2024-06-03 12:44:06 +01:00
fanquake
5f2c1d84e3
guix: show *_FLAGS variables in pre-build output
For example:
```bash
ADDITIONAL_GUIX_COMMON_FLAGS set in the ENV
ADDITIONAL_GUIX_ENVIRONMENT_FLAGS="--emulate-fhs" ./contrib/guix/guix-build
<snip>
INFO: Building f75199182133 for platform triple x86_64-linux-gnu:
      ...using reference timestamp: 1716905119
      ...running at most 10 jobs
      ...from worktree directory: '/bitcoin'
          ...bind-mounted in container to: '/bitcoin'
      ...in build directory: '/bitcoin/guix-build-f75199182133/distsrc-f75199182133-x86_64-linux-gnu'
          ...bind-mounted in container to: '/distsrc-base/distsrc-f75199182133-x86_64-linux-gnu'
      ...outputting in: '/bitcoin/guix-build-f75199182133/output/x86_64-linux-gnu'
          ...bind-mounted in container to: '/outdir-base/x86_64-linux-gnu'
      ADDITIONAL FLAGS (if set)
          ADDITIONAL_GUIX_COMMON_FLAGS: --no-substitutes
          ADDITIONAL_GUIX_ENVIRONMENT_FLAGS: --emulate-fhs
          ADDITIONAL_GUIX_TIMEMACHINE_FLAGS:
```
2024-06-03 11:56:40 +01:00
marcofleon
22d0f1a27e [fuzz] Avoid endless waiting in FuzzedSock::{Wait,WaitMany}
Currently, when the FuzzedDataProvider of a FuzzedSock runs out of data,
FuzzedSock::Wait and WaitMany will simulate endless waiting as the
requested events are never simulated as occured.

Fix this by simulating event occurence when ConsumeBool() returns false
(e.g. when the data provider runs out).

Co-authored-by: dergoegge <n.goeggi@gmail.com>
2024-06-03 10:32:43 +01:00
dergoegge
a7fceda68b [fuzz] Make peeking through FuzzedSock::Recv fuzzer friendly
FuzzedSock only supports peeking at one byte at a time, which is not
fuzzer friendly when trying to receive long data.

Fix this by supporting peek data of arbitrary length instead of only one
byte.
2024-06-03 10:32:43 +01:00
merge-script
80bdd4b6be
Merge bitcoin/bitcoin#30167: doc, rpc: Release notes and follow-ups for #29612
efc1b5be8a test: Add coverage for txid coins count check when loading snapshot (Fabian Jahr)
6b6084850b assumeutxo: Add network magic ctor param to SnapshotMetadata (Fabian Jahr)
1f1f998455 assumeutxo: Deserialize trailing byte instead of Txid (Fabian Jahr)
359967e310 doc: Add release notes for #29612 (Fabian Jahr)

Pull request description:

  This adds release notes for #29612 and addresses post-merge review comments.

ACKs for top commit:
  maflcko:
    utACK efc1b5be8a
  theStack:
    utACK efc1b5be8a

Tree-SHA512: 3b270202e4f7b2576090ef1d970fd54a6840d96fc3621dddd28e888fb8696a97ff69af2e000bcee3b364316ca3f6e2a9b2f1694c6184f0e704dc487823127ce4
2024-06-03 10:29:14 +01:00
merge-script
f7c0ddff46
Merge bitcoin/bitcoin#30192: build: remove --enable-lcov-branch-coverage
cbd4640ede build: remove --enable-lcov-branch-coverage (fanquake)

Pull request description:

  This supports lcov `2.x` in the sense that we are no-longer hardcoding version specific options, and instead will use the `LCOV_OPTS` variable (which is the more flexible thing to do in any case). It's also quite likely that devs are already having to pass extra options to lcov `2.x`, given it's more stringent in terms of coverage generation and error checking. See this thread for an example: https://github.com/linux-test-project/lcov/issues/238.

  Tested on one machine (LCOV 2.0, gcc 13.2) with:
  ```bash
  ./autogen.sh
  ./configure --enable-lcov CXXFLAGS="-fprofile-update=prefer-atomic" LCOV_OPTS="--rc branch_coverage=1 --ignore-errors mismatch"
  make
  make cov
  <snip>
  Processing file src/netaddress.cpp
    lines=521 hit=480 functions=72 hit=72 branches=675 hit=499
  Overall coverage rate:
    lines......: 81.8% (79362 of 97002 lines)
    functions......: 77.8% (10356 of 13310 functions)
    branches......: 49.6% (130628 of 263196 branches)
  ```

  and another machine (LCOV 2.1, Clang 18.1.3) with:
  ```bash
  ./autogen.sh
  ./configure --enable-lcov CC=clang CXX=clang++ LCOV_OPTS="--rc branch_coverage=1 --ignore-errors mismatch,inconsistent"
  make
  make cov
  <snip>
      Processing file src/util/strencodings.cpp
        lines=315 hit=311 functions=38 hit=38 branches=425 hit=357
      Overall coverage rate:
        source files: 622
        lines.......: 79.8% (70311 of 88132 lines)
        functions...: 78.1% (13968 of 17881 functions)
        branches....: 44.5% (157551 of 354317 branches)
      Message summary:
        101 warning messages:
          count: 1
          inconsistent: 100
        3528 ignore messages:
          inconsistent: 3528
  ```

  Related to #28468.

ACKs for top commit:
  theuni:
    utACK cbd4640ede
  hebasto:
    ACK cbd4640ede, tested on Ubuntu 22.04.

Tree-SHA512: 94eb01e0e236a480052749f6107b1d0d2e4f6f70a8eefd55fa9ba3d2f72996c9e8a0f28340698b7ac82e7a71e9cf799b7a53ddb6e435e5e9795f5f98a18820f7
2024-06-03 10:06:15 +01:00
merge-script
e18accc5f5
Merge bitcoin/bitcoin#30186: fuzz: increase txorphan harness stability
8defc182a3 scripted-diff: Replace nNextSweep with m_next_sweep (marcofleon)
0048680467 increase txorphan harness stability (marcofleon)

Pull request description:

  This moves `nNextSweep` from being a static variable in `LimitOrphans` to being a member of the `TxOrphanage` class. This improves the stability of the `txorphan` fuzz harness, as each orphanage (created every iteration) now has its own value for `nNextSweep`.

ACKs for top commit:
  maflcko:
    utACK 8defc182a3
  dergoegge:
    Code review ACK 8defc182a3
  glozow:
    utACK 8defc182a3, I can rebase on this pretty easily

Tree-SHA512: 54d4a5074def764f6c895308b94e417662d2f21f157925421131745f22743907df59971f4ce545063658cd74ec133792cdd8df96ae3e69af8314e9b0ff899d48
2024-06-03 09:59:54 +01:00
Hennadii Stepanov
ffbc173ca1
depends: Update Boost download link
See: https://github.com/boostorg/boost-tasks/pull/3
2024-06-03 09:49:34 +01:00
Hennadii Stepanov
3299abce94
build: Fix building fuzz binary on on SunOS / illumos 2024-06-02 19:51:22 +01:00
glozow
30a01134cd [doc] update bips.md for 431 2024-06-02 20:21:56 +02:00
glozow
9dbe6a03f0 [test] wallet uses CURRENT_VERSION which is 2 2024-06-02 08:54:50 +02:00
glozow
539404fe0f [policy] make v3 transactions standard
Note that, as CURRENT_VERSION = 2, the wallet will not make transactions
with nVersion=3 yet.
2024-06-02 08:54:50 +02:00
Luke Dashjr
3c08e11c3e
doc: JSON-RPC request Content-Type is application/json
Specify json content type in RPC examples
2024-05-31 16:44:47 +01:00
merge-script
457e1846d2
Merge bitcoin/bitcoin#30204: depends: consolidate dependency docs
a27e1ceb9f depends: consolidate dependency docs (fanquake)

Pull request description:

  Adds missing `g++` for macOS. This is needed by Qt:
  ```bash
  Configuring qt...
  Creating qmake...
  gmake[1]: Entering directory '/bitcoin/depends/work/build/arm64-apple-darwin/qt/5.15.14-4bca24c8f89/qtbase/qmake'
  gmake[1]: g++: No such file or directory
  gmake[1]: *** [Makefile:250: main.o] Error 127
  ```

  `xz-utils` was also missing (but generally already installed), and is needed for the `.tar.xz` tarballs.

  Remove `bsdmainutils`, as this is only needed by the main build system (for tests), and isn't needed to complete a depends build.

ACKs for top commit:
  maflcko:
    ACK a27e1ceb9f

Tree-SHA512: 720c31d4d4c9b86fda4aace405d528193714dd3e526f38d5b8a83e4b676a433b9c891f01d86d673be9ac848458eda8a89b0981003a42eaa6d97bacc2e914396a
2024-05-31 15:30:29 +01:00
merge-script
3ac1465cd9
Merge bitcoin/bitcoin#30198: depends: qt 5.15.14 and fix macOS build with Clang 18
0a3631fc35 depends: fix Qt macOS build with Clang 18 (fanquake)
b018bd779d depends: qt 5.15.14 (fanquake)

Pull request description:

  Also adds a patch to Qts internal libpng, to fix compilation using Clang 18, when targetting macOS. I'd like to get this patched, so we can continue working on removing `FORCE_USE_SYSTEM_CLANG` (#30201); otherwise builds will be broken using the default Clang (`18`) on the current Ubuntu LTS (`24.04`).

  With this PR, anyone using Ubuntu 24.04 should be able to `apt install clang llvm lld`, and then cross-compile for macOS using:
  ```bash
  # clang --version
  Ubuntu clang version 18.1.3 (1)
  make -C depends HOST=arm64-apple-darwin FORCE_USE_SYSTEM_CLANG=1
  ./autogen.sh
  CONFIG_SITE=/path/to/depends/arm64-apple-darwin/share/config.site ./configure
  make
  # file src/qt/bitcoin-qt
  src/qt/bitcoin-qt: Mach-O 64-bit arm64 executable, flags:<NOUNDEFS|DYLDLINK|TWOLEVEL|WEAK_DEFINES|BINDS_TO_WEAK|PIE|HAS_TLV_DESCRIPTORS>
  ```

ACKs for top commit:
  TheCharlatan:
    ACK 0a3631fc35
  theuni:
    utACK 0a3631fc35
  hebasto:
    ACK 0a3631fc35, a new patch indeed fixes cross-compiling on Ubuntu 24.04 with `FORCE_USE_SYSTEM_CLANG=1`.

Tree-SHA512: 711d321b1efbb1aeef802d1d7e72fff8f4e28aa2420d19df9db6f4449fc7d281e1d08ba242ce20122dfe21129e713bd59e7e6ade0b67d7271eea18b39ceb9283
2024-05-31 15:28:32 +01:00
dergoegge
865cdf3692 [fuzz] Use fuzzer friendly ConsumeRandomLengthByteVector in FuzzedSock::Recv
See comment on FuzzedDataProvider::ConsumeRandomLengthString.
2024-05-31 14:48:29 +01:00
fanquake
a27e1ceb9f
depends: consolidate dependency docs
Adds missing `g++` for macOS. This is needed by Qt:
```bash
Configuring qt...
Creating qmake...
gmake[1]: Entering directory '/bitcoin/depends/work/build/arm64-apple-darwin/qt/5.15.14-4bca24c8f89/qtbase/qmake'
gmake[1]: g++: No such file or directory
gmake[1]: *** [Makefile:250: main.o] Error 127
```

`xz-utils` was also missing (but generally already installed), and is
needed for the `.tar.xz` tarballs.

Remove bsdmainutils, as this is only needed by the main build system
(for tests), and isn't needed to complete a depends build.
2024-05-31 09:30:24 +01:00
glozow
052ede75af [refactor] use TRUC_VERSION in place of 3 2024-05-31 08:46:01 +09:00
Sebastian Falbesoner
39d135e79f test: MiniWallet: respect fee_rate for target_weight, use in mempool_limit.py 2024-05-31 00:12:00 +02:00
Sebastian Falbesoner
b2f0a9f8b0 test: add framework functional test for MiniWallet's tx padding 2024-05-31 00:12:00 +02:00
Sebastian Falbesoner
c17550bc3a test: MiniWallet: fix tx padding (target_weight) for large sizes, improve accuracy 2024-05-31 00:11:55 +02:00
merge-script
62f7f59ff4
Merge bitcoin/bitcoin#30199: clang-tidy: Add bugprone-move-forwarding-reference check
88cdb5967f clang-tidy: Add `bugprone-move-forwarding-reference` check (Hennadii Stepanov)

Pull request description:

  This PR adds [`bugprone-move-forwarding-reference`](https://clang.llvm.org/extra/clang-tidy/checks/bugprone/move-forwarding-reference.html) to the clang-tidy checks.

ACKs for top commit:
  maflcko:
    utACK 88cdb5967f

Tree-SHA512: 8366c895085d0656a4491035aa8863c9dca12885c2bdf0392bebc63d6f6f5473ec263594e5fde70a3c211e95d19b9cd98e2c574ced91b4c970cce0edce40bceb
2024-05-30 15:32:08 +01:00
Pieter Wuille
ae60d485da net_processing: remove Misbehavior score and increments
This is now all unused.
2024-05-30 08:35:18 -04:00
Pieter Wuille
6457c31197 net_processing: make all Misbehaving increments = 100
This removes the need to actually track misbehavior score (see further commit), because any
Misbehaving node will immediately hit the discouragement threshold.
2024-05-30 08:35:18 -04:00
Pieter Wuille
5120ab1478 net_processing: drop 8 headers threshold for incoming BIP130
With the Misbehavior score gone for non-connecting headers (see previous
commit), there is no need to only treat headers messages with up to 8
headers as potential BIP130 announcements. BIP130 does not specify such
a limit; it was purely a heuristic.
2024-05-30 08:35:18 -04:00
Pieter Wuille
944c54290d net_processing: drop Misbehavior for unconnecting headers
This misbehavior was originally intended to prevent bandwidth wastage due to
actually observed very broken (but likely non-malicious) nodes that respond
to GETHEADERS with a response unrelated to the request, triggering a request
cycle.

This has however largely been addressed by the previous commit, which causes
non-connecting HEADERS that are received while a GETHEADERS has not been
responded to, to be ignored, as long as they do not time out (2 minutes).
With that, the specific misbehavior is largely irrelevant (for inbound peers,
it is now harmless; for outbound peers, the eviction logic will eventually
kick them out if they're not keeping up with headers at all).
2024-05-30 08:34:59 -04:00
Pieter Wuille
9f66ac7cf1 net_processing: do not treat non-connecting headers as response
Since https://github.com/bitcoin/bitcoin/pull/25454 we keep track of the last
GETHEADERS request that was sent and wasn't responded to. So far, every incoming
HEADERS message is treated as a response to whatever GETHEADERS was last sent,
regardless of its contents.

This commit makes this tracking more accurate, by only treating HEADERS messages
which (1) are empty, (2) connect to our existing block header tree, or (3) are a
continuation of a low-work headers sync as responses that clear the "outstanding
GETHEADERS" state (m_last_getheaders_timestamp).

That means that HEADERS messages which do not satisfy any of the above criteria
will be ignored, not triggering a GETHEADERS, and potentially (for now, but see
later commit) increase misbehavior score.
2024-05-30 08:31:43 -04:00
merge-script
0a7c650fcd
Merge bitcoin/bitcoin#30034: ci: add markdown link check job
4b7d984269 lint: add markdown hyperlink checker (willcl-ark)

Pull request description:

  Potential followup to: #30025

  This should prevent us reintroducing broken markdown links.

  It does not test "online" (external) links, only those within this repo. Both relative and absolute links are parsed successfully if they resolve.

ACKs for top commit:
  maflcko:
    re-utACK 4b7d984269
  davidgumberg:
    reACK 4b7d984269

Tree-SHA512: 9bc40d700b73499c046bb76157bc139f32ec3850f64ef813bbf7f18f9c01a253abe6a857d6f559890165f2bd26e7742c05d86232cd9b8efb33ff85d735f4f095
2024-05-30 12:36:09 +01:00
fanquake
0a3631fc35
depends: fix Qt macOS build with Clang 18
Patch Qts internal libpng to resolve the failure.

I would like to have this patched, so we can continue working on the
removal of `FORCE_USE_SYSTEM_CLANG`. Otherwise builds will be broken using
the default clang (18) on the current Ubuntu LTS (24.04).
2024-05-30 12:00:05 +01:00
Hennadii Stepanov
88cdb5967f
clang-tidy: Add bugprone-move-forwarding-reference check 2024-05-30 11:33:59 +01:00
fanquake
cbd4640ede
build: remove --enable-lcov-branch-coverage
This supports lcov 2.x in the sense that we are no-longer hardcoding
version specific options, and instead will use the `LCOV_OPTS` variable
(which is the more correct/flexible thing to do in any case). It's also
quite likely that devs are already having to pass extra options to lcov
2.x, given it's more stringent in terms of coverage generation and error
checking. See this thread for an example:
https://github.com/linux-test-project/lcov/issues/238.

Added an example to the developer notes.

Tested on one machine (LCOV 2.0, gcc 13.2) with:
```bash
./autogen.sh
./configure --enable-lcov CXXFLAGS="-fprofile-update=prefer-atomic" LCOV_OPTS="--rc branch_coverage=1 --ignore-errors mismatch"
make
make cov
<snip>
Processing file src/netaddress.cpp
  lines=521 hit=480 functions=72 hit=72 branches=675 hit=499
Overall coverage rate:
  lines......: 81.8% (79362 of 97002 lines)
  functions......: 77.8% (10356 of 13310 functions)
  branches......: 49.6% (130628 of 263196 branches)
```

and another machine (LCOV 2.1, Clang 18.1.3) with:
```bash
./autogen.sh
./configure --enable-lcov CC=clang CXX=clang++ LCOV_OPTS="--rc branch_coverage=1 --ignore-errors mismatch,inconsistent"
make
make cov
<snip>
Processing file src/util/strencodings.cpp
  lines=315 hit=311 functions=38 hit=38 branches=425 hit=357
Overall coverage rate:
  source files: 622
  lines.......: 79.8% (70311 of 88132 lines)
  functions...: 78.1% (13968 of 17881 functions)
  branches....: 44.5% (157551 of 354317 branches)
Message summary:
  101 warning messages:
    count: 1
    inconsistent: 100
  3528 ignore messages:
    inconsistent: 3528
```
2024-05-30 10:36:55 +01:00
fanquake
b018bd779d
depends: qt 5.15.14 2024-05-30 09:29:11 +01:00
merge-script
f61ede574c
Merge bitcoin/bitcoin#30049: build, test, doc: Temporarily remove Android-related stuff
5deb0b024e build, test, doc: Temporarily remove Android-related stuff (Hennadii Stepanov)

Pull request description:

  Previously, our Android builds were geared towards generating APKs, which relied on Qt. However, after migrating to C++20, compiling for Android became unfeasible due to Qt 5.15's compatibility limitations with NDK only up to r25, which includes an outdated embedded libc++ (see https://github.com/bitcoin/bitcoin/issues/29360).

  All removed stuff will be reinstated after migrating the build system to CMake and upgrading Qt to version 6.x.

  This PR makes possible a clean migration to the CMake-based build system as it removes code, which is not used at this moment.

ACKs for top commit:
  vasild:
    ACK 5deb0b024e
  fanquake:
    ACK 5deb0b024e - given none of this is currently tested/wont compile. Can be revisted in future.

Tree-SHA512: 3bc2ccfe881e11cc1d78c27acd6f1d86cfba86821ef3bb5eca2e80d978fdfa13659ec82284dcaadc507e2394524dea91d4b8f81d0030c1cef9708df8be76bf07
2024-05-30 09:25:42 +01:00
marcofleon
8defc182a3 scripted-diff: Replace nNextSweep with m_next_sweep
-BEGIN VERIFY SCRIPT-
sed -i 's/nNextSweep/m_next_sweep/g' $(git grep -l 'nNextSweep')
-END VERIFY SCRIPT-

fixing to match style
2024-05-29 09:02:07 -07:00
marcofleon
0048680467 increase txorphan harness stability
initialize variable
2024-05-29 08:22:11 -07:00
merge-script
10164916f7
Merge bitcoin/bitcoin#30122: bench: enable wallet creation benchmarks on all platforms
7c8abf3c20 bench: bugfix, properly release wallet before erasing directory (furszy)

Pull request description:

  Simple fix for #29816.

  Since the wallet is appended to the global `WalletContext` during
  creation, merely calling `reset()` on the benchmark shared_pointer
  is insufficient to destruct the wallet. This no destruction of the
  wallet object results in keeping the db connection open, which
  was causes the `fs::remove_all()` failure on Windows.

ACKs for top commit:
  maflcko:
    utACK 7c8abf3c20
  kevkevinpal:
    utACK [7c8abf3](7c8abf3c20)
  hebasto:
    re-ACK 7c8abf3c20, I agree with changes since my recent [review](https://github.com/bitcoin/bitcoin/pull/30122#pullrequestreview-2061694682).

Tree-SHA512: 279df65bea8f7aa02af0a2efed62dca9bf9b29cb748eb369c602d223e08a8a907dea7b1bffbd3dab91b1656c1d91b18a9a0534bc3f153bd751414b0e6230b3a4
2024-05-29 10:32:02 +01:00
merge-script
46d3477b5b
Merge bitcoin/bitcoin#30172: fuzz: Handle missing BDBRO errors
9ddf39dd87 fuzz: Handle missing BDBRO errors (Ava Chow)

Pull request description:

  Adds error messages that were not being handled. Also removes error messages that no longer exist.

  Fixes #30166

ACKs for top commit:
  dergoegge:
    reACK 9ddf39dd87
  TheCharlatan:
    ACK 9ddf39dd87

Tree-SHA512: 2597536a1e5d030653dfcb02fd892f7492f5a091def787f6cbd421b8bca9544847684a498e9458ea99ae7de5a8a6d91532ff904d1e39222d324939d31d2eb3f0
2024-05-29 10:27:12 +01:00
Ava Chow
9ddf39dd87 fuzz: Handle missing BDBRO errors
Adds error messages that were not being handled. Also removes error
messages that no longer exist.
2024-05-29 05:01:21 -04:00
merge-script
be100cf4c7
Merge bitcoin/bitcoin#21778: build: LLD based macOS toolchain
e8c25e8a35 guix: drop binutils from macOS env (fanquake)
555fddf646 guix: use GUIX_LD_WRAPPER_DISABLE_RPATH for all HOSTS (fanquake)
9ec238d0f3 guix: remove ZERO_AR_DATE export (fanquake)
f836f7e9b3 depends: remove cctools & libtapi (fanquake)
4a0536c5d9 build: switch to using lld for macOS builds (fanquake)
c6a6b2d6fd build: add lld into macOS build environment(s) (fanquake)
437e908ebd depends: swap cctools-x for llvm-x (fanquake)
bab287d1ba depends: don't use -no_warning_for_no_symbols in macOS qt build (fanquake)

Pull request description:

  This switches us to using a [LLD](https://lld.llvm.org/) based toolchain for macOS builds.

  ### Benefits
  * Less complicated macOS toolchain.
  * No longer beholden to Apple releasing it's [source](https://opensource.apple.com/source/) for [cctools](https://opensource.apple.com/source/cctools/), [ld64](https://opensource.apple.com/source/ld64/) & [libtapi](https://opensource.apple.com/source/tapi/).
  * No more reliance on third parties to modify those sources for us. i.e [apple-libtapi](https://github.com/tpoechtrager/apple-libtapi), [cctools-port](https://github.com/tpoechtrager/cctools-port) (cctools + ld64).

ACKs for top commit:
  theuni:
    Tentative ACK e8c25e8a35.

Tree-SHA512: ec73304e8a2cd4c71041f7863d7d2e4e0408787299fb4fa3745076853156e8f64e4742e16f30d65e3a27f1e9c0d19cdf802248366b72a4fcb4ea821f92bb7a00
2024-05-29 09:42:05 +01:00
merge-script
417b6cecee
Merge bitcoin/bitcoin#30156: fuzz: More accurate coverage reports
949abebea0 [fuzz] Avoid collecting initialization coverage (dergoegge)

Pull request description:

  Our coverage reports include coverage of initialization code, which can be misleading when trying to evaluate the coverage a fuzz harness achieves through fuzzing alone.

  This PR proposes to make fuzz coverage reports more accurate by resetting coverage counters after initialization code has been run. This makes it easier to evaluate which code was actually reached through fuzzing (e.g. to spot fuzz blockers).

ACKs for top commit:
  maflcko:
    utACK 949abebea0
  brunoerg:
    nice, utACK 949abebea0

Tree-SHA512: c8579bda4f3d71d199b9331fbe6316fce375a906743d0bc216bb94958dc03fdc9a951ea50cfeb487494a75668ae3c16471a82f7e5fdd912d781dc29d063e2c5b
2024-05-29 09:34:48 +01:00
merge-script
58956028e4
Merge bitcoin/bitcoin#30170: refactor: Use type-safe time in txorphanage
fa6d4891c7 refactor: Use type-safe time in txorphanage (MarcoFalke)

Pull request description:

  This allows to remove manual conversions like multiplication by `60`, and uses a type-safe type instead of a raw `int64_t`.

ACKs for top commit:
  epiccurious:
    utACK fa6d4891c7.
  dergoegge:
    Code review ACK fa6d4891c7
  brunoerg:
    utACK fa6d4891c7

Tree-SHA512: c187d0e579b1131afcef8c901f5662c18ab867fa2a99fbb13b67bb1e10b2047128194bfef8329cde0d51e1c35d6227ae292b823968f37ea9422975e46e01846a
2024-05-29 09:22:24 +01:00
Murch
bd34dd85e7 Use exact_target shorthand in coinselector_tests 2024-05-28 10:14:17 -04:00
Murch
7aa7e30441 Fold GetSelectionWaste() into ComputeAndSetWaste()
Both `GetSelectionWaste()` and `ComputeAndSetWaste()` now are part of
`SelectionResult`. Instead of `ComputeAndSetWaste()` being a wrapper for
`GetSelectionWaste()`, we combine them to a new function
`RecalculateWaste()`.

As I was combining the logic of the two functions, I noticed that
`GetSelectionWaste()` was making the odd assumption that the
`change_cost` being set to zero means that no change is created.
However, if we build transactions at a feerate of zero with the
`discard_feerate` also set to zero, we'd organically have a
`change_cost` of zero, even when we create change on a transaction.

This commit cleans up this duplicate meaning of `change_cost` and relies
on `GetChange()` to figure out whether there is change on basis of the
`min_viable_change` and whatever is left after deducting fees.

Since this broke a bunch of tests that relied on the double-meaning of
`change_cost` a bunch of tests had to be fixed.
2024-05-24 14:53:54 -04:00
Ava Chow
327f08bb0c
Merge bitcoin/bitcoin#30169: fuzz: Fix wallet_bdb_parser stdlib error matching
fac7298529 fuzz: Fix wallet_bdb_parser stdlib error matching (MarcoFalke)

Pull request description:

  The stdlib error string is an implementation detail and can not be relied upon.

  Ref: `libc++abi: terminating due to uncaught exception of type std::runtime_error: AutoFile::read: end of file: unspecified iostream_category error`

ACKs for top commit:
  achow101:
    ACK fac7298529

Tree-SHA512: 588acc71a05d97855d6bb65380411e8486692536434eadee7697de09f80b128ff2f90a31fd0e8384d084b554d2f3978efd076082e070e721cf05b07c94cc83b1
2024-05-24 13:15:47 -04:00
Fabian Jahr
efc1b5be8a
test: Add coverage for txid coins count check when loading snapshot 2024-05-24 18:44:05 +02:00
Fabian Jahr
6b6084850b
assumeutxo: Add network magic ctor param to SnapshotMetadata
This prevents SnapshotMetadata from using any globals implicitly.
2024-05-24 18:44:02 +02:00
MarcoFalke
fac7298529
fuzz: Fix wallet_bdb_parser stdlib error matching 2024-05-24 14:21:30 +02:00
willcl-ark
4b7d984269
lint: add markdown hyperlink checker
This adds a markdown hyperlink check task to the lint test_runner. It
relies on having the [`mlc`](https://crates.io/crates/mlc) binary found
on $PATH, but will fail with `success` if the binary is not found.

`mlc` is also added to the ci/04_install.sh script run by the
containerfile.

Note that broken markdown hyperlinks will be detected in untracked
markdown files found in a dirty working directory (including e.g.
.venv).
2024-05-24 12:11:50 +01:00
Fabian Jahr
1f1f998455
assumeutxo: Deserialize trailing byte instead of Txid 2024-05-24 12:42:09 +02:00
Fabian Jahr
359967e310
doc: Add release notes for #29612 2024-05-24 12:42:06 +02:00