Commit graph

2928 commits

Author SHA1 Message Date
Lőrinc
f0130ab1a1 doc: replace -? with -h for bench_bitcoin help
The question mark (`?`) is interpreted as a wildcard for any single character in Zsh (see https://www.techrepublic.com/article/globbing-wildcard-characters-with-zsh), so `bench_bitcoin -?` will not work on systems using Zsh, such as macOS.

Since `-h` provides equivalent help functionality (as defined in https://github.com/bitcoin/bitcoin/blob/master/src/common/args.cpp#L684-L693), the `benchmarking.md` documentation has been updated to ensure compatibility with macOS.
\
2024-10-19 18:44:22 +02:00
merge-script
e8f72aefd2
Merge bitcoin/bitcoin#29877: tracing: explicitly cast block_connected duration to nanoseconds
Some checks failed
CI / test each commit (push) Has been cancelled
CI / macOS 14 native, arm64, no depends, sqlite only, gui (push) Has been cancelled
CI / Win64 native, VS 2022 (push) Has been cancelled
CI / ASan + LSan + UBSan + integer, no depends, USDT (push) Has been cancelled
cd0edf26c0 tracing: cast block_connected duration to nanoseconds (0xb10c)

Pull request description:

  When the `validation:block_connected` tracepoint was introduced in 8f37f5c2a5, the connect block duration was passed in microseconds `µs`. By starting to use steady clock in fabf1cdb20 this changed to nanoseconds `ns`. As the test only checked if the duration value is `> 0` as a plausibility check, this went unnoticed. This was detected this when setting up monitoring for block validation time as part of the Great Consensus Cleanup Revival discussion.

  This change casts the duration explicitly to nanoseconds, updates the documentation, and adds a check for an upper bound to the tracepoint interface tests. The upper bound is quite lax as mining the block takes much longer than connecting the empty test block. It's however able to detect a duration passed in an incorrect unit (1000x off).

  A previous version of this PR casted the duration to microseconds `µs` - however, as the last three major releases have had the duration as nanoseconds (and this went unnoticed), we assume that this is the API now and changeing it back to microseconds would break the API again. See also https://github.com/bitcoin/bitcoin/pull/29877#issuecomment-2067867597

ACKs for top commit:
  maflcko:
    re-lgtm ACK cd0edf26c0
  laanwj:
    re-ACK cd0edf26c0

Tree-SHA512: 54a1eea0297e01c07c2d071ffafbf97dbd080f763e1dc0014ff086a913b739637c1634b1cf87c90b94a3c2f66006acfaada0414a15769cac761e03bc4aab2a77
2024-10-17 16:30:12 +01:00
merge-script
a38603456e
Merge bitcoin/bitcoin#31100: doc: remove dependency install instructions from win docs
Some checks are pending
CI / test each commit (push) Waiting to run
CI / macOS 14 native, arm64, no depends, sqlite only, gui (push) Waiting to run
CI / Win64 native, VS 2022 (push) Waiting to run
CI / ASan + LSan + UBSan + integer, no depends, USDT (push) Waiting to run
184f12c154 doc: remove dependency install instructions from win docs (fanquake)

Pull request description:

  This duplicates what is in depends, and is outdated.

  Closes #31090.

ACKs for top commit:
  maflcko:
    lgtm ACK 184f12c154
  jarolrod:
    ACK 184f12c154
  BrandonOdiwuor:
    ACK 184f12c154

Tree-SHA512: 089c9ff91c501c22ec1b9d5925a2b8c6cd1ea9ac2b75dd6a8c5fe75cf2f0090d808842cb321017894d2da70a30a87dbc1c4c481771d3c4aba13ce44244fcf392
2024-10-17 09:19:28 +01:00
fanquake
184f12c154
doc: remove dependency install instructions from win docs
This duplicates what is in depends, and is outdated.
2024-10-16 14:47:11 +01:00
fanquake
79aa8280b2
doc: drop LLVM install instructions 2024-10-16 14:20:21 +01:00
Ava Chow
2123c94448
Merge bitcoin/bitcoin#30527: Bump python minimum supported version to 3.10
fa1b139d17 Bump python minimum supported version to 3.10 (MarcoFalke)

Pull request description:

  All supported operating systems ship with python 3.10 (or later), so bumping the minimum should not cause any issues. A bump will allow new code to use new python features.

  For reference:
  * https://packages.debian.org/bookworm/python3
  * https://packages.ubuntu.com/jammy/python3
  * FreeBSD 13/14 ships with 3.11
  * CentOS-like 8/9 ships with 3.11/3.12 (via `appstream`)
  * OpenSuse Tumbleweed ships with all python versions, e.g. https://software.opensuse.org/package/python312-base

  This is for Bitcoin Core 29.0 in 2025 (next year), not the soon upcoming 28.0 this fall.

ACKs for top commit:
  achow101:
    ACK fa1b139d17
  AngusP:
    ACK fa1b139d17
  l0rinc:
    ACK fa1b139d17
  stickies-v:
    ACK fa1b139d17

Tree-SHA512: 910b202ff2374bb21c93e5249a151fd2c8f63759bed5659676b0e467afa6e8e977be797c3fccceca303c82575e11ec236a8d7c5880910e4314b3875b820e7e8a
2024-10-16 08:35:26 -04:00
merge-script
538ccaed00
Merge bitcoin/bitcoin#31048: build: Bump minimum supported macOS to 13.0
Some checks are pending
CI / ASan + LSan + UBSan + integer, no depends, USDT (push) Waiting to run
CI / test each commit (push) Waiting to run
CI / macOS 14 native, arm64, no depends, sqlite only, gui (push) Waiting to run
CI / Win64 native, VS 2022 (push) Waiting to run
a0e089a71d build: Bump minimum supported macOS to 13.0 (Hennadii Stepanov)

Pull request description:

  Running Bitcoin Core on unsupported OSes may expose users to security issues.

  macOS Monterey 12 received its final security update ([12.7.6](https://support.apple.com/en-us/100100)) on July 2024. Apple classifies the hardware that can run macOS 12 at most as ["obsolete worldwide"](https://support.apple.com/en-us/102772).

ACKs for top commit:
  maflcko:
    lgtm ACK a0e089a71d
  m3dwards:
    ACK a0e089a71d
  itornaza:
    reACK a0e089a71d

Tree-SHA512: b219730de87bcb2bcb40a972e910f516c739a538b0741fc245d23df04650f7e2f5774c38c1d1c9c053ed9e2a377488002feb708e8c7cba9c0070b81169719b10
2024-10-16 11:53:32 +01:00
brunoerg
d823ba6e20 doc: fuzz: remove Honggfuzz NetDriver instructions 2024-10-15 07:46:54 -03:00
Hennadii Stepanov
a0e089a71d
build: Bump minimum supported macOS to 13.0
Running Bitcoin Core on unsupported OSes may expose users to security
issues.

macOS Monterey 12 received its final security update (12.7.6) on July
2024. Apple classifies the hardware that can run macOS 12 at most as
"obsolete worldwide".
2024-10-15 10:18:48 +01:00
Ava Chow
9909a34d79
Merge bitcoin/bitcoin#30992: doc: update IBD requirements in doc/README.md
36a6d4b007 doc: update IBD requirements in doc/README.md (Mackain)

Pull request description:

  A small change to the first paragraph of the Setup part of the README that has been bugging me for a while.
  The disk space required for the Bitcoin transactions can no longer be described as "a few" hundred gigabytes.
  So I thought it was time it was changed to "several" instead.

  <!--
  *** Please remove the following help text before submitting: ***

  Pull requests without a rationale and clear improvement may be closed
  immediately.

  GUI-related pull requests should be opened against
  https://github.com/bitcoin-core/gui
  first. See CONTRIBUTING.md
  -->

  <!--
  Please provide clear motivation for your patch and explain how it improves
  Bitcoin Core user experience or Bitcoin Core developer experience
  significantly:

  * Any test improvements or new tests that improve coverage are always welcome.
  * All other changes should have accompanying unit tests (see `src/test/`) or
    functional tests (see `test/`). Contributors should note which tests cover
    modified code. If no tests exist for a region of modified code, new tests
    should accompany the change.
  * Bug fixes are most welcome when they come with steps to reproduce or an
    explanation of the potential issue as well as reasoning for the way the bug
    was fixed.
  * Features are welcome, but might be rejected due to design or scope issues.
    If a feature is based on a lot of dependencies, contributors should first
    consider building the system outside of Bitcoin Core, if possible.
  * Refactoring changes are only accepted if they are required for a feature or
    bug fix or otherwise improve developer experience significantly. For example,
    most "code style" refactoring changes require a thorough explanation why they
    are useful, what downsides they have and why they *significantly* improve
    developer experience or avoid serious programming bugs. Note that code style
    is often a subjective matter. Unless they are explicitly mentioned to be
    preferred in the [developer notes](/doc/developer-notes.md), stylistic code
    changes are usually rejected.
  -->

  <!--
  Bitcoin Core has a thorough review process and even the most trivial change
  needs to pass a lot of eyes and requires non-zero or even substantial time
  effort to review. There is a huge lack of active reviewers on the project, so
  patches often sit for a long time.
  -->

ACKs for top commit:
  achow101:
    ACK 36a6d4b007
  danielabrozzoni:
    ACK 36a6d4b007
  jonatack:
    ACK 36a6d4b007
  ismaelsadeeq:
    ACK 36a6d4b007
  tdb3:
    ACK 36a6d4b007
  itornaza:
    ACK 36a6d4b007

Tree-SHA512: c5b21aca526c0ebe5f3234bd72e4080dc64cbba0ccd2306397aafe8349bc3573773ee64ff31fafcf59ea1afc7527caaf6d7cd8fe798311d9dc11ad0cd539e21e
2024-10-09 20:01:16 -04:00
Ava Chow
f019fcec41 doc: Archive 28.0 release notes 2024-10-04 19:25:11 -04:00
Ava Chow
772928a13c
Merge bitcoin/bitcoin#30982: docs: Add instructions on how to self-sign bitcoin-core binaries for macOS
27709f51ee docs: Add instructions on how to self-sign bitcoin-core binaries for macOS (Chris Stewart)

Pull request description:

  Related to #15774

  This PR adds instructions to the release notes to tell users how to self sign bitcoin core binaries so they are executable on macOS.

  Tested on
  ```
  Darwin Chriss-MacBook-Pro.local 23.6.0 Darwin Kernel Version 23.6.0: Mon Jul 29 21:14:46 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T6031 arm64
  ```

  These commands do not appear to require 'phoning home'. I tested these commands when disconnected from a network connection and things worked.

ACKs for top commit:
  andrewtoth:
    reACK 27709f51ee
  achow101:
    ACK 27709f51ee

Tree-SHA512: db19c61577bb774420a2506d3f06bc0193116117f09ebd2d022a4524e8ca32d2cf9277a2997744ddfe8844600a569176e194aafc252dd31b48fc6e74db3c74d0
2024-10-03 12:54:58 -04:00
Chris Stewart
27709f51ee docs: Add instructions on how to self-sign bitcoin-core binaries for macOS
Remove link and clear up language

Move instructions to release-notes-empty-template.md

Capitalize 'Bitcoin Core' project name
2024-10-03 10:30:42 -05:00
Mackain
36a6d4b007 doc: update IBD requirements in doc/README.md 2024-10-02 17:46:11 +02:00
Marnix
61cdb1c9d8 doc: add testnet4 section header for config file 2024-10-01 15:18:12 +02:00
Ava Chow
c33eb2360e
Merge bitcoin/bitcoin#30043: net: Replace libnatpmp with built-in PCP+NATPMP implementation
5c7cacf649 ci: Remove natpmp build option and libnatpmp dependency (laanwj)
7e7ec984da doc: Remove mention of natpmp build options (laanwj)
061c3e32a2 depends: Drop natpmp and associated option from depends (laanwj)
20a18bf6aa build: Drop libnatpmp from build system (laanwj)
7b04709862 qt: Changes for built-in PCP+NAT-PMP (laanwj)
52f8ef66c6 net: Replace libnatpmp with built-in NATPMP+PCP implementation in mapport (laanwj)
97c97177cd net: Add PCP and NATPMP implementation (laanwj)
d72df63d16 net: Use GetLocalAddresses in Discover (laanwj)
e02030432b net: Add netif utility (laanwj)
754e425438 crypto: Add missing WriteBE16 function (laanwj)

Pull request description:

  Continues #30005. Closes #17012..

  This PR adds PCP (Port Control Protocol) from [RFC6887](https://datatracker.ietf.org/doc/html/rfc6887).  This adds, in addition to the existing IPv4 port mapping (which now uses PCP, with fallback to NAT-PMP), support for IPv6 pinholing-that is, opening a port on the firewall to make it reachable.

  PCP, like NAT-PMP is a simple UDP-based protocol, and the implementation is self-contained, so this gets rid of lthe libnatpnp dependency without adding a new one. It should otherwise be a drop-in replacement. NAT-PMP fallback is implemented so this will not make router support worse.

  For now it is disabled by default, though in the future (not in this PR) we could consider enable it by default to increase the number of connectable nodes without adding significant attack surface.

  To test:
  ```bash
  bitcoind -regtest -natpmp=1 -debug=net
  ```

  (most of the changes in this PR are, ironically, removing the libnatpmp dependency and associated build system and build docs)

  ## TODO

  - [x] Default gateway discovery on Linux / FreeBSD
  - [x] Default gateway discovery on Windows
  - [x] Default gateway discovery on MacOS
  - [x] Either solve FreeBSD compile issue (probably upstream issue) or remove FreeBSD support

  ## Things to consider for follow-up PRs

  - https://github.com/bitcoin/bitcoin/pull/30043#discussion_r1658764974 avoid unreachable nets (not given to -onlynet=)

  - https://github.com/bitcoin/bitcoin/pull/30043#discussion_r1658949236 could announce an addr:port where we do not listen (no -bind)

  - https://github.com/bitcoin/bitcoin/pull/30043#discussion_r1684368824 could announce the wrong port because it uses GetListenPort()

  - https://github.com/bitcoin/bitcoin/pull/30043#discussion_r1679709347 if we requested one port but another was assigned, then which one to use in the renewal?

  - https://github.com/bitcoin/bitcoin/pull/30043#discussion_r1772017020 Use `GetAdapterAddresses` to discover local addresses for Windows

ACKs for top commit:
  Sjors:
    ACK 5c7cacf649
  achow101:
    ACK 5c7cacf649
  vasild:
    ACK 5c7cacf649

Tree-SHA512: e35b69e56d5f5449a3d48a799f9b7b65107c65eeb3e245c2c1e9d42221e469ca5ead90afae423160601cd664dd553a51c859e04f4492f335b064aae3bf23e3bc
2024-09-30 16:27:47 -04:00
laanwj
7e7ec984da doc: Remove mention of natpmp build options 2024-09-30 11:37:56 +02:00
Ava Chow
65f6e7078b
Merge bitcoin/bitcoin#30510: multiprocess: Add IPC wrapper for Mining interface
Some checks are pending
CI / test each commit (push) Waiting to run
CI / macOS 14 native, arm64, no depends, sqlite only, gui (push) Waiting to run
CI / Win64 native, VS 2022 (push) Waiting to run
CI / ASan + LSan + UBSan + integer, no depends, USDT (push) Waiting to run
1a33281766 doc: multiprocess documentation improvements (Ryan Ofsky)
d043950ba2 multiprocess: Add serialization code for BlockValidationState (Ryan Ofsky)
33c2eee285 multiprocess: Add IPC wrapper for Mining interface (Ryan Ofsky)
06882f8401 multiprocess: Add serialization code for vector<char> (Russell Yanofsky)
095286f790 multiprocess: Add serialization code for CTransaction (Russell Yanofsky)
69dfeb1876 multiprocess: update common-types.h to use C++20 concepts (Ryan Ofsky)
206c6e78ee build: Make bitcoin_ipc_test depend on bitcoin_ipc (Ryan Ofsky)
070e6a32d5 depends: Update libmultiprocess library for cmake headers target (Ryan Ofsky)

Pull request description:

  Add Cap'n Proto wrapper for the Mining interface introduced in #30200, and its associated types.

  This PR combined with #30509 will allow a separate mining process, like the one being implemented in https://github.com/Sjors/bitcoin/pull/48, to connect to the node over IPC, and create, manage, and submit block templates. (#30437 shows another simpler demo of a process using the Mining interface.)

  ---

  This PR is part of the [process separation project](https://github.com/bitcoin/bitcoin/issues/28722).

ACKs for top commit:
  achow101:
    ACK 1a33281766
  TheCharlatan:
    ACK 1a33281766
  itornaza:
    ACK 1a33281766

Tree-SHA512: 0791078dd6885dbd81e3d14c75fffff3da8d1277873af379ea6f9633e910c11485bb324e4cde3d936d50d343b16a10b0e8fc1e0fc6d7bdca7f522211da50c01e
2024-09-25 16:39:07 -04:00
merge-script
39219fe145
Merge bitcoin/bitcoin#30946: doc: correct the zmq automatic build info
Some checks are pending
CI / test each commit (push) Waiting to run
CI / macOS 14 native, arm64, no depends, sqlite only, gui (push) Waiting to run
CI / Win64 native, VS 2022 (push) Waiting to run
CI / ASan + LSan + UBSan + integer, no depends, USDT (push) Waiting to run
06e7e83632 doc: correct the zmq automatic build info (tdb3)

Pull request description:

  The current documentation states that the ZMQ feature is automatically included when building.
  Noticed this was no longer the case when building to review PR #30942.

ACKs for top commit:
  l0rinc:
    ACK 06e7e83632
  hebasto:
    re-ACK 06e7e83632.

Tree-SHA512: 24269c29415e54815b105e3f830f31f055e9bdcb3bf4a7cede068651875190adfc4e72ad5448b3c30a23b0db024f743d9f18576a6fda46d87deb5ea39352e626
2024-09-25 12:21:51 +01:00
tdb3
06e7e83632
doc: correct the zmq automatic build info 2024-09-25 07:07:04 -04:00
MarcoFalke
fa6c1946d2
doc: Adjust links in OSS-Fuzz section 2024-09-24 22:09:17 +02:00
Ryan Ofsky
1a33281766 doc: multiprocess documentation improvements
Most improvements suggested by stickies-v <stickies-v@protonmail.com>
https://github.com/bitcoin/bitcoin/pull/28978#pullrequestreview-1800375604

Omission of CustomReadMessage and CustomBuildMessage was noticed by
TheCharlatan in
https://github.com/bitcoin/bitcoin/pull/30510#discussion_r1708996040 and is
fixed here as well.

Co-authored-by: stickies-v <stickies-v@protonmail.com>
2024-09-23 15:03:04 -05:00
merge-script
ab0b5706b2
Merge bitcoin/bitcoin#30875: doc: fixed inconsistencies in documentation between autotools to cmake change
Some checks are pending
CI / test each commit (push) Waiting to run
CI / macOS 14 native, arm64, no depends, sqlite only, gui (push) Waiting to run
CI / Win64 native, VS 2022 (push) Waiting to run
CI / ASan + LSan + UBSan + integer, no depends, USDT (push) Waiting to run
a9964c0444 doc: Updating docs from autotools to cmake (kevkevinpal)

Pull request description:

  A bit of a followup from https://github.com/bitcoin/bitcoin/pull/30840

  - In this change the documentation where we refer to the `./configure` script which is now gone and have converted the configure params to use the `cmake` equivalent.

ACKs for top commit:
  maflcko:
    ACK a9964c0444
  jonatack:
    utACK a9964c0444
  jarolrod:
    ACK a9964c0444
  tdb3:
    ACK a9964c0444
  pablomartin4btc:
    re-ACK a9964c0444

Tree-SHA512: f7ed20b8ad61f028c0d242b9cc70650d8da63057d4a8f7da88f0117a8d3241c5fe8fcf19d56ec82088160b9fee9b175fe9f64e5a845260d3696dc7e94bfdd0bd
2024-09-18 18:44:02 +01:00
kevkevinpal
a9964c0444
doc: Updating docs from autotools to cmake
replaced --enable-debug with -DCMAKE_BUILD_TYPE=Debug in developer-notes
replaced --enable-multiprocess with -DWITH_MULTIPROCESS=ON
replaced --disable-zmq with -DWITH_ZMQ=OFF
2024-09-18 11:04:52 -04:00
merge-script
69409bc6e5
Merge bitcoin/bitcoin#30908: doc: remove Eclipser fuzzing documentation
Some checks are pending
CI / test each commit (push) Waiting to run
CI / macOS 14 native, arm64, no depends, sqlite only, gui (push) Waiting to run
CI / Win64 native, VS 2022 (push) Waiting to run
CI / ASan + LSan + UBSan + integer, no depends, USDT (push) Waiting to run
735436df8c Remove outdated Eclipser fuzzing documentation (Jon Atack)

Pull request description:

  Remove the Eclipser fuzzing documentation from `doc/fuzzing.md`, as that repository (https://github.com/SoftSec-KAIST/Eclipser) hasn't been updated in several years, appears possibly unmaintained, and likely isn't being actively used for fuzzing Bitcoin Core.

  These docs were originally added in https://github.com/bitcoin/bitcoin/pull/22585.

ACKs for top commit:
  maflcko:
    review ACK 735436df8c
  brunoerg:
    ACK 735436df8c

Tree-SHA512: 7ccbf93c10add53e92edf67a622722935029add63f8fbb6e733b96e9d155faeb8d5d3678adb0e7f2ce8ccbdffd2a34c3dc93adbcf4e3ce0cdd03e20ad3e6bbd6
2024-09-18 10:17:28 +01:00
Jon Atack
735436df8c Remove outdated Eclipser fuzzing documentation
[skip ci]
2024-09-17 11:32:46 -06:00
Ava Chow
fce9e065c1
Merge bitcoin/bitcoin#28358: Drop -dbcache limit
bb3b980dfd validation: drop maximum -dbcache (Sjors Provoost)

Pull request description:

  Due to recent UTXO set growth, the current maximum value for `-dbcache` of 16GB is ~just months away from being~ insufficient (for those who wish to complete IBD with the UTXO set held in RAM).

  This drops the limit. It also adds a warning that it's up to users to check that they have enough RAM.

  Fixes #28249.

  ---

  A previous version of this PR increased the maximum to 64GB. It also made startup abort if the value provided is too high, rather than quietly round it down. But this didn't get much support.

ACKs for top commit:
  achow101:
    ACK bb3b980dfd
  tdb3:
    ACK bb3b980dfd
  BenWestgate:
    crACK bb3b980dfd.

Tree-SHA512: 8515fff468c2387a0b04bd9523ab1df46d6325738588b7550fabddbb8624817a583d95b95ea246407f9f0ff3e43e760cf7334621bec6af79710176328528a3ef
2024-09-16 15:56:02 -04:00
merge-script
0c1e507278
Merge bitcoin/bitcoin#30871: build: Add more cmake presets
f15e817811 build: add more CMake presets (dev-mode, libfuzzer, libfuzzer-nosan) (Pieter Wuille)

Pull request description:

  Add three more cmake presets to the project-wide `CMakePresets.json` file:
  * `dev-mode`: enables all features and dependencies
  * `libfuzzer`: builds for fuzzing with libfuzzer and the typical sanitizers (but not the optional ones that require suppressions) enabled.
  * `libfuzzer-nosan`: builds for fuzzing with libfuzzer and no (other) sanitizers

  ... and then uses these in some documentation.

ACKs for top commit:
  ryanofsky:
    Code review ACK f15e817811. This change is much needed to simplify my command line.
  TheCharlatan:
    ACK f15e817811

Tree-SHA512: a5f67bb7119fd36832ca5eb7189db04bfaf88f954aa461bfb2aeb866469057b0d0272835c418bc3a264c30dd8fba6d2e2cc8a6741a889f28f52c1c09b3ba9704
2024-09-12 11:33:15 +01:00
merge-script
db8350b0e3
Merge bitcoin/bitcoin#30803: build: Minor build system fixes and amendments
1cc93fe7b4 build: Delete dead code that implements `IF_CHECK_FAILED` option (Hennadii Stepanov)
341ad23809 build: Delete MSVC special case for `BUILD_FOR_FUZZING` option (Hennadii Stepanov)
fdad128b52 build: Stop enabling CMake's CMP0141 policy (Hennadii Stepanov)
b2a6f545b4 doc: Drop `ctest` command from Windows cross-compiling instructions (Hennadii Stepanov)
73b618582d build: Print `CMAKE_CXX_COMPILER_ARG1` in summary (Hennadii Stepanov)
f03c942095 build, test: Add missed log options (Hennadii Stepanov)
6f2cb0eafd doc: Amend comment about ZeroMQ config files (Hennadii Stepanov)

Pull request description:

  This PR addresses the following comments:
  - https://github.com/bitcoin/bitcoin/pull/30454#discussion_r1742342524
  - https://github.com/bitcoin/bitcoin/pull/30454#discussion_r1728692369
  - https://github.com/bitcoin/bitcoin/pull/30454#discussion_r1736110362
  - https://github.com/bitcoin/bitcoin/pull/30454#discussion_r1742931121
  - https://github.com/bitcoin/bitcoin/pull/30454#discussion_r1747723657
  - https://github.com/bitcoin/bitcoin/pull/30454#discussion_r1742328675
  - https://github.com/bitcoin/bitcoin/pull/30454#discussion_r1723106474

ACKs for top commit:
  sipsorcery:
    tACK 1cc93fe7b4 (win11 msvc).
  maflcko:
    re-ACK 1cc93fe7b4

Tree-SHA512: a390797bb4d3b7eb9163653b6c9c324e7a01090f6cdda74df7349a24a5c4a2084e5912878747f56561315afc70cae9adb1c363f47ceb0af96004ea591d25171b
2024-09-12 10:30:06 +01:00
Ava Chow
f6298a878f
Merge bitcoin/bitcoin#30840: docs: Updated debug build instructions for cmake
0b003e1ff7 docs: Updated debug build instructions for cmake (ion-)

Pull request description:

  In the [developer notes](https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md) the section on [compiling for debug](https://github.com/bitcoin/bitcoin/blob/master/doc/developer-notes.md#compiling-for-debugging) displays outdated instructions that were applicable before the move to cmake build system.

  This PR just gives instructions on how to build for debugging in the context of cmake.

ACKs for top commit:
  kevkevinpal:
    ACK [0b003e1](0b003e1ff7)
  achow101:
    ACK 0b003e1ff7
  tdb3:
    ACK 0b003e1ff7

Tree-SHA512: fc8b4824d68e47b3e64320b4ce728df4242d00c2e8c75dcf5daa60af3050c62d94fa9741e447c7d81e72194470ed68a4e19bbee8cf6a1412d6566c7b699cf242
2024-09-11 13:20:19 -04:00
Pieter Wuille
f15e817811 build: add more CMake presets (dev-mode, libfuzzer, libfuzzer-nosan) 2024-09-11 12:51:34 -04:00
kevkevinpal
4b1ce3cac8
docs: updated developer notes for --with-sanitizers to -DSANITIZERS and removed resource for -fsanitze flags 2024-09-11 10:26:58 -04:00
merge-script
ba84c2774d
Merge bitcoin/bitcoin#30823: cmake: add USE_SOURCE_PERMISSIONS to all configure_file() usage
1f054eca4e cmake: add USE_SOURCE_PERMISSIONS to all configure_file usage (fanquake)

Pull request description:

  `USE_SOURCE_PERMISSIONS` is the default, so this should not change behaviour. However, being explicit makes it clear what we are doing.

  Related to #30815.

  See https://cmake.org/cmake/help/latest/command/configure_file.html#options.

ACKs for top commit:
  hebasto:
    ACK 1f054eca4e.
  TheCharlatan:
    ACK 1f054eca4e

Tree-SHA512: efed91b8aa0813100304ee58e169bbf5cfbb7db465ec4f7e6cbbae6053f09a36757bf96b4d1cb9ddf4c1cab0ceb3ab18805ebefa122535518ffb501c9b489d3d
2024-09-09 10:39:36 +01:00
Gutflo
7a669fde18
docs: Fix minor typo 2024-09-08 20:25:53 +02:00
ion-
0b003e1ff7 docs: Updated debug build instructions for cmake 2024-09-08 18:29:01 +03:00
Hennadii Stepanov
b2a6f545b4
doc: Drop ctest command from Windows cross-compiling instructions
The ctest command was added hastily without considering the requirement
of Wine, which is generally not trivial to install.
2024-09-06 21:59:52 +01:00
Hennadii Stepanov
ee22bf55e3
doc: Update and amend MSVC build guide 2024-09-06 12:19:27 +01:00
fanquake
1f054eca4e
cmake: add USE_SOURCE_PERMISSIONS to all configure_file usage
`USE_SOURCE_PERMISSIONS` is the default, so this should not change
behaviour. However, being explicit makes it clear what we are doing.

Related to #30815.

See
https://cmake.org/cmake/help/latest/command/configure_file.html#options.
2024-09-06 10:52:19 +01:00
marcofleon
e5f7272ad3 doc: fix assumeutxo design doc link 2024-09-04 22:53:34 +01:00
Ava Chow
b8d2f58e06
Merge bitcoin/bitcoin#30808: rpc: dumptxoutset height parameter follow-ups (29553)
a3108a7c56 rpc: Manage dumptxoutset rollback with RAII class (Fabian Jahr)
c5eaae3b89 doc: Add -rpcclienttimeout=0 to loadtxoutset examples (Fabian Jahr)
598b9bba5a rpc: Don't re-enable previously disabled network after dumptxoutset (Fabian Jahr)

Pull request description:

  First, this addresses two left-over comments in #29553:

  - When running `dumptxoutset` the network gets disabled in the beginning and then re-enabled at the end. The network would be re-enabled even if the user had already disabled the network themself before running `dumptxoutset`. The network is now not re-enabled anymore since that might not be what the user wants.
  - The `-rpcclienttimeout=0` option is added to `loadtxoutset` examples in documentation

  Additionally, pablomartin4btc notified me that he found his node stuck at the invalidated height after some late testing after #29553 was merged. We could not find the actual source of the issue since his logs got lost. However, it seems likely that some kind of disruption stopped the process before the node could roll forward again. We fixed this issue for network disablement with a RAII class previously and it seems logical that this can happen the same way for the rollback part so I suggest to also fix it the same way.

  An example to reproduce the issue described above as I think it happened: Remove the `!` in the following line in `PrepareUTXOSnapshot()` to simulate an issue occurring during `GetUTXOStats()`.

  ```
  if (!maybe_stats) {
  ```

  This leaves the node in the following state on master:

  ```
  $ build/src/bitcoin-cli -rpcclienttimeout=0 -named dumptxoutset utxo-859750.dat rollback=859750
  error code: -32603
  error message:
  Unable to read UTXO set
  $ build/src/bitcoin-cli getchaintips
  [
    {
      "height": 859762,
      "hash": "00000000000000000002ec7a0fcca3aeca5b35545b52eb925766670aacc704ad",
      "branchlen": 12,
      "status": "headers-only"
    },
    {
      "height": 859750,
      "hash": "0000000000000000000010897b6b88a18f9478050200d8d048013c58bfd6229e",
      "branchlen": 0,
      "status": "active"
    },
  ```

  (Note that the first tip is `headers-only` and not `invalid` only because I started `dumptxoutset` before my node had fully synced to the tip. pablomartin4btc saw it as `invalid`.)

ACKs for top commit:
  maflcko:
    re-ACK a3108a7c56 🐸
  achow101:
    ACK a3108a7c56
  pablomartin4btc:
    cr ACK a3108a7c56

Tree-SHA512: d2ab32f62de2253312e27d7d753ec0995da3fe7a22ffc3d6c7cfa3b68a4a144c59210aa82b7a704c2a29c3b2aad6ea74972e3e8bb979ee4b7082a20f4bfddc9c
2024-09-04 11:40:26 -04:00
Fabian Jahr
c5eaae3b89
doc: Add -rpcclienttimeout=0 to loadtxoutset examples 2024-09-04 15:49:04 +02:00
merge-script
ab317ad2ef
Merge bitcoin/bitcoin#30804: fuzz: Rename fuzz_seed_corpus to fuzz_corpora
8888beea8d scripted-diff: fuzz: Rename fuzz_seed_corpus to fuzz_corpora (MarcoFalke)

Pull request description:

  Now that cmake was a breaking change for all fuzz scripts, it seems fine to bundle it with another breaking change to rename the fuzz corpora directory, as discussed and approved in https://github.com/bitcoin-core/qa-assets/issues/200:

  * The word "seed" in the old name doesn't really apply. In reality it is a collection of fuzz input seeds, as well as fuzz inputs.
  * The rename will also allow in the future (when there is a need and desire) to provide a minimal set of possibly hand-crafted or otherwise non-fuzz-generated fuzz seed inputs to some fuzz targets (and possibly store them in a separate folder and validate that their format is still accurate and matches the fuzz target code).
  * Finally, "corpus" is renamed to corpora, to clarify that the folder holds the fuzz inputs for several fuzz targets.

ACKs for top commit:
  brunoerg:
    ACK 8888beea8d
  marcofleon:
    ACK 8888beea8d

Tree-SHA512: abc693ca5d946850f04b6349e2a98f8fbc2ba9991be5a025bc0f357e341cbe7510f2f5f0e47b997d07136736d818df361270f372b8fb70860995a0605ca81e4d
2024-09-04 14:04:27 +01:00
merge-script
4835bba2cb
Merge bitcoin/bitcoin#30802: doc: Clarify libbitcoin_consensus in design/libraries.md
fa78ed83be doc: Clarify libbitcoin_consensus in design/libraries.md (MarcoFalke)

Pull request description:

  Now that the shared library has been removed in commit 80f8b92f4f, update the documentation to drop the no-longer applicable prefix "Stable...".

ACKs for top commit:
  hebasto:
    ACK fa78ed83be.
  fanquake:
    ACK fa78ed83be

Tree-SHA512: d7b946d50f734c0474ff6155a655a2bb873f76e071bfeeca1dd42ea5fdd32bc1e45129826bb54e3f111265d19c2aba2d02cb77ad7663f9fc40c8c875e5fddda2
2024-09-04 10:13:56 +01:00
Ava Chow
fa5fc71199
Merge bitcoin/bitcoin#29553: assumeutxo: Add dumptxoutset height param, remove shell scripts
94b0adcc37 rpc, refactor: Prevent potential race conditions in dumptxoutset (Fabian Jahr)
e868a6e070 doc: Improve assumeutxo guide and add more docs/comments (Fabian Jahr)
b29c21fc92 assumeutxo: Remove devtools/utxo_snapshot.sh (Fabian Jahr)
20a1c77aa7 contrib: Remove test_utxo_snapshots.sh (Fabian Jahr)
8426850352 test: Test for dumptxoutset at specific height (Fabian Jahr)
993cafe7e4 RPC: Add type parameter to dumptxoutset (Fabian Jahr)
fccf4f91d2 RPC: Extract ReconsiderBlock helper (Fabian Jahr)
446ce51c21 RPC: Extract InvalidateBlock helper (Fabian Jahr)

Pull request description:

  This adds a height parameter to the `dumptxoutset` RPC. This internalizes the workflow that was previously done by scripts: roll back the chain to the height we actually want the snapshot from, create the snapshot, roll forward to the real tip again.

  The nice thing about internalizing this functionality is that we can write tests for the code and it gives us more options to make the functionality robust. The shell scripts we have so far will be more cumbersome to maintain in the long run, especially since we will only notice later when we have broken them. I think it's safe to remove these `test_utxo_snapshots.sh` as well when we have this option in `dumptxoutset` because we have also added some good additional functional test coverage for this functionality.

ACKs for top commit:
  Sjors:
    re-utACK 94b0adcc37
  achow101:
    ACK 94b0adcc37
  mzumsande:
    ACK 94b0adcc37
  pablomartin4btc:
    re-ACK 94b0adcc37

Tree-SHA512: a4c9af5f687d1ca7bfb579a36f363882823386b5fa80c05de531b05a2782b5da6ff5baf3ada4bca8f32f63975d86f1948175abed9affe51fc958472b5f838dab
2024-09-03 15:30:45 -04:00
MarcoFalke
8888beea8d
scripted-diff: fuzz: Rename fuzz_seed_corpus to fuzz_corpora
-BEGIN VERIFY SCRIPT-
 ren() { sed -i "s:\<$1\>:$2:g" $( git grep -l "$1" ) ; }
 ren fuzz_seed_corpus     fuzz_corpora
 ren FUZZ_SEED_CORPUS_DIR FUZZ_CORPORA_DIR
-END VERIFY SCRIPT-
2024-09-03 20:40:35 +02:00
MarcoFalke
fa78ed83be
doc: Clarify libbitcoin_consensus in design/libraries.md 2024-09-03 19:35:43 +02:00
0xb10c
cd0edf26c0
tracing: cast block_connected duration to nanoseconds
When the tracepoint was introduced in 8f37f5c2a5,
the connect_block duration was passed in microseconds `µs`.
By starting to use steady clock in fabf1cdb20
this changed to nanoseconds `ns`. As the test only checked if the
duration value is `> 0` as a plausibility check, this went unnoticed.

I detected this when setting up monitoring for block validation time
as part of the Great Consensus Cleanup Revival discussion.

This change casts the duration explicitly to nanoseconds (as it has been
nanoseconds for the last three releases; switching back now would 'break'
the broken API again; there don't seem to be many users affected), updates
the documentation and adds a check for an upper bound to the tracepoint
interface tests. The upper bound is quite lax as mining the block takes
much longer than connecting the empty test block. It's however able to
detect incorrect duration units passed.
2024-09-03 14:15:37 +02:00
merge-script
4c526f575c
Merge bitcoin/bitcoin#30741: doc: update documentation and scripts related to build directories
6a68343ffb doc: Prepend 'build/' to binary paths under 'src/' in docs (Lőrinc)
91b3bc2b9c doc: Update documentation generation example in developer-notes.md (Lőrinc)

Pull request description:

  In [the other readmes](6ce50fd9d0/src/test/README.md (L19)) we've provided a default build directory instead, unified the `developer-notes.md` to specify it explicitly.

  In the next commit I've used this default to go over each reference to our binaries and changed their in-source references to the build directory.
  Some of these changes were in example outputs - I haven't validated that the outputs are still the same.
  I haven't modified the build folders in the devtools.

ACKs for top commit:
  maflcko:
    review ACK 6a68343ffb
  pablomartin4btc:
    ACK 6a68343ffb
  fanquake:
    ACK 6a68343ffb - we still need to followup with other scripts/devtools, and likely unify what we are doing in some way, but this is an improvement.

Tree-SHA512: 905d9c68cafe1e405e98d6aa089d7a36a34c9e03403df5c67ac2c9a98cfa54a0305b647cb92247dcb9f49e9b509a8ba88367392b95618c67059684c67b6c36fb
2024-09-03 10:31:00 +01:00
merge-script
99e35fb7b9
Merge bitcoin/bitcoin#30779: doc: add -DWITH_BDB=ON to unix build docs
ddef914bbb doc: remove extraneous install statement (tdb3)
bc532c915e doc: add with_bdb to unix build docs (tdb3)

Pull request description:

  Existing instructions for building legacy wallet support omit `-DWITH_BDB=ON`, which results in:

  ```
  CMake Warning:
    Manually-specified variables were not used by the project:

      BerkeleyDB_INCLUDE_DIR
  ```

  and a build without BDB support.

  This PR updates the docs to include `-DWITH_BDB=ON`.
  Also adds a minor correction to the OpenBSD build doc.

  Checked by building on Linux (Debian 12.7), FreeBSD 14.1, and OpenBSD 7.5 and attempting to create a legacy wallet with the `createwallet` rpc (with `-deprecatedrpc=create_bdb`).

ACKs for top commit:
  l0rinc:
    utACK ddef914bbb
  fanquake:
    ACK ddef914bbb

Tree-SHA512: 261568700b95fc073e03db6ca64a5f0544d5aed337aee4275575c1d0d1373c2a96911947abd202da3ed7c3b7a662b700b0596c0dabefe4b50900a798eed7e118
2024-09-02 15:04:23 +01:00
marcofleon
8d7f8fabae doc: fix compiler flags for macOS configuration 2024-09-02 12:53:50 +01:00