Skip to content

Conversation

theuni
Copy link
Member

@theuni theuni commented Jan 17, 2024

This replaces #28674, #29036, and #29057. Now ready for testing and review.

Replaces platform-specific endian and byteswap functions. This is especially useful for kernel, as it means that our deep serialization code no longer requires bitcoin-config.h.

I apologize for the size of the last commit, but it's hard to avoid making those changes at once.

All platforms now use our internal functions rather than libc or platform-specific ones, with the exception of MSVC.

Sadly, benchmarking showed that not all compilers are capable of detecting and optimizing byteswap functions, so compiler builtins are instead used where possible. However, they're now detected via macros rather than autoconf checks.

This matches how libc++ implements std::byteswap for c++23.

I suggest we move/rename compat/endian.h, but I left that out of this PR to avoid bikeshedding.

#29057 pointed out some irregularities in benchmarks. After messing with various compilers and configs for a few weeks with these changes, I'm of the opinion that we can't win on every platform every time, so we should take the code that makes sense going forward. That said, if any real-world slowdowns are caused here, we should obviously investigate.

@DrahtBot
Copy link
Contributor

DrahtBot commented Jan 17, 2024

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Code Coverage

For detailed information about the code coverage, see the test coverage report.

Reviews

See the guideline for information on the review process.

Type Reviewers
ACK maflcko
Concept ACK fanquake

If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #29494 (build: Assume HAVE_CONFIG_H, Add IWYU pragma keep to bitcoin-config.h includes by maflcko)
  • #29450 (build: replace custom MAC_OSX macro with standard __APPLE__ for consistent macOS detection by paplorinc)
  • #21590 (Safegcd-based modular inverses in MuHash3072 by sipa)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@theuni
Copy link
Member Author

theuni commented Jan 19, 2024

Here's a godbolt test that shows how various compilers perform: https://gcc.godbolt.org/z/nTadqEP83

To test with/without builtins, comment/un-comment the DISABLE_BUILTIN_BSWAPS define at line 14.

From my tests:

  • clang: all c++20 supporting versions (>= 10.0) optimize without the need for builtins
  • gcc: no version optimizes without the builtins
  • msvc: versions >= 19.37 optimize without builtins

@theuni
Copy link
Member Author

theuni commented Jan 23, 2024

Added a quick note about std::byteswap and c++23.

@DrahtBot
Copy link
Contributor

Guix builds (on x86_64)

File commit e69796c
(master)
commit ea6e27c
(master and this pull)
SHA256SUMS.part e3cbeb9e75c9ac85... 99dcf4de09376e75...
*-aarch64-linux-gnu-debug.tar.gz 49b7d884d40ea63b... be15822b12796d24...
*-aarch64-linux-gnu.tar.gz 7ba0932cedca0b55... e73549352dae7a29...
*-arm-linux-gnueabihf-debug.tar.gz ff1cc0114023daa7... 047df3ec91266906...
*-arm-linux-gnueabihf.tar.gz c9f35eb8d6b70596... aeb1de17fe3d8b73...
*-arm64-apple-darwin-unsigned.tar.gz c7b8e86e6f571427... 117f1a412fcdf132...
*-arm64-apple-darwin-unsigned.zip 64263106e26d5f38... 698d08ae6a55eb6b...
*-arm64-apple-darwin.tar.gz c451a701b31666a6... 160ddcae70fd28b7...
*-powerpc64-linux-gnu-debug.tar.gz 8eaed3b25e35a166... 91eb43803645a409...
*-powerpc64-linux-gnu.tar.gz 92192d5dcd2abc5d... 0e4f93325d2c1d4c...
*-powerpc64le-linux-gnu-debug.tar.gz 7ba12a5e155f1f31... 865994169509c581...
*-powerpc64le-linux-gnu.tar.gz 783da5e58254e1c7... 338e87d38582f88d...
*-riscv64-linux-gnu-debug.tar.gz 123752c651ab537b... 36fde55fe604836a...
*-riscv64-linux-gnu.tar.gz 6816d44ba62480e0... d06f75cb9639c743...
*-x86_64-apple-darwin-unsigned.tar.gz 651a9ae2176cf7e1... 7da6af545e133a49...
*-x86_64-apple-darwin-unsigned.zip 32787903bc08d809... e6f37321a45e076f...
*-x86_64-apple-darwin.tar.gz 878b96f61a83b5d5... 8fad7f75ceced2b9...
*-x86_64-linux-gnu-debug.tar.gz 7a7b930773e6723f... 7d4987ee307d625a...
*-x86_64-linux-gnu.tar.gz d012051198112116... 637d9dce06441d0f...
*.tar.gz 05ffca50f20c6f8c... f1e9711f7f4b1d8b...
guix_build.log b307741814adae42... 3d60205e28f729b9...
guix_build.log.diff 6b4c07847d5b2078...

@fanquake
Copy link
Member

Concept ACK - I think moving to using the builtins is ok. With the eventual plan to migrate to std::byteswap.

@aureleoules everytime I visit the coverage/benchmarks for this PR, I get a 500 error. Can you take a look?

@aureleoules
Copy link
Contributor

@fanquake thanks for reaching out, I fixed the issue.

@theuni
Copy link
Member Author

theuni commented Jan 24, 2024

@aureleoules Thanks! These numbers really don't make much sense to me and don't match what I've seen locally, but I'll work on trying to reproduce.

@theuni
Copy link
Member Author

theuni commented Jan 24, 2024

From some more local tests, it looks like it's the clz changes slowing things down for whatever reason. Still investigating.

@theuni
Copy link
Member Author

theuni commented Feb 1, 2024

I've dropped the clz changes as a test and kept only the endian/byteswap change. Locally on my machine the benchmarks look the same before and after.

If the corecheck benchmarks look better I'll update the title/description here.

Edit: looks good.

@theuni
Copy link
Member Author

theuni commented Feb 1, 2024

Aha, I finally tracked down the culprit! No wonder the benchmarks weren't making sense!

The problem was the removal of this from crypto/common.h:

#if defined(HAVE_CONFIG_H)
#include <config/bitcoin-config.h>
#endif

Turns out, sha256.cpp was relying on that. Adding that include to sha256.cpp (where it belongs) fixes my local benchmarks.

I'm going to put the clz changes back to match the PR title/description, but this time with the include fixed up. Hopefully after that the benchmarks will make sense and all will be good :)

I suppose there might be other compilation units that were depending on the include indirectly as well. I'll figure out a way to check for that.

@theuni theuni marked this pull request as draft February 1, 2024 22:40
@theuni
Copy link
Member Author

theuni commented Feb 1, 2024

Converted to a draft while I'm still messing with this.

I added a new commit to add the bitcoin-config.h include where it's necessary. I'm not done investigating that yet, but it's at least needed for chacha20poly1305.cpp as well.

The benchmarks still show some regressions, though it's not nearly as bad as it was before. Will continue poking.

@maflcko
Copy link
Member

maflcko commented Feb 5, 2024

I've created #26972 to track ideas on how to detect those silent build issues, or at least make them easier to spot.

@theuni
Copy link
Member Author

theuni commented Feb 5, 2024

I've pushed a commit which temporarily puts the includes back in the low-level headers for the sake of addressing the benchmarks first, setting aside the possibility of missing defines.

@aureleoules's benchmarks show 2 small regressions, though I am unable to reproduce those locally.

My tests show: ./bench/bench_bitcoin -min-time=5000 -filter="AddrManGetAddr|PrevectorDeserializeNontrivial"
master (3d52ced):

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|          224,138.83 |            4,461.52 |    0.1% |      5.50 | `AddrManGetAddr`
|              155.96 |        6,411,753.11 |    0.1% |      5.49 | `PrevectorDeserializeNontrivial

This PR:

|               ns/op |                op/s |    err% |     total | benchmark
|--------------------:|--------------------:|--------:|----------:|:----------
|          226,531.50 |            4,414.40 |    0.2% |      5.50 | `AddrManGetAddr`
|              156.91 |        6,372,901.08 |    0.1% |      5.50 | `PrevectorDeserializeNontrivial`

Essentially no change. I'm curious if @maflcko sees the same?

@DrahtBot DrahtBot removed the CI failed label Feb 5, 2024
@aureleoules
Copy link
Contributor

@theuni yeah the AddrManGetAddr and PrevectorDeserializeNontrivial are known to be flaky. I'll filter them out from the UI while I find a better solution.
Some benchmarks depend on I/O or randomness so it's hard a have consistent results between runs.

You can see ignored benchmarks here in the meantime: https://github.com/corecheck/frontend/blob/master/src/routes/%5Bowner%5D/%5Brepo%5D/pulls/%5Bnumber%5D/Benchmarks.svelte#L334

@theuni
Copy link
Member Author

theuni commented Feb 5, 2024

@aureleoules Thanks, that's helpful.

Christewart added a commit to Christewart/bitcoin that referenced this pull request Mar 6, 2024
…ESSTHANOREQUAL64, OP_GREATERTHAN64, OP_GREATERTHANOREQUAL64, OP_SCRIPTNUMTOLE64, OP_LE64TOSCRIPTNUM, OP_LE32TOLE64

Remove liquid args

WIP

Get simple OP_1 functional test case working

Get tests for arithmetic and comparison opcodes working

Get all functional tests passing

Rename test case to Arithmetic64bitTest

Rename file to feature_64bit_arithmetic_opcodes.py, add it to test_runner.py

Get tests passing in feature_taproot.py

Remove unused push_le4

Revert test fixture setup

Cleanup

Fix linting

test: Add leaf_version parameter to taproot_tree_helper()

Fix bug

Fix bugs

Fix compile

Fix missing sigversion checks

Fix htole64 -> htole64_internal due to bitcoin#29263
hebasto added a commit to hebasto/bitcoin that referenced this pull request Mar 8, 2024
THis change mirrors changes from bitcoin#29263.
hebasto added a commit to hebasto/bitcoin that referenced this pull request Mar 8, 2024
This change mirrors changes from bitcoin#29263.
fanquake added a commit that referenced this pull request Mar 8, 2024
8e17f00 build, msvc: Cleanup `bitcoin_config.h.in` (Hennadii Stepanov)

Pull request description:

  This PR mirrors changes from #29263 into the MSVC build system.

ACKs for top commit:
  fanquake:
    ACK 8e17f00

Tree-SHA512: b8e5cca015ff112c2969a60436524e97007ff2c559b3c12425d0549af694b16248311cc3e7c33f798bc095a679933641496836bb846eee6a2a377956ef53f56e
kevkevinpal pushed a commit to kevkevinpal/bitcoin that referenced this pull request Mar 13, 2024
kevkevinpal pushed a commit to kevkevinpal/bitcoin that referenced this pull request Mar 13, 2024
Christewart added a commit to Christewart/bitcoin that referenced this pull request Mar 13, 2024
…ESSTHANOREQUAL64, OP_GREATERTHAN64, OP_GREATERTHANOREQUAL64, OP_SCRIPTNUMTOLE64, OP_LE64TOSCRIPTNUM, OP_LE32TOLE64

Remove liquid args

WIP

Get simple OP_1 functional test case working

Get tests for arithmetic and comparison opcodes working

Get all functional tests passing

Rename test case to Arithmetic64bitTest

Rename file to feature_64bit_arithmetic_opcodes.py, add it to test_runner.py

Get tests passing in feature_taproot.py

Remove unused push_le4

Revert test fixture setup

Cleanup

Fix linting

test: Add leaf_version parameter to taproot_tree_helper()

Fix bug

Fix bugs

Fix compile

Fix missing sigversion checks

Fix htole64 -> htole64_internal due to bitcoin#29263
hebasto added a commit to hebasto/bitcoin that referenced this pull request Mar 17, 2024
33a454e fixup! cmake: Check system symbols (Hennadii Stepanov)
3cb2e65 fixup! cmake: Check system headers (Hennadii Stepanov)

Pull request description:

  This PR backports build system changes from bitcoin#29263.

ACKs for top commit:
  pablomartin4btc:
    ACK 33a454e

Tree-SHA512: 1793c6504a7190134c0ce075e959d22c4a3640d54a4d141f5117975bed267952cc8c7da488426e48022eba1eb77d3353783d77a20907b0cfa183e0b68d824133
janus pushed a commit to BitgesellOfficial/bitgesell that referenced this pull request Apr 6, 2024
Christewart added a commit to Christewart/bitcoin that referenced this pull request May 13, 2024
…ESSTHANOREQUAL64, OP_GREATERTHAN64, OP_GREATERTHANOREQUAL64, OP_SCRIPTNUMTOLE64, OP_LE64TOSCRIPTNUM, OP_LE32TOLE64

Remove liquid args

WIP

Get simple OP_1 functional test case working

Get tests for arithmetic and comparison opcodes working

Get all functional tests passing

Rename test case to Arithmetic64bitTest

Rename file to feature_64bit_arithmetic_opcodes.py, add it to test_runner.py

Get tests passing in feature_taproot.py

Remove unused push_le4

Revert test fixture setup

Cleanup

Fix linting

test: Add leaf_version parameter to taproot_tree_helper()

Fix bug

Fix bugs

Fix compile

Fix missing sigversion checks

Fix htole64 -> htole64_internal due to bitcoin#29263
Christewart added a commit to Christewart/bitcoin that referenced this pull request May 13, 2024
…ESSTHANOREQUAL64, OP_GREATERTHAN64, OP_GREATERTHANOREQUAL64, OP_SCRIPTNUMTOLE64, OP_LE64TOSCRIPTNUM, OP_LE32TOLE64

Remove liquid args

WIP

Get simple OP_1 functional test case working

Get tests for arithmetic and comparison opcodes working

Get all functional tests passing

Rename test case to Arithmetic64bitTest

Rename file to feature_64bit_arithmetic_opcodes.py, add it to test_runner.py

Get tests passing in feature_taproot.py

Remove unused push_le4

Revert test fixture setup

Cleanup

Fix linting

test: Add leaf_version parameter to taproot_tree_helper()

Fix bug

Fix bugs

Fix compile

Fix missing sigversion checks

Fix htole64 -> htole64_internal due to bitcoin#29263
Christewart added a commit to Christewart/bitcoin that referenced this pull request May 13, 2024
…ESSTHANOREQUAL64, OP_GREATERTHAN64, OP_GREATERTHANOREQUAL64, OP_SCRIPTNUMTOLE64, OP_LE64TOSCRIPTNUM, OP_LE32TOLE64

Remove liquid args

WIP

Get simple OP_1 functional test case working

Get tests for arithmetic and comparison opcodes working

Get all functional tests passing

Rename test case to Arithmetic64bitTest

Rename file to feature_64bit_arithmetic_opcodes.py, add it to test_runner.py

Get tests passing in feature_taproot.py

Remove unused push_le4

Revert test fixture setup

Cleanup

Fix linting

test: Add leaf_version parameter to taproot_tree_helper()

Fix bug

Fix bugs

Fix compile

Fix missing sigversion checks

Fix htole64 -> htole64_internal due to bitcoin#29263
Christewart added a commit to Christewart/bitcoin that referenced this pull request May 21, 2024
…ESSTHANOREQUAL64, OP_GREATERTHAN64, OP_GREATERTHANOREQUAL64, OP_SCRIPTNUMTOLE64, OP_LE64TOSCRIPTNUM, OP_LE32TOLE64

Remove liquid args

WIP

Get simple OP_1 functional test case working

Get tests for arithmetic and comparison opcodes working

Get all functional tests passing

Rename test case to Arithmetic64bitTest

Rename file to feature_64bit_arithmetic_opcodes.py, add it to test_runner.py

Get tests passing in feature_taproot.py

Remove unused push_le4

Revert test fixture setup

Cleanup

Fix linting

test: Add leaf_version parameter to taproot_tree_helper()

Fix bug

Fix bugs

Fix compile

Fix missing sigversion checks

Fix htole64 -> htole64_internal due to bitcoin#29263

Add negative test case for OP_LE64TOSCRIPTNUM

Use OP_EQUAL rather than OP_EQUALVERIFY

Fix rebase
Christewart added a commit to Christewart/bitcoin that referenced this pull request May 21, 2024
…ESSTHANOREQUAL64, OP_GREATERTHAN64, OP_GREATERTHANOREQUAL64, OP_SCRIPTNUMTOLE64, OP_LE64TOSCRIPTNUM, OP_LE32TOLE64

Remove liquid args

WIP

Get simple OP_1 functional test case working

Get tests for arithmetic and comparison opcodes working

Get all functional tests passing

Rename test case to Arithmetic64bitTest

Rename file to feature_64bit_arithmetic_opcodes.py, add it to test_runner.py

Get tests passing in feature_taproot.py

Remove unused push_le4

Revert test fixture setup

Cleanup

Fix linting

test: Add leaf_version parameter to taproot_tree_helper()

Fix bug

Fix bugs

Fix compile

Fix missing sigversion checks

Fix htole64 -> htole64_internal due to bitcoin#29263
Christewart added a commit to Christewart/bitcoin that referenced this pull request Jun 3, 2024
…ESSTHANOREQUAL64, OP_GREATERTHAN64, OP_GREATERTHANOREQUAL64, OP_SCRIPTNUMTOLE64, OP_LE64TOSCRIPTNUM, OP_LE32TOLE64

Remove liquid args

WIP

Get simple OP_1 functional test case working

Get tests for arithmetic and comparison opcodes working

Get all functional tests passing

Rename test case to Arithmetic64bitTest

Rename file to feature_64bit_arithmetic_opcodes.py, add it to test_runner.py

Get tests passing in feature_taproot.py

Remove unused push_le4

Revert test fixture setup

Cleanup

Fix linting

test: Add leaf_version parameter to taproot_tree_helper()

Fix bug

Fix bugs

Fix compile

Fix missing sigversion checks

Fix htole64 -> htole64_internal due to bitcoin#29263

Add negative test case for OP_LE64TOSCRIPTNUM

Use OP_EQUAL rather than OP_EQUALVERIFY

Fix rebase
Christewart added a commit to Christewart/bitcoin that referenced this pull request Jun 3, 2024
…ESSTHANOREQUAL64, OP_GREATERTHAN64, OP_GREATERTHANOREQUAL64, OP_SCRIPTNUMTOLE64, OP_LE64TOSCRIPTNUM, OP_LE32TOLE64

Remove liquid args

WIP

Get simple OP_1 functional test case working

Get tests for arithmetic and comparison opcodes working

Get all functional tests passing

Rename test case to Arithmetic64bitTest

Rename file to feature_64bit_arithmetic_opcodes.py, add it to test_runner.py

Get tests passing in feature_taproot.py

Remove unused push_le4

Revert test fixture setup

Cleanup

Fix linting

test: Add leaf_version parameter to taproot_tree_helper()

Fix bug

Fix bugs

Fix compile

Fix missing sigversion checks

Fix htole64 -> htole64_internal due to bitcoin#29263
Christewart added a commit to Christewart/bitcoin that referenced this pull request Jun 3, 2024
…ESSTHANOREQUAL64, OP_GREATERTHAN64, OP_GREATERTHANOREQUAL64, OP_SCRIPTNUMTOLE64, OP_LE64TOSCRIPTNUM, OP_LE32TOLE64

Remove liquid args

WIP

Get simple OP_1 functional test case working

Get tests for arithmetic and comparison opcodes working

Get all functional tests passing

Rename test case to Arithmetic64bitTest

Rename file to feature_64bit_arithmetic_opcodes.py, add it to test_runner.py

Get tests passing in feature_taproot.py

Remove unused push_le4

Revert test fixture setup

Cleanup

Fix linting

test: Add leaf_version parameter to taproot_tree_helper()

Fix bug

Fix bugs

Fix compile

Fix missing sigversion checks

Fix htole64 -> htole64_internal due to bitcoin#29263
kwvg added a commit to kwvg/dash that referenced this pull request Nov 2, 2024
Christewart added a commit to Christewart/bitcoin that referenced this pull request Nov 5, 2024
…ESSTHANOREQUAL64, OP_GREATERTHAN64, OP_GREATERTHANOREQUAL64, OP_SCRIPTNUMTOLE64, OP_LE64TOSCRIPTNUM, OP_LE32TOLE64

Remove liquid args

WIP

Get simple OP_1 functional test case working

Get tests for arithmetic and comparison opcodes working

Get all functional tests passing

Rename test case to Arithmetic64bitTest

Rename file to feature_64bit_arithmetic_opcodes.py, add it to test_runner.py

Get tests passing in feature_taproot.py

Remove unused push_le4

Revert test fixture setup

Cleanup

Fix linting

test: Add leaf_version parameter to taproot_tree_helper()

Fix bug

Fix bugs

Fix compile

Fix missing sigversion checks

Fix htole64 -> htole64_internal due to bitcoin#29263

Fix tests after rebase
Christewart added a commit to Christewart/bitcoin that referenced this pull request Nov 5, 2024
…ESSTHANOREQUAL64, OP_GREATERTHAN64, OP_GREATERTHANOREQUAL64, OP_SCRIPTNUMTOLE64, OP_LE64TOSCRIPTNUM, OP_LE32TOLE64

Remove liquid args

WIP

Get simple OP_1 functional test case working

Get tests for arithmetic and comparison opcodes working

Get all functional tests passing

Rename test case to Arithmetic64bitTest

Rename file to feature_64bit_arithmetic_opcodes.py, add it to test_runner.py

Get tests passing in feature_taproot.py

Remove unused push_le4

Revert test fixture setup

Cleanup

Fix linting

test: Add leaf_version parameter to taproot_tree_helper()

Fix bug

Fix bugs

Fix compile

Fix missing sigversion checks

Fix htole64 -> htole64_internal due to bitcoin#29263

Add negative test case for OP_LE64TOSCRIPTNUM

Use OP_EQUAL rather than OP_EQUALVERIFY

Fix rebase
Christewart added a commit to Christewart/bitcoin that referenced this pull request Nov 5, 2024
…ESSTHANOREQUAL64, OP_GREATERTHAN64, OP_GREATERTHANOREQUAL64, OP_SCRIPTNUMTOLE64, OP_LE64TOSCRIPTNUM, OP_LE32TOLE64

Remove liquid args

WIP

Get simple OP_1 functional test case working

Get tests for arithmetic and comparison opcodes working

Get all functional tests passing

Rename test case to Arithmetic64bitTest

Rename file to feature_64bit_arithmetic_opcodes.py, add it to test_runner.py

Get tests passing in feature_taproot.py

Remove unused push_le4

Revert test fixture setup

Cleanup

Fix linting

test: Add leaf_version parameter to taproot_tree_helper()

Fix bug

Fix bugs

Fix compile

Fix missing sigversion checks

Fix htole64 -> htole64_internal due to bitcoin#29263
kwvg added a commit to kwvg/dash that referenced this pull request Feb 16, 2025
kwvg added a commit to kwvg/dash that referenced this pull request Feb 17, 2025
kwvg added a commit to kwvg/dash that referenced this pull request Feb 17, 2025
kwvg added a commit to kwvg/dash that referenced this pull request Feb 18, 2025
PastaPastaPasta added a commit to dashpay/dash that referenced this pull request Feb 21, 2025
, bitcoin#26159, bitcoin#26489, bitcoin#26825, bitcoin#28127, bitcoin#29275, bitcoin#29263, partial bitcoin#27790, bitcoin#27978 (c++20 backports)

8b14cd6 fix: add header to `test/util/wallet.cpp` to define `ENABLE_WALLET` (Kittywhiskers Van Gogh)
0c69fb6 merge bitcoin#29263: c++20 endian/byteswap/clz modernization (Kittywhiskers Van Gogh)
26c1553 merge bitcoin#29275: Fix prevector iterator concept issues (Kittywhiskers Van Gogh)
bda57aa merge bitcoin#28127: Remove C-style const-violating cast, Use reinterpret_cast (Kittywhiskers Van Gogh)
48ed8c0 partial bitcoin#27978: Drop unsafe AsBytePtr function (Kittywhiskers Van Gogh)
7185aff partial bitcoin#27790: Add PrefixCursor (Kittywhiskers Van Gogh)
2b2869b merge bitcoin#26825: remove already tested headers from AC_CHECK_HEADERS (Kittywhiskers Van Gogh)
e9d23b3 merge bitcoin#26489: Split overly large util_tests.cpp file (Kittywhiskers Van Gogh)
b682aea merge bitcoin#26159: Remove `stdlib.h` from header checks (Kittywhiskers Van Gogh)
3c2c6da merge bitcoin#26150: remove stdio.h from header checks (Kittywhiskers Van Gogh)
043bc04 merge bitcoin#26135: remove strings.h from header checks (Kittywhiskers Van Gogh)
97f3c6d merge bitcoin#24989: rename BytePtr to AsBytePtr (Kittywhiskers Van Gogh)

Pull request description:

  ## Additional Information

  * Developers are required to rerun `autogen.sh` if switching between this PR and `develop` due to changes in `configure.ac`, failing to do so will result in a myriad of compiler errors (see below)

    <details>

    <summary>Build errors:</summary>

     ```
     In file included from /usr/include/x86_64-linux-gnu/sys/types.h:176,
                    from /usr/include/stdlib.h:514,
                    from /usr/include/c++/13/cstdlib:79,
                    from /usr/include/c++/13/ext/string_conversions.h:43,
                    from /usr/include/c++/13/bits/basic_string.h:4109,
                    from /usr/include/c++/13/string:54,
                    from ./blockfilter.h:9,
                    from blockfilter.cpp:8:
     ./compat/endian.h:156:17: error: redefinition of 'uint16_t __bswap_16(uint16_t)'
     156 | inline uint16_t htobe16(uint16_t host_16bits)
           |                 ^~~~~~~
     In file included from /usr/include/endian.h:35:
     /usr/include/x86_64-linux-gnu/bits/byteswap.h:34:1: note: '__uint16_t __bswap_16(__uint16_t)' previously defined here
        34 | __bswap_16 (__uint16_t __bsx)
           | ^~~~~~~~~~
     ./compat/endian.h:163:17: error: redefinition of 'uint16_t __uint16_identity(uint16_t)'
     163 | inline uint16_t htole16(uint16_t host_16bits)
           |                 ^~~~~~~
     In file included from /usr/include/endian.h:36:
     /usr/include/x86_64-linux-gnu/bits/uintn-identity.h:33:1: note: '__uint16_t __uint16_identity(__uint16_t)' previously defined here
        33 | __uint16_identity (__uint16_t __x)
           | ^~~~~~~~~~~~~~~~~
     ```

    </details>

  ## Breaking Changes

  None expected.

  ## Checklist

  - [x] I have performed a self-review of my own code
  - [x] I have commented my code, particularly in hard-to-understand areas **(note: N/A)**
  - [x] I have added or updated relevant unit/integration/functional/e2e tests
  - [x] I have made corresponding changes to the documentation **(note: N/A)**
  - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

ACKs for top commit:
  UdjinM6:
    utACK 8b14cd6
  PastaPastaPasta:
    ACK 8b14cd6; reviewed compiled locally

Tree-SHA512: 4f0ad19006df965aba68e28227bbffb340e7bd578594970bc295737929bdb6e9f0782c8fa5b0e699bc8df3b3861d655783275456976ef0dacc8c85e62c522aa5
@bitcoin bitcoin locked and limited conversation to collaborators Mar 1, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants