Age | Commit message (Collapse) | Author |
|
90b405516f7f3be522ced3e0c4d23b3892df0661 Update libmultiprocess library (Ryan Ofsky)
Pull request description:
Add recent changes and fixes for shutdown bugs.
https://github.com/chaincodelabs/libmultiprocess/pull/111: doc: Add internal design section
https://github.com/chaincodelabs/libmultiprocess/pull/113: Add missing include to util.h
https://github.com/chaincodelabs/libmultiprocess/pull/116: shutdown bugfix: destroy RPC system before running cleanup callbacks
https://github.com/chaincodelabs/libmultiprocess/pull/118: shutdown bugfix: Prevent segfault in server if connection is broken during long function call
https://github.com/chaincodelabs/libmultiprocess/pull/119: cmake: avoid libatomic not found error on debian
ACKs for top commit:
fanquake:
ACK 90b405516f7f3be522ced3e0c4d23b3892df0661
TheCharlatan:
ACK 90b405516f7f3be522ced3e0c4d23b3892df0661
Tree-SHA512: 2c256667f0c16e00bb5a81b2c6d3db103fae211844e32b111bbed673ab2612ad1478e6b3ecd3a867a4e425cfa6e778b67388343626597a8fac800a15cea5e53a
|
|
Add recent changes and fixes for shutdown bugs.
https://github.com/chaincodelabs/libmultiprocess/pull/111: doc: Add internal design section
https://github.com/chaincodelabs/libmultiprocess/pull/113: Add missing include to util.h
https://github.com/chaincodelabs/libmultiprocess/pull/116: shutdown bugfix: destroy RPC system before running cleanup callbacks
https://github.com/chaincodelabs/libmultiprocess/pull/118: shutdown bugfix: Prevent segfault in server if connection is broken during long function call
https://github.com/chaincodelabs/libmultiprocess/pull/119: cmake: avoid libatomic not found error on debian
|
|
This duplicates what is in depends, and is outdated.
|
|
Running Bitcoin Core on unsupported OSes may expose users to security
issues.
macOS Monterey 12 received its final security update (12.7.6) on July
2024. Apple classifies the hardware that can run macOS 12 at most as
"obsolete worldwide".
|
|
to prevent library conflict
ae56b3230b287eef5a5657d3089abebffde51484 depends: For mingw cross compile use -gcc-posix to prevent library conflict (laanwj)
Pull request description:
CMake parses some paths from the spec of the C compiler, assuming it will be the linker, resulting in the link to end up with `-L/usr/lib/gcc/x86_64-w64-mingw32/12-win32` on debian bookworm if both `-win32` and `-posix` variants are installed, and `-win32` is the default alternative.
This results in the wrong C++ library being linked, missing std::threads::hardware_concurrency and other threading functions.
To fix this, use the `-posix` variant of gcc as well when available. This fixes a regression compared to autotools, where this scenario worked.
ACKs for top commit:
theuni:
utACK ae56b3230b287eef5a5657d3089abebffde51484.
hebasto:
ACK ae56b3230b287eef5a5657d3089abebffde51484. I've tested on both Debian Bookworm and Ubuntu 24.04 with the `g++-mingw-w64-x86-64` package installed. The resulting CMake internal configuration appears more accurate. For instance, on Ubuntu 24.04, for the `bitcoin-tx` target, the diff in `build/src/CMakeFiles/bitcoin-tx.dir/linkLibs.rsp` looks as follows:
Tree-SHA512: f36fae50f91a29f565940494af9e46f47e219b99e329c0714ace47c516ac524602d5b6538a07488157bc2a71be7bac72176097fff3178129c5084bf6cc823167
|
|
CMake parses some paths from the spec of the C compiler, assuming it
will be the linker, resulting in the link to end up with
`-L/usr/lib/gcc/x86_64-w64-mingw32/12-win32` on debian bookworm if both
-win32 and -posix variants are installed, and -win32 is the default
alternative.
This results in the wrong C++ library being linked, missing
std::threads::hardware_concurrency and other threading functions.
To fix this, use the -posix variant of gcc as well when available. This
fixes a regression compared to autotools, where this scenario worked.
|
|
|
|
implementation
5c7cacf649a6b474b876a7d219c7dc683a25e33d ci: Remove natpmp build option and libnatpmp dependency (laanwj)
7e7ec984da50f45491b994aaab180e7735ad1d8f doc: Remove mention of natpmp build options (laanwj)
061c3e32a26c6c04bf734d62627403758d7e51d9 depends: Drop natpmp and associated option from depends (laanwj)
20a18bf6aa38e87f72e2645482d00d0c77a344f5 build: Drop libnatpmp from build system (laanwj)
7b04709862f48e9020c7bef79cb31dd794cf91d0 qt: Changes for built-in PCP+NAT-PMP (laanwj)
52f8ef66c61b82457a161f3b90cc87f57d1dda80 net: Replace libnatpmp with built-in NATPMP+PCP implementation in mapport (laanwj)
97c97177cdb2f596aa7d4a65c4bde87de50a96f2 net: Add PCP and NATPMP implementation (laanwj)
d72df63d16941576b3523cfeaa49985cf3cd4d42 net: Use GetLocalAddresses in Discover (laanwj)
e02030432b77abbf27bb4f67d879d3ad6d6366e6 net: Add netif utility (laanwj)
754e4254388ec8ac1be6cf807bf300cd43fd3da5 crypto: Add missing WriteBE16 function (laanwj)
Pull request description:
Continues #30005. Closes #17012..
This PR adds PCP (Port Control Protocol) from [RFC6887](https://datatracker.ietf.org/doc/html/rfc6887). This adds, in addition to the existing IPv4 port mapping (which now uses PCP, with fallback to NAT-PMP), support for IPv6 pinholing-that is, opening a port on the firewall to make it reachable.
PCP, like NAT-PMP is a simple UDP-based protocol, and the implementation is self-contained, so this gets rid of lthe libnatpnp dependency without adding a new one. It should otherwise be a drop-in replacement. NAT-PMP fallback is implemented so this will not make router support worse.
For now it is disabled by default, though in the future (not in this PR) we could consider enable it by default to increase the number of connectable nodes without adding significant attack surface.
To test:
```bash
bitcoind -regtest -natpmp=1 -debug=net
```
(most of the changes in this PR are, ironically, removing the libnatpmp dependency and associated build system and build docs)
## TODO
- [x] Default gateway discovery on Linux / FreeBSD
- [x] Default gateway discovery on Windows
- [x] Default gateway discovery on MacOS
- [x] Either solve FreeBSD compile issue (probably upstream issue) or remove FreeBSD support
## Things to consider for follow-up PRs
- https://github.com/bitcoin/bitcoin/pull/30043#discussion_r1658764974 avoid unreachable nets (not given to -onlynet=)
- https://github.com/bitcoin/bitcoin/pull/30043#discussion_r1658949236 could announce an addr:port where we do not listen (no -bind)
- https://github.com/bitcoin/bitcoin/pull/30043#discussion_r1684368824 could announce the wrong port because it uses GetListenPort()
- https://github.com/bitcoin/bitcoin/pull/30043#discussion_r1679709347 if we requested one port but another was assigned, then which one to use in the renewal?
- https://github.com/bitcoin/bitcoin/pull/30043#discussion_r1772017020 Use `GetAdapterAddresses` to discover local addresses for Windows
ACKs for top commit:
Sjors:
ACK 5c7cacf649a6b474b876a7d219c7dc683a25e33d
achow101:
ACK 5c7cacf649a6b474b876a7d219c7dc683a25e33d
vasild:
ACK 5c7cacf649a6b474b876a7d219c7dc683a25e33d
Tree-SHA512: e35b69e56d5f5449a3d48a799f9b7b65107c65eeb3e245c2c1e9d42221e469ca5ead90afae423160601cd664dd553a51c859e04f4492f335b064aae3bf23e3bc
|
|
|
|
Guix environment
06b4c339e89e593d951a90cd2d1bce944acf3bf7 depends: Fix reproducibility when building with `MULTIPROCESS=1` (Hennadii Stepanov)
d8e3afc3352a2742e9da1f777e026d1f051042ac depends: Fix build with `MULTIPROCESS=1` in Guix environment (Hennadii Stepanov)
Pull request description:
In the Guix environment, `${BASEPREFIX}/${HOST}/native/bin` is added to the `PATH` environment variable:https://github.com/bitcoin/bitcoin/blob/33adc7521cc8bb24b941d959022b084002ba7c60/contrib/guix/libexec/build.sh#L233-L234
This causes CMake to search for package configurations in the `native` subdirectory first.
Explicitly specifying the top-priority search prefixes for the `Libmultiprocess` and `LibmultiprocessNative` packages resolves https://github.com/bitcoin/bitcoin/issues/30931.
Can be tested on this [branch](https://github.com/hebasto/bitcoin/commits/240921-guix-mp.DEMO/) with an additional [commit](https://github.com/hebasto/bitcoin/commit/d8ec933456bc7e63306b9cb8aa51ad93e215dc51):
```
$ uname -m
x86_64
$ env MULTIPROCESS=1 HOSTS=x86_64-linux-gnu ./contrib/guix/guix-build
$ find guix-build-$(git rev-parse --short=12 HEAD)/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum
70d482a09099931345888a918df5ccc78a0c742b1d18bb8a5d442af9b2717867 guix-build-d8ec933456bc/output/dist-archive/bitcoin-d8ec933456bc.tar.gz
ea9465517c0e1cc559a6a353f404b2bf47447332c918b69410dc51b6c4fbdedc guix-build-d8ec933456bc/output/x86_64-linux-gnu/SHA256SUMS.part
f83a296139d0757abc47d053b8fddebc6d2ccc36dabea9b2d52883d23ba923bb guix-build-d8ec933456bc/output/x86_64-linux-gnu/bitcoin-d8ec933456bc-x86_64-linux-gnu-debug.tar.gz
81aed48bece8d9bf5327530763c17d73dd66d5a3c666cbaf9381c03d4a660845 guix-build-d8ec933456bc/output/x86_64-linux-gnu/bitcoin-d8ec933456bc-x86_64-linux-gnu.tar.gz
```
```
$ uname -m
aarch64
$ env MULTIPROCESS=1 HOSTS=x86_64-linux-gnu ./contrib/guix/guix-build
$ find guix-build-$(git rev-parse --short=12 HEAD)/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum
70d482a09099931345888a918df5ccc78a0c742b1d18bb8a5d442af9b2717867 guix-build-d8ec933456bc/output/dist-archive/bitcoin-d8ec933456bc.tar.gz
ea9465517c0e1cc559a6a353f404b2bf47447332c918b69410dc51b6c4fbdedc guix-build-d8ec933456bc/output/x86_64-linux-gnu/SHA256SUMS.part
f83a296139d0757abc47d053b8fddebc6d2ccc36dabea9b2d52883d23ba923bb guix-build-d8ec933456bc/output/x86_64-linux-gnu/bitcoin-d8ec933456bc-x86_64-linux-gnu-debug.tar.gz
81aed48bece8d9bf5327530763c17d73dd66d5a3c666cbaf9381c03d4a660845 guix-build-d8ec933456bc/output/x86_64-linux-gnu/bitcoin-d8ec933456bc-x86_64-linux-gnu.tar.gz
```
ACKs for top commit:
ryanofsky:
Code review ACK 06b4c339e89e593d951a90cd2d1bce944acf3bf7
fanquake:
ACK 06b4c339e89e593d951a90cd2d1bce944acf3bf7
Tree-SHA512: b219ff29723bf571784af11b8d41fdc0f3fe7e21a87493909f9fcc695e37f9dbf2f6eb0fda172a1e0060dec4d2aeaa7017b1078c0ea0040cabfbbe3e8a352c6b
|
|
CMake is no longer required solely for `libmultiprocess`.
|
|
This update brings in the following changes:
https://github.com/chaincodelabs/libmultiprocess/pull/107 example: Remove manual client adding
https://github.com/chaincodelabs/libmultiprocess/pull/108 doc: Add comments for socket descriptor handling when forking
https://github.com/chaincodelabs/libmultiprocess/pull/109 example: Add missing thread.join() call so example can exit cleanly
https://github.com/chaincodelabs/libmultiprocess/pull/110 cmake: add target_capnp_sources headers target
|
|
|
|
In the Guix environment, `${BASEPREFIX}/${HOST}/native/bin` is added to
the `PATH` environment variable, causing CMake to search for package
configurations in the `native` subdirectory first.
Explicitly specifying the top-priority search prefixes for the
`Libmultiprocess` and `LibmultiprocessNative` packages resolves the
issue.
|
|
|
|
ThreadContext bugfix
The CustomMessage functions allow simplifying custom IPC type code, and the
bugfix is needed to prevent in a crash in a new test which creates and destroys
connections in a loop. Upstream PRs are:
https://github.com/chaincodelabs/libmultiprocess/pull/105 types: Add Custom{Build,Read,Pass}Message hooks
https://github.com/chaincodelabs/libmultiprocess/pull/106 Bugfix: Clean up ThreadContext pointers when Connection is destroyed
|
|
Currently, builds of libevent in depends, using CMake, fail on some
systems, like Alpine, with the following:
```bash
/bitcoin/depends/work/build/aarch64-unknown-linux-musl/libevent/2.1.12-stable-1516ed47ea8/evmap.c: In function 'evmap_signal_add_':
/bitcoin/depends/work/build/aarch64-unknown-linux-musl/libevent/2.1.12-stable-1516ed47ea8/evmap.c:456:31: error: 'NSIG' undeclared (first use in this function)
456 | if (sig < 0 || sig >= NSIG)
```
From what I can tell the `_GNU_SOURCE` "detection" in libevents CMake build
system, never? really worked, and it's not clear what a nice fix is.
For now, always use `_GNU_SOURCE` when building libevent in depends.
|
|
|
|
See https://github.com/zeromq/libzmq/pull/4706.
|
|
Co-authored-by: Lőrinc <pap.lorinc@gmail.com>
Co-authored-by: pablomartin4btc <pablomartin4btc@gmail.com>
|
|
To configure CMake for cross-compiling, use
`--toolchain depends/${HOST}/toolchain.cmake` command-line option.
|
|
|
|
|
|
|
|
This reverts commit 1155978d8f3fcc1cebf357302b933b834f9c9465.
|
|
If any of {C,CXX,CPP,LD}FLAGS is specified it should be assigned to
a non-type-specific variable.
|
|
This reverts commit 21b8a14d37c19ce292d5529597e0d52338db48a9.
|
|
Fixes #30587.
|
|
|
|
Now that we use the native compiler, and have fixed Qt, and these vars
are unset it Guix, we can remove the unsetting from our compiler command
here.
Fixes #21552.
|
|
|
|
|
|
|
|
|
|
ec0e805d11d6a73c542032fc49a58a1d05b62d24 depends: Bump `libmultiprocess` for CMake fixes (Hennadii Stepanov)
Pull request description:
This PR amends https://github.com/bitcoin/bitcoin/pull/30490 and bumps the upstream branch, which now includes a required CMake [fix](https://github.com/chaincodelabs/libmultiprocess/pull/103).
Addresses https://github.com/bitcoin/bitcoin/pull/30490#issuecomment-2241153244.
The CI logs are available in https://github.com/bitcoin/bitcoin/pull/29790 where the recent [push](https://github.com/hebasto/bitcoin/tree/pr29790-0723.2.mp) uses this PR implementation.
ACKs for top commit:
ryanofsky:
Code review ACK ec0e805d11d6a73c542032fc49a58a1d05b62d24
theuni:
utACK ec0e805d11d6a73c542032fc49a58a1d05b62d24.
Tree-SHA512: e300a27bcab80a63a518719e9af8e10a938294fc07289cadbf4a7744627c10b0e9541a36971d08b65152f3f7d0eb434e427274d9c9d9f0bdd216afd914027a0f
|
|
|
|
Add a patch to set the minimum CMake to 3.16.
|
|
8c935e625ea75d180144f0526d6a0d5fd58c1f29 depends: Fix CMake-generated `libevent*.pc` files (Hennadii Stepanov)
Pull request description:
Broken out of #30454. This is a backport of the merged upstream PR: https://github.com/libevent/libevent/pull/1622.
Note that after #29835 we might end up dropping pkg-config and using the installed CMake files directly, but that depends on whether or not enough distros actually ship those files.
Either way, having fixed up .pc files won't hurt.
ACKs for top commit:
hebasto:
ACK 8c935e625ea75d180144f0526d6a0d5fd58c1f29.
fanquake:
ACK 8c935e625ea75d180144f0526d6a0d5fd58c1f29
Tree-SHA512: 259c2ad78fb9e90370a7205dc71c40acda1a872f6509435133bc1c4c2c3de57366e80679aa083e13ed85e7966883dc470c0147ee171a2ed0171a18cd5ffc99b3
|
|
0388ad0d65b6c9ee802ca641eb01d69fcdd5605d depends: switch zmq to CMake (Cory Fields)
fefb3bbe5b538f8faa59de191914ad0c22c3ade6 depends: add zeromq no librt patch (fanquake)
a522ef15424110f76172b3c0603fa08f7291c9fc depends: add zeromq cmake minimum patch (fanquake)
cbbc229adf4c12ad4bd7edde71425b8ef217edfc depends: add zeromq windows usage patch (fanquake)
2de68d6d388b9a33c57234d3161f6ffc4c2a0246 depends: add zeromq builtin sha1 patch (fanquake)
0c8605253ae887dac316264cb969b752027d277a depends: add zeromq mktemp macos patch (fanquake)
Pull request description:
This picks up a change, which is a switch to building zeromq with CMake. It includes a number of patches, some which have already been upstreamed (see each patch for details).
ACKs for top commit:
hebasto:
ACK 0388ad0d65b6c9ee802ca641eb01d69fcdd5605d.
Tree-SHA512: 5567e432b4e4e0446c41d502bd61810a80b329dea2399b5d9d9f6e79acc450d1c6ba861c8238ba895de98338cfc5dc44ad2bf86ee8c222ecb3fbf47d6eb60da4
|
|
|
|
See https://github.com/libevent/libevent/pull/1622.
|
|
The CMake WIN32_WINNT autodetection is broken, and must be set
manually. We may want to set is explicitly in any case, but the
brokenness should also be fixed upstream.
Also patch out depends paths, that would cause non-determinism.
Co-authored-by: fanquake <fanquake@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
f170fe04ca03fe4021cbff7c5450ce3cc7fda17f depends: update doc in Qt pwd patch (fanquake)
Pull request description:
Now that upstream has gotten around to fixing this. We don't need any more of the patch, and it likely wont apply to our version of Qt in any case. See: https://github.com/qt/qtbase/commit/3388de698bfb9bbc456c08f03e83bf3e749df35c.
ACKs for top commit:
theuni:
ACK f170fe04ca03fe4021cbff7c5450ce3cc7fda17f
Tree-SHA512: f6db8ccad591b1bf144ce71f873f42a115d394c432a95b6b855e3e32751e6331145e0d9676657599b25fd369af8c72c1bd34e192a7a1062c15f152421422a9ed
|
|
Now that upstream has gotten around to fixing this. We don't need any
more of the patch, and it likely wont apply to our version of Qt in any
case. See:
https://github.com/qt/qtbase/commit/3388de698bfb9bbc456c08f03e83bf3e749df35c.
|