Commit Graph

25058 Commits

Author SHA1 Message Date
MacroFake
1c678a1b62
Merge bitcoin/bitcoin#25888: refactor: use strprintf for creating unknown-service-flag string
706c8e096978b694fb56dee9e8ed8f55373ad5a0 refactor: use `strprintf` for creating unknown-service-flag string (Sebastian Falbesoner)

Pull request description:

  No need to use a stringstream here. The trivial change can be verified by running the functional test `rpc_net.py`:
  c73c8d53fe/test/functional/rpc_net.py (L181-L184)
  As far as I could tell, this is the only instace left where we used `std::ostringstream` for the creation of simple strings (in `FormatSubVersion` using a stream makes sense since the number of placeholders is not constant).

ACKs for top commit:
  kristapsk:
    ACK 706c8e096978b694fb56dee9e8ed8f55373ad5a0

Tree-SHA512: 069cea29aef03996ae16a0dc3ed87b1b2cf2ab0bf5987c225b10da12d0f4b62b7c3faf3a169c0b912eb2ad60c6ea0a09a622be7eaadad78cee0463ef4ffc0e19
2024-02-29 09:35:00 -06:00
MacroFake
1526885baf
Merge bitcoin/bitcoin#25836: subtree: update crc32c subtree
08269e54a9a74e06c9fb72720a216d8c4d4532a2 Squashed 'src/crc32c/' changes from 0d624261ef..0bac72c455 (fanquake)

Pull request description:

  Update the crc32c subtree. Includes:
  * https://github.com/bitcoin-core/crc32c-subtree/pull/5

  Which is useful for https://github.com/bitcoin/bitcoin/pull/25797.

  Guix Build (x86_64):
  ```bash
  10677afb5b43e75f9c44ca2a854df88c2d2443392d3930d8c63d3c17e8d5959f  guix-build-9546b3a2a3a4/output/aarch64-linux-gnu/SHA256SUMS.part
  a05ea337e8dbbf234419908e1c95467f24f9ad83f3371718d4d4e3c1ae64dc7b  guix-build-9546b3a2a3a4/output/aarch64-linux-gnu/bitcoin-9546b3a2a3a4-aarch64-linux-gnu-debug.tar.gz
  9e3bcaecc55e8100c17cd6049f99a5dcdd485153091a9ddc1bb014cd74da719b  guix-build-9546b3a2a3a4/output/aarch64-linux-gnu/bitcoin-9546b3a2a3a4-aarch64-linux-gnu.tar.gz
  1306478fadf15b11636625747029de78a9121d179bc63cad77478a5a4b70e012  guix-build-9546b3a2a3a4/output/arm-linux-gnueabihf/SHA256SUMS.part
  55e82fc26fb57b4a58d63985b4b746c939c949abc670c976e270d5ec9c678623  guix-build-9546b3a2a3a4/output/arm-linux-gnueabihf/bitcoin-9546b3a2a3a4-arm-linux-gnueabihf-debug.tar.gz
  4ef06487c7df0b5ffdbcd5b8e4d32ffc8016f071fda7566f824e713581e7b043  guix-build-9546b3a2a3a4/output/arm-linux-gnueabihf/bitcoin-9546b3a2a3a4-arm-linux-gnueabihf.tar.gz
  fff63a55498bc592296fa3514bc99b39e83c4ab808ce3b04c9499b7a6adf3fd6  guix-build-9546b3a2a3a4/output/arm64-apple-darwin/SHA256SUMS.part
  965a96698bf7e49e2cc710ea567f69fbd4bedef64308f574e96c66e15c78d84d  guix-build-9546b3a2a3a4/output/arm64-apple-darwin/bitcoin-9546b3a2a3a4-arm64-apple-darwin-unsigned.dmg
  6738a0692430d4e59b45a8a9a247b6765970fb17c4047b66a332999425caafd9  guix-build-9546b3a2a3a4/output/arm64-apple-darwin/bitcoin-9546b3a2a3a4-arm64-apple-darwin-unsigned.tar.gz
  d2dc890f9d4e7f147b29e3e186504fc1af7f68b516d770d7700d4982429ad7e3  guix-build-9546b3a2a3a4/output/arm64-apple-darwin/bitcoin-9546b3a2a3a4-arm64-apple-darwin.tar.gz
  c74196e38f26f0aa8b345d81389a69c2324017c08b32fe5d97823a6bdaebd63b  guix-build-9546b3a2a3a4/output/dist-archive/bitcoin-9546b3a2a3a4.tar.gz
  fdcebf2b6518f3a538429aba53795f45a6c07e0b3a73e58242a46b0e1a1de429  guix-build-9546b3a2a3a4/output/powerpc64-linux-gnu/SHA256SUMS.part
  d4180196535c6a13f158e6f1b013bac6e1f32291d2940f830898aff55bd215ad  guix-build-9546b3a2a3a4/output/powerpc64-linux-gnu/bitcoin-9546b3a2a3a4-powerpc64-linux-gnu-debug.tar.gz
  ffbaea4130f460a93afd89618b68be5918d9fad053427390350daa1f512f628c  guix-build-9546b3a2a3a4/output/powerpc64-linux-gnu/bitcoin-9546b3a2a3a4-powerpc64-linux-gnu.tar.gz
  09071b159126c89bdbc3f19b51b89c34d9709658e77f0f5da55b41218453b652  guix-build-9546b3a2a3a4/output/powerpc64le-linux-gnu/SHA256SUMS.part
  4b75a22ac557a0fea88f8df0beaff9b19fb032587710edcca3d942847445fbc3  guix-build-9546b3a2a3a4/output/powerpc64le-linux-gnu/bitcoin-9546b3a2a3a4-powerpc64le-linux-gnu-debug.tar.gz
  1bbb30880fe9ec5151377b0ee1952316b63d3d4bfaaa383f72660591e46e1965  guix-build-9546b3a2a3a4/output/powerpc64le-linux-gnu/bitcoin-9546b3a2a3a4-powerpc64le-linux-gnu.tar.gz
  06e6140b0b23f974a1c49e551fc4f8effba8afcc3fef3adf4fc3a5cd72d55007  guix-build-9546b3a2a3a4/output/riscv64-linux-gnu/SHA256SUMS.part
  948219a7eb070e48d613bef5c96e47880414d738ecc0c334e1d46291af315cc9  guix-build-9546b3a2a3a4/output/riscv64-linux-gnu/bitcoin-9546b3a2a3a4-riscv64-linux-gnu-debug.tar.gz
  9dcdb87bf947a23eb8e108a15b7b224f03f01dfac1879be85114f67ecc1cd425  guix-build-9546b3a2a3a4/output/riscv64-linux-gnu/bitcoin-9546b3a2a3a4-riscv64-linux-gnu.tar.gz
  c02b6fcc9f1333a83571eff16c6d7789febd8f693c6945b751b0665bdc025f20  guix-build-9546b3a2a3a4/output/x86_64-apple-darwin/SHA256SUMS.part
  3a092d1c08cb85f4ac502424b3c5932ff6970a191ce43d622d36ad17f9b36243  guix-build-9546b3a2a3a4/output/x86_64-apple-darwin/bitcoin-9546b3a2a3a4-x86_64-apple-darwin-unsigned.dmg
  1a1bbefb93131d62f88d9eb51bddc2bd3e247533f8000555af20ea582fe65daa  guix-build-9546b3a2a3a4/output/x86_64-apple-darwin/bitcoin-9546b3a2a3a4-x86_64-apple-darwin-unsigned.tar.gz
  684180389af6cba525439b8c8142bbdc3391c125583743275b6876e69adbd733  guix-build-9546b3a2a3a4/output/x86_64-apple-darwin/bitcoin-9546b3a2a3a4-x86_64-apple-darwin.tar.gz
  f81bc831e3d933b387940c8bd3cc10402e00116c713cd2ac9e7531082a354187  guix-build-9546b3a2a3a4/output/x86_64-linux-gnu/SHA256SUMS.part
  05faf45bc567742d41addafc5d8e85b5b586173f2efdd2ae501d6ebdf69379bb  guix-build-9546b3a2a3a4/output/x86_64-linux-gnu/bitcoin-9546b3a2a3a4-x86_64-linux-gnu-debug.tar.gz
  dfe1b0c22c706a918cbc8952bebba0b471c849276725dd5e0b2eee265c281386  guix-build-9546b3a2a3a4/output/x86_64-linux-gnu/bitcoin-9546b3a2a3a4-x86_64-linux-gnu.tar.gz
  64186c495eb9b6e8c6a2be89530c928e7b161e5ca7a1b56b7786dd28d310e7e8  guix-build-9546b3a2a3a4/output/x86_64-w64-mingw32/SHA256SUMS.part
  c099d0dfeb4556539b52c8bc08ef2c15c636526dccc0a73900c68fa45b052189  guix-build-9546b3a2a3a4/output/x86_64-w64-mingw32/bitcoin-9546b3a2a3a4-win64-debug.zip
  7751e50110ed1a9a46a2fdadb7d71c6e30910685a3074dea563ec64997cbb134  guix-build-9546b3a2a3a4/output/x86_64-w64-mingw32/bitcoin-9546b3a2a3a4-win64-setup-unsigned.exe
  d8ec6a7d24c9b514c342fe3ee2281482a104100230650523d3303484036507a3  guix-build-9546b3a2a3a4/output/x86_64-w64-mingw32/bitcoin-9546b3a2a3a4-win64-unsigned.tar.gz
  ee3123a60a732596347e58351c38cc5c0a8bf9b24f3cc9041f12ec11572e0659  guix-build-9546b3a2a3a4/output/x86_64-w64-mingw32/bitcoin-9546b3a2a3a4-win64.zip
  ```

  Guix Build (arm64):
  ```bash
  1306478fadf15b11636625747029de78a9121d179bc63cad77478a5a4b70e012  guix-build-9546b3a2a3a4/output/arm-linux-gnueabihf/SHA256SUMS.part
  55e82fc26fb57b4a58d63985b4b746c939c949abc670c976e270d5ec9c678623  guix-build-9546b3a2a3a4/output/arm-linux-gnueabihf/bitcoin-9546b3a2a3a4-arm-linux-gnueabihf-debug.tar.gz
  4ef06487c7df0b5ffdbcd5b8e4d32ffc8016f071fda7566f824e713581e7b043  guix-build-9546b3a2a3a4/output/arm-linux-gnueabihf/bitcoin-9546b3a2a3a4-arm-linux-gnueabihf.tar.gz
  fff63a55498bc592296fa3514bc99b39e83c4ab808ce3b04c9499b7a6adf3fd6  guix-build-9546b3a2a3a4/output/arm64-apple-darwin/SHA256SUMS.part
  965a96698bf7e49e2cc710ea567f69fbd4bedef64308f574e96c66e15c78d84d  guix-build-9546b3a2a3a4/output/arm64-apple-darwin/bitcoin-9546b3a2a3a4-arm64-apple-darwin-unsigned.dmg
  6738a0692430d4e59b45a8a9a247b6765970fb17c4047b66a332999425caafd9  guix-build-9546b3a2a3a4/output/arm64-apple-darwin/bitcoin-9546b3a2a3a4-arm64-apple-darwin-unsigned.tar.gz
  d2dc890f9d4e7f147b29e3e186504fc1af7f68b516d770d7700d4982429ad7e3  guix-build-9546b3a2a3a4/output/arm64-apple-darwin/bitcoin-9546b3a2a3a4-arm64-apple-darwin.tar.gz
  c74196e38f26f0aa8b345d81389a69c2324017c08b32fe5d97823a6bdaebd63b  guix-build-9546b3a2a3a4/output/dist-archive/bitcoin-9546b3a2a3a4.tar.gz
  fdcebf2b6518f3a538429aba53795f45a6c07e0b3a73e58242a46b0e1a1de429  guix-build-9546b3a2a3a4/output/powerpc64-linux-gnu/SHA256SUMS.part
  d4180196535c6a13f158e6f1b013bac6e1f32291d2940f830898aff55bd215ad  guix-build-9546b3a2a3a4/output/powerpc64-linux-gnu/bitcoin-9546b3a2a3a4-powerpc64-linux-gnu-debug.tar.gz
  ffbaea4130f460a93afd89618b68be5918d9fad053427390350daa1f512f628c  guix-build-9546b3a2a3a4/output/powerpc64-linux-gnu/bitcoin-9546b3a2a3a4-powerpc64-linux-gnu.tar.gz
  09071b159126c89bdbc3f19b51b89c34d9709658e77f0f5da55b41218453b652  guix-build-9546b3a2a3a4/output/powerpc64le-linux-gnu/SHA256SUMS.part
  4b75a22ac557a0fea88f8df0beaff9b19fb032587710edcca3d942847445fbc3  guix-build-9546b3a2a3a4/output/powerpc64le-linux-gnu/bitcoin-9546b3a2a3a4-powerpc64le-linux-gnu-debug.tar.gz
  1bbb30880fe9ec5151377b0ee1952316b63d3d4bfaaa383f72660591e46e1965  guix-build-9546b3a2a3a4/output/powerpc64le-linux-gnu/bitcoin-9546b3a2a3a4-powerpc64le-linux-gnu.tar.gz
  06e6140b0b23f974a1c49e551fc4f8effba8afcc3fef3adf4fc3a5cd72d55007  guix-build-9546b3a2a3a4/output/riscv64-linux-gnu/SHA256SUMS.part
  948219a7eb070e48d613bef5c96e47880414d738ecc0c334e1d46291af315cc9  guix-build-9546b3a2a3a4/output/riscv64-linux-gnu/bitcoin-9546b3a2a3a4-riscv64-linux-gnu-debug.tar.gz
  9dcdb87bf947a23eb8e108a15b7b224f03f01dfac1879be85114f67ecc1cd425  guix-build-9546b3a2a3a4/output/riscv64-linux-gnu/bitcoin-9546b3a2a3a4-riscv64-linux-gnu.tar.gz
  c02b6fcc9f1333a83571eff16c6d7789febd8f693c6945b751b0665bdc025f20  guix-build-9546b3a2a3a4/output/x86_64-apple-darwin/SHA256SUMS.part
  3a092d1c08cb85f4ac502424b3c5932ff6970a191ce43d622d36ad17f9b36243  guix-build-9546b3a2a3a4/output/x86_64-apple-darwin/bitcoin-9546b3a2a3a4-x86_64-apple-darwin-unsigned.dmg
  1a1bbefb93131d62f88d9eb51bddc2bd3e247533f8000555af20ea582fe65daa  guix-build-9546b3a2a3a4/output/x86_64-apple-darwin/bitcoin-9546b3a2a3a4-x86_64-apple-darwin-unsigned.tar.gz
  684180389af6cba525439b8c8142bbdc3391c125583743275b6876e69adbd733  guix-build-9546b3a2a3a4/output/x86_64-apple-darwin/bitcoin-9546b3a2a3a4-x86_64-apple-darwin.tar.gz
  f81bc831e3d933b387940c8bd3cc10402e00116c713cd2ac9e7531082a354187  guix-build-9546b3a2a3a4/output/x86_64-linux-gnu/SHA256SUMS.part
  05faf45bc567742d41addafc5d8e85b5b586173f2efdd2ae501d6ebdf69379bb  guix-build-9546b3a2a3a4/output/x86_64-linux-gnu/bitcoin-9546b3a2a3a4-x86_64-linux-gnu-debug.tar.gz
  dfe1b0c22c706a918cbc8952bebba0b471c849276725dd5e0b2eee265c281386  guix-build-9546b3a2a3a4/output/x86_64-linux-gnu/bitcoin-9546b3a2a3a4-x86_64-linux-gnu.tar.gz
  64186c495eb9b6e8c6a2be89530c928e7b161e5ca7a1b56b7786dd28d310e7e8  guix-build-9546b3a2a3a4/output/x86_64-w64-mingw32/SHA256SUMS.part
  c099d0dfeb4556539b52c8bc08ef2c15c636526dccc0a73900c68fa45b052189  guix-build-9546b3a2a3a4/output/x86_64-w64-mingw32/bitcoin-9546b3a2a3a4-win64-debug.zip
  7751e50110ed1a9a46a2fdadb7d71c6e30910685a3074dea563ec64997cbb134  guix-build-9546b3a2a3a4/output/x86_64-w64-mingw32/bitcoin-9546b3a2a3a4-win64-setup-unsigned.exe
  d8ec6a7d24c9b514c342fe3ee2281482a104100230650523d3303484036507a3  guix-build-9546b3a2a3a4/output/x86_64-w64-mingw32/bitcoin-9546b3a2a3a4-win64-unsigned.tar.gz
  ee3123a60a732596347e58351c38cc5c0a8bf9b24f3cc9041f12ec11572e0659  guix-build-9546b3a2a3a4/output/x86_64-w64-mingw32/bitcoin-9546b3a2a3a4-win64.zip
  ```

ACKs for top commit:
  hebasto:
    ACK 9546b3a2a3a4796a13f05edd1340bfc0fa4c0a75, I have reviewed the code and it looks OK, I agree it can be merged.
  jarolrod:
    ACK 9546b3a2a3a4796a13f05edd1340bfc0fa4c0a75

Tree-SHA512: e5f98fd3bdb90516d24ed6cc26da9ed4a83374888d322a4e3a26d8df4a2352711d842787b07ba94e2dbd142391bb8f39eb6f040cbb3c2f217f7980b69aaae31f
2024-02-29 09:35:00 -06:00
Andrew Chow
c9d3695688
Merge bitcoin/bitcoin#25798: build: fix cleanup of test logs
5474f5c356c5a17fbf6c84110cf83a5753cd0367 build: fix cleanup of test logs (fanquake)

Pull request description:

  `make clean` currently looks for `test_name.cpp.log`, when it should be `test_name.log`, meaning .log files are left after running `make clean`.

  Also fixes #21705. `make distcheck` seems to work fine after the logs files are properly cleaned up:
  ```bash
  ./autogen.sh && ./configure && make distcheck -j9
  ....
  make[1]: Leaving directory '/home/ubuntu/bitcoin/bitcoin-23.99.0/_build/sub'
  if test -d "bitcoin-23.99.0"; then find "bitcoin-23.99.0" -type d ! -perm -200 -exec chmod u+w {} ';' && rm -rf "bitcoin-23.99.0" || { sleep 5 && rm -rf "bitcoin-23.99.0"; }; else :; fi
  =================================================
  bitcoin-23.99.0 archives ready for distribution:
  bitcoin-23.99.0.tar.gz
  =================================================
  ```

  Probably broken in #19385 / #24715.

  Guix Build (x86_64):
  ```bash
  c33306c2ae55bc0e037a1050bd0813fd7654f21fefd0e7df089a541118b629bc  guix-build-5474f5c356c5/output/aarch64-linux-gnu/SHA256SUMS.part
  f3cf5b8366e27155f3a369ab0d017074912506c43b4010054a72e5c3ae8cab2c  guix-build-5474f5c356c5/output/aarch64-linux-gnu/bitcoin-5474f5c356c5-aarch64-linux-gnu-debug.tar.gz
  48f618300f63533c50c31395959737103bb0279972b989cc5417adbf338a5c9f  guix-build-5474f5c356c5/output/aarch64-linux-gnu/bitcoin-5474f5c356c5-aarch64-linux-gnu.tar.gz
  6b3e0ceefc84dfad48aec3a9ea8ae98a427775242370234709605855f593dc88  guix-build-5474f5c356c5/output/arm-linux-gnueabihf/SHA256SUMS.part
  36a38f4d0d2d0fee51256ee9c610cde014055cf18b5b852c8b3235ef218b461e  guix-build-5474f5c356c5/output/arm-linux-gnueabihf/bitcoin-5474f5c356c5-arm-linux-gnueabihf-debug.tar.gz
  3acb46a786323068fe34eaa8b2f7bff428d35367677e456b78fc00db09da8adf  guix-build-5474f5c356c5/output/arm-linux-gnueabihf/bitcoin-5474f5c356c5-arm-linux-gnueabihf.tar.gz
  aaeb126cca3cbbb1d21be2cbb36b3e16a8c110199a5e61172ee55c9c913fb717  guix-build-5474f5c356c5/output/arm64-apple-darwin/SHA256SUMS.part
  0135d47c34dfbfbcd68181292fc810a1be4efaa0ff9fab05f9f33415167fc82c  guix-build-5474f5c356c5/output/arm64-apple-darwin/bitcoin-5474f5c356c5-arm64-apple-darwin-unsigned.dmg
  261ae9f70238ecbd8fedf9b3e02f34601abe42c4a23b25d0571d04d0881fdaba  guix-build-5474f5c356c5/output/arm64-apple-darwin/bitcoin-5474f5c356c5-arm64-apple-darwin-unsigned.tar.gz
  de716e0f425bae38cfda2690e86dbfa6831b6d37dd8a7638ca14334eecbddf99  guix-build-5474f5c356c5/output/arm64-apple-darwin/bitcoin-5474f5c356c5-arm64-apple-darwin.tar.gz
  2e2e1d5cd009ec5c69ce22124afe90ff8c15e9cb546df818b2305ff96efa9c81  guix-build-5474f5c356c5/output/dist-archive/bitcoin-5474f5c356c5.tar.gz
  85dd41584a2c7715b16508dff0f51bbb20b3891a1901a1781ecc37bc1cfd97c8  guix-build-5474f5c356c5/output/powerpc64-linux-gnu/SHA256SUMS.part
  49ae951e9acb34fede0ead4d53679ddc041bfb6d60646efaca2a99cf87972be9  guix-build-5474f5c356c5/output/powerpc64-linux-gnu/bitcoin-5474f5c356c5-powerpc64-linux-gnu-debug.tar.gz
  2efcb3fbb6702bff30bbf05d83b9849f390c67a1c363c883d71f365f4bee7ef6  guix-build-5474f5c356c5/output/powerpc64-linux-gnu/bitcoin-5474f5c356c5-powerpc64-linux-gnu.tar.gz
  cea9e8e2499932ef6e20bba7a6b3408e2cca6fcd1875c1890293dd745add6942  guix-build-5474f5c356c5/output/powerpc64le-linux-gnu/SHA256SUMS.part
  7616659242a1f15b7d6f9f54382dfb52d0bbdca701e1fb3d48fbe7bb590e6213  guix-build-5474f5c356c5/output/powerpc64le-linux-gnu/bitcoin-5474f5c356c5-powerpc64le-linux-gnu-debug.tar.gz
  d9d4eeaf6f9d1272000aa598c8461afc330a8e65f263d45b0eab222f8ddfec71  guix-build-5474f5c356c5/output/powerpc64le-linux-gnu/bitcoin-5474f5c356c5-powerpc64le-linux-gnu.tar.gz
  f83ee11c35001d34f9fba7d1e9e201a4cc6fa5e44bd51e13dabffcb35324348c  guix-build-5474f5c356c5/output/riscv64-linux-gnu/SHA256SUMS.part
  c441e56f23f224122ed064cdb57364fb129f5c9d50c5e8173952ce649b46bdb8  guix-build-5474f5c356c5/output/riscv64-linux-gnu/bitcoin-5474f5c356c5-riscv64-linux-gnu-debug.tar.gz
  319db8af21a4d3c7bbdf54c315ad70bacf7fba1f2559408188d90c9ba60ca63c  guix-build-5474f5c356c5/output/riscv64-linux-gnu/bitcoin-5474f5c356c5-riscv64-linux-gnu.tar.gz
  9ac536a04d7e500f87b1f7dfb60e1e84cde2c192d3dffb89c308b864e9b9d583  guix-build-5474f5c356c5/output/x86_64-apple-darwin/SHA256SUMS.part
  19e70f13fb4bf82375f7ca882a23e831f84729278e643cf5911182bdababa893  guix-build-5474f5c356c5/output/x86_64-apple-darwin/bitcoin-5474f5c356c5-x86_64-apple-darwin-unsigned.dmg
  673a20e9457af3d0a89ea6721f84c6136132d3fbe469b7371bf14ce688b567d0  guix-build-5474f5c356c5/output/x86_64-apple-darwin/bitcoin-5474f5c356c5-x86_64-apple-darwin-unsigned.tar.gz
  74162d53faffc4372ae4587cde395fe078b5c440c43c5a4ad8b8b890e9546255  guix-build-5474f5c356c5/output/x86_64-apple-darwin/bitcoin-5474f5c356c5-x86_64-apple-darwin.tar.gz
  d751d50427d7abcbe9ac1daf087dc3addb7e4e6b90bb4c3ef6c31f8e54cac25e  guix-build-5474f5c356c5/output/x86_64-linux-gnu/SHA256SUMS.part
  49951b53172d4fe193d7ffc15b04a4bc058a3209653982b65912f2b221305dd4  guix-build-5474f5c356c5/output/x86_64-linux-gnu/bitcoin-5474f5c356c5-x86_64-linux-gnu-debug.tar.gz
  93d4c4b07202a9171a72b6887e3931e53b3a8c22433b26521e2cb2a0c942f52a  guix-build-5474f5c356c5/output/x86_64-linux-gnu/bitcoin-5474f5c356c5-x86_64-linux-gnu.tar.gz
  b4b79e3578b6ffbb3075aacff969fb201b386e35a2d9d597047b61ff14bdfbfb  guix-build-5474f5c356c5/output/x86_64-w64-mingw32/SHA256SUMS.part
  8260f5c9a38cc577dff2143f00c465d117aa9835b3633365289d6807d7e46e7c  guix-build-5474f5c356c5/output/x86_64-w64-mingw32/bitcoin-5474f5c356c5-win64-debug.zip
  b20fbf02ddf617b86e5d5f88346ed97f9d169cd56904684ba3ca5f03ea85f008  guix-build-5474f5c356c5/output/x86_64-w64-mingw32/bitcoin-5474f5c356c5-win64-setup-unsigned.exe
  16e9d1b817a832bfb0be2b9065440245a5d04b3aae8e34ff0f43f20c5dd7047f  guix-build-5474f5c356c5/output/x86_64-w64-mingw32/bitcoin-5474f5c356c5-win64-unsigned.tar.gz
  da766e257d10cf8890a530babc6100039c69ae7ed8e4f969eb612b4a411dd88f  guix-build-5474f5c356c5/output/x86_64-w64-mingw32/bitcoin-5474f5c356c5-win64.zip
  ```

ACKs for top commit:
  adam2k:
    ACK 5474f5c356c5a17fbf6c84110cf83a5753cd0367
  achow101:
    ACK 5474f5c356c5a17fbf6c84110cf83a5753cd0367
  jarolrod:
    ACK 5474f5c356c5a17fbf6c84110cf83a5753cd0367

Tree-SHA512: d5595c96d0386b5ee9b98d9499770a00d8b751500020bf92f75c88e688640a50cfa5ebe7c26dea8cc5473b16a6adb83ec39891dd18d32ef59df5cf48d7091d6c
2024-02-29 09:35:00 -06:00
MacroFake
afc1a9f4ac
Merge bitcoin/bitcoin#25811: doc: test: suggest multi-line imports in functional test style guide
4edc6893825fd8c45c53c81c73a6a7801e1b458c doc: test: suggest multi-line imports in functional test style guide (Sebastian Falbesoner)

Pull request description:

  As long as I remember contributing to functional tests (~2-3 years), it was always kind of an unwritten rule that multi-line imports are preferred over single-line imports in order to reduce the possibility of potential merge conflicts -- at least if more than one symbol from a module is imported. This PR adds this rule to the style guide and adapts the example test accordingly. (Inspired by https://github.com/bitcoin/bitcoin/pull/25792#discussion_r941180819).

ACKs for top commit:
  kouloumos:
    ACK 4edc6893825fd8c45c53c81c73a6a7801e1b458c
  1440000bytes:
    ACK 4edc689382
  w0xlt:
    ACK 4edc689382
  fanquake:
    ACK 4edc6893825fd8c45c53c81c73a6a7801e1b458c

Tree-SHA512: c7b6ff62f601f4e57cc8334d291662987d6737ebca8d81c063280409f4412302172f1404ec16afc9a13007bcdba55bdab66b9b80363287e287888929cb386584
2024-02-29 09:34:59 -06:00
Andrew Chow
3e693ddfb5
Merge bitcoin/bitcoin#25788: guix: patch NSIS to remove .reloc sections from installer stubs
7a0b129c41d9fefdbc20d6d04983dd87bb8379e7 guix: patch NSIS to remove .reloc sections from install stubs (fanquake)

Pull request description:

  With the release of binutils/ld 2.36, ld swapped to much improved
  default settings when producing windows binaries with mingw-w64. One of
  these changes was to stop stripping the .reloc section from binaries,
  which is required for working ASLR.

  When we switched to using a newer Guix time-machine in #23778, we begun
  using binutils 2.37 to produce releases. Since then, our windows
  installer (produced with makensis) has not functioned correctly when run on
  a Windows system with the "Force randomization for images (Mandatory ASLR)"
  option enabled. Note that all of our other release binaries, which all
  contain .reloc sections, function fine under the same option, so it
  cannot be just the presence of a .reloc section that is the issue.

  The root cause of the problem is that when we compile NSIS (makensis), a number
  of exe installer stubs are produced at the same time, for use later when makensis
  is actually run. Given the new linker defaults, the stubs will contain .reloc sections,
  when previously they would not. It seems that, in combination with how makensis
  mutates the stub when it actually builds the installer, causes the problem.

  According to upstream, https://sourceforge.net/p/nsis/bugs/1131/#abb6:
  > Looks like the problem is the very existance of the .reloc section.
  > It's not supposed to be there, and makensis doesn't handle it.

  The most recent .reloc related upstream activity is in
  https://sourceforge.net/p/nsis/bugs/1283/, where the conclusion again seemed to
  be that .relo sections are not wanted, but there hasn't been any further follow up.

  For now, restore pre-binutils-2.36 behaviour, by passing `-Wl,--disable-reloc-section`
  to the linker when building the installer stubs, which fixes the produced installer.
  The underlying issue can be further investigated in future.

  .reloc section stripping is something we've accounted for previously,
  see #18702, and related upstream discussion is in this thread:
  https://sourceware.org/bugzilla/show_bug.cgi?id=19011.

  Fixes #25726.

  Guix Build (x86_64):
  ```bash
  7e0723388913ac1ec9f650b943c6b23351ba0cd921c0ec830abf16b16724d503  guix-build-7a0b129c41d9/output/dist-archive/bitcoin-7a0b129c41d9.tar.gz
  c3bb9c68895ffafa2900b0d18c1268e299d012a7dc70593f20f9900cf116eb05  guix-build-7a0b129c41d9/output/x86_64-w64-mingw32/SHA256SUMS.part
  b57aa99c242b0aae64653c64ada38f6d3f0cbd902bbc096d3dc529fdcf87d681  guix-build-7a0b129c41d9/output/x86_64-w64-mingw32/bitcoin-7a0b129c41d9-win64-debug.zip
  341d99afc9961299883be6cd9666e8bc0f3f6296cff758719a32d27419acad36  guix-build-7a0b129c41d9/output/x86_64-w64-mingw32/bitcoin-7a0b129c41d9-win64-setup-unsigned.exe
  1d9ef48d3c9ed93a925962356b41cdaeb9d09fd758de193cd4d5f4d1ec6791eb  guix-build-7a0b129c41d9/output/x86_64-w64-mingw32/bitcoin-7a0b129c41d9-win64-unsigned.tar.gz
  28c81d99a9a4bd6648449393f91db213369e958add579ba9e9a1721540d2c4f7  guix-build-7a0b129c41d9/output/x86_64-w64-mingw32/bitcoin-7a0b129c41d9-win64.zip
  ```

  Guix Build (arm64):
  ```bash
  7e0723388913ac1ec9f650b943c6b23351ba0cd921c0ec830abf16b16724d503  guix-build-7a0b129c41d9/output/dist-archive/bitcoin-7a0b129c41d9.tar.gz
  c3bb9c68895ffafa2900b0d18c1268e299d012a7dc70593f20f9900cf116eb05  guix-build-7a0b129c41d9/output/x86_64-w64-mingw32/SHA256SUMS.part
  b57aa99c242b0aae64653c64ada38f6d3f0cbd902bbc096d3dc529fdcf87d681  guix-build-7a0b129c41d9/output/x86_64-w64-mingw32/bitcoin-7a0b129c41d9-win64-debug.zip
  341d99afc9961299883be6cd9666e8bc0f3f6296cff758719a32d27419acad36  guix-build-7a0b129c41d9/output/x86_64-w64-mingw32/bitcoin-7a0b129c41d9-win64-setup-unsigned.exe
  1d9ef48d3c9ed93a925962356b41cdaeb9d09fd758de193cd4d5f4d1ec6791eb  guix-build-7a0b129c41d9/output/x86_64-w64-mingw32/bitcoin-7a0b129c41d9-win64-unsigned.tar.gz
  28c81d99a9a4bd6648449393f91db213369e958add579ba9e9a1721540d2c4f7  guix-build-7a0b129c41d9/output/x86_64-w64-mingw32/bitcoin-7a0b129c41d9-win64.zip
  ```

ACKs for top commit:
  achow101:
    ACK 7a0b129c41d9fefdbc20d6d04983dd87bb8379e7
  hebasto:
    ACK 7a0b129c41d9fefdbc20d6d04983dd87bb8379e7
  jarolrod:
    ACK 7a0b129c41d9fefdbc20d6d04983dd87bb8379e7

Tree-SHA512: 9e14e98207d20236b833603319fc4bb335c878a7c179ab495b33d143e2a900c6926125536bbb7499ee4f0f676cd5ea45c8c86cd7e544ed9a76bb298f98db6197
2024-02-29 09:34:59 -06:00
fanquake
f8719ec4a4
Merge bitcoin/bitcoin#22176: test: Correct outstanding -Werror=sign-compare errors
4e44f5bac4481d49ac53c458dcc5ca48e8b28414 test: Correct outstanding -Werror=sign-compare errors (Ben Woosley)

Pull request description:

  I'm unclear on why these aren't failing on CI, but they failed for me locally, e.g.:

  ```
  In file included from /usr/local/include/boost/test/test_tools.hpp:46:
  /usr/local/include/boost/test/tools/old/impl.hpp:107:17: error: comparison of integers of different signs: 'const unsigned int' and 'const int' [-Werror,-Wsign-compare]
      return left == right;
             ~~~~ ^  ~~~~~
  /usr/local/include/boost/test/tools/old/impl.hpp:130:16: note: in instantiation of function template specialization 'boost::test_tools::tt_detail::equal_impl<unsigned int, int>' requested here
          return equal_impl( left, right );
                 ^
  /usr/local/include/boost/test/tools/old/impl.hpp:145:16: note: in instantiation of function template specialization 'boost::test_tools::tt_detail::equal_impl_frwd::call_impl<unsigned int, int>' requested here
          return call_impl( left, right, left_is_array() );
                 ^
  /usr/local/include/boost/test/tools/old/impl.hpp:92:50: note: in instantiation of function template specialization 'boost::test_tools::tt_detail::equal_impl_frwd::operator()<unsigned int, int>' requested here
  BOOST_PP_REPEAT( BOOST_TEST_MAX_PREDICATE_ARITY, IMPL_FRWD, _ )
                                                   ^
  /usr/local/include/boost/preprocessor/repetition/repeat.hpp:30:26: note: expanded from macro 'BOOST_PP_REPEAT'
                           ^
  /usr/local/include/boost/preprocessor/cat.hpp:22:32: note: expanded from macro 'BOOST_PP_CAT'
                                 ^
  /usr/local/include/boost/preprocessor/cat.hpp:29:34: note: expanded from macro 'BOOST_PP_CAT_I'
                                   ^
  <scratch space>:153:1: note: expanded from here
  BOOST_PP_REPEAT_1
  ^
  test/streams_tests.cpp:122:5: note: in instantiation of function template specialization 'boost::test_tools::tt_detail::check_frwd<boost::test_tools::tt_detail::equal_impl_frwd, unsigned int, int>' requested here
      BOOST_CHECK_EQUAL(varint, 54321);
      ^

  /usr/local/include/boost/test/tools/old/impl.hpp:107:17: error: comparison of integers of different signs: 'const unsigned long long' and 'const long' [-Werror,-Wsign-compare]
      return left == right;
             ~~~~ ^  ~~~~~
  /usr/local/include/boost/test/tools/old/impl.hpp:130:16: note: in instantiation of function template specialization 'boost::test_tools::tt_detail::equal_impl<unsigned long long, long>' requested here
          return equal_impl( left, right );
                 ^
  /usr/local/include/boost/test/tools/old/impl.hpp:145:16: note: in instantiation of function template specialization 'boost::test_tools::tt_detail::equal_impl_frwd::call_impl<unsigned long long, long>' requested here
          return call_impl( left, right, left_is_array() );
                 ^
  /usr/local/include/boost/test/tools/old/impl.hpp:92:50: note: in instantiation of function template specialization 'boost::test_tools::tt_detail::equal_impl_frwd::operator()<unsigned long long, long>' requested here
  BOOST_PP_REPEAT( BOOST_TEST_MAX_PREDICATE_ARITY, IMPL_FRWD, _ )
                                                   ^
  /usr/local/include/boost/preprocessor/repetition/repeat.hpp:30:26: note: expanded from macro 'BOOST_PP_REPEAT'
                           ^
  /usr/local/include/boost/preprocessor/cat.hpp:22:32: note: expanded from macro 'BOOST_PP_CAT'
                                 ^
  /usr/local/include/boost/preprocessor/cat.hpp:29:34: note: expanded from macro 'BOOST_PP_CAT_I'
                                   ^
  <scratch space>:161:1: note: expanded from here
  BOOST_PP_REPEAT_1
  ^
  test/serfloat_tests.cpp:41:5: note: in instantiation of function template specialization 'boost::test_tools::tt_detail::check_frwd<boost::test_tools::tt_detail::equal_impl_frwd, unsigned long long, long>' requested here
      BOOST_CHECK_EQUAL(TestDouble(std::numeric_limits<double>::infinity()), 0x7ff0000000000000);
      ^

ACKs for top commit:
  theStack:
    ACK 4e44f5bac4481d49ac53c458dcc5ca48e8b28414

Tree-SHA512: 8d9e5245676c61207ceacdf78c78a78ccc9fd2a2551d4d8df023513795591334aa2f5e1f4a2a8ed2bfeb381f1e226b6ba84c07e0de29a1f3f00da71f3a257bc1
2024-02-29 09:34:59 -06:00
MarcoFalke
8fcd549956
Merge bitcoin/bitcoin#22180: fuzz: Increase branch coverage of the float fuzz target
fa13f34bf35129b38af699a0faf32c39d2ba8576 fuzz: Increase branch coverage of the float fuzz target (MarcoFalke)
fad0c58c3ecdf2a2a602ff39c9fd9dda7f8747d9 fuzz: Remove confusing return keyword from CallOneOf (MarcoFalke)

Pull request description:

  Currently the branch coverage for the float fuzz target is only 50% : https://marcofalke.github.io/btc_cov/fuzz.coverage/src/test/fuzz/float.cpp.gcov.html

  This is caused by the Fuzzed Data Provider only picking "nice" floats.

ACKs for top commit:
  practicalswift:
    cr ACK fa13f34bf35129b38af699a0faf32c39d2ba8576: patch looks correct

Tree-SHA512: 326822515e9a1c77647d41eab9a96185a3b320914d9264730fa72ffb76c2bf3dc5bf72cf6cd9beef14f4f032358d76a976860bf3e2418ae61943cf926c0ea086
2024-02-29 09:34:57 -06:00
pasta
7701948873
Merge #5824: feat: generalize ehf activation
1821d92b66 test: add activate_ehf_by_name (Alessandro Rezzi)
de38dca242 feat(consensus): Generalize ehf activation (Alessandro Rezzi)

Pull request description:

  ## Issue being fixed or feature implemented
   Try to sign/mine any ehf deployment and not only mn_rr.  As asked in the review this decouples (and improves) commit  [e24cb23](e24cb239f8) from PR #5799

  ## What was done?
   See commit description

  ## How Has This Been Tested?

  ## Breaking Changes

  ## Checklist:

  - [x] I have performed a self-review of my own code
  - [x] I have commented my code, particularly in hard-to-understand areas
  - [ ] I have added or updated relevant unit/integration/functional/e2e tests
  - [ ] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone

Top commit has no ACKs.

Tree-SHA512: 7112a5214b473dea29a892563e6598eca089d2e17fdff8bda08c7777738f1054d2cb07e0a7dccf66214911fec64a6441e84100273ac2ed52abe1d33fb960e8cc
2024-02-28 19:54:04 -06:00
pasta
90108bb8a7
Merge #5887: fix: rename "Mask values" to "Discreet mode"
7b3756f8c9 fix: rename "Mask values" to "Discreet mode" (Konstantin Akimov)

Pull request description:

  ## Issue being fixed or feature implemented
  As [noticed by](https://github.com/dashpay/dash/pull/5796#issuecomment-1874256010) thephez  "Discreet mode" is a good name, Legder and Trezor use that.

  ## What was done?
  Renamed qt option "Mask values" to "Discreet mode", update hot-key from Ctrl+Shift+M to Ctrl+Shift+D

  ## How Has This Been Tested?
  Build & run qt app

  ## Breaking Changes
  N/A, that's just gui text field.

  ## Checklist:
  - [x] I have performed a self-review of my own code
  - [ ] I have commented my code, particularly in hard-to-understand areas
  - [ ] I have added or updated relevant unit/integration/functional/e2e tests
  - [ ] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone

Top commit has no ACKs.

Tree-SHA512: 515c9c8caab02c78d6edb3859608bd6058dff04e2687567014ad721d2cff255e24bf4dd429dd18b5cac7f6a0f72415a5750fc0590dd6be05d2733ae438f60039
2024-02-28 17:36:08 -06:00
Konstantin Akimov
7b3756f8c9
fix: rename "Mask values" to "Discreet mode"
follow-up to PR #5796
2024-02-28 17:35:44 -06:00
pasta
7ab37529e7
Merge #5903: feat: enable optional rebasing as part of github-merge.py script
f44c07f75d feat: enable optional rebasing as part of github-merge.py script (pasta)

Pull request description:

  ## Issue being fixed or feature implemented
  this will allow us to rebase the PR before merging as we do now; and then right after merge it into develop and push

  note we can not simply rebase locally before merging as we would then violate the "all changes must be done through PR rule"

  When rebasing locally; we also check the range-diff (should be all >'s indicating a commit being pulled in from the rebase and ='s indicating the commits are the same as the base PR. This ensures that when we force push we will not invalidate previously created reviews.

  ## What was done?

  ## How Has This Been Tested?
  Rebased and Merged PR with it

  ## Breaking Changes
  None

  ## Checklist:
    _Go over all the following points, and put an `x` in all the boxes that apply._
  - [x] I have performed a self-review of my own code
  - [ ] I have commented my code, particularly in hard-to-understand areas
  - [ ] I have added or updated relevant unit/integration/functional/e2e tests
  - [ ] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

Top commit has no ACKs.

Tree-SHA512: 020be8f2451d8945ca10b6388d8bffea0736c43eb410b3f0d9cb5dc07eefd661d8d8c9f0a749ed0accd8288c2fb161f379408022eb2590bd50fa55c0145e072c
2024-02-28 17:27:38 -06:00
pasta
f44c07f75d
feat: enable optional rebasing as part of github-merge.py script
this will allow us to rebase the PR before merging as we do now; and then right after merge it into develop and push

note we can not simply rebase locally before merging as we would then violate the "all changes must be done through PR rule"

When rebasing locally; we also check the range-diff (should be all >'s indicating a commit being pulled in from the rebase and ='s indicating the commits are the same as the base PR. This ensures that when we force push we will not invalidate previously created reviews.

Co-authored-by: UdjinM6 <UdjinM6@users.noreply.github.com>
2024-02-28 17:27:21 -06:00
pasta
96c4442253
Merge #5901: backport: merge bitcoin#21817, #21966, #21824, #21969, #23653, #23438, #24190, #24253, #24231, #26258, #28012, partial bitcoin#25001, #25296, #23595, #27927 (serialization updates)
2b26a87874 merge bitcoin#28012: Allow FastRandomContext::randbytes for std::byte, Allow std::byte serialization (Kittywhiskers Van Gogh)
4eeafa267c partial bitcoin#27927: Allow std::byte and char Span serialization (Kittywhiskers Van Gogh)
cb2fa8360a test: place the std::ostream operator<< definition in namespace std (Kittywhiskers Van Gogh)
cf4522f845 partial bitcoin#23595: Add ParseHex<std::byte>() helper (Kittywhiskers Van Gogh)
e4091aa477 partial bitcoin#25296: Add DataStream without ser-type and ser-version (Kittywhiskers Van Gogh)
eab031a9b0 merge bitcoin#26258: Remove unused CDataStream::rdbuf method (Kittywhiskers Van Gogh)
95b5850434 partial bitcoin#25001: Modernize util/strencodings and util/string: string_view and optional (Kittywhiskers Van Gogh)
5fe72bbb8e merge bitcoin#24231: Fix read-past-the-end and integer overflows (Kittywhiskers Van Gogh)
24af37256f merge bitcoin#24253: Remove broken and unused CDataStream methods (Kittywhiskers Van Gogh)
baf8dd65cd merge bitcoin#24190: Fix sanitizer suppresions in streams_tests (Kittywhiskers Van Gogh)
e933d78a88 merge bitcoin#23438: Use spans of std::byte in serialize (Kittywhiskers Van Gogh)
d3b282208b merge bitcoin#23653: Generalize/simplify VectorReader into SpanReader (Kittywhiskers Van Gogh)
2c32a09f4e merge bitcoin#21969: Switch serialize to uint8_t (Kittywhiskers Van Gogh)
0a08dbf3f4 merge bitcoin#21824: Replace deprecated char with uint8_t in serialization (Kittywhiskers Van Gogh)
d0b4e560a6 merge bitcoin#21966: Remove double serialization; use software encoder for fee estimation (Kittywhiskers Van Gogh)
1d6aafea47 merge bitcoin#21817: Replace &foo[0] with foo.data() (Kittywhiskers Van Gogh)
d9a8ce2749 trivial: move GetSerializeSize away from Stream (Un)serialize functions (Kittywhiskers Van Gogh)

Pull request description:

  ## Additional Information

  * Dependency for https://github.com/dashpay/dash/pull/5902

  * [bitcoin#24231](https://github.com/bitcoin/bitcoin/pull/24231) is merged after [bitcoin#24253](https://github.com/bitcoin/bitcoin/pull/24253) due to a MinGW bug ([comment](https://github.com/bitcoin/bitcoin/pull/24231#issuecomment-1031179638))

  * [bitcoin#25001](https://github.com/bitcoin/bitcoin/pull/25001) is listed as unmerged despite being committed upstream as 132d5f8c2f

  * [bitcoin#25296](https://github.com/bitcoin/bitcoin/pull/25296) is listed as unmerged despite being committed upstream as 79e007d1d6

  * [bitcoin#21966](https://github.com/bitcoin/bitcoin/pull/21966) was partially backported in [dash#4197](https://github.com/dashpay/dash/pull/4197) as f946c68f83, including only 2be4cd94f4c7d92a4287971233a20d68db81c9c9.
    The excluded commits have been backported, marking the pull request as fully merged.

  * [bitcoin#23438](https://github.com/bitcoin/bitcoin/pull/23438) was partially backported in [dash#5574](https://github.com/dashpay/dash/pull/5574) as de54b8784c, including only fa65bbf.
     The excluded commits have been backported, marking the pull request as fully merged.

  * [bitcoin#27927](https://github.com/bitcoin/bitcoin/pull/27927) opened a fresh can of hell thanks to being (possibly?) the first pull request to include `std::byte` `BOOST_CHECK`'s to the unit test suite. For reasons still unbeknownst to me, it refused to compile, despite being perfectly happy when checked-out as a commit directly and built as-is from upstream.

    The compile error was like this (edited for brevity):
    ```
      CXX      test/test_dash-serialize_tests.o
    In file included from test/serialize_tests.cpp:13:
    In file included from /src/dash/depends/x86_64-pc-linux-gnu/include/boost/test/unit_test.hpp:18:
    In file included from /src/dash/depends/x86_64-pc-linux-gnu/include/boost/test/test_tools.hpp:46:
    In file included from /src/dash/depends/x86_64-pc-linux-gnu/include/boost/test/tools/old/impl.hpp:24:
    /src/dash/depends/x86_64-pc-linux-gnu/include/boost/test/tools/detail/print_helper.hpp:53:13: error: static assertion failed due to requirement 'boost::has_left_shift<std::basic_ostream<char, std::char_traits<char>>, std::byte, boost::binary_op_detail::dont_care>::value': Type has to implement operator<< to be printable
                BOOST_STATIC_ASSERT_MSG( (boost::has_left_shift<std::ostream,T>::value),
                ^                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    [...]
    <scratch space>:206:1: note: expanded from here
    BOOST_PP_REPEAT_1
    ^
    test/serialize_tests.cpp:347:9: note: in instantiation of function template specialization 'boost::test_tools::tt_detail::check_frwd<boost::test_tools::tt_detail::equal_impl_frwd, std::byte, std::byte>' requested here
            BOOST_CHECK_EQUAL(out.at(0), std::byte{'a'});
            ^
    [...]
    In file included from test/serialize_tests.cpp:13:
    In file included from /src/dash/depends/x86_64-pc-linux-gnu/include/boost/test/unit_test.hpp:18:
    In file included from /src/dash/depends/x86_64-pc-linux-gnu/include/boost/test/test_tools.hpp:46:
    In file included from /src/dash/depends/x86_64-pc-linux-gnu/include/boost/test/tools/old/impl.hpp:24:
    /src/dash/depends/x86_64-pc-linux-gnu/include/boost/test/tools/detail/print_helper.hpp:55:18: error: invalid operands to binary expression ('std::ostream' (aka 'basic_ostream<char>') and 'const std::byte')
                ostr << t;
                ~~~~ ^  ~
    /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/cstddef:130:5: note: candidate function template not viable: no known conversion from 'std::ostream' (aka 'basic_ostream<char>') to 'byte' for 1st argument
        operator<<(byte __b, _IntegerType __shift) noexcept
        ^
    [...]
    5 warnings and 2 errors generated.
    make[2]: *** [Makefile:17842: test/test_dash-serialize_tests.o] Error 1
    make[2]: *** Waiting for unfinished jobs....
    make[2]: Leaving directory '/src/dash/src'
    make[1]: *** [Makefile:18525: all-recursive] Error 1
    make[1]: Leaving directory '/src/dash/src'
    make: *** [Makefile:802: all-recursive] Error 1
    ```
    * No such error was present on Bitcoin.

      It is true, that no `std::ostream& operator<<(std::ostream& a, const std::byte& b)` is present by default but attempting to `grep` for any specializations didn't show anything _relevant_ that Dash didn't have. Searching on GitHub didn't help either.
    * Then, assuming that perhaps Boost's assertion logic may have changed, upgraded the version of Boost to match the pull request at the time, Boost 1.81. That also did not do anything (and actually, caused a trailing slashes unit test to fail but doesn't cause any problem in Bitcoin because they got rid of their `boost::filesystem` usage by then).
    * If that isn't it, then let's try building Bitcoin with Dash's depends. It built successfully, ran successfully. The problem isn't in the dependency, it's in the codebase.
    * Since it seemed to be `std::byte` related, pull requests that are related to `std::byte` serialization were backported and `std::byte` serialization related changes needed for [dash#5902](https://github.com/dashpay/dash/pull/5902) were cherry-picked. That's why this pull request came to be. But it didn't help this particular issue (though it did smooth out the cherry-picks).
    * Running out of ideas, `gdb` is used to step through `serialize_tests`'s `class_methods` and understand why `BOOST_CHECK_EQUAL(out.at(0), std::byte{'a'});` is valid in Bitcoin but not Dash by finding the elusive `operator<<`. This is where things go from bad to worse.

      Turns out, when you build with `clang`, `gdb` loses the ability to do breakpoints by file. So, an attempt is made to use `lldb` (which btw, is called `lldb-16`, running `lldb` with yield an error if you're using the develop container) and it refuses to work, erroring `personality set failed: Operation not permitted`.

      Turns out, the [`docker-compose.yml`](37f43e4e56/contrib/containers/develop/docker-compose.yml) needs the following additions:

      ```
        cap_add:
          - SYS_PTRACE
        security_opt:
          - "seccomp:unconfined"
      ```

      After making these changes, `lldb` works and then we resume trying to find `operator<<`. After too many hours and nimbly alternating between `next` and `step`, tried making a return to `gdb` (compiling with `gcc` this time with the appropriate `CXXFLAGS`) hoping for different results and a while later, realized that it cannot step through Boost's headers (it doesn't recognize the filenames) and then recompile it with `clang` and return to `lldb`.

      This was a wild goose chase.

    * After a lot of futile efforts to find the operator by stepping through `BOOST_CHECK_EQUAL`, a basic example addressing the static assertion (that a left shift operator must exist of `<type>` (here `std::byte`) for `std::ostream`) was added in

      ```c++
      std::ostream& ostr = std::cout;
      ostr << std::byte{'a'};
      ```

      ...and it compiled in both codebases.

      So the left shift that Boost is asserting doesn't exist does exist but it isn't being detected for some reason. Upon hovering the `<<`, VSCode highlighted the source of the definition as [`setup_common.h`](96ac317c27/src/test/util/setup_common.h (L27-L32)) thanks to the comment above it.

      Diffing between Bitcoin and Dash revealed the secret, the `operator<<` definition was placed under namespace `std` by [bitcoin#23497](https://github.com/bitcoin/bitcoin/pull/23497) in f7086fd8ff (see [change](f7086fd8ff/src/test/util/setup_common.h (L29-L35))).

      That change has now been made in a separate commit.

  ## Breaking Changes

  Changes in serialization APIs will make backports predating [bitcoin#23438](https://github.com/bitcoin/bitcoin/pull/23438) annoying but will _not_ change how data is stored on disk.

  ## Checklist:
    _Go over all the following points, and put an `x` in all the boxes that apply._
  - [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 **(note: N/A)**
  - [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)_

Top commit has no ACKs.

Tree-SHA512: 1d7c67f5fe282f78e24cb720828e5f1f48b6926006b903c28399938532cc5c470c175b00c8b80e9662c4467c1201e09ae6d1cd9b95e8b20ace5e4410c72c472e
2024-02-28 13:43:52 -06:00
Kittywhiskers Van Gogh
2b26a87874
merge bitcoin#28012: Allow FastRandomContext::randbytes for std::byte, Allow std::byte serialization 2024-02-28 13:37:36 -06:00
Kittywhiskers Van Gogh
4eeafa267c
partial bitcoin#27927: Allow std::byte and char Span serialization
includes:
- fa257bc8312b91c2d281f48ca2500d9cba353cc5
2024-02-28 13:37:36 -06:00
Kittywhiskers Van Gogh
cb2fa8360a
test: place the std::ostream operator<< definition in namespace std
this is required to prevent the tests introduced in bitcoin#27927 from
failing to compile because boost::has_left_shift<std::ostream,T>::value
returns false for the std::byte specialization, resulting in a static
assertion failure in Boost.Test

this change was introduced in f7086fd in bitcoin#23497
2024-02-28 13:37:36 -06:00
Kittywhiskers Van Gogh
cf4522f845
partial bitcoin#23595: Add ParseHex<std::byte>() helper
excludes:
- facd1fb911abfc595a3484ee53397eff515d4c40
2024-02-28 13:37:36 -06:00
Kittywhiskers Van Gogh
e4091aa477
partial bitcoin#25296: Add DataStream without ser-type and ser-version
includes:
- fa9becfe1cea5040e7cea36324d1b0789cbbd25d
2024-02-28 13:37:35 -06:00
Kittywhiskers Van Gogh
eab031a9b0
merge bitcoin#26258: Remove unused CDataStream::rdbuf method 2024-02-28 13:37:35 -06:00
Kittywhiskers Van Gogh
95b5850434
partial bitcoin#25001: Modernize util/strencodings and util/string: string_view and optional
includes:
- c1d165a8c2678c31aced5e1d46231d9996b0774a
- 40062997f223d88d4f92aaae4622a31476686163
- 963bc9b576f0a62caffede2ce32830aef3473995
- d648b5120b2fefa9e599898bd26f05ecf4428fac
- a4377a0843636eae0aaf698510fc6518582545db
2024-02-28 13:37:35 -06:00
Kittywhiskers Van Gogh
5fe72bbb8e
merge bitcoin#24231: Fix read-past-the-end and integer overflows 2024-02-28 13:37:35 -06:00
Kittywhiskers Van Gogh
24af37256f
merge bitcoin#24253: Remove broken and unused CDataStream methods 2024-02-28 13:37:34 -06:00
Kittywhiskers Van Gogh
baf8dd65cd
merge bitcoin#24190: Fix sanitizer suppresions in streams_tests 2024-02-28 13:37:34 -06:00
Kittywhiskers Van Gogh
e933d78a88
merge bitcoin#23438: Use spans of std::byte in serialize
continuation of de54b878 from dash#5574
2024-02-28 13:37:34 -06:00
Kittywhiskers Van Gogh
d3b282208b
merge bitcoin#23653: Generalize/simplify VectorReader into SpanReader 2024-02-28 13:37:34 -06:00
Kittywhiskers Van Gogh
2c32a09f4e
merge bitcoin#21969: Switch serialize to uint8_t 2024-02-28 13:37:33 -06:00
Kittywhiskers Van Gogh
0a08dbf3f4
merge bitcoin#21824: Replace deprecated char with uint8_t in serialization 2024-02-28 13:37:33 -06:00
Kittywhiskers Van Gogh
d0b4e560a6
merge bitcoin#21966: Remove double serialization; use software encoder for fee estimation
continuation of f946c68f8 from dash#4197
2024-02-28 13:37:33 -06:00
Kittywhiskers Van Gogh
1d6aafea47
merge bitcoin#21817: Replace &foo[0] with foo.data() 2024-02-28 13:37:33 -06:00
Kittywhiskers Van Gogh
d9a8ce2749
trivial: move GetSerializeSize away from Stream (Un)serialize functions
done to reduce the number of conflicts associated with the unexpected
forward decl, moved it just above WriteAutoBitSet and added comment to
clarify reason.
2024-02-28 13:37:30 -06:00
pasta
cdc7df744c
Merge #5896: fix: drop symlinks in immer subtree
c09981d8ad fix: drop symlinks in immer subtree (pasta)

Pull request description:

  ## Issue being fixed or feature implemented
  I've been playing around recently with the `github-merge.py` script recently; and while I've been able to create merges with it (see 73c90c8370 and 10ddf62dfb) it complains / refuses to trivially work with symlinks. I haven't been able to figure out exactly why it doesn't want symlinks, but I think it's related to the sha512sum hash that gets created.

  I'm not sure if we'll start using `github-merge.py` more or not; but I guess we should "fix" this anyhow in order to learn more how these work. It may be useful to move to merging commits locally and not relying on github being a good actor? 🤷

  ## What was done?

  ## How Has This Been Tested?
  Ran `github-merge.py` locally and it no longer complains about symlinks

  ## Breaking Changes
  None

  ## Checklist:
    _Go over all the following points, and put an `x` in all the boxes that apply._
  - [x] I have performed a self-review of my own code
  - [ ] I have commented my code, particularly in hard-to-understand areas
  - [ ] I have added or updated relevant unit/integration/functional/e2e tests
  - [ ] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

Top commit has no ACKs.

Tree-SHA512: be935bb9f5fa562fa7af5b33da239b6eca06bcf2790ee3f16d1b313b8b5ad1c878f4761b855cea5f7776f0241622f86feac91149a74c6d8940ddb8fb1b5700c4
2024-02-28 13:19:17 -06:00
pasta
c09981d8ad
fix: drop symlinks in immer subtree
I've been playing around recently with the `github-merge.py` script recently; and while I've been able to create merges with it (see 73c90c8370 and 10ddf62dfb)
it complains / refuses to trivially work with symlinks. I haven't been able to figure out exactly why it doesn't want symlinks, but I think it's related to the sha512sum hash that gets created.

I'm not sure if we'll start using `github-merge.py` more or not; but I guess we should "fix" this anyhow in order to learn more how these work. It may be useful to move to merging commits locally and not relying on github being a good actor? 🤷
2024-02-28 13:18:49 -06:00
pasta
59bf5cd6ee
Merge #5906: backport: trivial 2024 02 27
a852a919dd Merge bitcoin/bitcoin#25697: depends: expat 2.4.8 & fix building with -flto (fanquake)
587c335c54 Merge bitcoin/bitcoin#22485: doc: BaseIndex sync behavior with empty datadir (MacroFake)
aaa170af05 Merge bitcoin/bitcoin#25605: depends: update urls for dmg tools (fanquake)
7cbf69dd56 Merge bitcoin/bitcoin#24319: refactor: Avoid unsigned integer overflow in core_write (MarcoFalke)
002db515dc Merge bitcoin/bitcoin#24191: refactor: Make MessageBoxFlags enum underlying type unsigned (MarcoFalke)
93027376bf Merge bitcoin/bitcoin#24059: Fix implicit-integer-sign-change in arith_uint256 (MarcoFalke)
7e57600a22 Merge bitcoin/bitcoin#23992: fuzz: Limit fuzzed time to years 2000-2100 (MarcoFalke)
cd13274076 Merge bitcoin/bitcoin#23626: refactor: Fix implicit-signed-integer-truncation in cuckoocache.h (fanquake)
2a4558b4f7 Merge bitcoin/bitcoin#23553: test: Remove sanitizer suppression implicit-signed-integer-truncation:netaddress.cpp (fanquake)
75c877dbba Merge bitcoin/bitcoin#22584: test: Add temporary sanitizer suppression implicit-signed-integer-truncation:netaddress.cpp (MarcoFalke)
c342ce95b8 Merge bitcoin/bitcoin#22146: Reject invalid coin height and output index when loading assumeutxo (MarcoFalke)
0557c32264 Merge bitcoin/bitcoin#22202: test: Add temporary coinstats suppressions (MarcoFalke)
3450fa5fe4 Merge bitcoin/bitcoin#21846: fuzz: Add `-fsanitize=integer` suppression needed for RPC fuzzer (`generateblock`) (MarcoFalke)

Pull request description:

  ## Issue being fixed or feature implemented
  Batch of trivial backports

  ## What was done?

  ## How Has This Been Tested?
  Building locally; tests not ran

  ## Breaking Changes

  ## Checklist:
    _Go over all the following points, and put an `x` in all the boxes that apply._
  - [ ] I have performed a self-review of my own code
  - [ ] I have commented my code, particularly in hard-to-understand areas
  - [ ] I have added or updated relevant unit/integration/functional/e2e tests
  - [ ] I have made corresponding changes to the documentation
  - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_

Top commit has no ACKs.

Tree-SHA512: 42e7fa81ce409917b36fa761b6a48a3869f5efe7287b8f02bb120036d6b7a6ff3463477cce4bcf87957f24c9128abcfbce4dfe0c4a0a3a52f9690527f49294f2
2024-02-28 13:17:26 -06:00
fanquake
a852a919dd
Merge bitcoin/bitcoin#25697: depends: expat 2.4.8 & fix building with -flto
e838a9847580527b8321d65e57b1c53cc2af6bf4 depends: re-enable using -flto when building expat (fanquake)
304452558c7f6f5e32ba13d8f05325790c8a4f5f depends: expat 2.4.8 (fanquake)

Pull request description:

  Currently, when building the expat package in depends, using `-flto` (`LTO=1`), the configure check can fail, because it cannot determine the system endianess:
  ```bash
  configure:18718: result: unknown
  configure:18733: error: unknown endianness
   presetting ac_cv_c_bigendian=no (or yes) will help
  ```

  Fix that by defining `_DEFAULT_SOURCE`, which in turn defines `__USE_MISC` (`features.h`):
  ```c
  #if defined _DEFAULT_SOURCE
  # define __USE_MISC1
  #endif
  ```
  which exposes additional definitions in `endian.h`:
  ```c
  #include <features.h>

  /* Get the definitions of __*_ENDIAN, __BYTE_ORDER, and __FLOAT_WORD_ORDER.  */
  #include <bits/endian.h>

  #ifdef __USE_MISC
  # define LITTLE_ENDIAN__LITTLE_ENDIAN
  # define BIG_ENDIAN__BIG_ENDIAN
  # define PDP_ENDIAN__PDP_ENDIAN
  # define BYTE_ORDER__BYTE_ORDER
  #endif
  ```
  and gives us a working configure.

  You could test building this change with Guix + LTO with [this branch](https://github.com/fanquake/bitcoin/tree/lto_in_guix). Note that that build may fail for other reasons (on x86_64), unrelated to this change.

  Some related upstream discussion:
  https://bugs.gentoo.org/757681
  https://forums.gentoo.org/viewtopic-t-1013786.html

ACKs for top commit:
  hebasto:
    re-ACK e838a9847580527b8321d65e57b1c53cc2af6bf4, only [suggested](https://github.com/bitcoin/bitcoin/pull/25697#discussion_r929735675) changes since my recent [review](https://github.com/bitcoin/bitcoin/pull/25697#pullrequestreview-1050657421).
  jarolrod:
    code review ACK e838a9847580527b8321d65e57b1c53cc2af6bf4

Tree-SHA512: 9dbf64c9bd1fd995a4d1addc011ffeff83d50df736030012346c97605e63aed4b5bac390a81abe646c1be28ad6fd600f64560dcb26bbc2edf5d513ca3b180bfa
2024-02-28 13:16:40 -06:00
MacroFake
587c335c54
Merge bitcoin/bitcoin#22485: doc: BaseIndex sync behavior with empty datadir
11780f29e7c3f50fb7717fc98950ece9385d314b doc: BaseIndex sync behavior with empty datadir (James O'Beirne)

Pull request description:

  Make a note about a potentially confusing behavior with `BaseIndex::m_synced`;
  if the user starts bitcoind with an empty datadir and an index enabled,
  BaseIndex will consider itself synced (as a degenerate case). This affects
  how indices are built during IBD (relying solely on BlockConnected signals vs.
  using ThreadSync()).

ACKs for top commit:
  mzumsande:
    ACK 11780f29e7c3f50fb7717fc98950ece9385d314b

Tree-SHA512: 0b530379e57c62e05d2ddca7bb8e2c936786fa00678f9eaa1bb3742d957c48f141d46f936734b03f6673d964abc7eb72c1769f1784b9d3563d218e96296b7afd
2024-02-28 13:16:40 -06:00
fanquake
aaa170af05
Merge bitcoin/bitcoin#25605: depends: update urls for dmg tools
718d29af233959896c2ef63340c3f61d2134ebcc depends: update urls for dmg tools (fanquake)

Pull request description:

  These repos have migrated from https://github.com/al45tair/ to
  https://github.com/dmgbuild/, so update our URLs to point to the new
  location. Note that GitHub is also already performing the redirect
  automatically.

  Guix Build (x86_64):
  ```bash
  d77fedbd1781e7106e567a43d6830f5ccecab9f234546871cb4928b1f98be989  guix-build-718d29af2339/output/arm64-apple-darwin/SHA256SUMS.part
  c96dac549214f2d5bcc496d321767b6440367677149d254242da47dcc860a121  guix-build-718d29af2339/output/arm64-apple-darwin/bitcoin-718d29af2339-arm64-apple-darwin-unsigned.dmg
  0d3cd6b6a1c3ca4d35fd7301cd02ca7bced8ffc587b653dcd0a3c67116ae8ac6  guix-build-718d29af2339/output/arm64-apple-darwin/bitcoin-718d29af2339-arm64-apple-darwin-unsigned.tar.gz
  f86eb599d21687ddaca35bdf5400a58ec03a48823357d0182110c3c507c09c58  guix-build-718d29af2339/output/arm64-apple-darwin/bitcoin-718d29af2339-arm64-apple-darwin.tar.gz
  6bbd4bdf2d90ab20ae4d6aa4e9a9cfef6e14f3784d0eda67fdbd0006f03a2feb  guix-build-718d29af2339/output/dist-archive/bitcoin-718d29af2339.tar.gz
  6c8a22474864fefbcd3ad676f46f7c10696a2801f2315367b64975f55877702d  guix-build-718d29af2339/output/x86_64-apple-darwin/SHA256SUMS.part
  d9caf693e70876d30cef2a38a0e5a62f808903f51bd3c845107f6dfc4dcf7b80  guix-build-718d29af2339/output/x86_64-apple-darwin/bitcoin-718d29af2339-x86_64-apple-darwin-unsigned.dmg
  1510f55407f61d6f1df2711b744bae6ba43ba926ff67b1eaafcb90415d8ce748  guix-build-718d29af2339/output/x86_64-apple-darwin/bitcoin-718d29af2339-x86_64-apple-darwin-unsigned.tar.gz
  3cf52eb02345dfc14039a7f37f49f0c0ea2c067a86b245981b767a2491e160c6  guix-build-718d29af2339/output/x86_64-apple-darwin/bitcoin-718d29af2339-x86_64-apple-darwin.tar.gz
  ```

  Guix Build (arm64):
  ```bash
  3451e31b7a3bb6c44c1cca70a954e82033894770396c625f2936b36cfdde3104  guix-build-718d29af2339/output/arm64-apple-darwin/SHA256SUMS.part
  757095bb54b407c76c03d4bc1e4ddba9247c521c815293e33273212a1255f2d7  guix-build-718d29af2339/output/arm64-apple-darwin/bitcoin-718d29af2339-arm64-apple-darwin-unsigned.dmg
  9f5c68f3310076eb1cfa15e8325f4ff81cb7c3929efe69d1ee3e4b40f65865fc  guix-build-718d29af2339/output/arm64-apple-darwin/bitcoin-718d29af2339-arm64-apple-darwin-unsigned.tar.gz
  d8ce004001d349be6b0ea20a6d59780ebdec4e8cca445f63da72c569d558ce4e  guix-build-718d29af2339/output/arm64-apple-darwin/bitcoin-718d29af2339-arm64-apple-darwin.tar.gz
  6bbd4bdf2d90ab20ae4d6aa4e9a9cfef6e14f3784d0eda67fdbd0006f03a2feb  guix-build-718d29af2339/output/dist-archive/bitcoin-718d29af2339.tar.gz
  6c8a22474864fefbcd3ad676f46f7c10696a2801f2315367b64975f55877702d  guix-build-718d29af2339/output/x86_64-apple-darwin/SHA256SUMS.part
  d9caf693e70876d30cef2a38a0e5a62f808903f51bd3c845107f6dfc4dcf7b80  guix-build-718d29af2339/output/x86_64-apple-darwin/bitcoin-718d29af2339-x86_64-apple-darwin-unsigned.dmg
  1510f55407f61d6f1df2711b744bae6ba43ba926ff67b1eaafcb90415d8ce748  guix-build-718d29af2339/output/x86_64-apple-darwin/bitcoin-718d29af2339-x86_64-apple-darwin-unsigned.tar.gz
  3cf52eb02345dfc14039a7f37f49f0c0ea2c067a86b245981b767a2491e160c6  guix-build-718d29af2339/output/x86_64-apple-darwin/bitcoin-718d29af2339-x86_64-apple-darwin.tar.gz
  ```

ACKs for top commit:
  hebasto:
    ACK 718d29af233959896c2ef63340c3f61d2134ebcc, I've manually downloaded archives from new links, and verified their hashes.
  jarolrod:
    ACK 718d29af233959896c2ef63340c3f61d2134ebcc

Tree-SHA512: 9dc69293775481abf5be4967cb42446707fa56a3bdba5e36125b02c0d73092871b6fb5d3467ebbeb5120c5df7a321e4dc7fbcf3600bfc8631f86bb781c4523c1
2024-02-28 13:16:40 -06:00
MarcoFalke
7cbf69dd56
Merge bitcoin/bitcoin#24319: refactor: Avoid unsigned integer overflow in core_write
fa6065661a86656a29e89ed1a3529cb7103f5394 refactor: Avoid unsigned integer overflow in core_write (MarcoFalke)

Pull request description:

  Also, I find the new code a bit easier to understand.

ACKs for top commit:
  shaavan:
    Code Review ACK fa6065661a86656a29e89ed1a3529cb7103f5394

Tree-SHA512: cd751e3b4dc97ef525eb8be8d0a49e9629389cb114df18d59a06e05388822af2939078e937f01494e6b317d601743b1a433ba47aa40c4dc602372d1f0fd0dc11
2024-02-28 13:16:39 -06:00
MarcoFalke
002db515dc
Merge bitcoin/bitcoin#24191: refactor: Make MessageBoxFlags enum underlying type unsigned
1111d33532516c16fb2e22660ac2745ce56ad6cd refactor: Make MessageBoxFlags enum underlying type unsigned (MarcoFalke)

Pull request description:

  All values in the enum are unsigned. Also, flags shouldn't be treated as signed types. So clarify the underlying type and remove a sanitizer suppression.

ACKs for top commit:
  hebasto:
    ACK 1111d33532516c16fb2e22660ac2745ce56ad6cd, I have reviewed the code and it looks OK, I agree it can be merged.

Tree-SHA512: 48b16c4a0ace1a1e4d351d6eadadbb1bc42aef7fd82e24e3ea50c62f2c04a552ed21027158d09aa97e630c8c7d732cb150c38065333d7c2accbae46593b7ed9f
2024-02-28 13:16:39 -06:00
MarcoFalke
93027376bf
Merge bitcoin/bitcoin#24059: Fix implicit-integer-sign-change in arith_uint256
fa99e108e778b5169b3de2ce557af68f1fe0ac0b Fix implicit-integer-sign-change in arith_uint256 (MarcoFalke)

Pull request description:

  This refactor doesn't change behaviour, but clarifies that the numbers being dealt with aren't supposed to be negative. This helps when reading the code and allows to remove a sanitizer suppression for the whole file.

ACKs for top commit:
  PastaPastaPasta:
    utACK fa99e108e778b5169b3de2ce557af68f1fe0ac0b
  shaavan:
    ACK fa99e108e778b5169b3de2ce557af68f1fe0ac0b

Tree-SHA512: f227e2fd22021e39f0445ec041f4a299d13477c23cef0fc06c53fb3313cbe550cec329336224a7e8775d9045b8009423052b394e83d42a1e40772085dfcdd471
2024-02-28 13:16:39 -06:00
MarcoFalke
7e57600a22
Merge bitcoin/bitcoin#23992: fuzz: Limit fuzzed time to years 2000-2100
fa7238300c18938cdf627cacfc58d4b81602417f fuzz: Limit fuzzed time to years 2000-2100 (MarcoFalke)

Pull request description:

  It doesn't make sense to fuzz times in the past, as Bitcoin Core will refuse to start in the past.

  Fix that and also remove a sanitizer suppression, which would be hit in net_processing in `ProcessMessage`:

  ```cpp

               if (addr.nTime <= 100000000 || addr.nTime > nNow + 10 * 60)
                   addr.nTime = nNow - 5 * 24 * 60 * 60; // <-- Here
  ```

  This changes the format of fuzz inputs. Previously a time value was (de)serialized as 40 bytes, now it is 32 bytes.

ACKs for top commit:
  mzumsande:
    Code Review ACK fa7238300c18938cdf627cacfc58d4b81602417f

Tree-SHA512: ca6e7233beec2d9ef9fd481d8f1331942a4d2c8fe518b857629bebcc53a4f42ae123b994cf5d359384a0a8022098ff5a9c146600bc2593c6d88734e25bc240ad
2024-02-28 13:16:39 -06:00
fanquake
cd13274076
Merge bitcoin/bitcoin#23626: refactor: Fix implicit-signed-integer-truncation in cuckoocache.h
fa7da227daf8558be14f226c4366583fdc59ba10 refactor: Fix implicit-signed-integer-truncation in cuckoocache.h (MarcoFalke)

Pull request description:

  Using a file-wide suppression for this implicit truncation has several issues:

  * It is file-wide, thus suppressing any other (newly introduced) issues
  * The file doesn't compile with `-Wimplicit-int-conversion`

  Fix both issues by making the truncation explicit.

ACKs for top commit:
  fanquake:
    ACK fa7da227daf8558be14f226c4366583fdc59ba10

Tree-SHA512: bf2076ed94c4e80d0d29ff883080edc7a73144c73d6d3e872ec87966177ee3160f4760fc4c774aaa6fb591f4acee450a24b0f7c82291e0bef96582a6d134046e
2024-02-28 13:16:38 -06:00
fanquake
2a4558b4f7
Merge bitcoin/bitcoin#23553: test: Remove sanitizer suppression implicit-signed-integer-truncation:netaddress.cpp
fae5fec0fec851568a72724000193b2747c30414 test: Remove sanitizer suppression implicit-signed-integer-truncation:netaddress.cpp (MarcoFalke)

Pull request description:

  This reverts commit fa865287e5f35e0a376785834e966dd202d2959e.

  This was fixed in commit efd6f904c78769ad2e93c1f1de43014d284e7561.

ACKs for top commit:
  vasild:
    ACK fae5fec0fec851568a72724000193b2747c30414

Tree-SHA512: 3bebf1babd5c68cbb2506bcab9b8e9ffed8697213cf66190484748741f05c59b847a103be171360f7fd6ddb57dfd86ed34a123f72860b76e533ed46bb53a4852
2024-02-28 13:16:38 -06:00
MarcoFalke
75c877dbba
Merge bitcoin/bitcoin#22584: test: Add temporary sanitizer suppression implicit-signed-integer-truncation:netaddress.cpp
fa865287e5f35e0a376785834e966dd202d2959e test: Add temporary sanitizer suppression implicit-signed-integer-truncation:netaddress.cpp (MarcoFalke)

Pull request description:

  This is required to unbreak the fuzzers while a fix is being worked on.

  https://cirrus-ci.com/task/4787303177519104?logs=ci#L3020

  ```
  netaddress.cpp:1190:18: runtime error: implicit conversion from type 'int' of value -1 (32-bit, signed) to type 'uint8_t' (aka 'unsigned char') changed the value to 255 (8-bit, unsigned)

ACKs for top commit:
  practicalswift:
    cr ACK fa865287e5f35e0a376785834e966dd202d2959e
  tryphe:
    untested ACK fa865287e5f35e0a376785834e966dd202d2959e
  lsilva01:
    ACK fa865287e5

Tree-SHA512: 4a54ec68c014c7a4c9ab268c3a04321db5eb9b2857646b41406d8d4908a3d349848b4549e80aea6afd9a0c3639522a48fe578527139519b12439eae9f0c4c46c
2024-02-28 13:16:38 -06:00
MarcoFalke
c342ce95b8
Merge bitcoin/bitcoin#22146: Reject invalid coin height and output index when loading assumeutxo
fa9ebedec3f982bb5bb459ea33d74c94d9b5cec4 Reject invalid coin height and output index when loading assumeutxo (MarcoFalke)

Pull request description:

  It should be impossible to have a coin at a height higher than the height of the snapshot block, so reject those early to avoid integer wraparounds and hash collisions later on.

  Same for the outpoint index.

  Both issues were found by fuzzing:

  * The height issue by OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=34793
  * The outpoint issue by my fuzz server: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=34793#c2

ACKs for top commit:
  practicalswift:
    cr ACK fa9ebedec3f982bb5bb459ea33d74c94d9b5cec4: patch looks correct
  jamesob:
    crACK fa9ebedec3
  theStack:
    Code review ACK fa9ebedec3f982bb5bb459ea33d74c94d9b5cec4
  benthecarman:
    crACK fa9ebedec3f982bb5bb459ea33d74c94d9b5cec4

Tree-SHA512: dae7caee4b3862b23ebdf2acb7edec4baf75b0dbf1409b370b1a73aa6b632b317ebfac596dcbaf4edfb1301b513f45465ea75328962460f35e2af0d7e547c9ac
2024-02-28 13:16:38 -06:00
MarcoFalke
0557c32264
Merge bitcoin/bitcoin#22202: test: Add temporary coinstats suppressions
faca40ec68a25180f90a5b9ef017f931354d5bc6 test: Add temporary coinstats suppressions (MarcoFalke)

Pull request description:

  Needed for my fuzzer to continue to run

ACKs for top commit:
  practicalswift:
    cr ACK faca40ec68a25180f90a5b9ef017f931354d5bc6: suppression looks necessary (temporarily)

Tree-SHA512: 5bdff9a24a60546cfe31e775fa2aa5e238aefda2ed2604bef18c82b1b80c51ca3cbe058d6c7988fa75305258b70076036a3e430b9b7de13a111309fa7a66745b
2024-02-28 13:16:37 -06:00
MarcoFalke
3450fa5fe4
Merge bitcoin/bitcoin#21846: fuzz: Add -fsanitize=integer suppression needed for RPC fuzzer (generateblock)
575792e6ffe23c8236a1f8431f6be445e448809b fuzz: Add -fsanitize=integer suppression needed for RPC fuzzer (practicalswift)

Pull request description:

  Add `-fsanitize=integer` suppression needed for RPC fuzzer (`generateblock`).

  Context: https://github.com/bitcoin-core/qa-assets/pull/59/checks?check_run_id=2494624259

  ```
  miner.cpp:130:21: runtime error: implicit conversion from type 'int64_t' (aka 'long') of value 244763573890 (64-bit, signed) to type 'uint32_t' (aka 'unsigned int') changed the value to 4245405314 (32-bit, unsigned)
      #0 0x56143974eaf3 in BlockAssembler::CreateNewBlock(CScript const&) miner.cpp:130:21
      #1 0x56143993690d in generateblock()::$_4::operator()(RPCHelpMan const&, JSONRPCRequest const&) const rpc/mining.cpp:370:127
  ```

ACKs for top commit:
  practicalswift:
    > review ACK [575792e](575792e6ff), but this function shouldn't be called by the rpc fuzzer, at least not without sanitizing num_blocks
  MarcoFalke:
    review ACK 575792e6ffe23c8236a1f8431f6be445e448809b

Tree-SHA512: c2133d1064bf17df0e7749ef4a0f7664b5c8082040491a1035d39f0c6e5d96997b347ef2354411e285c7f1f973e34515f1c3c88eb3de60fab64ca4d2adf6dd74
2024-02-28 13:16:35 -06:00
pasta
41eb1b2b1e
Merge #5878: backport: Merge bitcoin#21818, 21752
1e613f0ca1 Merge bitcoin/bitcoin#21752: doc: Clarify that feerates are per virtual size. (Vijay Manikpuri)
ad73978530 Merge bitcoin/bitcoin#21818: doc:  fixup -coinstatsindex help, update bitcoin.conf and files.md (fanquake)

Pull request description:

  bitcoin backports

Top commit has no ACKs.

Tree-SHA512: d0db0e906a10a3168c8fbab64e960b8c1130313bb27c3db08b7e85734fa27e193c1411e45167f76089236f1f5f5dfceffb8d794574057ebe071f0394ac4f62bf
2024-02-27 12:01:26 -06:00
Vijay Manikpuri
1e613f0ca1
Merge bitcoin/bitcoin#21752: doc: Clarify that feerates are per virtual size.
fae196147bae11202c0d54543dc12ba5d92ab0cc doc: Clarify that feerates are per virtual size (MarcoFalke)
fa83e95ac6f318caa38016a08fa4e402c3b05833 scripted-diff: Clarify that feerates are per virtual size (MarcoFalke)

Pull request description:

  By implementing segwit, it is already clear that all feerates in Bitcoin Core are denoted in (amount/virtual size). Though, there is  inconsistency, as some places use kvB, some use kB. Thus, replace all with "kvB".

  See also commit 6da3afbaee5809ebf6d88efaa3958c505c2d71c7, which did the replacement for wallet RPCs.

ACKs for top commit:
  ryanofsky:
    Code review ACK fae196147bae11202c0d54543dc12ba5d92ab0cc. Checked instances where units were being added in the second commit and they all looked right.

Tree-SHA512: ab70d13cde7d55c1ac931bddc2b45aa218fc75ef46cb6ea9e5a30b1d4dbf27889c2b6357299a6c5427912443a46ec3592a4809dae335e03162bd2120a0f7f8ad
2024-02-27 12:01:05 -06:00
fanquake
ad73978530
Merge bitcoin/bitcoin#21818: doc: fixup -coinstatsindex help, update bitcoin.conf and files.md
54133c59b80ccac85eaebb0668cd2f0fe360b323 doc: add indexes/coinstats/db/ to files.md (Jon Atack)
5d1050f51647980b1204e3b44b319ab31948d11f doc: fix -coinstatsindex help, and test/rpc touchups (Jon Atack)
e041ee0a80e5f3e10301acf8512a18864af750cd doc: add coinstatsindex to bitcoin.conf (Jon Atack)

Pull request description:

ACKs for top commit:
  Sjors:
    utACK 54133c59b80ccac85eaebb0668cd2f0fe360b323
  MarcoFalke:
    cr ACK 54133c59b80ccac85eaebb0668cd2f0fe360b323
  clarkmoody:
    utACK 54133c5

Tree-SHA512: 1a7f3e89873b7dc79ec71d5d39e9e3e4977ce43cc4bee208ad55291bef1bb319a9d1c34ed84a87d6a803db983bdfd0af4d9f396cec0bec86b1701ebbb6f34378
2024-02-27 12:01:02 -06:00
pasta
4ff0c95400
Merge #5900: backport: merge bitcoin#21000, #21586, #21599, #21604, #23859, partial bitcoin#21798, #26341 (auxiliary backports: part 13)
d033cd55be partial bitcoin#26341: add BIP158 false-positive element check in rpc_scanblocks.py (Kittywhiskers Van Gogh)
eab94ac07b merge bitcoin#23859: Add missing suppressions for crypto_diff_fuzz_chacha20.cpp (Kittywhiskers Van Gogh)
0e8d4a1a95 partial bitcoin#21798: Create a block template in tx_pool targets (Kittywhiskers Van Gogh)
ad71db2dcc merge bitcoin#21604: Document why no symbol names can be used for suppressions (Kittywhiskers Van Gogh)
c116d8405a merge bitcoin#21599: Replace file level integer overflow suppression with function level suppression (Kittywhiskers Van Gogh)
8a0dc8cfa1 merge bitcoin#21586: Add missing suppression for signed-integer-overflow:txmempool.cpp (Kittywhiskers Van Gogh)
53cf0d5cea merge bitcoin#21000: Add UBSan suppressions needed for fuzz tests to not warn under -fsanitize=integer (Kittywhiskers Van Gogh)

Pull request description:

  ## Additional Information

  * Dependency for https://github.com/dashpay/dash/pull/5902
  * [bitcoin#21586](https://github.com/bitcoin/bitcoin/pull/21586) was listed as DNM in the backports Google Sheet as listed below as it is `reverted as #23059`
    ![Listing of bitcoin#21586 as DNM](https://github.com/dashpay/dash/assets/63189531/413c116a-b3cb-4b58-becd-0d731b0e4b0b)
    * [bitcoin#23059](https://github.com/bitcoin/bitcoin/pull/23059) actually reverts [bitcoin#22925](https://github.com/bitcoin/bitcoin/pull/22925) (which deals with `addrman.cpp`), not [bitcoin#21586](https://github.com/bitcoin/bitcoin/pull/21586) (which deals with `txmempool.cpp`).

  ## Breaking Changes

  None, changes are limited to fuzzing, functional tests and undefined behavior exclusions

  ## Checklist:
    _Go over all the following points, and put an `x` in all the boxes that apply._
  - [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 **(note: N/A)**
  - [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)_

Top commit has no ACKs.

Tree-SHA512: 7b6c3fcb462edc9bbcc12a0c4eab052d3ef3a6048281b162dd5650f311f6e1bae7a958adf1c03aa0dea09c56c1ddbc99d98a44023fd81f83b2325fd79dc32e80
2024-02-27 10:06:42 -06:00