This builds on all the work done by fjahr and pinheadmz to fully remove libevent from the codebase.
Closes #31194.
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--006a51241073e994b41acfe9ec718e94-->
For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/34411.
<!--021abf342d371248e50ceaed478a90ca-->
See the guideline for information on the review process.
If your review is incorrectly listed, please copy-paste <code><!--meta-tag:bot-skip--></code> into the comment that the bot should ignore.
<!--174a7506f384e20aa4161008e828411d-->
Reviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
<!--5faf32d7da4f0f540f40219e4f7537a3-->
nit: Pull request description should be replaced by the lyrics of Taylor Swift's "We Are Never Ever Getting Back Together" before merging.
@dergoegge want to run this in antithesis?
Concept ACK
To fix the CI failure, the first 2 commits need to be squashed. Otherwise, CI will be attempting to run the first commit in an environment without libevent, but that commit still requires libevent to exist.
concept ACK, did a guix build as well, nothing freaked out there.
60 | @@ -61,7 +61,7 @@ RPCMethod walletpassphrase() 61 | throw JSONRPCError(RPC_INVALID_PARAMETER, "Timeout cannot be negative."); 62 | } 63 | // Clamp timeout 64 | - constexpr int64_t MAX_SLEEP_TIME = 100000000; // larger values trigger a macos/libevent bug?
I traced MAX_SLEEP_TIME back to https://github.com/bitcoin/bitcoin/commit/662d19ff7217d0e6c7975ca311933f640955a53e where the bug is described as "macos+libevent" in the commit description, suggesting that this could be resolved with the removal of libevent. I looked into removing MAX_SLEEP_TIME entirely but found that it does prevent an overflow of nRelockTime and also could overflow when converting nSleepTime to nanoseconds for scheduleFromNow. So removing this here and handling these two instances would be a bigger change without any actual improvement, so I instead would say we leave this in and only improve the comment here.
// Clamp timeout to ~3 years to avoid overflow when computing the relock time
constexpr int64_t MAX_SLEEP_TIME = 100000000;
Thanks, taken.
Concept ACK
Seems like this should rebase again to fix CI and I would like to see the comment changed. Otherwise I am ready to full ACK this, I already reviewed all the changes, grepped for potentially missing bits etc. Everything looks to good to me.
EDIT: Assumed another previously seen issue with CI, ignore and see @achow101 's comment for the CI fix.
Also remove raii_event_tests.
ACK 146b3adfaa19070ff88b202df865bb9fca4336b6
ACK 146b3adfaa19070ff88b202df865bb9fca4336b6
Guix Build (x86_64):
ce02fb31abed83ea441f8fdfed1e431a21bcdf281fdff2704dba1694a05363f5 guix-build-146b3adfaa19/output/aarch64-linux-gnu/SHA256SUMS.part
9f1f76f5a8a9851f92c3120386c5d3afdc39335e123c1f95f5675759b900a68c guix-build-146b3adfaa19/output/aarch64-linux-gnu/bitcoin-146b3adfaa19-aarch64-linux-gnu-debug.tar.gz
5bc62c8cea1028395ef364d5486463f5aa0601b7c40391cc8417db84afb1bfb6 guix-build-146b3adfaa19/output/aarch64-linux-gnu/bitcoin-146b3adfaa19-aarch64-linux-gnu.tar.gz
8d611a51cc6cd21fa89bd03f022b54da7030406e5ddc2764568a799d1ab26918 guix-build-146b3adfaa19/output/arm-linux-gnueabihf/SHA256SUMS.part
b69e14b7abcb5ffe0c86d164dc4a5930e38a54584cb59c14f5585309c8e58c91 guix-build-146b3adfaa19/output/arm-linux-gnueabihf/bitcoin-146b3adfaa19-arm-linux-gnueabihf-debug.tar.gz
d505dcc62824c027c356929c3a0e5714f2e679b17b38861aea68e983b02ceb67 guix-build-146b3adfaa19/output/arm-linux-gnueabihf/bitcoin-146b3adfaa19-arm-linux-gnueabihf.tar.gz
cbee666d2ce896bf63beff720eb930db9274ab3b55e3feda44c3ddcbf540ccaf guix-build-146b3adfaa19/output/arm64-apple-darwin/SHA256SUMS.part
52a7b4fa3fff52b57aba191469051a841511909c11d39c17b83acff2be2c5b2b guix-build-146b3adfaa19/output/arm64-apple-darwin/bitcoin-146b3adfaa19-arm64-apple-darwin-codesigning.tar.gz
3b39461ed5d1a2370d536914aa70f4532469998d2d307d219ec86c1d85d1d1d2 guix-build-146b3adfaa19/output/arm64-apple-darwin/bitcoin-146b3adfaa19-arm64-apple-darwin-unsigned.tar.gz
f4a8f87e8f3eec5c3d29537d63aef12bf41c0d22de838a5655df024df0799415 guix-build-146b3adfaa19/output/arm64-apple-darwin/bitcoin-146b3adfaa19-arm64-apple-darwin-unsigned.zip
de76cbe9c7ef2ffcf21af6a1bfc09c65b57fc5fe656d21a41b59976ecbbf184b guix-build-146b3adfaa19/output/dist-archive/bitcoin-146b3adfaa19.tar.gz
0b5e0e29154d17d9d3fbd4d5f5221e54fb21eefe4cf80df379d02a0ca4cf2ebb guix-build-146b3adfaa19/output/powerpc64-linux-gnu/SHA256SUMS.part
8d33c8aa7e33aa8bd11654a99a55c69d57490cac412ddbb8665bae5b8e00f189 guix-build-146b3adfaa19/output/powerpc64-linux-gnu/bitcoin-146b3adfaa19-powerpc64-linux-gnu-debug.tar.gz
2f6c6398e1656f99fb8c6cef20babb8112f40c48274c04f4fbcd9d7b1a2008c9 guix-build-146b3adfaa19/output/powerpc64-linux-gnu/bitcoin-146b3adfaa19-powerpc64-linux-gnu.tar.gz
0d4748af74ad2e37983c9ccce5b433ae779fe2cba887cc538bcbca74f717e414 guix-build-146b3adfaa19/output/riscv64-linux-gnu/SHA256SUMS.part
88a34705399e8fcb930a5f5893ebecd4125cdefd8415534e545090df5fc75f22 guix-build-146b3adfaa19/output/riscv64-linux-gnu/bitcoin-146b3adfaa19-riscv64-linux-gnu-debug.tar.gz
64ec8a82f54c127c7c4e9fb20dd1d1a9ce9dc3f2347c1e6998b29508bf2a0089 guix-build-146b3adfaa19/output/riscv64-linux-gnu/bitcoin-146b3adfaa19-riscv64-linux-gnu.tar.gz
e916b3c3d2b169182f19a17490128e9f8f3910f804148fe1836d963f87894a71 guix-build-146b3adfaa19/output/x86_64-apple-darwin/SHA256SUMS.part
e77842aa81d7af02cb14600fa48758a2c508f09729fe061e02876d4c44543cee guix-build-146b3adfaa19/output/x86_64-apple-darwin/bitcoin-146b3adfaa19-x86_64-apple-darwin-codesigning.tar.gz
628466e2aba05e3fdc8284d07a821fde8acd3a07e79e17b9ae244952fa4e4ea5 guix-build-146b3adfaa19/output/x86_64-apple-darwin/bitcoin-146b3adfaa19-x86_64-apple-darwin-unsigned.tar.gz
00c75df635b705a1b69c10d0fefd560a32f6b4c665d70ffc92a6ae1febc3cf63 guix-build-146b3adfaa19/output/x86_64-apple-darwin/bitcoin-146b3adfaa19-x86_64-apple-darwin-unsigned.zip
6891b65df8317a382929ac2be54e26d7d59795330d0adc82eecf1534baa84d87 guix-build-146b3adfaa19/output/x86_64-linux-gnu/SHA256SUMS.part
b5b47847b7bb98df306379d1ffc4940673229c7c4fac41fa0cfcb32131576326 guix-build-146b3adfaa19/output/x86_64-linux-gnu/bitcoin-146b3adfaa19-x86_64-linux-gnu-debug.tar.gz
6f180c7a3d82ff95d99b035b95f612326058255f0d5fd93245fc833d3fdc4654 guix-build-146b3adfaa19/output/x86_64-linux-gnu/bitcoin-146b3adfaa19-x86_64-linux-gnu.tar.gz
c7445a216bb643857c09edf4ffd570b11cc8302065ea9bcfaeeaee7267f3ef97 guix-build-146b3adfaa19/output/x86_64-w64-mingw32/SHA256SUMS.part
fb2d1277638ed85241a4ce1a377d586c05c02830aaa78d90e65d09f904044437 guix-build-146b3adfaa19/output/x86_64-w64-mingw32/bitcoin-146b3adfaa19-win64-codesigning.tar.gz
c91021142d283ff64d0401c9d8bb405aa7d880895040749751adafcf6bc4bf8e guix-build-146b3adfaa19/output/x86_64-w64-mingw32/bitcoin-146b3adfaa19-win64-debug.zip
c6a4eb0e539e6b95dc3b328d9d8485b30cf997522356cf4ebda9c5200e97f34f guix-build-146b3adfaa19/output/x86_64-w64-mingw32/bitcoin-146b3adfaa19-win64-setup-unsigned.exe
c7ebfff63d50b28246093db5720d37302caaf61ec837f7b9196a5b4e3c2d609b guix-build-146b3adfaa19/output/x86_64-w64-mingw32/bitcoin-146b3adfaa19-win64-unsigned.zip
Concept ACK.
ACK 146b3adfaa19070ff88b202df865bb9fca4336b6
Reviewed changes, nothing besides libevent removed. grep is clean. built on macos/arm64 and debian/x86. guix build suceeded (will run again on top commit). no problems running daemon or Qt-gui, making RPC calls. Fuzzer builds and runs fine.
¡ADIÓS! 👋
<details><summary>Show Signature</summary>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
ACK 146b3adfaa19070ff88b202df865bb9fca4336b6
-----BEGIN PGP SIGNATURE-----
iQJPBAEBCAA5FiEE5hdzzW4BBA4vG9eM5+KYS2KJyToFAmo6lukbFIAAAAAABAAO
bWFudTIsMi41KzEuMTIsMCwzAAoJEOfimEtiick6by8P/3llqjyHeGFWHOfxn7Qa
fwlig9MuReRI2weNbGLd4Wi4roK2Fbvin0uprLaA9uS14nz2W4VhyfVMbcPPpVYM
LmI07UtQiGTaFVdGyJeqZMvxKPDZjmuJms2G050yUW7avM6Hgj4MSYoGtX7qAW6d
XLHVmaYP3fuo/Lz0rfbU/iox4fp+VTZaCVT4J0MuWb4cIfQy1u4KTgyz/FlIb+xM
/4oMvwAn/69R4hVigL2pe5QmPvbW3dbWUxRLZIbYoZhYfn9Yjodl4CqZbnLylWbN
oDpbld/PhetkEkjIfXA4P6hi/gxP6FC8YBONvcvK+XTzD6wn6dRWmsrHlLe1aCK/
ctrNxeIzSeLiDKwR9vQL/pIbsXODMTxEI8EiWLW3gImP9a/AqSdcn+oAaABxMcEW
YhUCn0jYJwcK0HH8wugQ7uJWnnNeF7+0rcAHReZvBBT3IfWj5uj9tQnbQMVMLmOS
UkslhqIaNjW7cpNIE4IvKbViXnnkTgnLvWuoN3a3MpdDTdD5VVrrozP/VumI9W+p
4heL3jEXqUuei9uMHeksksxx16aYMb/qLUyMoofJQJFiEfLO6dguPAilN2BF/kGO
rxBAdcYTHnWHRAO3jQsdQ29Riq/0L0Ihnq4IrM/ePcmXvsZxgRpbmMWL/6YkGtWA
uFLtK+CC3gzO1QvsYRyzJBXE
=D6jh
-----END PGP SIGNATURE-----
pinheadmz's public key is on openpgp.org
</details>
ACK 146b3adfaa19070ff88b202df865bb9fca4336b6
My Guix build:
aarch64
ce02fb31abed83ea441f8fdfed1e431a21bcdf281fdff2704dba1694a05363f5 guix-build-146b3adfaa19/output/aarch64-linux-gnu/SHA256SUMS.part
9f1f76f5a8a9851f92c3120386c5d3afdc39335e123c1f95f5675759b900a68c guix-build-146b3adfaa19/output/aarch64-linux-gnu/bitcoin-146b3adfaa19-aarch64-linux-gnu-debug.tar.gz
5bc62c8cea1028395ef364d5486463f5aa0601b7c40391cc8417db84afb1bfb6 guix-build-146b3adfaa19/output/aarch64-linux-gnu/bitcoin-146b3adfaa19-aarch64-linux-gnu.tar.gz
8d611a51cc6cd21fa89bd03f022b54da7030406e5ddc2764568a799d1ab26918 guix-build-146b3adfaa19/output/arm-linux-gnueabihf/SHA256SUMS.part
b69e14b7abcb5ffe0c86d164dc4a5930e38a54584cb59c14f5585309c8e58c91 guix-build-146b3adfaa19/output/arm-linux-gnueabihf/bitcoin-146b3adfaa19-arm-linux-gnueabihf-debug.tar.gz
d505dcc62824c027c356929c3a0e5714f2e679b17b38861aea68e983b02ceb67 guix-build-146b3adfaa19/output/arm-linux-gnueabihf/bitcoin-146b3adfaa19-arm-linux-gnueabihf.tar.gz
cbee666d2ce896bf63beff720eb930db9274ab3b55e3feda44c3ddcbf540ccaf guix-build-146b3adfaa19/output/arm64-apple-darwin/SHA256SUMS.part
52a7b4fa3fff52b57aba191469051a841511909c11d39c17b83acff2be2c5b2b guix-build-146b3adfaa19/output/arm64-apple-darwin/bitcoin-146b3adfaa19-arm64-apple-darwin-codesigning.tar.gz
3b39461ed5d1a2370d536914aa70f4532469998d2d307d219ec86c1d85d1d1d2 guix-build-146b3adfaa19/output/arm64-apple-darwin/bitcoin-146b3adfaa19-arm64-apple-darwin-unsigned.tar.gz
f4a8f87e8f3eec5c3d29537d63aef12bf41c0d22de838a5655df024df0799415 guix-build-146b3adfaa19/output/arm64-apple-darwin/bitcoin-146b3adfaa19-arm64-apple-darwin-unsigned.zip
de76cbe9c7ef2ffcf21af6a1bfc09c65b57fc5fe656d21a41b59976ecbbf184b guix-build-146b3adfaa19/output/dist-archive/bitcoin-146b3adfaa19.tar.gz
0b5e0e29154d17d9d3fbd4d5f5221e54fb21eefe4cf80df379d02a0ca4cf2ebb guix-build-146b3adfaa19/output/powerpc64-linux-gnu/SHA256SUMS.part
8d33c8aa7e33aa8bd11654a99a55c69d57490cac412ddbb8665bae5b8e00f189 guix-build-146b3adfaa19/output/powerpc64-linux-gnu/bitcoin-146b3adfaa19-powerpc64-linux-gnu-debug.tar.gz
2f6c6398e1656f99fb8c6cef20babb8112f40c48274c04f4fbcd9d7b1a2008c9 guix-build-146b3adfaa19/output/powerpc64-linux-gnu/bitcoin-146b3adfaa19-powerpc64-linux-gnu.tar.gz
0d4748af74ad2e37983c9ccce5b433ae779fe2cba887cc538bcbca74f717e414 guix-build-146b3adfaa19/output/riscv64-linux-gnu/SHA256SUMS.part
88a34705399e8fcb930a5f5893ebecd4125cdefd8415534e545090df5fc75f22 guix-build-146b3adfaa19/output/riscv64-linux-gnu/bitcoin-146b3adfaa19-riscv64-linux-gnu-debug.tar.gz
64ec8a82f54c127c7c4e9fb20dd1d1a9ce9dc3f2347c1e6998b29508bf2a0089 guix-build-146b3adfaa19/output/riscv64-linux-gnu/bitcoin-146b3adfaa19-riscv64-linux-gnu.tar.gz
e916b3c3d2b169182f19a17490128e9f8f3910f804148fe1836d963f87894a71 guix-build-146b3adfaa19/output/x86_64-apple-darwin/SHA256SUMS.part
e77842aa81d7af02cb14600fa48758a2c508f09729fe061e02876d4c44543cee guix-build-146b3adfaa19/output/x86_64-apple-darwin/bitcoin-146b3adfaa19-x86_64-apple-darwin-codesigning.tar.gz
628466e2aba05e3fdc8284d07a821fde8acd3a07e79e17b9ae244952fa4e4ea5 guix-build-146b3adfaa19/output/x86_64-apple-darwin/bitcoin-146b3adfaa19-x86_64-apple-darwin-unsigned.tar.gz
00c75df635b705a1b69c10d0fefd560a32f6b4c665d70ffc92a6ae1febc3cf63 guix-build-146b3adfaa19/output/x86_64-apple-darwin/bitcoin-146b3adfaa19-x86_64-apple-darwin-unsigned.zip
6891b65df8317a382929ac2be54e26d7d59795330d0adc82eecf1534baa84d87 guix-build-146b3adfaa19/output/x86_64-linux-gnu/SHA256SUMS.part
b5b47847b7bb98df306379d1ffc4940673229c7c4fac41fa0cfcb32131576326 guix-build-146b3adfaa19/output/x86_64-linux-gnu/bitcoin-146b3adfaa19-x86_64-linux-gnu-debug.tar.gz
6f180c7a3d82ff95d99b035b95f612326058255f0d5fd93245fc833d3fdc4654 guix-build-146b3adfaa19/output/x86_64-linux-gnu/bitcoin-146b3adfaa19-x86_64-linux-gnu.tar.gz
c7445a216bb643857c09edf4ffd570b11cc8302065ea9bcfaeeaee7267f3ef97 guix-build-146b3adfaa19/output/x86_64-w64-mingw32/SHA256SUMS.part
fb2d1277638ed85241a4ce1a377d586c05c02830aaa78d90e65d09f904044437 guix-build-146b3adfaa19/output/x86_64-w64-mingw32/bitcoin-146b3adfaa19-win64-codesigning.tar.gz
c91021142d283ff64d0401c9d8bb405aa7d880895040749751adafcf6bc4bf8e guix-build-146b3adfaa19/output/x86_64-w64-mingw32/bitcoin-146b3adfaa19-win64-debug.zip
c6a4eb0e539e6b95dc3b328d9d8485b30cf997522356cf4ebda9c5200e97f34f guix-build-146b3adfaa19/output/x86_64-w64-mingw32/bitcoin-146b3adfaa19-win64-setup-unsigned.exe
c7ebfff63d50b28246093db5720d37302caaf61ec837f7b9196a5b4e3c2d609b guix-build-146b3adfaa19/output/x86_64-w64-mingw32/bitcoin-146b3adfaa19-win64-unsigned.zip
post-merge guix build hashes:
9f1f76f5a8a9851f92c3120386c5d3afdc39335e123c1f95f5675759b900a68c bitcoin-146b3adfaa19-aarch64-linux-gnu-debug.tar.gz
5bc62c8cea1028395ef364d5486463f5aa0601b7c40391cc8417db84afb1bfb6 bitcoin-146b3adfaa19-aarch64-linux-gnu.tar.gz
b69e14b7abcb5ffe0c86d164dc4a5930e38a54584cb59c14f5585309c8e58c91 bitcoin-146b3adfaa19-arm-linux-gnueabihf-debug.tar.gz
d505dcc62824c027c356929c3a0e5714f2e679b17b38861aea68e983b02ceb67 bitcoin-146b3adfaa19-arm-linux-gnueabihf.tar.gz
52a7b4fa3fff52b57aba191469051a841511909c11d39c17b83acff2be2c5b2b bitcoin-146b3adfaa19-arm64-apple-darwin-codesigning.tar.gz
3b39461ed5d1a2370d536914aa70f4532469998d2d307d219ec86c1d85d1d1d2 bitcoin-146b3adfaa19-arm64-apple-darwin-unsigned.tar.gz
f4a8f87e8f3eec5c3d29537d63aef12bf41c0d22de838a5655df024df0799415 bitcoin-146b3adfaa19-arm64-apple-darwin-unsigned.zip
de76cbe9c7ef2ffcf21af6a1bfc09c65b57fc5fe656d21a41b59976ecbbf184b bitcoin-146b3adfaa19.tar.gz
8d33c8aa7e33aa8bd11654a99a55c69d57490cac412ddbb8665bae5b8e00f189 bitcoin-146b3adfaa19-powerpc64-linux-gnu-debug.tar.gz
2f6c6398e1656f99fb8c6cef20babb8112f40c48274c04f4fbcd9d7b1a2008c9 bitcoin-146b3adfaa19-powerpc64-linux-gnu.tar.gz
88a34705399e8fcb930a5f5893ebecd4125cdefd8415534e545090df5fc75f22 bitcoin-146b3adfaa19-riscv64-linux-gnu-debug.tar.gz
64ec8a82f54c127c7c4e9fb20dd1d1a9ce9dc3f2347c1e6998b29508bf2a0089 bitcoin-146b3adfaa19-riscv64-linux-gnu.tar.gz
e77842aa81d7af02cb14600fa48758a2c508f09729fe061e02876d4c44543cee bitcoin-146b3adfaa19-x86_64-apple-darwin-codesigning.tar.gz
628466e2aba05e3fdc8284d07a821fde8acd3a07e79e17b9ae244952fa4e4ea5 bitcoin-146b3adfaa19-x86_64-apple-darwin-unsigned.tar.gz
00c75df635b705a1b69c10d0fefd560a32f6b4c665d70ffc92a6ae1febc3cf63 bitcoin-146b3adfaa19-x86_64-apple-darwin-unsigned.zip
b5b47847b7bb98df306379d1ffc4940673229c7c4fac41fa0cfcb32131576326 bitcoin-146b3adfaa19-x86_64-linux-gnu-debug.tar.gz
6f180c7a3d82ff95d99b035b95f612326058255f0d5fd93245fc833d3fdc4654 bitcoin-146b3adfaa19-x86_64-linux-gnu.tar.gz
fb2d1277638ed85241a4ce1a377d586c05c02830aaa78d90e65d09f904044437 bitcoin-146b3adfaa19-win64-codesigning.tar.gz
c91021142d283ff64d0401c9d8bb405aa7d880895040749751adafcf6bc4bf8e bitcoin-146b3adfaa19-win64-debug.zip
c6a4eb0e539e6b95dc3b328d9d8485b30cf997522356cf4ebda9c5200e97f34f bitcoin-146b3adfaa19-win64-setup-unsigned.exe
c7ebfff63d50b28246093db5720d37302caaf61ec837f7b9196a5b4e3c2d609b bitcoin-146b3adfaa19-win64-unsigned.zip
146b3adfaa19070ff88b202df865bb9fca4336b6
pkgconf/pkg-configis no longer a strict requirement. However, it may still be needed to find theZeroMQpackage on systems where it is shipped without CMake config files. It is also optional for finding theQRencodepackage.
This seems to remain unresolved though.
This seems to remain unresolved though.
Your comment isn't that clear, because it claims that it isn't necessarily needed, but still is needed, depending on the context. Is your suggestion to remove the pkgconf reference in the NetBSD/FreeBSD build docs? I've had a quick scan now, and it looks like most places in the codebase that pkgconf/pkg-config are referenced/used they are still needed. If there are more instances that can be cleaned up, we can do that.