Age | Commit message (Collapse) | Author |
|
Both glibcs we build support `--enable-bind-now`:
Disable lazy binding for installed shared objects and programs.
This provides additional security hardening because it enables full RELRO
and a read-only global offset table (GOT), at the cost of slightly
increased program load times.
See:
https://www.gnu.org/software/libc/manual/html_node/Configuring-and-compiling.html
|
|
Pass `--enable-stack-protector=all` when building the glibc used for the
RISC-V toolchain, to enable stack smashing protection on all functions,
in the glibc code.
|
|
ba9a8e6cc1d1e9746f74e8c75af5c6c0a49f25c3 test: Drop unused boost workaround (Hennadii Stepanov)
Pull request description:
This PR is a follow up of bitcoin/bitcoin#24065 and removes the workaround which has already been removed in other [places](https://github.com/bitcoin/bitcoin/pull/24065/files#diff-19427b0dd1a791adc728c82e88f267751ba4f1c751e19262cac03cccd2822216).
Moreover, this workaround won't be required even if bitcoin/bitcoin#25696 is ever merged.
ACKs for top commit:
fanquake:
ACK ba9a8e6cc1d1e9746f74e8c75af5c6c0a49f25c3
Tree-SHA512: db19fc1550252d7a82a08f388ff6078c78452365e74b41e7bc36cbbc4d0fed9342636e8f2371bb8e78c9d11ee721d6363bcc21d11787f3aac967a6c4a9cc346f
|
|
|
|
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
|
|
fa64dd6673767992eb4e0e775fb0afdfd298610d refactor: Use type-safe std::chrono for addrman time (MarcoFalke)
fa2ae373f33fa76dc4e435e7cb4778055aa6afd5 Add type-safe AdjustedTime() getter to timedata (MarcoFalke)
fa5103a9f5f8559ab005c0b012d3d3a8057d81fb Add ChronoFormatter to serialize (MarcoFalke)
fa253d385f9201ea10beacecf3e0e80ff69f3138 util: Add HoursDouble (MarcoFalke)
fa21fc60c292ab947b2200e54201440f16230566 scripted-diff: Rename addrman time symbols (MarcoFalke)
fa9284c3e9acec4b44b2560256f27b3d78c753e2 refactor: Remove not needed std::max (MacroFake)
Pull request description:
Those refactors are overlapping with, but otherwise largely unrelated to #24662.
ACKs for top commit:
naumenkogs:
utACK fa64dd6673767992eb4e0e775fb0afdfd298610d
dergoegge:
Code review ACK fa64dd6673767992eb4e0e775fb0afdfd298610d
Tree-SHA512: a50625e78036e7220a11997e6d9b6c6b317cb38ce02b1835fb41cbee2d8bfb1faf29b29d8990be78d6b5e15e9a9d8dec33bf25fa439b47610ef708950969724b
|
|
30091807514470f51bee6057905415ddc853ca53 depends: always use correct ar for win qt (fanquake)
Pull request description:
If we don't set this explicitly, then qt will still use it's default
windows ar, when building with LTO (when we want it to use gcc-ar).
So set `QMAKE_LIB` which is used for win32, and defaults to `ar rc`, to `our_ar rc`.
This way we always get the correct ar.
Issue can be seen building in Guix with LTO. i.e:
```bash
x86_64-w64-mingw32-ar: .obj/release/hb-blob.o: plugin needed to handle lto object
```
Guix Build (x86_64):
```bash
6c24d8a86c2410d5dbf29e8087c1bcd230aeb3f5c8ba3bf63e4edf07503cd689 guix-build-300918075144/output/aarch64-linux-gnu/SHA256SUMS.part
deb6c99f2efa3b60569fb31fbe543a97071af707f3b6e68825de93e7f1adaab0 guix-build-300918075144/output/aarch64-linux-gnu/bitcoin-300918075144-aarch64-linux-gnu-debug.tar.gz
d3f14344f472d2c0540ac9254935f3008fb6b8286aa6c52045243a42dd05f2e4 guix-build-300918075144/output/aarch64-linux-gnu/bitcoin-300918075144-aarch64-linux-gnu.tar.gz
fe97d5c4eb398c18689e7e68b1d97ab9ccbd12d1f0085eff8bd49de242675963 guix-build-300918075144/output/arm-linux-gnueabihf/SHA256SUMS.part
239dfcaaaee91164c0e6d8835b613af51e43ece4bf7e17236f55c1a4facf8cd7 guix-build-300918075144/output/arm-linux-gnueabihf/bitcoin-300918075144-arm-linux-gnueabihf-debug.tar.gz
29fe2ffb5c85f654cf23efd43035f1db6cff4e532839b50e7610dd588ad6680b guix-build-300918075144/output/arm-linux-gnueabihf/bitcoin-300918075144-arm-linux-gnueabihf.tar.gz
a100ce07e5566284a1b213174295c49573e8d93bfea86ad35b3b2dcb85d6c263 guix-build-300918075144/output/arm64-apple-darwin/SHA256SUMS.part
593f57ff35de42f262bdae8085afcd49f33e7db350fd0cb0850bc560414a302a guix-build-300918075144/output/arm64-apple-darwin/bitcoin-300918075144-arm64-apple-darwin-unsigned.dmg
6d5ae0ff77dfb0a7f74621a859c00060cda86c426c604b19269987163b67e413 guix-build-300918075144/output/arm64-apple-darwin/bitcoin-300918075144-arm64-apple-darwin-unsigned.tar.gz
14bc35725df2dbbd1e3447f57d128125cf65a182d4bb081c840947a0af69bce4 guix-build-300918075144/output/arm64-apple-darwin/bitcoin-300918075144-arm64-apple-darwin.tar.gz
29da16189e087c7fc90909d4dfc8002e37ce4ab035d6a94f0d73724d81ce565b guix-build-300918075144/output/dist-archive/bitcoin-300918075144.tar.gz
fe4a4a3b84f7782c7d65fdc7d4cbdf6fa57a7898d347ad932cbd4b5d3d7712b4 guix-build-300918075144/output/powerpc64-linux-gnu/SHA256SUMS.part
e612386c452d04c7a9c9a624efa00f905928af39694067d903635fc7476d0e2c guix-build-300918075144/output/powerpc64-linux-gnu/bitcoin-300918075144-powerpc64-linux-gnu-debug.tar.gz
148ff9a17842287e1d541d032bab3c96df98d0c8a2175a132d896e4617799b5b guix-build-300918075144/output/powerpc64-linux-gnu/bitcoin-300918075144-powerpc64-linux-gnu.tar.gz
d67e6ad7a8ae2c3a0305602aabbed22ccdf07e354fbc1991b99d9ba58f451d1b guix-build-300918075144/output/powerpc64le-linux-gnu/SHA256SUMS.part
a776fb31b742d391cee1b2401204f41b3e93793cc2b54cdfcfca1f1b24a49051 guix-build-300918075144/output/powerpc64le-linux-gnu/bitcoin-300918075144-powerpc64le-linux-gnu-debug.tar.gz
9bfc9255af051fe3801a556bdeaa940a74399ab7b3b677e5313e5e720a87e9cf guix-build-300918075144/output/powerpc64le-linux-gnu/bitcoin-300918075144-powerpc64le-linux-gnu.tar.gz
bc74550b70614e7c07500507943f7b7cda7ec0097908e459b84edfcf9c5f2de7 guix-build-300918075144/output/riscv64-linux-gnu/SHA256SUMS.part
00906c4d9ba5aa6f567c8c3cfa0d44749f944a182f531ff6724284dc70157f88 guix-build-300918075144/output/riscv64-linux-gnu/bitcoin-300918075144-riscv64-linux-gnu-debug.tar.gz
9cd40cbaeb3a68faf500410559443376957aafda081e0cdef2a0d17c9b49d933 guix-build-300918075144/output/riscv64-linux-gnu/bitcoin-300918075144-riscv64-linux-gnu.tar.gz
f9bc2d2cf92493af543a9199763ab913d86bf602f3f5123913ad313391527d75 guix-build-300918075144/output/x86_64-apple-darwin/SHA256SUMS.part
ba60756267e7fa7add1bb4375c98a65bd730a72a86646e3ddfb8496c1e1b695a guix-build-300918075144/output/x86_64-apple-darwin/bitcoin-300918075144-x86_64-apple-darwin-unsigned.dmg
fa44e1d7b861e1f02232ef35e81b28dc78dcf52631944ec38768bc2e08943fa5 guix-build-300918075144/output/x86_64-apple-darwin/bitcoin-300918075144-x86_64-apple-darwin-unsigned.tar.gz
57ddb381261a1c242e683c12db6c2cfc0bb690bef73ad596f6503e07522f90ff guix-build-300918075144/output/x86_64-apple-darwin/bitcoin-300918075144-x86_64-apple-darwin.tar.gz
95e409a241da708c8eefe87c1ba419258f3e4918a36cddd3bc50dbc754a9958e guix-build-300918075144/output/x86_64-linux-gnu/SHA256SUMS.part
6b0548280d8558aa68d3a9006beb95a5402e98e64a92a7b211a4341e67b00e85 guix-build-300918075144/output/x86_64-linux-gnu/bitcoin-300918075144-x86_64-linux-gnu-debug.tar.gz
612a684ed3dc374a81806a50946c85c6d043704945596bed7c5f0f7e998ebf10 guix-build-300918075144/output/x86_64-linux-gnu/bitcoin-300918075144-x86_64-linux-gnu.tar.gz
a5adc490213892f93e2ea62af2aac6db26127afc721a44cb787b0207b8c16d07 guix-build-300918075144/output/x86_64-w64-mingw32/SHA256SUMS.part
1c7bf2d489e8d950b22be16506465da70b9402a4e23c770e04a74fb69d05c18c guix-build-300918075144/output/x86_64-w64-mingw32/bitcoin-300918075144-win64-debug.zip
2a04f07ca0e46a18b68088093eee0bbfbdeb51ec72bb18c2282168d54f748fc4 guix-build-300918075144/output/x86_64-w64-mingw32/bitcoin-300918075144-win64-setup-unsigned.exe
e519347ff375e79d12acd8db87a9b216c5363d4b3cce09d7a8f79b85ba0deb85 guix-build-300918075144/output/x86_64-w64-mingw32/bitcoin-300918075144-win64-unsigned.tar.gz
e49571279f9e5897d5217e5d5fb319467ca213ba7b4e99904e262a1cd1e65df6 guix-build-300918075144/output/x86_64-w64-mingw32/bitcoin-300918075144-win64.zip
```
Guix Build (arm64):
```bash
fe97d5c4eb398c18689e7e68b1d97ab9ccbd12d1f0085eff8bd49de242675963 guix-build-300918075144/output/arm-linux-gnueabihf/SHA256SUMS.part
239dfcaaaee91164c0e6d8835b613af51e43ece4bf7e17236f55c1a4facf8cd7 guix-build-300918075144/output/arm-linux-gnueabihf/bitcoin-300918075144-arm-linux-gnueabihf-debug.tar.gz
29fe2ffb5c85f654cf23efd43035f1db6cff4e532839b50e7610dd588ad6680b guix-build-300918075144/output/arm-linux-gnueabihf/bitcoin-300918075144-arm-linux-gnueabihf.tar.gz
8ef780a952f6a8352ec897f5446be2c49c2bf06825442dfb38037a2160973ba6 guix-build-300918075144/output/arm64-apple-darwin/SHA256SUMS.part
4c80a8d78c3bfcef0c6368b54f3112746ee8912bbd7efcebe9f7072ad7f47c32 guix-build-300918075144/output/arm64-apple-darwin/bitcoin-300918075144-arm64-apple-darwin-unsigned.dmg
d3aa00742093b62165de0fa74b9c2eef0cc37e245cd1720c82a14db30b05ed40 guix-build-300918075144/output/arm64-apple-darwin/bitcoin-300918075144-arm64-apple-darwin-unsigned.tar.gz
67b56f78a0d410ea346f2aa7432b73d4ab99f8471debd2d8e1459d18fcfdf39f guix-build-300918075144/output/arm64-apple-darwin/bitcoin-300918075144-arm64-apple-darwin.tar.gz
29da16189e087c7fc90909d4dfc8002e37ce4ab035d6a94f0d73724d81ce565b guix-build-300918075144/output/dist-archive/bitcoin-300918075144.tar.gz
fe4a4a3b84f7782c7d65fdc7d4cbdf6fa57a7898d347ad932cbd4b5d3d7712b4 guix-build-300918075144/output/powerpc64-linux-gnu/SHA256SUMS.part
e612386c452d04c7a9c9a624efa00f905928af39694067d903635fc7476d0e2c guix-build-300918075144/output/powerpc64-linux-gnu/bitcoin-300918075144-powerpc64-linux-gnu-debug.tar.gz
148ff9a17842287e1d541d032bab3c96df98d0c8a2175a132d896e4617799b5b guix-build-300918075144/output/powerpc64-linux-gnu/bitcoin-300918075144-powerpc64-linux-gnu.tar.gz
d67e6ad7a8ae2c3a0305602aabbed22ccdf07e354fbc1991b99d9ba58f451d1b guix-build-300918075144/output/powerpc64le-linux-gnu/SHA256SUMS.part
a776fb31b742d391cee1b2401204f41b3e93793cc2b54cdfcfca1f1b24a49051 guix-build-300918075144/output/powerpc64le-linux-gnu/bitcoin-300918075144-powerpc64le-linux-gnu-debug.tar.gz
9bfc9255af051fe3801a556bdeaa940a74399ab7b3b677e5313e5e720a87e9cf guix-build-300918075144/output/powerpc64le-linux-gnu/bitcoin-300918075144-powerpc64le-linux-gnu.tar.gz
bc74550b70614e7c07500507943f7b7cda7ec0097908e459b84edfcf9c5f2de7 guix-build-300918075144/output/riscv64-linux-gnu/SHA256SUMS.part
00906c4d9ba5aa6f567c8c3cfa0d44749f944a182f531ff6724284dc70157f88 guix-build-300918075144/output/riscv64-linux-gnu/bitcoin-300918075144-riscv64-linux-gnu-debug.tar.gz
9cd40cbaeb3a68faf500410559443376957aafda081e0cdef2a0d17c9b49d933 guix-build-300918075144/output/riscv64-linux-gnu/bitcoin-300918075144-riscv64-linux-gnu.tar.gz
f9bc2d2cf92493af543a9199763ab913d86bf602f3f5123913ad313391527d75 guix-build-300918075144/output/x86_64-apple-darwin/SHA256SUMS.part
ba60756267e7fa7add1bb4375c98a65bd730a72a86646e3ddfb8496c1e1b695a guix-build-300918075144/output/x86_64-apple-darwin/bitcoin-300918075144-x86_64-apple-darwin-unsigned.dmg
fa44e1d7b861e1f02232ef35e81b28dc78dcf52631944ec38768bc2e08943fa5 guix-build-300918075144/output/x86_64-apple-darwin/bitcoin-300918075144-x86_64-apple-darwin-unsigned.tar.gz
57ddb381261a1c242e683c12db6c2cfc0bb690bef73ad596f6503e07522f90ff guix-build-300918075144/output/x86_64-apple-darwin/bitcoin-300918075144-x86_64-apple-darwin.tar.gz
95e409a241da708c8eefe87c1ba419258f3e4918a36cddd3bc50dbc754a9958e guix-build-300918075144/output/x86_64-linux-gnu/SHA256SUMS.part
6b0548280d8558aa68d3a9006beb95a5402e98e64a92a7b211a4341e67b00e85 guix-build-300918075144/output/x86_64-linux-gnu/bitcoin-300918075144-x86_64-linux-gnu-debug.tar.gz
612a684ed3dc374a81806a50946c85c6d043704945596bed7c5f0f7e998ebf10 guix-build-300918075144/output/x86_64-linux-gnu/bitcoin-300918075144-x86_64-linux-gnu.tar.gz
a5adc490213892f93e2ea62af2aac6db26127afc721a44cb787b0207b8c16d07 guix-build-300918075144/output/x86_64-w64-mingw32/SHA256SUMS.part
1c7bf2d489e8d950b22be16506465da70b9402a4e23c770e04a74fb69d05c18c guix-build-300918075144/output/x86_64-w64-mingw32/bitcoin-300918075144-win64-debug.zip
2a04f07ca0e46a18b68088093eee0bbfbdeb51ec72bb18c2282168d54f748fc4 guix-build-300918075144/output/x86_64-w64-mingw32/bitcoin-300918075144-win64-setup-unsigned.exe
e519347ff375e79d12acd8db87a9b216c5363d4b3cce09d7a8f79b85ba0deb85 guix-build-300918075144/output/x86_64-w64-mingw32/bitcoin-300918075144-win64-unsigned.tar.gz
e49571279f9e5897d5217e5d5fb319467ca213ba7b4e99904e262a1cd1e65df6 guix-build-300918075144/output/x86_64-w64-mingw32/bitcoin-300918075144-win64.zip
```
ACKs for top commit:
hebasto:
ACK 30091807514470f51bee6057905415ddc853ca53, tested on Ubuntu 22.04.
jarolrod:
tACK https://github.com/bitcoin/bitcoin/commit/30091807514470f51bee6057905415ddc853ca53
Tree-SHA512: f1a108ed81b043075250918549471e51c930c8bde617c6cdec0e450e0e2c7f679916a7097561a8f1dbdf00072844b5bbcfc7770dc2c2b265b9e82757fec8f498
|
|
49168df073d465450b1da4a506ac7ea24fbbb877 tidy: enable readability-redundant-string-init (fanquake)
4ddd746bf9714a209b2f82918a70c4fe81d895c9 refactor: remove unnecessary string initializations (fanquake)
Pull request description:
Remove unnecessary `std::string` = "" initializations. Enable `readability-redundant-string-init`.
See:
https://releases.llvm.org/14.0.0/tools/clang/tools/extra/docs/clang-tidy/checks/readability-redundant-string-init.html
ACKs for top commit:
shaavan:
ACK 49168df073d465450b1da4a506ac7ea24fbbb87
Tree-SHA512: 69e72a434908c9166d407551657b310361ae2ef0170f8289cb1c2b8e96a4632be718c0d55cb12af03a3c3d621d9583eced88e5e9d924abb0a8b1a9b36c903d66
|
|
(std::chrono)
fa74e726c414f5f7a1e63126a69463491f66e0ec refactor: Make FEELER_SLEEP_WINDOW type safe (std::chrono) (MacroFake)
fa3b3cb9b5d944d34b1d5ac3e102ac333482a475 Expose underlying clock in CThreadInterrupt (MacroFake)
Pull request description:
This gets rid of the `value*1000` manual conversion.
ACKs for top commit:
naumenkogs:
utACK fa74e726c414f5f7a1e63126a69463491f66e0ec
dergoegge:
Code review ACK fa74e726c414f5f7a1e63126a69463491f66e0ec
Tree-SHA512: 90409c05c25f0dd2f1c4dead78f707ebfd78b7d84ea4db9fcefd9c4958a1a3338ac657cd9e99eb8b47d52d4485fa3c947dce4ee1559fb56ae65878685e1ed9a3
|
|
fa2247a9f9754d90ea60f254f6c0ed881c55772b refactor: Make CTransaction constructor explicit (MacroFake)
Pull request description:
It involves calculating two hashes, so the performance impact should be
made explicit.
Also, add the module to iwyu.
ACKs for top commit:
aureleoules:
ACK fa2247a9f9754d90ea60f254f6c0ed881c55772b.
hebasto:
ACK fa2247a9f9754d90ea60f254f6c0ed881c55772b, I have reviewed the code and it looks OK, I agree it can be merged.
Tree-SHA512: e236c352a472c7edfd4f0319a5a16a59f627b0ab7eb8531b53c75d730a3fa3e990a939978dcd952cd73e647925fc79bfa6d9fd87624bbc3ef180f40f95acef19
|
|
|
|
|
|
fa57c449cf45a4f1df195970c711bba8f02f3cc6 fuzz: Remove no-op SetMempoolConstraints (MacroFake)
Pull request description:
Now that the mempool no longer uses the args manager (after commit e4e201dfd9a9dbd8e22cac688dbbde16234cd937), there is no point setting the mempool limits after it is constructed.
Fix that by setting them once right before the mempool is constructed.
ACKs for top commit:
dongcarl:
utACK fa57c449cf45a4f1df195970c711bba8f02f3cc6
glozow:
utACK fa57c449cf45a4f1df195970c711bba8f02f3cc6
Tree-SHA512: d236f9cdcee8c2076272b82c97f8a5942f1ecf119ab36edafd42088ef97554592348a61e1fbe504fd52b30301ef0177813042599ad12e8cb95b4a20586c85bb0
|
|
See:
https://releases.llvm.org/14.0.0/tools/clang/tools/extra/docs/clang-tidy/checks/readability-redundant-string-init.html
|
|
|
|
UniValue::VNULL
fa28d0f3c3fe528dae7fd6dc7725219b9bdf0e1b scripted-diff: Replace NullUniValue with UniValue::VNULL (MacroFake)
fa962103e8eb0b078b83943a21831be39e7716c9 fuzz: refactor: Replace NullUniValue with UniValue{} (MacroFake)
Pull request description:
This refactor is needed to disable the (potentially expensive for large json) UniValue copy constructors.
ACKs for top commit:
fanquake:
ACK fa28d0f3c3fe528dae7fd6dc7725219b9bdf0e1b
Tree-SHA512: 7d4204cce0a6fc4ecda96973de77d15b7e4c7caa3e0e890e1f5b9a4b9ace8b240b1f7565d6ab586e168a5fa1201b6c60a924868ef34d6abfbfd8ab7f0f99fbc7
|
|
|
|
Also, fix includes.
The getter will be used in a future commit.
|
|
|
|
850b0850ccacc4e4f7e82ce2291a111132eae756 fix comment spellings from the codespell lint (Greg Weber)
Pull request description:
test/lint/all-lint.py includes the codespell lint
ACKs for top commit:
aureleoules:
ACK 850b0850ccacc4e4f7e82ce2291a111132eae756.
Tree-SHA512: bf63690da2652886e705d6594903bab67ff0f35a0e5a5505f063827f5148ebce47681e541cbe0e52396baf1addb25d9fe50e5faa9176456f579a7cd2f1321c44
|
|
|
|
-BEGIN VERIFY SCRIPT-
ren() { sed -i "s:\<$1\>:$2:g" $(git grep -l "\<$1\>" ./src ./test); }
ren nLastTry m_last_try
ren nLastSuccess m_last_success
ren nLastGood m_last_good
ren nLastCountAttempt m_last_count_attempt
ren nSinceLastTry since_last_try
ren nTimePenalty time_penalty
ren nUpdateInterval update_interval
ren fCurrentlyOnline currently_online
-END VERIFY SCRIPT-
|
|
|
|
If we don't set this explicitly, then qt will still use it's default
windows ar, when building with LTO (when we want it to use gcc-ar).
So set `QMAKE_LIB` which is used for win32, and defaults to `ar -rc`.
This way we always get the correct ar.
Issue can be seen building in Guix with LTO. i.e:
```bash
x86_64-w64-mingw32-ar: .obj/release/hb-blob.o: plugin needed to handle lto object
```
|
|
test/lint/all-lint.py includes the codespell lint
|
|
4fa79837ad19fada3a3df3fb490617f6ca4606e0 psbt: Fix unsigned integer overflow (Aurèle Oulès)
Pull request description:
Fixes #25692.
This change prevents an unsigned integer overflow during the deserialization of a PSBT.
ACKs for top commit:
achow101:
ACK 4fa79837ad19fada3a3df3fb490617f6ca4606e0
Tree-SHA512: 0863d4d31ada1ba50632b6a66cb4c694c0a15680a90cf9370129cf3db15e3c10e65610b779db047d5a4cc7c920708b728948708e4023e916099c6bfe730f01f9
|
|
|
|
This is required for removing the UniValue copy constructor.
-BEGIN VERIFY SCRIPT-
sed -i 's/return NullUniValue/return UniValue::VNULL/g' $(git grep -l NullUniValue ':(exclude)src/univalue')
-END VERIFY SCRIPT-
|
|
This is needed for the scripted-diff to compile in the next commit
|
|
safety, consistent behavior
3a61fc56a0ad6ed58570350dcfd9ed2d10239b48 refactor: move CBlockIndex#ToString() from header to implementation (Jon Atack)
57865eb51288852c3ce99607eff76c61ae5f5365 CDiskBlockIndex: rename GetBlockHash() to ConstructBlockHash() (Jon Atack)
99e8ec8721a52cd08bdca31f6e926c9c1ce281fb CDiskBlockIndex: remove unused ToString() class member (Jon Atack)
14aeece462b149eaf0d28a37d55cc169df99b2cb CBlockIndex: ensure phashBlock is not nullptr before dereferencing (Jon Atack)
Pull request description:
Fix a few design issues, potential footguns and inconsistent behavior in the CBlockIndex and CDiskBlockIndex classes.
- Ensure phashBlock in `CBlockIndex#GetBlockHash()` is not nullptr before dereferencing and remove a now-redundant assert preceding a GetBlockHash() caller. This protects against UB here, and in case of failure (which would indicate a consensus bug), the debug log will print `bitcoind: chain.h:265: uint256 CBlockIndex::GetBlockHash() const: Assertion 'phashBlock != nullptr' failed. Aborted` instead of `Segmentation fault`.
- Remove the unused `CDiskBlockIndex#ToString()` class member, and mark the inherited `CBlockIndex#ToString()` public interface member as deleted to disallow calling it in the derived CDiskBlockIndex class.
- Rename the `CDiskBlockIndex GetBlockHash()` class member to `ConstructBlockHash()`, which also makes sense as they perform different operations to return a blockhash, and mark the inherited `CBlockIndex#GetBlockHash()` public interface member as deleted to disallow calling it in the derived CDiskBlockIndex class.
- Move `CBlockIndex#ToString()` from header to implementation, which also allows dropping `tinyformat.h` from the header file.
Rationale and discussion regarding the CDiskBlockIndex changes:
Here is a failing test on master that demonstrates the inconsistent behavior of the current design: calling the same inherited public interface functions on the same CDiskBlockIndex object should yield identical behavior, but does not.
```diff
diff --git a/src/test/validation_chainstatemanager_tests.cpp b/src/test/validation_chainstatemanager_tests.cpp
index 6dc522b421..dac3840f32 100644
--- a/src/test/validation_chainstatemanager_tests.cpp
+++ b/src/test/validation_chainstatemanager_tests.cpp
@@ -240,6 +240,15 @@ BOOST_FIXTURE_TEST_CASE(chainstatemanager_activate_snapshot, TestChain100Setup)
const CBlockIndex* tip = chainman.ActiveTip();
BOOST_CHECK_EQUAL(tip->nChainTx, au_data.nChainTx);
+ // CDiskBlockIndex "is a" CBlockIndex, as it publicly inherits from it.
+ // Test that calling the same inherited interface functions on the same
+ // object yields identical behavior.
+ CDiskBlockIndex index{tip};
+ CBlockIndex *pB = &index;
+ CDiskBlockIndex *pD = &index;
+ BOOST_CHECK_EQUAL(pB->GetBlockHash(), pD->GetBlockHash());
+ BOOST_CHECK_EQUAL(pB->ToString(), pD->ToString());
```
(build and run: `$ ./src/test/test_bitcoin -t validation_chainstatemanager_tests`)
The GetBlockHash() test assertion only passes on master because the different methods invoked by the current design happen to return the same result. If one of the two is changed, it fails like the ToString() assertion does.
Redefining inherited non-virtual functions is well-documented as incorrect design to avoid inconsistent behavior (see Scott Meyers, Effective C++, Item 36). Class usage is confusing when the behavior depends on the pointer definition instead of the object definition (static binding happening where dynamic binding was expected). This can lead to unsuspected or hard-to-track bugs.
Outside of critical hot spots, correctness usually comes before optimisation, but the current design dates back to main.cpp and it may possibly have been chosen to avoid the overhead of dynamic dispatch. This solution does the same: the class sizes are unchanged and no vptr or vtbl is added.
There are better designs for doing this that use composition instead of inheritance, or that separate the public interface from the private implementations. One example of the latter would be a non-virtual public interface that calls private virtual implementation methods, i.e. the Template pattern via the Non-Virtual Interface (NVI) idiom.
ACKs for top commit:
vasild:
ACK 3a61fc56a0ad6ed58570350dcfd9ed2d10239b48
Tree-SHA512: 9ff358ab0a6d010b8f053ad8303c6d4d061e62d9c3755a56b9c9f5eab855d02f02bee42acc77dfa0cbf4bb5cb775daa72d675e1560610a29bd285c46faa85ab7
|
|
integral type confusions
fa23c197509f692a815193acc1b50bad2fcbedfe univalue: Avoid narrowing and verbose int constructors (MacroFake)
fa3a9a1e8d9b6dffda772e97c279f3c0af6813f9 rpc: Select int-UniValue constructor for enum value in upgradewallet RPC (MacroFake)
Pull request description:
As UniValue provides several constructors for integral types, the
compiler is unable to select one if the passed type does not exactly
match. This is unintuitive for developers and forces them to write
verbose and brittle code. (Refer to `-Wnarrowing` compiler warning)
For example, there are many places where an unsigned int is cast to a
signed int. While the cast is safe in practice, it is still needlessly
verbose and confusing as the value can never be negative. In fact it
might even be unsafe if the unsigned value is large enough to map to a
negative signed one.
Fix this issue and other (minor) type issues.
ACKs for top commit:
aureleoules:
ACK fa23c197509f692a815193acc1b50bad2fcbedfe.
Tree-SHA512: 7d99b5b90c7d8eed2e3448167255a59e817dd6b8fcfc1b17c69ddefd0db33d1bf4344fbcd8b7f8685b58182c0f572ab9ffa99467afa666ac21843df7ea645033
|
|
7ab43eb8110af74e8f5be029118e19b39fe16125 test: remove unused if statements (Aurèle Oulès)
Pull request description:
This change removes two useless if statements in a functional test.
ACKs for top commit:
furszy:
Straightforward ACK 7ab43eb8,
Tree-SHA512: 56ff472f6f53f82d35dead7181dfefa9e7545dfb989e80fb750062a517f0f3c02882db6daa115f2d844f68fac9ce58170c340cf9c9989368419b02fa7f9790e3
|
|
It involves calculating two hashes, so the performance impact should be
made explicit.
Also, add the module to iwyu.
|
|
scripts & fix getblock help
56d92447d0e75f459511bf48e105efae0dffc6b6 RPC: Document "asm" and "hex" fields for scripts (Luke Dashjr)
2cdd4df1406fc3ea892ecc29cd78fcded2ae4e10 Bugfix: RPC/blockchain: Correct type of "value" in getblock docs; add missing "desc" (Jon Atack)
Pull request description:
Inspired by #24718
ACKs for top commit:
kristapsk:
cr utACK 56d92447d0e75f459511bf48e105efae0dffc6b6
Tree-SHA512: 2c6d0291397929f6a76b2d2998789187da123d7bfcace77375331cb81995eb0afd2600286c1e25cf68d16e35bd58706d2f672f63a3febe5e3a556a668f2175a2
|
|
|
|
|
|
missing "desc"
|
|
|
|
`QInputDialog`
9d9a098530df9986039f64b2810b6375b715f196 gui: Fix translator comment for Restore Wallet QInputDialog (w0xlt)
Pull request description:
Fix translator comment for Restore Wallet `QInputDialog`, as suggested in https://github.com/bitcoin-core/gui/pull/471#discussion_r917437779.
This also changes the window title name from `Restore Name` to `Restore Wallet` as it seems clearer.
ACKs for top commit:
shaavan:
reACK 9d9a098530df9986039f64b2810b6375b715f196
Tree-SHA512: 02aec661839215ab1183e4e92fa131671daa986339373a87c0a0e2c5e79a46f362a8846f4a5f6d630a99884a7949031982d13352336bd3f0573625826406dde8
|
|
This also changes the window title name
from `Restore Name` to `Restore Wallet`.
|
|
which allows dropping tinyformat.h from the header file.
|
|
and mark the inherited CBlockIndex#GetBlockHash public interface member
as deleted, to disallow calling it in the derived CDiskBlockIndex class.
Here is a failing test on master demonstrating the inconsistent behavior of the
current design: calling the same inherited public interface functions on the
same CDiskBlockIndex object should yield identical behavior.
```diff
diff --git a/src/test/validation_chainstatemanager_tests.cpp b/src/test/validation_chainstatemanager_tests.cpp
index 6dc522b421..dac3840f32 100644
--- a/src/test/validation_chainstatemanager_tests.cpp
+++ b/src/test/validation_chainstatemanager_tests.cpp
@@ -240,6 +240,15 @@ BOOST_FIXTURE_TEST_CASE(chainstatemanager_activate_snapshot, TestChain100Setup)
const CBlockIndex* tip = chainman.ActiveTip();
BOOST_CHECK_EQUAL(tip->nChainTx, au_data.nChainTx);
+ // CDiskBlockIndex "is a" CBlockIndex, as it publicly inherits from it.
+ // Test that calling the same inherited interface functions on the same
+ // object yields identical behavior.
+ CDiskBlockIndex index{tip};
+ CBlockIndex *pB = &index;
+ CDiskBlockIndex *pD = &index;
+ BOOST_CHECK_EQUAL(pB->GetBlockHash(), pD->GetBlockHash());
+ BOOST_CHECK_EQUAL(pB->ToString(), pD->ToString());
+
```
The GetBlockHash() test assertion only passes on master because the different
methods invoked by the current design happen to return the same result. If one
of the two is changed, it fails like the ToString() assertion does.
Redefining inherited non-virtual functions is well-documented as incorrect
design to avoid inconsistent behavior (see Scott Meyers, "Effective C++", Item
36). Class usage is confusing when the behavior depends on the pointer
definition instead of the object definition (static binding happening where
dynamic binding was expected). This can lead to unsuspected or hard-to-track
bugs.
Outside of critical hot spots, correctness usually comes before optimisation,
but the current design dates back to main.cpp and it may possibly have been
chosen to avoid the overhead of dynamic dispatch. This solution does the same:
the class sizes are unchanged and no vptr or vtbl is added.
There are better designs for doing this that use composition instead of
inheritance or that separate the public interface from the private
implementations. One example of the latter would be a non-virtual public
interface that calls private virtual implementation methods, i.e. the Template
pattern via the Non-Virtual Interface (NVI) idiom.
|
|
and mark its inherited CBlockIndex#ToString public interface member
as deleted, to disallow calling it in the derived CDiskBlockIndex class.
|
|
and remove a now-redundant assert preceding a GetBlockHash() caller.
This protects against UB here, and in case of failure (which would
indicate a consensus bug), the debug log will print
bitcoind: chain.h:265: uint256 CBlockIndex::GetBlockHash() const: Assertion `phashBlock != nullptr' failed.
Aborted
instead of
Segmentation fault
|
|
fad3c5826e6618fa1d58b9be48972f4ef03a2103 refactor: Fix iwyu on node/chainstate (MacroFake)
Pull request description:
Fix the CI warning on master: https://cirrus-ci.com/task/5398182703136768?logs=ci#L7020
ACKs for top commit:
fanquake:
ACK fad3c5826e6618fa1d58b9be48972f4ef03a2103 - could do chain.h
Tree-SHA512: 94f6ea0b3d9667863a4217b65bd1b9e07c65bdb566378faf0727bae5eb38d2d527ecae0c39efdda740b7ab7c8269141437ffbcb470cca7d559f09b8ee132d101
|
|
and use it where possible
faf9accd662974a69390213fee1b5c6237846b42 Use HashWriter where possible (MacroFake)
faa5425629d35708326b255570c51139aef0c8c4 Add HashWriter without ser-type and ser-version (MacroFake)
Pull request description:
This was done in the context of https://github.com/bitcoin/bitcoin/pull/25284 , but I think it also makes sense standalone.
The basic idea is that serialization type should not be initialized when it is not needed. Same for the serialization version.
So do this here for `HashWriter`. `CHashWriter` remains in places where it is not yet possible.
ACKs for top commit:
sipa:
utACK faf9accd662974a69390213fee1b5c6237846b42
Empact:
utACK https://github.com/bitcoin/bitcoin/pull/25331/commits/faf9accd662974a69390213fee1b5c6237846b42
Tree-SHA512: 544cc712436e49f6e608120bcd3ddc5ea72dd236554ce30fb6cfff34a92d7e67b6e6527336ad0f5b6365e2b2884f4c6508aef775953ccd9312f17752729703f2
|
|
a08c9723f50945edfc82ed9ae1d0106231c2babc contrib: remove unneeded valgrind suppressions (fanquake)
cc5b39e44ec2133df32e059bbe124e33c0a23401 ci: better pin to dwarf4 in valgrind job (fanquake)
Pull request description:
Prune some unneeded suppressions. Running either valgrind job locally these are no-longer needed.
Top commit has no ACKs.
Tree-SHA512: e191f121d545efb428fa1a0ca40f843593dd95e9895313d764364ed1fb409105a0ac264d1a67dc024ee241afa64a193a241d12be9abbe0549a24006fe845bd9c
|
|
|
|
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
|
|
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()).
|