42353 Commits

Author SHA1 Message Date
Hennadii Stepanov
d9fcbfc372
build: Add JOBS variable support to CoverageFuzz.cmake script 2024-09-04 16:03:06 +01:00
Hennadii Stepanov
e7cf4a6f27
build: Add missed -g for "Coverage" build configuration 2024-09-04 16:02:19 +01:00
Hennadii Stepanov
fe2003ab12
build: Add COMMAND_ERROR_IS_FATAL to every process in coverage scrips 2024-09-04 16:02:14 +01:00
glozow
f66011e88f
Merge bitcoin/bitcoin#30784: test: add check that too large txs aren't put into orphanage
66d13c870284327abc89d36c0b5cc5f58e96f570 test: add check that large txs aren't put into orphanage (Sebastian Falbesoner)
ed7d2246661ec1789b7db0f21668270f0681ea4a test: add `BulkTransaction` helper to unit test transaction utils (Sebastian Falbesoner)

Pull request description:

  This PR adds test coverage for the following check in `TxOrphanage::AddTx`, where large orphan txs are ignored in order to avoid memory exhaustion attacks:
  5abb9b1af4/src/txorphanage.cpp (L22-L34)
  Note that this code-path isn't reachable under normal circumstances, as txs larger than `MAX_STANDARD_TX_WEIGHT` are already rejected earlier in the course of doing the mempool standardness checks (see `MemPoolAccept::PreChecks` -> `IsStandardTx` -> `reason = "tx-size";`), so this is only relevant if tx standardness rules are disabled via `-acceptnonstdtxns=1`. The ignore path is checked ~~by asserting the debug log, which is ugly, but as far as I know there is currently no way to access the orphanage entries from the outside~~ via unit test that checks the return value of `AddTx`. As an alternative to adding test coverage, one might consider removing this check altogether (or replacing it with an `Assume`), as it's redundant as explained above.

ACKs for top commit:
  maflcko:
    review ACK 66d13c870284327abc89d36c0b5cc5f58e96f570
  glozow:
    ACK 66d13c870284327abc89d36c0b5cc5f58e96f570
  tdb3:
    re-ACK 66d13c870284327abc89d36c0b5cc5f58e96f570

Tree-SHA512: 88e8254ab5fca70c387a5992649ea6a704a65162999be972cc86bd74fc26c5f0f1e13e04856708d07ad5524cb77c0918e19663db92b3593e842469dfe04af6a1
2024-09-04 10:20:33 -04:00
merge-script
ab317ad2ef
Merge bitcoin/bitcoin#30804: fuzz: Rename fuzz_seed_corpus to fuzz_corpora
8888beea8d477b1d4a2dfd2a0bb5f686de62f3ff 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 8888beea8d477b1d4a2dfd2a0bb5f686de62f3ff
  marcofleon:
    ACK 8888beea8d477b1d4a2dfd2a0bb5f686de62f3ff

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
fa78ed83be1f6831416a6f6632e2161f12d359e4 doc: Clarify libbitcoin_consensus in design/libraries.md (MarcoFalke)

Pull request description:

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

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

Tree-SHA512: d7b946d50f734c0474ff6155a655a2bb873f76e071bfeeca1dd42ea5fdd32bc1e45129826bb54e3f111265d19c2aba2d02cb77ad7663f9fc40c8c875e5fddda2
2024-09-04 10:13:56 +01:00
Ava Chow
94c307b3c0
Merge bitcoin/bitcoin#30675: http: set TCP_NODELAY when creating HTTP server
03d49d0f25ab5660524d5ddd171de677a808b984 http: set TCP_NODELAY when creating HTTP server (Roman Zeyde)

Pull request description:

  Otherwise, the default HTTP server config may result in high latency, due to Nagle's algorithm (on the server) and delayed ACK (on the client):

  [1] https://www.extrahop.com/blog/tcp-nodelay-nagle-quickack-best-practices
  [2] https://eklitzke.org/the-caveats-of-tcp-nodelay

  Without the fix, fetching a small block takes ~40ms (when connection keep-alive is enabled):
  ```
  $ ab -k -c 1 -n 100 http://localhost:8332/rest/block/00000000000002b5898f7cdc80d9c84e9747bc6b9388cc989971d443f05713ee.bin

  Server Software:
  Server Hostname:        localhost
  Server Port:            8332

  Document Path:          /rest/block/00000000000002b5898f7cdc80d9c84e9747bc6b9388cc989971d443f05713ee.bin
  Document Length:        25086 bytes

  Concurrency Level:      1
  Time taken for tests:   4.075 seconds
  Complete requests:      100
  Failed requests:        0
  Keep-Alive requests:    100
  Total transferred:      2519200 bytes
  HTML transferred:       2508600 bytes
  Requests per second:    24.54 [#/sec] (mean)
  Time per request:       40.747 [ms] (mean)
  Time per request:       40.747 [ms] (mean, across all concurrent requests)
  Transfer rate:          603.76 [Kbytes/sec] received

  Connection Times (ms)
                min  mean[+/-sd] median   max
  Connect:        0    0   0.0      0       0
  Processing:     0   41   4.1     41      42
  Waiting:        0    0   0.1      0       1
  Total:          0   41   4.1     41      42

  Percentage of the requests served within a certain time (ms)
    50%     41
    66%     41
    75%     41
    80%     41
    90%     42
    95%     42
    98%     42
    99%     42
   100%     42 (longest request)
  ```

  With the fix, it takes ~0.2ms:
  ```
  $ ab -k -c 1 -n 1000 http://localhost:8332/rest/block/00000000000002b5898f7cdc80d9c84e9747bc6b9388cc989971d443f05713ee.bin

  Benchmarking localhost (be patient)
  Completed 100 requests
  Completed 200 requests
  Completed 300 requests
  Completed 400 requests
  Completed 500 requests
  Completed 600 requests
  Completed 700 requests
  Completed 800 requests
  Completed 900 requests
  Completed 1000 requests
  Finished 1000 requests

  Server Software:
  Server Hostname:        localhost
  Server Port:            8332

  Document Path:          /rest/block/00000000000002b5898f7cdc80d9c84e9747bc6b9388cc989971d443f05713ee.bin
  Document Length:        25086 bytes

  Concurrency Level:      1
  Time taken for tests:   0.194 seconds
  Complete requests:      1000
  Failed requests:        0
  Keep-Alive requests:    1000
  Total transferred:      25192000 bytes
  HTML transferred:       25086000 bytes
  Requests per second:    5147.05 [#/sec] (mean)
  Time per request:       0.194 [ms] (mean)
  Time per request:       0.194 [ms] (mean, across all concurrent requests)
  Transfer rate:          126625.50 [Kbytes/sec] received

  Connection Times (ms)
                min  mean[+/-sd] median   max
  Connect:        0    0   0.0      0       0
  Processing:     0    0   0.0      0       0
  Waiting:        0    0   0.0      0       0
  Total:          0    0   0.0      0       0

  Percentage of the requests served within a certain time (ms)
    50%      0
    66%      0
    75%      0
    80%      0
    90%      0
    95%      0
    98%      0
    99%      0
   100%      0 (longest request)
  ```

ACKs for top commit:
  achow101:
    ACK 03d49d0f25ab5660524d5ddd171de677a808b984
  theStack:
    re-ACK 03d49d0f25ab5660524d5ddd171de677a808b984
  tdb3:
    ACK 03d49d0f25ab5660524d5ddd171de677a808b984

Tree-SHA512: bbf3d78b8521f569430850ec4315a75711303547df1a3de213a4ad34c9700105e374e0a649352fd05f8e4badb5b59debd3720e1c5d392c5113d7816648f7fcaa
2024-09-03 17:27:50 -04:00
Ava Chow
27e89bc2f5
Merge bitcoin/bitcoin#26619: log: expand BCLog::LogFlags (categories) to 64 bits
b31a0cd0378184b2b9eb8f4bd3120cbd32c62005 log: expand BCLog::LogFlags (categories) to 64 bits (Larry Ruane)

Pull request description:

  Increase the maximum number of logging categories from 32 to 64.

  We're currently using 29 of the 32 available logging categories (there are only 3 remaining). It would be good to increase the limit soon; the fourth PR to be merged that adds a new logging category will be blocked until something like this is done.

  This PR also adds a `TEST` category that uses the new range (`1ULL << 63`) in case there's a hidden assumption somewhere that the `BCLog::LogFlags` type is 32 bits. (Also added a test for this test category.) It also provides an example showing that the expression must be `1ULL << <shift>` for shift value 31 and beyond.

ACKs for top commit:
  achow101:
    ACK b31a0cd0378184b2b9eb8f4bd3120cbd32c62005
  vasild:
    ACK b31a0cd0378184b2b9eb8f4bd3120cbd32c62005
  ryanofsky:
    Code review ACK b31a0cd0378184b2b9eb8f4bd3120cbd32c62005, just dropping mask_bit constant since last review. I still think
  theStack:
    Code-review ACK b31a0cd0378184b2b9eb8f4bd3120cbd32c62005

Tree-SHA512: de422dbeb479848d370aed42d415f42461457ab0eda62b245dc7ff9f0e111626e7d4c0d62ff13082ec664d05fbb0db04c71eb4b6f22eb8f19198826a67c4035e
2024-09-03 16:33:49 -04:00
Sebastian Falbesoner
66d13c8702 test: add check that large txs aren't put into orphanage 2024-09-03 22:23:48 +02:00
Sebastian Falbesoner
ed7d224666 test: add BulkTransaction helper to unit test transaction utils
The padding method used matches the one used in MiniWallet,
`MiniWallet._bulk_tx`.
2024-09-03 22:20:01 +02:00
Ava Chow
d4b5553849
Merge bitcoin/bitcoin#30742: kernel: Use spans instead of vectors for passing block headers to validation functions
a2955f09792b6232f3a45aa44a498b466279a8b7 validation: Use span for ImportBlocks paths (TheCharlatan)
20515ea3f5bd426f6e3746cf5cddd2324dacae31 validation: Use span for CalculateClaimedHeadersWork (TheCharlatan)
52575e96e72a0402c448f86728b2e84836b1e817 validation: Use span for ProcessNewBlockHeaders (TheCharlatan)

Pull request description:

  Makes it friendlier for potential future users of the kernel library if they do not store the headers in a std::vector, but can guarantee contiguous memory.

  Take this opportunity to also change the argument of ImportBlocks previously taking a `std::vector` to a `std::span`.

ACKs for top commit:
  stickies-v:
    re-ACK a2955f09792b6232f3a45aa44a498b466279a8b7 - no changes except further walking the ~file~ path of modernizing variable names.
  maflcko:
    ACK a2955f09792b6232f3a45aa44a498b466279a8b7 🕑
  achow101:
    ACK a2955f09792b6232f3a45aa44a498b466279a8b7
  danielabrozzoni:
    ACK a2955f09792b6232f3a45aa44a498b466279a8b7

Tree-SHA512: 8b07f4ad26e270b65600d1968cd78847b85caca5bfbb83fd9860389f26656b1d9a40b85e0990339f50403d18cedcd2456990054f3b8b0bedce943e50222d2709
2024-09-03 15:40:40 -04:00
Ava Chow
fa5fc71199
Merge bitcoin/bitcoin#29553: assumeutxo: Add dumptxoutset height param, remove shell scripts
94b0adcc371540732453d70309c4083d4bd9cd6b rpc, refactor: Prevent potential race conditions in dumptxoutset (Fabian Jahr)
e868a6e070a91c00555e72181f9b14bbf0373fdc doc: Improve assumeutxo guide and add more docs/comments (Fabian Jahr)
b29c21fc92dcc3da95bd032ba41675a8b9a0a24b assumeutxo: Remove devtools/utxo_snapshot.sh (Fabian Jahr)
20a1c77aa7dec2449071187a439d17f7aeaee648 contrib: Remove test_utxo_snapshots.sh (Fabian Jahr)
842685035244e151f4a10019af2dfe0563f11a82 test: Test for dumptxoutset at specific height (Fabian Jahr)
993cafe7e45ab0af1e862c7def3de688f47c0443 RPC: Add type parameter to dumptxoutset (Fabian Jahr)
fccf4f91d21c351d742943d35476f53d40963b8b RPC: Extract ReconsiderBlock helper (Fabian Jahr)
446ce51c21cd2466cb12fa0166fd069d42b603bf 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 94b0adcc371540732453d70309c4083d4bd9cd6b
  achow101:
    ACK 94b0adcc371540732453d70309c4083d4bd9cd6b
  mzumsande:
    ACK 94b0adcc371540732453d70309c4083d4bd9cd6b
  pablomartin4btc:
    re-ACK 94b0adcc371540732453d70309c4083d4bd9cd6b

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
merge-script
9cb9651d92
Merge bitcoin/bitcoin#30778: build: Fix linking for fuzz target when building with MSan
787dfaf084a3952319778da9cbcda9d7d619e4ee ci: Do not override `-g -O1` set in `MSAN_FLAGS` (Hennadii Stepanov)
26c460aa8b5decfd08d931b9b3f80be5c13c7528 build: Fix linking for `fuzz` target when building with MSan (Hennadii Stepanov)

Pull request description:

  The first commit fixes https://github.com/bitcoin/bitcoin/issues/30760.

  The second commit:
  1. Preserves `-g -O1` set in `MSAN_FLAGS`. Since configuration-specific flags override general flags, these are set to empty strings. A similar approach is used in the OSS-Fuzz repository.
  2. Sets the "Debug" build configuration when depends are built with `DEBUG=1`, ensuring that `linux_debug_CPPFLAGS` from depends are passed to the main build system.

ACKs for top commit:
  maflcko:
    review-only ACK 787dfaf084a3952319778da9cbcda9d7d619e4ee
  fanquake:
    ACK 787dfaf084a3952319778da9cbcda9d7d619e4ee - as a follow up it would be good to:

Tree-SHA512: c324390d1dbda30f82025d8482ddb0cfa0395f9ba225a2ddce05a123c65e0622a6a1d5f0fa03f09e21d62792431cf3da5c49e41a3ac7f7a958d0392a0430f29c
2024-09-03 12:15:28 +01:00
merge-script
4c526f575c
Merge bitcoin/bitcoin#30741: doc: update documentation and scripts related to build directories
6a68343ffbf3291eb243d90c00df50e672ff3944 doc: Prepend 'build/' to binary paths under 'src/' in docs (Lőrinc)
91b3bc2b9c572d9244e1cf542655c1b32e87aaf7 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 6a68343ffbf3291eb243d90c00df50e672ff3944
  pablomartin4btc:
    ACK 6a68343ffbf3291eb243d90c00df50e672ff3944
  fanquake:
    ACK 6a68343ffbf3291eb243d90c00df50e672ff3944 - 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
Hennadii Stepanov
787dfaf084
ci: Do not override -g -O1 set in MSAN_FLAGS
Additionally, setting the "Debug" build configuration ensures that
`linux_debug_CPPFLAGS` from depends are passed to the main build system.
2024-09-02 23:49:30 +01:00
Hennadii Stepanov
26c460aa8b
build: Fix linking for fuzz target when building with MSan 2024-09-02 23:18:16 +01:00
merge-script
a74bdeea1b
Merge bitcoin/bitcoin#30761: test: Avoid intermittent timeout in p2p_headers_sync_with_minchainwork.py
fa247e6e8c7fddf9e3461c3e2e6f5fade0fe64cf test: Avoid intermittent timeout in p2p_headers_sync_with_minchainwork.py (MarcoFalke)

Pull request description:

  Similar to https://github.com/bitcoin/bitcoin/pull/30705:

  The goal of this test case is to check that the sync works at all, not to check any timeout.

  On extremely slow hardware (for example qemu virtual hardware), downloading the 4110 BLOCKS_TO_MINE may take longer than the block download timeout.

  Fix it by pinning the time using mocktime temporarily, and advance it immediately after the sync.

ACKs for top commit:
  stratospher:
    ACK fa247e6. Checked the timeout downloading block logs before/after using `setmocktime`.
  tdb3:
    ACK fa247e6e8c7fddf9e3461c3e2e6f5fade0fe64cf

Tree-SHA512: f61632a8d9e484f1b888aafbf87f7adf71b8692387bd77f603cdbc0de49f30d42e654741d46ae1ff8b9706a5559ee0faabdb192ed0db7449010b68bfcdbaa42d
2024-09-02 15:14:55 +01:00
merge-script
99e35fb7b9
Merge bitcoin/bitcoin#30779: doc: add -DWITH_BDB=ON to unix build docs
ddef914bbb1e4fe87e8a85f17e4e839639fd97da doc: remove extraneous install statement (tdb3)
bc532c915ec6ec8ca28e0b2dd00e232f0dd8f259 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 ddef914bbb1e4fe87e8a85f17e4e839639fd97da
  fanquake:
    ACK ddef914bbb1e4fe87e8a85f17e4e839639fd97da

Tree-SHA512: 261568700b95fc073e03db6ca64a5f0544d5aed337aee4275575c1d0d1373c2a96911947abd202da3ed7c3b7a662b700b0596c0dabefe4b50900a798eed7e118
2024-09-02 15:04:23 +01:00
merge-script
0533e65235
Merge bitcoin/bitcoin#30785: doc: fix compiler flags for macOS configuration
8d7f8fabae252710e8e43bf18a0c33ec9f8a7137 doc: fix compiler flags for macOS configuration (marcofleon)

Pull request description:

  Small CMake correction in the macOS build docs. My Mac will actually use AppleClang if I don't specify the compiler flags.
  ```bash
  % cmake -B testbuild
  -- The CXX compiler identification is AppleClang 15.0.0.15000309
  ```

  ```bash
  % cmake -B testbuild -DCMAKE_C_COMPILER="$(brew --prefix llvm)/bin/clang" -DCMAKE_CXX_COMPILER="$(brew --prefix llvm)/bin/clang++"
  -- The CXX compiler identification is Clang 18.1.8
  ```

ACKs for top commit:
  maflcko:
    review ACK 8d7f8fabae252710e8e43bf18a0c33ec9f8a7137
  brunoerg:
    ACK 8d7f8fabae252710e8e43bf18a0c33ec9f8a7137

Tree-SHA512: f25f0b38d5868d3182b79b8d0ff75ba7041e6282a6f4c83ed08ba7254ec9d8ae2553df36a4654a91ede5777e4c727dbdce6dcee7a5fe35bdd403d17e249ddd18
2024-09-02 14:36:11 +01:00
marcofleon
8d7f8fabae doc: fix compiler flags for macOS configuration 2024-09-02 12:53:50 +01:00
merge-script
d4cc0c6845
Merge bitcoin/bitcoin#30750: scripted-diff: LogPrint -> LogDebug
fa09cb41f58d0483ffe134eb274b9048c5260faa refactor: Remove unused LogPrint (MarcoFalke)
333341589010b1d9b21b68ae6649992fd2653756 scripted-diff: LogPrint -> LogDebug (MarcoFalke)

Pull request description:

  `LogPrint` has many issues:

  * It seems to indicate that something is being "printed", however config options such as `-printtoconsole` actually control what and where something is logged.
  * It does not mention the log severity (debug).
  * It is a deprecated alias for `LogDebug`, according to the dev notes.
  * It wastes review cycles, because reviewers sometimes point out that it is deprecated.
  * It makes the code inconsistent, when both are used, possibly even in lines right next to each other (like in `InitHTTPServer`)

  Fix all issues by removing the deprecated alias.

  I checked all conflicting pull requests and at the time of writing there are no conflicts, except in pull requests that are marked as draft, are yet unreviewed, or are blocked on feedback for other reasons. So I think it is fine to do now.

ACKs for top commit:
  stickies-v:
    ACK fa09cb41f58d0483ffe134eb274b9048c5260faa
  danielabrozzoni:
    utACK fa09cb41f58d0483ffe134eb274b9048c5260faa
  TheCharlatan:
    ACK fa09cb41f58d0483ffe134eb274b9048c5260faa

Tree-SHA512: 14270f4cfa3906025a0b994cbb5b2e3c8c2427c0beb19c717a505a2ccbfb1fd1ecf2fd03f6c52d22cde69a8d057e50d2207119fab2c2bc8228db3f10d4288d0f
2024-09-02 11:59:56 +01:00
merge-script
ef6f49ecaf
Merge bitcoin/bitcoin#30664: build: Remove Autotools-based build system
faa382ae7642da0e436ea2c7f7eac67386280a7e ci, doc: Drop reference to `src/.bear-tidy-config` (Hennadii Stepanov)
d71ac768424333b65a6d88c9752cc9c7fdb276f3 build: Remove Autotools-based build system (Hennadii Stepanov)
e268b48419b802857c329a7ae27d3dbe4c1a9a4b doc: Adjust `doc/design/libraries.md` (Hennadii Stepanov)
d209e4f1566f9240f105bb93ed61bda9b4bb272b doc: Drop mentions of `share/genbuild.sh` (Hennadii Stepanov)

Pull request description:

  This PR deletes the Autotools-based build system.

  The MSVC build system is deleted in https://github.com/bitcoin/bitcoin/pull/30731.

ACKs for top commit:
  maflcko:
    re-ACK faa382ae7642da0e436ea2c7f7eac67386280a7e 🍦
  TheCharlatan:
    ACK faa382ae7642da0e436ea2c7f7eac67386280a7e
  fanquake:
    ACK faa382ae7642da0e436ea2c7f7eac67386280a7e

Tree-SHA512: 53df977b5b199a1c38f7f61a042a62b24831c559ba65a461b4ac1c96a1a56e2dfd676df79f1358fd1cc1749ff27e7b548086157f337d4f596c1054cb3d2d5739
2024-09-02 11:39:56 +01:00
Fabian Jahr
94b0adcc37
rpc, refactor: Prevent potential race conditions in dumptxoutset
Co-authored-by: Ryan Ofsky <ryan@ofsky.org>
2024-09-01 21:07:23 +02:00
Fabian Jahr
e868a6e070
doc: Improve assumeutxo guide and add more docs/comments
Also fixes some outdated information in the remaining design doc.
2024-09-01 21:07:21 +02:00
Fabian Jahr
b29c21fc92
assumeutxo: Remove devtools/utxo_snapshot.sh 2024-09-01 20:56:39 +02:00
Fabian Jahr
20a1c77aa7
contrib: Remove test_utxo_snapshots.sh 2024-09-01 20:56:39 +02:00
Fabian Jahr
8426850352
test: Test for dumptxoutset at specific height 2024-09-01 20:56:39 +02:00
Fabian Jahr
993cafe7e4
RPC: Add type parameter to dumptxoutset 2024-09-01 20:56:38 +02:00
Fabian Jahr
fccf4f91d2
RPC: Extract ReconsiderBlock helper 2024-09-01 20:56:38 +02:00
Fabian Jahr
446ce51c21
RPC: Extract InvalidateBlock helper 2024-09-01 20:56:37 +02:00
merge-script
5abb9b1af4
Merge bitcoin/bitcoin#30763: doc: update Fedora build instructions for cmake
877c55a68b65b30f226f4747829bc7336329e295 doc: update fedora build instructions for cmake (Marnix)

Pull request description:

  Update Fedora build instructions for cmake:

  - update the Fedora build requirements
  - remove old configure instruction

  This was forgotten to update

ACKs for top commit:
  davidgumberg:
    ACK 877c55a68b
  l0rinc:
    utACK 877c55a68b65b30f226f4747829bc7336329e295
  hebasto:
    ACK 877c55a68b65b30f226f4747829bc7336329e295.
  pablomartin4btc:
    ACK 877c55a68b65b30f226f4747829bc7336329e295
  tdb3:
    ACK 877c55a68b65b30f226f4747829bc7336329e295

Tree-SHA512: 53fbd4bef96d2aeef753f26359eab53023a154fbcc75952aecd15e8805cc24ceb8ebdc6d8746416720b5655ed694299b3381a2e4d621ebd522fb09d145c48665
2024-09-01 09:53:23 +01:00
tdb3
ddef914bbb
doc: remove extraneous install statement 2024-08-31 17:54:39 -04:00
tdb3
bc532c915e
doc: add with_bdb to unix build docs 2024-08-31 16:53:59 -04:00
Ryan Ofsky
b52d547361
Merge bitcoin/bitcoin#30377: refactor: Replace ParseHex with consteval ""_hex literals
8756ccd71218c8e013181473720b10d3c4a94957 scripted-diff: Replace ParseHex[<std::byte>]("str") -> "str"_hex[_u8] (Hodlinator)
9cb687351f7ff50d19b5c5997ed69cfdab75bbf2 refactor: Prepare for ParseHex -> ""_hex scripted-diff (Hodlinator)
50bc017040ae300c795e3709233b80619db24518 refactor: Hand-replace some ParseHex -> ""_hex (Hodlinator)
5b74a849cf5c54543280ba6488ae7f87361b1e2f util: Add consteval ""_hex[_v][_u8] literals (l0rinc)
dc5f6f681275f56ff389500e3dd98fbe791f4a45 test refactor: util_tests - parse_hex clean up (Hodlinator)
2b5e6eff36abe4c23b8789ef1babfafedc90b973 refactor: Make XOnlyPubKey tolerate constexpr std::arrays (Hodlinator)
403d86f1ccf0b73f042d42a9722bb007ba8c7a31 refactor: vector -> span in CCrypter (Hodlinator)
bd0830bbd4105af1953b6b897ba6bc35098cbe13 refactor: de-Hungarianize CCrypter (Hodlinator)
d99c81697148a9695c0fba614dff9fbe728a3acd refactor: Improve CCrypter related lines (Hodlinator)
7e1d9a84689d77a9349a3a09fd5f9dd3f9c293aa refactor: Enforce lowercase hex digits for consteval uint256 (Hodlinator)

Pull request description:

  Motivation:
  * Validates and converts the hex string into bytes at compile time instead of at runtime like `ParseHex()`.
  * Eliminates runtime dependencies: https://github.com/bitcoin/bitcoin/pull/30377#issuecomment-2214432177, https://github.com/bitcoin/bitcoin/pull/30048#discussion_r1592108480
  * Has stricter requirements than `ParseHex()` (disallows whitespace and uppercase hex digits) and replaces it in a bunch of places.
  * Makes it possible to derive other compile time constants.
  * Minor: should shave off a few runtime CPU cycles.

  `""_hex` produces `std::array<std::byte>` as the momentum in the codebase is to use `std::byte` over `uint8_t`.

  Also makes `uint256` hex string constructor disallow uppercase hex digits. Discussed: https://github.com/bitcoin/bitcoin/pull/30560#discussion_r1701323070

  Surprisingly does not change the size of the Guix **bitcoind** binary (on x86_64-linux-gnu) by 1 single byte.

  Spawned already merged PRs: #30436, #30482, #30532, #30560.

ACKs for top commit:
  l0rinc:
    ACK 8756ccd71218c8e013181473720b10d3c4a94957
  stickies-v:
    Rebase re-ACK 8756ccd71218c8e013181473720b10d3c4a94957, no changes since a096215c9c71a2ec03e76f1fd0bcdda0727996e0
  ryanofsky:
    Code review ACK 8756ccd71218c8e013181473720b10d3c4a94957, just rebasing since last review and taking advantage of CScript constructors in #29369, also tweaking a code comment

Tree-SHA512: 9b2011b7c37e0ef004c669f8601270a214b388916316458370f5902c79c2856790b1b2c7c123efa65decad04886ab5eff95644301e0d84358bb265cf1f8ec195
2024-08-31 10:18:00 -04:00
Marnix
877c55a68b doc: update fedora build instructions for cmake 2024-08-31 15:18:06 +02:00
merge-script
e96f657e20
Merge bitcoin/bitcoin#30777: ci: Delete no longer needed workaround
74da8cb286ce057cbd8c5081bac3fda74781c279 ci: Delete no longer needed workaround (Hennadii Stepanov)

Pull request description:

  This PR removes a workaround that was necessary at some point during the development of the CMake staging branch.

ACKs for top commit:
  fanquake:
    ACK 74da8cb286ce057cbd8c5081bac3fda74781c279

Tree-SHA512: 619a513efe86af8e24fc3b6e4124df8f3ff3699216a3f87a4385aeb5e3c605f2b035d1594604cd3efe66281ac879d954d412ee4ae8423408e46ebd32956883a5
2024-08-31 12:07:21 +01:00
Hennadii Stepanov
74da8cb286
ci: Delete no longer needed workaround
It was necessary at some point during the development of the CMake
staging branch.
2024-08-30 23:13:25 +01:00
Hennadii Stepanov
faa382ae76
ci, doc: Drop reference to src/.bear-tidy-config 2024-08-30 21:31:40 +01:00
Hennadii Stepanov
d71ac76842
build: Remove Autotools-based build system 2024-08-30 21:31:39 +01:00
merge-script
96b0a8f858
Merge bitcoin/bitcoin#30752: guix: Drop unused autotools packages
0004dcc7b136424e5c84c3750e9d6af336b674ed guix: Drop unused autotools packages (Hennadii Stepanov)

Pull request description:

  This PR implements https://github.com/hebasto/bitcoin/pull/294.

  From https://github.com/hebasto/bitcoin/pull/294#issuecomment-2317292100:
  > I think guix was already bumped to cmake, so this can be done in a separate pull already today?

ACKs for top commit:
  fanquake:
    ACK 0004dcc7b136424e5c84c3750e9d6af336b674ed

Tree-SHA512: 60d0be8df6340797bebcd6a734e2a5a0a24df18b65c174af47ea652110f26aca00b019dd205b83ae0e664ba1322628f252ade461d2dc01353045347d405ad5fa
2024-08-30 17:40:13 +01:00
Hennadii Stepanov
0004dcc7b1
guix: Drop unused autotools packages 2024-08-30 14:44:21 +01:00
merge-script
c91cabbf56
Merge bitcoin/bitcoin#30753: build: Drop no longer needed workaround
66dd1b4e58347327c14e5d9a26ce41592b07113f build: Drop no longer needed workaround (Hennadii Stepanov)

Pull request description:

  This PR deletes a workaround that is no longer needed since https://github.com/bitcoin/bitcoin/pull/30508 was merged.

ACKs for top commit:
  fanquake:
    ACK 66dd1b4e58347327c14e5d9a26ce41592b07113f

Tree-SHA512: abb8e79b525989afe88f94899e4dc29c80d4593ea23f44c6b3d08710e6ddd1619e748798534973fa4ee9f48d9fad7226445b7a2cb4aec0bdb5d1b7ff2f6689ea
2024-08-30 14:04:39 +01:00
TheCharlatan
a2955f0979
validation: Use span for ImportBlocks paths
Makes it friendlier for potential future users of the kernel library if
they do not store the headers in a std::vector, but can guarantee
contiguous memory.
2024-08-30 12:39:46 +02:00
MarcoFalke
fa247e6e8c
test: Avoid intermittent timeout in p2p_headers_sync_with_minchainwork.py 2024-08-30 12:01:18 +02:00
merge-script
3ee1521c04
Merge bitcoin/bitcoin#30730: guix: Bump time machine to 53396a22afc04536ddf75d8f82ad2eafa5082725
60d4398a345cb0be600fcced3abd37219a105d57 guix: drop GCC 12.4.0 package (fanquake)
5ed1511e5032dc3e229e91701580e2a7e3146b2f guix: bump time-machine to 53396a22afc04536ddf75d8f82ad2eafa5082725 (fanquake)

Pull request description:

  Followup to #30511.
  https://git.savannah.gnu.org/cgit/guix.git/commit/?id=9aa38f98cbd41644abe2c43bb4f44f74df642df2 landed.

  Linux headers `6.1.102` -> `6.1.106`

ACKs for top commit:
  hebasto:
    ACK 60d4398a345cb0be600fcced3abd37219a105d57.
  TheCharlatan:
    ACK 60d4398a345cb0be600fcced3abd37219a105d57

Tree-SHA512: 6ff4372897e5abb15c28d4607915f777585d54b7a35787ac46f7ddca0d695dc60a7da532d8beb37e2df1de12511220f0dc6428f68d6a4db628de816e2d339914
2024-08-30 09:51:43 +01:00
TheCharlatan
20515ea3f5
validation: Use span for CalculateClaimedHeadersWork
Makes it friendlier for potential future users of the kernel library if
they do not store the headers in a std::vector, but can guarantee
contiguous memory.
2024-08-30 10:17:26 +02:00
TheCharlatan
52575e96e7
validation: Use span for ProcessNewBlockHeaders
Makes it friendlier for potential future users of the kernel library if
they do not store the headers in a std::vector, but can guarantee
contiguous memory.
2024-08-30 10:17:09 +02:00
merge-script
ffdc3d6060
Merge bitcoin/bitcoin#30754: misc: Autotools -> CMake changes
a865494deeff7dedcad7140299aee00ab3cdd62c lint: remove autotools packages (fanquake)
b02f29e7efa5043791a6574a3f0355750aab1ea1 doc: replace Autotools with CMake (fanquake)

Pull request description:

  These don't seem to be included in, i.e #30664.

ACKs for top commit:
  maflcko:
    lgtm ACK a865494deeff7dedcad7140299aee00ab3cdd62c
  hebasto:
    re-ACK a865494deeff7dedcad7140299aee00ab3cdd62c.

Tree-SHA512: bafa2675d7c819478fb9b3f44f557ec767acb8fa3c4a191b1b8a1e47352a4cb6cebbb3138d961058d846926359f5451241a8badcbe3edd7e067d69ecfc45df93
2024-08-29 17:34:36 +01:00