43236 Commits

Author SHA1 Message Date
MarcoFalke
2222aecd5f
util: Implement ParseISO8601DateTime based on C++20 2024-12-02 08:21:32 +01:00
merge-script
144f98db85
Merge bitcoin/bitcoin#31337: build: Fix coverage builds
01a7298818d7bd66bb8c800d7cd30ae0a4d3b1d1 build: Avoid using the `-ffile-prefix-map` compiler option (Hennadii Stepanov)

Pull request description:

  This PR follows up on https://github.com/bitcoin/bitcoin/pull/30811, which inadvertently broke coverage builds:
  1. For GCC. See https://github.com/bitcoin/bitcoin/pull/31337#issuecomment-2490598011.
  2. For [Clang's source-based code coverage](https://clang.llvm.org/docs/SourceBasedCodeCoverage.html) in the OSS-Fuzz environment due to its use of other options and a third party script. See https://issues.oss-fuzz.com/issues/379122777.

  The root cause of this regression is that the `-ffile-prefix-map` option implicitly applies:
  -  [`-fprofile-prefix-map`](https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html#index-fprofile-prefix-map) when using GCC.
  - [`-fcoverage-prefix-map`](https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-fcoverage-prefix-map) when using Clang. ~This behaviour is not explicitly documented~ See 994c544c18.

  With this PR, only the `-fdebug-prefix-map` and `-fmacro-prefix-map` options are applied.

  **Note for reviewers:** Please ensure that https://github.com/bitcoin/bitcoin/issues/30799 is not reintroduced.

ACKs for top commit:
  maflcko:
    review ACK 01a7298818d7bd66bb8c800d7cd30ae0a4d3b1d1
  dergoegge:
    tACK 01a7298818d7bd66bb8c800d7cd30ae0a4d3b1d1

Tree-SHA512: 70b11d769d2653c1528ffe1d430b79f20b061037bcb1db6addb261aa2c7be20c4bc4328ccff919adb72e81aa2e65b885c970cce3837aeeb3ca0a98b32b83d2e3
2024-11-27 14:21:52 +00:00
merge-script
efdb49afb9
Merge bitcoin/bitcoin#31323: guix: swap moreutils for just sponge
e8f50c5debe2b866e59872dbbf22db0fd592ec04 guix: swap moreutils for just sponge (fanquake)

Pull request description:

  Switch to building the only `moreutils` utility we actually need (`sponge`). This results in having less unused stuff in the Guix environment (i.e all the other `moreutils` utilities), and, the dependency graph is simplified. i.e we no-longer have a dependency on `perl`, `docbook` etc, for this package.

  Current `moreutils` dependency graph:
  ![moreutils](https://github.com/user-attachments/assets/b91a8609-1434-4094-ad12-93332737ef0f)

  In the Guix env, `chronic`, `combine`, `errno`, `ifdata`, `ifne`, `isutf8`, `lckdo`, `mispipe`, `parallel`, `pee`, `ts`, `vidir`, `vipe` & `zrun` (plus their `*.real` variants) are removed.

ACKs for top commit:
  hebasto:
    ACK e8f50c5debe2b866e59872dbbf22db0fd592ec04.
  TheCharlatan:
    Re-ACK e8f50c5debe2

Tree-SHA512: 3687ec4a821ff79c26ee839d2af879166edb7e179287a9574eca8fbf34bed1fea8fcdad822a2140d0a0089e1820f3fef29a6100e0e8da788896e1f7bac5ec3e6
2024-11-27 10:46:54 +00:00
Ava Chow
70e20ea024
Merge bitcoin/bitcoin#31172: build: increase minimum supported Windows to 10.0
ee1128ead846698db5e5633f193883837f2fbc64 doc: update stack-clash-protection comment re mingw-w64 (fanquake)
bf47448f152316145d9abb9b8abc3b564194fe46 test: drop check for Windows < 10 (fanquake)
35b898c47f8af6807c4a5f404af165c663c81a99 release: target Windows 10 or later (fanquake)
398754e70bc96b86ad0327fbe70fafdf27bb4e35 depends: target Windows 10 when building for mingw-w64 (fanquake)

Pull request description:

  Follows up to https://github.com/bitcoin/bitcoin/pull/31048#discussion_r1803165670.

  We definitely cannot claim that Bitcoin Core is "supported and extensively tested on" on Windows 7.

  Note that #30997 is also increasing the minimum required Windows version (for the GUI) to 10.

ACKs for top commit:
  hodlinator:
    cr-ACK ee1128ead846698db5e5633f193883837f2fbc64
  davidgumberg:
    ACK ee1128ead8
  achow101:
    ACK ee1128ead846698db5e5633f193883837f2fbc64
  hebasto:
    re-ACK ee1128ead846698db5e5633f193883837f2fbc64, only rebased, a commit message and a comment have been amended since my recent [review](https://github.com/bitcoin/bitcoin/pull/31172#pullrequestreview-2415452160).
  TheCharlatan:
    ACK ee1128ead846698db5e5633f193883837f2fbc64

Tree-SHA512: 245e0bac3d63414d919a1948661fef4ff79359faaacaf19d64abd91cc62e822797fb1cf3379e340bfdf9a85c0b88fd99a90eda450dd4218b6213ab78aefb1374
2024-11-26 17:47:29 -05:00
Ava Chow
733317ba94
Merge bitcoin/bitcoin#31364: refactor: Fix remaining clang-tidy performance-unnecessary-copy-initialization errors
3305972f7bfd78181566e4297891c2dd7cae0f2b refactor: Fix remaining clang-tidy performance-unnecessary-copy-initialization errors (Lőrinc)

Pull request description:

  A follow-up of https://github.com/bitcoin/bitcoin/pull/31305.

  The `clang-tidy` check can be run via:
  ```bash
  cmake -B build -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DBUILD_BENCH=ON -DBUILD_FUZZ_BINARY=ON -DBUILD_FOR_FUZZING=ON && cmake --build build -j$(nproc)

  run-clang-tidy -quiet -p build -j $(nproc) -checks='-*,performance-unnecessary-copy-initialization' | grep -v 'clang-tidy'
  ```

ACKs for top commit:
  maflcko:
    review ACK 3305972f7bfd78181566e4297891c2dd7cae0f2 🏀
  achow101:
    ACK 3305972f7bfd78181566e4297891c2dd7cae0f2b
  theuni:
    ACK the much more constrained 3305972f7bfd78181566e4297891c2dd7cae0f2b.
  hebasto:
    ACK 3305972f7bfd78181566e4297891c2dd7cae0f2b, tested with clang 19.1.5 + clang-tidy.

Tree-SHA512: 64dc3b35f33b7ac064ebf9e56e9f0ceca5d26681a1379dcd2168987960020fe1a282ec4de8c353c82ddf0a534a4866b607fc691e690010c6cea78887045897fb
2024-11-26 17:00:01 -05:00
Ava Chow
5a4bc5c036
Merge bitcoin/bitcoin#31305: refactor: Fix remaining clang-tidy performance-inefficient-vector errors
11f3bc229ccd4b20191855fb1df882cfa6145264 refactor: Reserve vectors in fuzz tests (Lőrinc)
152fefe7a22b7da3cfe2815083634bece9c5654e refactor: Preallocate PrevectorFillVector(In)Direct without vector resize (Lőrinc)
a774c7a339c26b1409c9a9572d2b52810ee64062 refactor: Fix remaining clang-tidy performance-inefficient-vector errors (Lőrinc)

Pull request description:

  PR inspired by https://github.com/bitcoin/bitcoin/pull/29608#issuecomment-2437847307 (and https://github.com/bitcoin/bitcoin/pull/29458, https://github.com/bitcoin/bitcoin/pull/29606, https://github.com/bitcoin/bitcoin/pull/29607, https://github.com/bitcoin/bitcoin/pull/30093).

  The `clang-tidy` check can be run via:
  ```bash
  cmake -B build -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DBUILD_BENCH=ON -DBUILD_FUZZ_BINARY=ON -DBUILD_FOR_FUZZING=ON && cmake --build build -j$(nproc)

  run-clang-tidy -quiet -p build -j $(nproc) -checks='-*,performance-inefficient-vector-operation' | grep -v 'clang-tidy'
  ```
  which revealed 3 tests and 1 prod warning (+ fuzz and benching, found by hebasto).
  Even though the tests aren't performance critical, getting rid of these warnings (for which the checks were already enabled via https://github.com/bitcoin/bitcoin/blob/master/src/.clang-tidy#L18, see below), the fix was quite simple.

  <details>
  <summary>clang-tidy -list-checks</summary>

  ```bash
  cd src && clang-tidy -list-checks | grep 'vector'
      performance-inefficient-vector-operation
  ```

  </details>

  <details>
  <summary>Output before the change</summary>

  ```
  src/test/rpc_tests.cpp:434:9: error: 'emplace_back' is called inside a loop; consider pre-allocating the container capacity before the loop [performance-inefficient-vector-operation,-warnings-as-errors]
    433 |     for (int64_t i = 0; i < 100; i++) {
    434 |         feerates.emplace_back(1 ,1);
        |         ^

  src/test/checkqueue_tests.cpp:366:13: error: 'emplace_back' is called inside a loop; consider pre-allocating the container capacity before the loop [performance-inefficient-vector-operation,-warnings-as-errors]
    365 |         for (size_t i = 0; i < 3; ++i) {
    366 |             tg.emplace_back(
        |             ^

  src/test/cuckoocache_tests.cpp:231:9: error: 'emplace_back' is called inside a loop; consider pre-allocating the container capacity before the loop [performance-inefficient-vector-operation,-warnings-as-errors]
    228 |     for (uint32_t x = 0; x < 3; ++x)
    229 |         /** Each thread is emplaced with x copy-by-value
    230 |         */
    231 |         threads.emplace_back([&, x] {
        |         ^

  src/rpc/output_script.cpp:127:17: error: 'push_back' is called inside a loop; consider pre-allocating the container capacity before the loop [performance-inefficient-vector-operation,-warnings-as-errors]
    126 |             for (unsigned int i = 0; i < keys.size(); ++i) {
    127 |                 pubkeys.push_back(HexToPubKey(keys[i].get_str()));
        |                 ^
  ```

  And the fuzz and benchmarks, noticed by hebasto: https://github.com/bitcoin/bitcoin/pull/31305#issuecomment-2483124499

  </details>

ACKs for top commit:
  maflcko:
    review ACK 11f3bc229ccd4b20191855fb1df882cfa6145264 🎦
  achow101:
    ACK 11f3bc229ccd4b20191855fb1df882cfa6145264
  theuni:
    ACK 11f3bc229ccd4b20191855fb1df882cfa6145264
  hebasto:
    ACK 11f3bc229ccd4b20191855fb1df882cfa6145264, tested with clang 19.1.5 + clang-tidy.

Tree-SHA512: 41691c19f35c63b922a95407617a54f9bff1af3f95f99d15642064f321df038aeb1ae5f061f854ed913f69036807cc28fa6222b2ff4c24ef43b909027fa0f9b3
2024-11-26 14:58:44 -05:00
Ava Chow
28fd0bc731
Merge bitcoin/bitcoin#31365: interpreter: Use the same type for SignatureHash in the definition
c288c790cd9abe91e53164aba5d975ef1e26ee3f interpreter: Use the same type for SignatureHash in the definition (TheCharlatan)

Pull request description:

  This was missed during the original PR switching the nHashType argument to int32_t in SignatureHash in bc52cda1f3c007bdf1ed00aa3011e207c7531017.

  The problem was discovered after running into a linker error when attempting to link this code as a static library using the header as a declaration with a riscv32 bare metal toolchain. The compiler would error with:
  ```
  /opt/riscv-ilp32/lib/gcc/riscv32-unknown-elf/13.2.0/../../../../riscv32-unknown-elf/bin/ld: build_kernel_riscv/src/libbitcoin_consensus.a(interpreter.cpp.o): in function `GenericTransactionSignatureChecker<CTransaction>::CheckECDSASignature(std::vector<unsigned char, std::allocator<unsigned char> > const&, std::vector<unsigned char, std::allocator<unsigned char> > const&, CScript const&, SigVersion) const':
  /home/user/bitcoin/build_kernel_riscv/./script/interpreter.cpp:2043:(.text._ZNK34GenericTransactionSignatureCheckerI12CTransactionE19CheckECDSASignatureERKSt6vectorIhSaIhEES6_RK7CScript10SigVersion[_ZNK34GenericTransactionSignatureCheckerI12CTransactionE19CheckECDSASignatureERKSt6vectorIhSaIhEES6_RK7CScript10SigVersion]+0xee): undefined reference to `uint256 SignatureHash<CTransaction>(CScript const&, CTransaction const&, unsigned int, int, long long const&, SigVersion, PrecomputedTransactionData const*)'
  ```

  With this patch it is possible to link against the static consensus library and produce a fully static executable.

ACKs for top commit:
  l0rinc:
    ACK c288c790cd9abe91e53164aba5d975ef1e26ee3f
  maflcko:
    review ACK c288c790cd9abe91e53164aba5d975ef1e26ee3f 🐺
  achow101:
    ACK c288c790cd9abe91e53164aba5d975ef1e26ee3f
  theuni:
    Obvious fix ACK c288c790cd9abe91e53164aba5d975ef1e26ee3f.
  BrandonOdiwuor:
    Code Review ACK c288c790cd9abe91e53164aba5d975ef1e26ee3f

Tree-SHA512: 74f283637f0a9cd0cab65d3502f2f8fc4fb983c7672f24e7a76ba2eb6e53b4a81cca0aacb610ef39ac0a454305be594ab440a697ae3718987bf5dbcbc7146a31
2024-11-26 13:45:41 -05:00
Ava Chow
72ab35a6d0
Merge bitcoin/bitcoin#31221: ci: Split out native fuzz jobs for macOS and windows (take 2)
b031b7910d62819443813b91705211c466933a53 [ci] Split out native fuzz jobs for macOS and windows (dergoegge)

Pull request description:

  Split out two new CI jobs (for native macOS and windows) that run the fuzz tests on the qa-assets input corpora.

  In both jobs the fuzz binary is built with `-DBUILD_FOR_FUZZING` to enable `Assume` assertions as well as `FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION`.

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

Tree-SHA512: 7d0dc5a9cb299f6f4596dd9a5526b6aaf82efc6eba308bdc9d8b0a45f79dea87204fb6cd4b2ea2a1bd952466b2e958d64021999296d110d7a83c1667f4de51fe
2024-11-26 13:29:59 -05:00
Lőrinc
3305972f7b refactor: Fix remaining clang-tidy performance-unnecessary-copy-initialization errors 2024-11-25 20:11:54 +01:00
Lőrinc
11f3bc229c refactor: Reserve vectors in fuzz tests
* Since the main LIMITED_WHILE stated `outpoints.size() < 200'000`, I've presized outpoints accordingly.
* `tx_mut.vin` and `tx_mut.vout` weren't caught by the clang-tidy, but addressed them anyway.
2024-11-25 20:09:44 +01:00
Lőrinc
152fefe7a2 refactor: Preallocate PrevectorFillVector(In)Direct without vector resize
The prevector benchmarks were likely not trying to measure vector resize performance.
2024-11-25 20:09:44 +01:00
Lőrinc
a774c7a339 refactor: Fix remaining clang-tidy performance-inefficient-vector errors 2024-11-25 20:09:44 +01:00
glozow
f7144b24be
Merge bitcoin/bitcoin#31279: policy: ephemeral dust followups
466e4df3fb83ef82b6add22e202e3a70dbf83a12 assert_mempool_contents: assert not duplicates expected (Greg Sanders)
ea5db2f26920bce7caf85e5c1b70a527cc3b82c2 functional: only generate required blocks for test (Greg Sanders)
d033acb608391f3ba95864cdaa7025cc00888ea2 fuzz: package_eval: let fuzzer run out input in main tx creation loop (Greg Sanders)
ba35a570c5d4ade342cb32630ffaa5f5bdd5e826 CheckEphemeralSpends: return boolean, and set child state and txid outparams (Greg Sanders)
cf0cee1617c0bf065b295a9807a4c7de0558393d func: add note about lack of 1P1C propagation in tree submitpackage (Greg Sanders)
84242903043bb14fca917790c9381c411817c9f7 unit test: ephemeral_tests is using a dust relay rate, not minrelay (Greg Sanders)
d9cfa5fc4eb03fb425fd5d46d3b72db72fbc3243 CheckEphemeralSpends: no need to iterate inputs if no parent dust (Greg Sanders)
87b26e3dc07b283cb05064ccde179c6777397ce8 func: rename test_free_relay to test_no_minrelay_fee (Greg Sanders)
e5709a4a41ecd8c7b1e695871c1a6153864e76ae func: slight elaboration on submitpackage restriction (Greg Sanders)
08e969bd1076c99e0b43ecd01dd790b9ebd04d0a RPC: only enforce dust rules on priority when standardness active (Greg Sanders)
ca050d12e76f61af7e60fa564dd04db08f2b8f38 unit test: adapt to changing MAX_DUST_OUTPUTS_PER_TX (Greg Sanders)
7c3490169c9e20375d3f525f81798fcced01a30a fuzz: package_eval: move last_tx inside txn ctor (Greg Sanders)
445eaed182a714e65ee2fe679ecdf7a86055313b fuzz: use optional status instead of should_rbf_eph_spend (Greg Sanders)
4dfdf615b9dbdc2204347029bea1db974a88e392 fuzz: remove unused TransactionsDelta validation interface (Greg Sanders)
09ce926e4a14f183cfab387d2531519e000ea176 func: cleanup reorg test comment (Greg Sanders)
768a0c1889e57ae8bb3596ac7aa9fd2b1ecab9fa func: cleanup test_dustrelay comments (Greg Sanders)
bedca1cb6633f4b9a5f8f532f27e084f23f04a2e fuzz: Directly place transactions in vector (Greg Sanders)
c041ad6eccb5aae87648cf510257a06f711b1bc3 fuzz: explain package eval coin tracking better (Greg Sanders)
bc0d98ea6126ea95526c2b70721131764c6ff3a7 fuzz: remove dangling reference to GetEntry (Greg Sanders)
15b6cbf07f5c3db650a0a8cccf46d3fbe031aef0 unit test: make dust index less magical (Greg Sanders)
5fbcfd12b8f508c87740883435800b6260fa308b unit test: assert txid returned on CheckEphemeralSpends failures (Greg Sanders)
ef94d84b4e469d8dbd63e63598d3b8d53595c695 bench: remove unnecessary CMTxn constructors (Greg Sanders)
c5c10fd317c6b4c033f3001757e6975b8b9a4942 ephemeral policy doxygen cleanup (Greg Sanders)
dd9044b8d4624fb7ffd432b6b89ab99290957a3e ephemeral policy: IWYU (Greg Sanders)
c6859ce2de7531e42fc304b69d74ca0d8e99ea29 Move+rename GetDustIndexes -> GetDust (Greg Sanders)
62016b32300123a44599e649b4f35a3a0f32565f Use std::ranges for ephemeral policy checks (Greg Sanders)
3ed930a1f41f7d7160c6ede5dcf3d4d5f1cfa876 Have HasDust and PreCheckValidEphemeralTx take CTransaction (Greg Sanders)
04a614bf9a7bb6abad150a3edf8938358f54d55b Rename CheckValidEphemeralTx to PreCheckEphemeralTx (Greg Sanders)
cbf1a47d6062ec2c2c4a788636e8c950a0271997 CheckEphemeralSpends: only compute txid of tx when needed (Greg Sanders)

Pull request description:

  Follow-up to https://github.com/bitcoin/bitcoin/pull/30239

  Here are the parent PR's comments that should be addressed by this PR:

  https://github.com/bitcoin/bitcoin/pull/30239/files#r1834529646
  https://github.com/bitcoin/bitcoin/pull/30239/files#r1831247308
  https://github.com/bitcoin/bitcoin/pull/30239/files#r1832622481
  https://github.com/bitcoin/bitcoin/pull/30239/files#r1831195216
  https://github.com/bitcoin/bitcoin/pull/30239#discussion_r1835805164
  https://github.com/bitcoin/bitcoin/pull/30239#discussion_r1835805164
  https://github.com/bitcoin/bitcoin/pull/30239#discussion_r1834639096
  https://github.com/bitcoin/bitcoin/pull/30239#discussion_r1834624976
  https://github.com/bitcoin/bitcoin/pull/30239#discussion_r1834619709
  https://github.com/bitcoin/bitcoin/pull/30239#discussion_r1834610434
  https://github.com/bitcoin/bitcoin/pull/30239#discussion_r1834504436
  https://github.com/bitcoin/bitcoin/pull/30239#discussion_r1834500036
  https://github.com/bitcoin/bitcoin/pull/30239#discussion_r1832985488
  https://github.com/bitcoin/bitcoin/pull/30239#discussion_r1830929809
  https://github.com/bitcoin/bitcoin/pull/30239#discussion_r1832376920
  https://github.com/bitcoin/bitcoin/pull/30239#discussion_r1832755799
  https://github.com/bitcoin/bitcoin/pull/30239#discussion_r1832492686
  https://github.com/bitcoin/bitcoin/pull/30239#discussion_r1832980576
  https://github.com/bitcoin/bitcoin/pull/30239#discussion_r1832784278
  https://github.com/bitcoin/bitcoin/pull/30239#discussion_r1837989979
  https://github.com/bitcoin/bitcoin/pull/30239#discussion_r1830996993
  https://github.com/bitcoin/bitcoin/pull/30239#discussion_r1830997947
  https://github.com/bitcoin/bitcoin/pull/30239#discussion_r1830012890
  https://github.com/bitcoin/bitcoin/pull/30239#discussion_r1830037288
  https://github.com/bitcoin/bitcoin/pull/30239#discussion_r1830977092
  https://github.com/bitcoin/bitcoin/pull/30239#discussion_r1832622481
  https://github.com/bitcoin/bitcoin/pull/30239#discussion_r1834726168
  https://github.com/bitcoin/bitcoin/pull/30239#discussion_r1832453654
  https://github.com/bitcoin/bitcoin/pull/30239#discussion_r1848488226

ACKs for top commit:
  naumenkogs:
    ACK 466e4df3fb83ef82b6add22e202e3a70dbf83a12
  hodlinator:
    ACK 466e4df3fb83ef82b6add22e202e3a70dbf83a12
  theStack:
    lgtm ACK 466e4df3fb83ef82b6add22e202e3a70dbf83a12
  glozow:
    utACK 466e4df3fb83ef82b6add22e202e3a70dbf83a12

Tree-SHA512: 89106f695755c238b84e0996b89446c0733e10a94c867f656d516d26697d2efe38dfc332188b8589a0a26a3d2bd2c88c6ab70c108e187ce5bfcb91bbf3fb0391
2024-11-25 13:47:44 -05:00
TheCharlatan
c288c790cd
interpreter: Use the same type for SignatureHash in the definition
This was missed during the original PR switching the nHashType argument
to int32_t in SignatureHash in bc52cda1f3c007bdf1ed00aa3011e207c7531017.

The problem was discovered after running into a linker error when
attempting to link this code as a static library using the header as a
declaration with a riscv32 bare metal toolchain. The compiler would
error with:

/opt/riscv-ilp32/lib/gcc/riscv32-unknown-elf/13.2.0/../../../../riscv32-unknown-elf/bin/ld: build_kernel_riscv/src/libbitcoin_consensus.a(interpreter.cpp.o): in function `GenericTransactionSignatureChecker<CTransaction>::CheckECDSASignature(std::vector<unsigned char, std::allocator<unsigned char> > const&, std::vector<unsigned char, std::allocator<unsigned char> > const&, CScript const&, SigVersion) const':
/home/user/bitcoin/build_kernel_riscv/./script/interpreter.cpp:2043:(.text._ZNK34GenericTransactionSignatureCheckerI12CTransactionE19CheckECDSASignatureERKSt6vectorIhSaIhEES6_RK7CScript10SigVersion[_ZNK34GenericTransactionSignatureCheckerI12CTransactionE19CheckECDSASignatureERKSt6vectorIhSaIhEES6_RK7CScript10SigVersion]+0xee): undefined reference to `uint256 SignatureHash<CTransaction>(CScript const&, CTransaction const&, unsigned int, int, long long const&, SigVersion, PrecomputedTransactionData const*)'
2024-11-25 15:36:05 +01:00
dergoegge
b031b7910d [ci] Split out native fuzz jobs for macOS and windows 2024-11-25 10:41:17 +00:00
fanquake
e8f50c5deb
guix: swap moreutils for just sponge
We build the only moreutils utility we actually need (sponge), have less
unused stuff in the Guix environment, and, the dependency graph is
simplified. i.e we no-longer have a dependency on perl, docbook etc, for
this package.
2024-11-22 10:54:13 +00:00
Hennadii Stepanov
01a7298818
build: Avoid using the -ffile-prefix-map compiler option
The `-ffile-prefix-map` compiler option implies `-fprofile-prefix-map`
on GCC or `-fcoverage-prefix-map` on Clang, which can lead to issues
with coverage builds.

This change applies only the options necessary for build reproducibility
and accurate source location messages.
2024-11-22 10:21:13 +00:00
Ava Chow
2638fdb4f9
Merge bitcoin/bitcoin#31338: test: Deduplicate assert_mempool_contents()
a0eafc10f94362408f54195ffd5a9237dc1ef638 functional test: Deduplicate assert_mempool_contents() (Hodlinator)

Pull request description:

  Recently added `mempool_util` implementation probably evolved in parallel with the package RBF one before being submitted as part of ephemeral dust in e2e30e89ba4b9bdbcabaf5b4346610922f0728bb (related comments: https://github.com/bitcoin/bitcoin/pull/30239#discussion_r1825278134, https://github.com/bitcoin/bitcoin/pull/31279#pullrequestreview-2445579323).

ACKs for top commit:
  instagibbs:
    ACK a0eafc10f94362408f54195ffd5a9237dc1ef638
  achow101:
    ACK a0eafc10f94362408f54195ffd5a9237dc1ef638
  l0rinc:
    ACK a0eafc10f94362408f54195ffd5a9237dc1ef638
  theStack:
    ACK a0eafc10f94362408f54195ffd5a9237dc1ef638

Tree-SHA512: 25ea807d7c041c18be0e4f424131419365d7c1e0fc6c4fb7ac7289c2f8196fd341ff2a2a3ea88df2c3a389edb4571a5fb889efc1b0204c65f7e09ef8f608d0d3
2024-11-21 19:11:27 -05:00
merge-script
17834bd197
Merge bitcoin/bitcoin#31333: fuzz: Implement G_TEST_GET_FULL_NAME
92d3d691f097ead8e5ae571eb9bf691133a6aa49 fuzz: Implement G_TEST_GET_FULL_NAME (Hodlinator)

Pull request description:

  Catching up to bench & unit tests. Makes for more orderly paths for fuzz tests using `BasicTestingSetup`.

  ### Before
  ```
  /tmp/test_common bitcoin/0748ae43ef8fa80703bc/regtest/blocks/xor.dat
  ```
  ### After
  ```
  /tmp/test_common bitcoin/tx_pool_standard/f18b3744625e0600eb0c/regtest/blocks/xor.dat
  ```

ACKs for top commit:
  kevkevinpal:
    ACK [92d3d69](92d3d691f0)
  furszy:
    utACK 92d3d691f097ead8e5ae571eb9bf691133a6aa49
  tdb3:
    ACK 92d3d691f097ead8e5ae571eb9bf691133a6aa49
  dergoegge:
    utACK 92d3d691f097ead8e5ae571eb9bf691133a6aa49
  brunoerg:
    code review ACK 92d3d691f097ead8e5ae571eb9bf691133a6aa49

Tree-SHA512: 5e83970b111232adece10f79e3a43d0c3c49ab635763e2a4b420f1336cbb8fee94aab751264ddec01ac8363166636e3b29cfe3b2969fc28c8dd6b31bda351950
2024-11-21 13:57:17 +00:00
merge-script
cf57722788
Merge bitcoin/bitcoin#31335: macOS: swap docs & CI from pkg-config to pkgconf
fe3457ccfff9a022d9f183e18217422e2e1f7689 ci: note that we should install pkgconf in future (fanquake)
8d203480b338c7504887777a8857e91708deadc7 doc: migrate from pkg-config to pkgconf in macOS build docs (fanquake)

Pull request description:

  Migrate the macOS build docs and CI from `pkg-config` to `pkgconf`. As the former now just redirects to the later.

  Upstream is currently mass-migrating its formula. i.e https://github.com/Homebrew/homebrew-core/pull/198317.

  Fixes #31334.

ACKs for top commit:
  maflcko:
    ACK fe3457ccfff9a022d9f183e18217422e2e1f7689 🍭
  hebasto:
    re-ACK fe3457ccfff9a022d9f183e18217422e2e1f7689.

Tree-SHA512: 6e337acb6767d163491149b6ae7181d7d7042bc11cdc745eb6f52d4df6d7a19c4f6daa000b314acd9178f97e670aba145f829e48b1b3033117d7e39cdd3af177
2024-11-21 13:37:46 +00:00
fanquake
fe3457ccff
ci: note that we should install pkgconf in future
As pkg-config is now just redirected to the later, but changing this likely
depends on the GHA image being updated first.
2024-11-21 11:08:02 +00:00
Hodlinator
a0eafc10f9
functional test: Deduplicate assert_mempool_contents()
Recently added mempool_util implementation probably evolved in parallel with the package RBF one before being submitted as part of ephemeral dust in e2e30e89ba4b9bdbcabaf5b4346610922f0728bb.
2024-11-21 12:01:34 +01:00
fanquake
8d203480b3
doc: migrate from pkg-config to pkgconf in macOS build docs
Brew has migrated to using the later:
```bash
brew info pkg-config
==> pkgconf: stable 2.3.0 (bottled), HEAD
Package compiler and linker metadata toolkit
https://github.com/pkgconf/pkgconf
```
2024-11-21 10:28:44 +00:00
Greg Sanders
466e4df3fb assert_mempool_contents: assert not duplicates expected 2024-11-20 13:49:41 -05:00
Greg Sanders
ea5db2f269 functional: only generate required blocks for test 2024-11-20 13:49:41 -05:00
Greg Sanders
d033acb608 fuzz: package_eval: let fuzzer run out input in main tx creation loop 2024-11-20 13:49:41 -05:00
Greg Sanders
ba35a570c5 CheckEphemeralSpends: return boolean, and set child state and txid outparams 2024-11-20 13:49:41 -05:00
Greg Sanders
cf0cee1617 func: add note about lack of 1P1C propagation in tree submitpackage 2024-11-20 13:49:41 -05:00
Greg Sanders
8424290304 unit test: ephemeral_tests is using a dust relay rate, not minrelay 2024-11-20 13:49:41 -05:00
Greg Sanders
d9cfa5fc4e CheckEphemeralSpends: no need to iterate inputs if no parent dust 2024-11-20 13:49:41 -05:00
Greg Sanders
87b26e3dc0 func: rename test_free_relay to test_no_minrelay_fee 2024-11-20 13:49:41 -05:00
Greg Sanders
e5709a4a41 func: slight elaboration on submitpackage restriction 2024-11-20 13:49:41 -05:00
Greg Sanders
08e969bd10 RPC: only enforce dust rules on priority when standardness active 2024-11-20 13:49:41 -05:00
Greg Sanders
ca050d12e7 unit test: adapt to changing MAX_DUST_OUTPUTS_PER_TX 2024-11-20 13:49:41 -05:00
Greg Sanders
7c3490169c fuzz: package_eval: move last_tx inside txn ctor 2024-11-20 13:49:41 -05:00
Greg Sanders
445eaed182 fuzz: use optional status instead of should_rbf_eph_spend 2024-11-20 13:49:41 -05:00
Greg Sanders
4dfdf615b9 fuzz: remove unused TransactionsDelta validation interface 2024-11-20 13:44:49 -05:00
Greg Sanders
09ce926e4a func: cleanup reorg test comment 2024-11-20 13:44:49 -05:00
Greg Sanders
768a0c1889 func: cleanup test_dustrelay comments 2024-11-20 13:44:49 -05:00
Greg Sanders
bedca1cb66 fuzz: Directly place transactions in vector 2024-11-20 13:44:49 -05:00
Greg Sanders
c041ad6ecc fuzz: explain package eval coin tracking better 2024-11-20 13:44:49 -05:00
Greg Sanders
bc0d98ea61 fuzz: remove dangling reference to GetEntry 2024-11-20 13:44:49 -05:00
Greg Sanders
15b6cbf07f unit test: make dust index less magical 2024-11-20 13:44:49 -05:00
Greg Sanders
5fbcfd12b8 unit test: assert txid returned on CheckEphemeralSpends failures
Simplify nullopt checks
2024-11-20 12:49:03 -05:00
Greg Sanders
ef94d84b4e bench: remove unnecessary CMTxn constructors 2024-11-20 12:49:03 -05:00
Greg Sanders
c5c10fd317 ephemeral policy doxygen cleanup 2024-11-20 12:49:03 -05:00
Greg Sanders
dd9044b8d4 ephemeral policy: IWYU 2024-11-20 12:49:03 -05:00
Greg Sanders
c6859ce2de Move+rename GetDustIndexes -> GetDust
Use to replace HasDust and where appropraite
2024-11-20 12:48:03 -05:00
Ryan Ofsky
22ef95dbe3
Merge bitcoin/bitcoin#31288: Add destroy to BlockTemplate schema
9aa50152c1cfa1c41215b2b51ed7a516aa67137a Add destroy to BlockTemplate schema (Sjors Provoost)

Pull request description:

  This ensures that if a client no longer needs a block template, the node can clear its memory as soon as possible.

  A block template may hold on to transactions that are no longer in the mempool, so this can be significant.

  This has a trivial silent merge conflict with #31283 because it also used the number `@9` (gaps are not allowed). I'll rebase whichever is merged last.

ACKs for top commit:
  TheCharlatan:
    Re-ACK 9aa50152c1cfa1c41215b2b51ed7a516aa67137a
  ryanofsky:
    Code review ACK 9aa50152c1cfa1c41215b2b51ed7a516aa67137a

Tree-SHA512: 393571b4455969cba71c7572feaeff4503738205331ab198b9181c156c75eb65933a8e5ceff66fc06d1efb8f2528bdb254e5eee7df75735b912526de1e7b166d
2024-11-20 10:45:43 -05:00
Hodlinator
92d3d691f0
fuzz: Implement G_TEST_GET_FULL_NAME
When BasicTestingSetup is used in fuzz-tests it will now create test directories containing the fuzz target names. Example:
/tmp/test_common bitcoin/tx_package_eval/153d7906294f7d0606a7/

This is already implemented for bench and unit tests.
2024-11-20 15:08:33 +01:00