Commit graph

2304 commits

Author SHA1 Message Date
Fabian Jahr
20a1c77aa7
contrib: Remove test_utxo_snapshots.sh 2024-09-01 20:56:39 +02:00
Hennadii Stepanov
0004dcc7b1
guix: Drop unused autotools packages 2024-08-30 14:44:21 +01:00
merge-script
3ee1521c04
Merge bitcoin/bitcoin#30730: guix: Bump time machine to 53396a22afc04536ddf75d8f82ad2eafa5082725
60d4398a34 guix: drop GCC 12.4.0 package (fanquake)
5ed1511e50 guix: bump time-machine to 53396a22afc04536ddf75d8f82ad2eafa5082725 (fanquake)

Pull request description:

  Followup to #30511.
  https://git.savannah.gnu.org/cgit/guix.git/commit/?id=9aa38f98cbd41644abe2c43bb4f44f74df642df2 landed.

  Linux headers `6.1.102` -> `6.1.106`

ACKs for top commit:
  hebasto:
    ACK 60d4398a34.
  TheCharlatan:
    ACK 60d4398a34

Tree-SHA512: 6ff4372897e5abb15c28d4607915f777585d54b7a35787ac46f7ddca0d695dc60a7da532d8beb37e2df1de12511220f0dc6428f68d6a4db628de816e2d339914
2024-08-30 09:51:43 +01:00
Lőrinc
6a68343ffb doc: Prepend 'build/' to binary paths under 'src/' in docs 2024-08-29 15:23:12 +02:00
MarcoFalke
3333415890
scripted-diff: LogPrint -> LogDebug
-BEGIN VERIFY SCRIPT-
 sed -i 's/\<LogPrint\>/LogDebug/g' $( git grep -l '\<LogPrint\>'  -- ./contrib/ ./src/ ./test/ ':(exclude)src/logging.h' )
-END VERIFY SCRIPT-
2024-08-29 13:49:57 +02:00
merge-script
7a226eb4d9
Merge bitcoin/bitcoin#30653: guix: Drop unused module from manifest
Some checks are pending
CI / test each commit (push) Waiting to run
CI / macOS 13 native, x86_64, no depends, sqlite only, gui (push) Waiting to run
CI / Win64 native, VS 2022 (push) Waiting to run
CI / ASan + LSan + UBSan + integer, no depends, USDT (push) Waiting to run
c7fb80a08f guix: Drop unused module from manifest (Hennadii Stepanov)

Pull request description:

  My Guix build:
  ```
  x86_64
  170df52c2238510bd166f3fb1c4c3c11d2c1480a2e468fd532cb4d0435ac11cf  guix-build-c7fb80a08f98/output/aarch64-linux-gnu/SHA256SUMS.part
  54e71ef5135464f58e3db4a3b893fa2f26a2c9cfb465699a363bb59a0d1bd94f  guix-build-c7fb80a08f98/output/aarch64-linux-gnu/bitcoin-c7fb80a08f98-aarch64-linux-gnu-debug.tar.gz
  806d6042151e0af026748379b9bbbfea53d4c91555b2f0d05ed11faf83f429bb  guix-build-c7fb80a08f98/output/aarch64-linux-gnu/bitcoin-c7fb80a08f98-aarch64-linux-gnu.tar.gz
  96f111f81311b55c805f1ebe74c5a5bc3160819e8fc6d14aab778e6a20a5c266  guix-build-c7fb80a08f98/output/arm-linux-gnueabihf/SHA256SUMS.part
  231a29a9ffec9cc88260324da28d8443a6fd455ff0b010574af455034581aea3  guix-build-c7fb80a08f98/output/arm-linux-gnueabihf/bitcoin-c7fb80a08f98-arm-linux-gnueabihf-debug.tar.gz
  a545801e94e2a7a9859f0111be8762a2a7e5ea4636eed86ac95d17f2f4cdb37a  guix-build-c7fb80a08f98/output/arm-linux-gnueabihf/bitcoin-c7fb80a08f98-arm-linux-gnueabihf.tar.gz
  f565c1c7c10cc5c36f2206c3c5aab54422f20e38185c43f4dbd91c12cb33d10d  guix-build-c7fb80a08f98/output/arm64-apple-darwin/SHA256SUMS.part
  0b0d3d7e7300984063109f2ea23fabdf3961fa337ff28ed602a22965cdf6b499  guix-build-c7fb80a08f98/output/arm64-apple-darwin/bitcoin-c7fb80a08f98-arm64-apple-darwin-unsigned.tar.gz
  78cfb54230e3b054c4bb121925844720be52269db6a63161eeebe93ebfb2dc21  guix-build-c7fb80a08f98/output/arm64-apple-darwin/bitcoin-c7fb80a08f98-arm64-apple-darwin-unsigned.zip
  95124a8019053cc296187c0332e3b5b3acef401298baadacf52713068764dd99  guix-build-c7fb80a08f98/output/arm64-apple-darwin/bitcoin-c7fb80a08f98-arm64-apple-darwin.tar.gz
  a8b36c808c7b57cb2a20e43af36749c07f14392b9816752b68a986f9124806fc  guix-build-c7fb80a08f98/output/dist-archive/bitcoin-c7fb80a08f98.tar.gz
  f7221bc6ed56b5af1196f67c776bd80de9f2b9dc8bf84b0a8602a586fda43079  guix-build-c7fb80a08f98/output/powerpc64-linux-gnu/SHA256SUMS.part
  e04410e453a9fcefacdbe9a1a43ad1f9ec6a36d622d258ea4208af1dc461692d  guix-build-c7fb80a08f98/output/powerpc64-linux-gnu/bitcoin-c7fb80a08f98-powerpc64-linux-gnu-debug.tar.gz
  64135391e147c7357b17b72b1e54e93a9a7931f90c4d14a2066f1c9a160881a0  guix-build-c7fb80a08f98/output/powerpc64-linux-gnu/bitcoin-c7fb80a08f98-powerpc64-linux-gnu.tar.gz
  3f2375042bc29a7f87cadc6ba3ce7389fa5e6f6c53b32836c7fc249e4ba9838e  guix-build-c7fb80a08f98/output/riscv64-linux-gnu/SHA256SUMS.part
  33b8396ab0e1fd3121a85f1a80d81d52fe9be151f401f08283f9d5b8ecbd251b  guix-build-c7fb80a08f98/output/riscv64-linux-gnu/bitcoin-c7fb80a08f98-riscv64-linux-gnu-debug.tar.gz
  418a264d0bcde9665d5760061284ca3b5533c9f63769a76bc64c69d8b3c7d82f  guix-build-c7fb80a08f98/output/riscv64-linux-gnu/bitcoin-c7fb80a08f98-riscv64-linux-gnu.tar.gz
  3fed3e2d050059694da965e1752468c3d054f1acf5b774242eb8e7a73a775af5  guix-build-c7fb80a08f98/output/x86_64-apple-darwin/SHA256SUMS.part
  a5d2ddf1c1bbc22d104ef08d0bd73f8d9c5c8404791df66d51ffc76a0c638fb2  guix-build-c7fb80a08f98/output/x86_64-apple-darwin/bitcoin-c7fb80a08f98-x86_64-apple-darwin-unsigned.tar.gz
  bc3a44ca40c5bad631b76c240a7f1f46d0597cbf0c2389473d856e29775b3f1a  guix-build-c7fb80a08f98/output/x86_64-apple-darwin/bitcoin-c7fb80a08f98-x86_64-apple-darwin-unsigned.zip
  5b2f0aaf4c023cda33fe952f18a977cc735c5e1524b45e734f99641ee605cc5d  guix-build-c7fb80a08f98/output/x86_64-apple-darwin/bitcoin-c7fb80a08f98-x86_64-apple-darwin.tar.gz
  e56223d773f7d1a0a0dbe99d98e60420f729987f14fb98f18eabe6575352f68c  guix-build-c7fb80a08f98/output/x86_64-linux-gnu/SHA256SUMS.part
  6e4a27fcafb1ec2dda41c7e486897ff51a4447d0ebfa6be30bdef6648c673786  guix-build-c7fb80a08f98/output/x86_64-linux-gnu/bitcoin-c7fb80a08f98-x86_64-linux-gnu-debug.tar.gz
  3ff4232266a461bb55518a1e8834867e7e79c02914c59eb8f6b5052a26aefc12  guix-build-c7fb80a08f98/output/x86_64-linux-gnu/bitcoin-c7fb80a08f98-x86_64-linux-gnu.tar.gz
  fd2cfb0befaf849e98574698ddab121a01c7894bb5acc789b9eb9c3bbe78e7b2  guix-build-c7fb80a08f98/output/x86_64-w64-mingw32/SHA256SUMS.part
  58a2f67ecc94b2daad37ab99e74708c062094eb047136e57451d89f856d0c9aa  guix-build-c7fb80a08f98/output/x86_64-w64-mingw32/bitcoin-c7fb80a08f98-win64-debug.zip
  6ccf68edc22dab4cc3171f3d8cdaed0444c438bca812512586edd81029de2c57  guix-build-c7fb80a08f98/output/x86_64-w64-mingw32/bitcoin-c7fb80a08f98-win64-setup-unsigned.exe
  d466b5bc2ace63995ca22943997db7c292e240cdee7c63e127ecd380a1ca9558  guix-build-c7fb80a08f98/output/x86_64-w64-mingw32/bitcoin-c7fb80a08f98-win64-unsigned.tar.gz
  b3fd8af55443feb8667940a18fb511e6d85ece1dd9fa0aa40f68e5ea86ab46df  guix-build-c7fb80a08f98/output/x86_64-w64-mingw32/bitcoin-c7fb80a08f98-win64.zip
  ```

ACKs for top commit:
  fanquake:
    ACK c7fb80a08f - looks like this was last used in https://github.com/bitcoin/bitcoin/pull/27179.

Tree-SHA512: 40498cb514a31609e721b3865a99b91e4ff2bf5760750a42b5b16333d905d13cf2f87481aabc679c08b9e872a6886a7c928706b6d7ada08df02672d4b5156ba1
2024-08-29 11:40:27 +01:00
MarcoFalke
faaf3e53f0
test: [refactor] Fix F841 flake8 2024-08-29 07:01:54 +02:00
fanquake
60d4398a34
guix: drop GCC 12.4.0 package
Now that 12.4.0 is upstreamed.
2024-08-28 11:18:21 +01:00
fanquake
5ed1511e50
guix: bump time-machine to 53396a22afc04536ddf75d8f82ad2eafa5082725
Includes:
https://git.savannah.gnu.org/cgit/guix.git/commit/?id=9aa38f98cbd41644abe2c43bb4f44f74df642df2.
2024-08-28 11:18:11 +01:00
merge-script
338bc2cd26
Merge bitcoin/bitcoin#30454: build: Introduce CMake-based build system
41051290ab cmake: Ignore build subdirectories within source directory (Hennadii Stepanov)
6ce50fd9d0 doc: Update for CMake-based build system (Hennadii Stepanov)
9730288a0c ci: Migrate CI scripts to CMake (Hennadii Stepanov)
c360837ca5 cmake, lint: Adjust `lint_includes_build_config` (Hennadii Stepanov)
3885441ee0 cmake: Add presets for native Windows builds (Hennadii Stepanov)
7681746b20 cmake: Add vcpkg manifest file (Hennadii Stepanov)
8b6f1c4353 cmake: Add `Coverage` and `CoverageFuzz` scripts (Hennadii Stepanov)
65bdbc1ff2 cmake: Add `docs` build target (Hennadii Stepanov)
fb75ebbc33 cmake: Add compiler diagnostic flags (Hennadii Stepanov)
e821f0a37a cmake: Migrate Guix build scripts to CMake (Hennadii Stepanov)
747adb6ffe cmake: Add `Maintenance` module (Hennadii Stepanov)
1f60b30df0 cmake: Add `APPEND_{CPP,C,CXX,LD}FLAGS` cache variables (Hennadii Stepanov)
2b43c45b13 cmake: Add `AddWindowsResources` module (Hennadii Stepanov)
973a3b0c5d cmake: Implement `install` build target (Hennadii Stepanov)
84ac35cfd4 cmake: Add cross-compiling support (Hennadii Stepanov)
0d01c228a7 build: Generate `toolchain.cmake` in depends (Hennadii Stepanov)
91a799247d depends: Add host-specific `cmake_system_version` variables (Hennadii Stepanov)
9b31209b4c depends: Rename `cmake_system` -> `cmake_system_name` (Hennadii Stepanov)
4a5208a81d Revert "build, qt: Do not install *.prl files" (Hennadii Stepanov)
6522af62af depends: Amend handling flags environment variables (Hennadii Stepanov)
90cec4d251 cmake: Add `MULTIPROCESS` option (Hennadii Stepanov)
bb1a450dcb cmake: Build `bitcoin-chainstate` executable (Hennadii Stepanov)
aed38ea58c cmake: Build `bitcoinkernel` library (Hennadii Stepanov)
975d67369b cmake: Build `test_bitcoin-qt` executable (Hennadii Stepanov)
10fcc668a3 cmake: Add `WITH_DBUS` option (Hennadii Stepanov)
5bb5a4bc75 cmake: Add `libqrencode` optional package support (Hennadii Stepanov)
57a6e2ef4a cmake: Build `bitcoin-qt` executable (Hennadii Stepanov)
30f642952c cmake: Add `WERROR` option (Hennadii Stepanov)
c98d4a4c34 cmake: Add `REDUCE_EXPORTS` option (Hennadii Stepanov)
a01cb6e63f cmake: Add `HARDENING` option (Hennadii Stepanov)
a8a2e364ac cmake: Add Python-based tests (Hennadii Stepanov)
3d85379570 cmake: Add fuzzing options (Hennadii Stepanov)
908530e312 cmake: Add `SANITIZERS` option (Hennadii Stepanov)
8bb0e85631 cmake: Build `bench_bitcoin` executable (Hennadii Stepanov)
801735163a cmake: Add external signer support (Hennadii Stepanov)
353e0c9e96 cmake: Add `systemtap-sdt` optional package support (Hennadii Stepanov)
d2fda82b49 cmake: Add `libzmq` optional package support (Hennadii Stepanov)
ae7b39a0e1 cmake: Add `libminiupnpc` optional package support (Hennadii Stepanov)
6480e1dcdb cmake: Add `libnatpmp` optional package support (Hennadii Stepanov)
e73e9304a1 cmake: Build `bitcoin-util` executable (Hennadii Stepanov)
027c6d7caa cmake: Build `bitcoin-tx` executable (Hennadii Stepanov)
d10c5c34c3 cmake: Add wallet functionality (Hennadii Stepanov)
ab2e99b0d9 cmake: Create test suite for `ctest` (Hennadii Stepanov)
959370bd76 cmake: Build `test_bitcoin` executable (Hennadii Stepanov)
b27bf9700d cmake: Build `bitcoin-cli` executable (Hennadii Stepanov)
a9813df826 cmake: Build `bitcoind` executable (Hennadii Stepanov)
97829ce2d5 cmake: Add `FindLibevent` module (Hennadii Stepanov)
3118e40c61 cmake: Build `bitcoin_consensus` library (Hennadii Stepanov)
809a2f1929 cmake: Build `bitcoin_util` static library (Hennadii Stepanov)
0a9a521a70 cmake: Build `bitcoin_crypto` library (Hennadii Stepanov)
958971f476 cmake: Build `univalue` static library (Hennadii Stepanov)
752747fda8 cmake: Generate `obj/build.h` header (Hennadii Stepanov)
1f0a78edf3 cmake: Build `minisketch` static library (Hennadii Stepanov)
12bfbc8154 cmake: Build `leveldb` static library (Hennadii Stepanov)
51985c5304 cmake: Build `crc32c` static library (Hennadii Stepanov)
db7a198f29 cmake: Build `secp256k1` subtree (Hennadii Stepanov)
dbb7ed14e8 cmake: Add `ccache` support (Hennadii Stepanov)
cedfdf6c72 cmake: Redefine/adjust per-configuration flags (Hennadii Stepanov)
b6b5e732c8 cmake: Add global compiler and linker flags (Hennadii Stepanov)
f98327931b cmake: Add `TryAppendLinkerFlag` module (Hennadii Stepanov)
4a0af29697 cmake: Add `TryAppendCXXFlags` module (Hennadii Stepanov)
35cffc497d cmake: Add POSIX threads support (Hennadii Stepanov)
fd72d00ffe cmake: Add position independent code support (Hennadii Stepanov)
07069e2bb0 cmake: Add introspection module (Hennadii Stepanov)
27d687fc1f cmake: Add `config/bitcoin-config.h` support (Hennadii Stepanov)
fe5cdace5f cmake: Print compiler and linker flags in summary (Hennadii Stepanov)
70683884c5 cmake: Introduce interface libraries to encapsulate common flags (Hennadii Stepanov)
a2317e27b7 cmake: Add root `CMakeLists.txt` file (Hennadii Stepanov)

Pull request description:

  This PR introduces a new CMake-based build system, which is a drop-in replacement for the current Autotools-based build system.

  ML announcement: https://groups.google.com/g/bitcoindev/c/hgKkfQWzrTo

  As discussed during the recent CoreDev meetup in April, the switch from Autotools to CMake is intended to happen as soon as possible after branching 28.x off, which means that 29.0 will be built using CMake.

  This PR branch is essentially the [staging branch](https://github.com/hebasto/bitcoin/tree/cmake-staging), with every change reviewed and tested by a group of contributors, including (in alphabetical order):
  - [**achow101**](https://github.com/achow101)
  - [**fanquake**](https://github.com/fanquake)
  - [**maflcko**](https://github.com/maflcko)
  - [**m3dwards**](https://github.com/m3dwards)
  - [**pablomartin4btc**](https://github.com/pablomartin4btc)
  - [**real-or-random**](https://github.com/real-or-random)
  - [**ryanofsky**](https://github.com/ryanofsky)
  - [**sipsorcery**](https://github.com/sipsorcery)
  - [**TheCharlatan**](https://github.com/TheCharlatan)
  - [**theStack**](https://github.com/theStack)
  - [**theuni**](https://github.com/theuni)
  - [**vasild**](https://github.com/vasild)

  Reviewing in a separate staging repo was suggested in https://github.com/bitcoin/bitcoin/pull/27060#issuecomment-1431798320.

  The accompanying changes to the OSS-Fuzz project are available in https://github.com/hebasto/oss-fuzz/pull/8.

  Please refer to the [build options parity table](https://gist.github.com/hebasto/2ef97d3a726bfce08ded9df07f7dab5e). The "auto" value is no longer available; non-default values must be specified explicitly. Additionally, the new default values have been chosen to suit the everyday build experience for the majority of developers.

  System requirements for using the CMake-based build system:
  - CMake >= 3.22 (if not available in your system's repository, it can be downloaded from https://cmake.org/download/)
  - a build tool of your choice:
  - any Make (GNU Make is no longer a requirement); GNU Make is still required to build depends
  - Ninja (https://ninja-build.org/)
  - MSBuild
  - Xcode

  A note for Windows users: The default installation of the latest version of MSVC 17.10.4 includes both CMake 3.28.3 and the vcpkg package manager).

  ---

  We, the build system developers, kindly ask reviewers to refrain from making suggestions that are not directly related to the migration process or can be implemented separately. Bugs in the scripts and errors in the updated documentation should be the focus of this PR. Please be advised that comments not aligned with this PR's goal may be ignored.

  Thank you all for your understanding.

ACKs for top commit:
  maflcko:
    review ACK 41051290ab 🐥
  sipsorcery:
    ACK 41051290ab.
  vasild:
    ACK 41051290ab
  TheCharlatan:
    ACK 41051290ab
  pablomartin4btc:
    tACK 41051290ab
  i-am-yuvi:
    tACK [`4105129`](41051290ab)
  theuni:
    ACK 41051290ab.
  fanquake:
    ACK 41051290ab

Tree-SHA512: 6c1445054436c6c00ad63bfa0f19d64091a2b25c9bd694f85bf2218ac358ffb774d6c000685b3ca1e9b50401babed989fa2a0694b774c211d226bfd1944c9b39
2024-08-28 10:51:24 +01:00
virtu
b061b35105 seeds: Regenerate mainnet seeds
Regenerate mainnet seeds from new sources without the need for hardcoded
data. Result has 512 nodes from each network type except cjdns, for
which only eight nodes were found that match the seed node criteria.
2024-08-27 07:00:27 +02:00
virtu
02dc45c506 seeds: Pull nodes from Luke's seeder
Pull additional nodes from Luke's seeder to further decentralize the
generation of seed nodes.
2024-08-27 07:00:27 +02:00
virtu
7a2068a0ff seeds: Pull nodes from virtu's crawler
Pull additional nodes from virtu's crawler. Data includes sufficient
Onion and I2P nodes to align the uptime requirements for these networks
to that of clearnet nodes (i.e., 50%). Data also includes more than
three times the number of CJDNS nodes currently hardcoded into
nodes_main_manual.txt, so hardcoded nodes becomes obsolete.
2024-08-27 07:00:09 +02:00
Ava Chow
37cdb5f248
Merge bitcoin/bitcoin#30008: seeds: Pull additional nodes from my seeder and update fixed seeds
Some checks are pending
CI / test each commit (push) Waiting to run
CI / macOS 13 native, x86_64, no depends, sqlite only, gui (push) Waiting to run
CI / Win64 native, VS 2022 (push) Waiting to run
CI / ASan + LSan + UBSan + integer, no depends, USDT (push) Waiting to run
41ad84a00c seeds: Use fjahr's more up to date asmap (Ava Chow)
d8fd1e0faf seeds: Fixed seeds update (Ava Chow)
f1f24d7214 seeds: Add testnet4 fixed seeds file (Ava Chow)
8ace71c737 seeds: Remove manual onion and i2p seeds (Ava Chow)
ed5b86cbe4 seeds: Add testnet instructions (Ava Chow)
0676515397 seeds: Also pull from achow101 seeder (Ava Chow)
5bab3175a6 makeseeds: Configurable minimum blocks for testnet4's smaller chain (Ava Chow)
d2465dfac6 makeseeds: Shuffle ips after parsing (Ava Chow)
af550b3a0f makeseeds: Support CJDNS (Ava Chow)
d5a8c4c4bd makeseeds: Update user agent regex (Ava Chow)

Pull request description:

  The [DNS seeder](https://github.com/achow101/dnsseedrs) that I wrote collects statistics on node reliability in the same way that sipa's seeder does, and also outputs this information in the same file format. Thus it can also be used in our fixed seeds update scripts. My seeder additionally crawls onion v3, i2p, and cjdns, so will now be able to set those fixed seeds automatically rather than curating manual lists.

  In doing this update, I've found that `makeseeds.py` is missing newer versions from the regex as well as cjdns support; both of these have been updated.

  I also noticed that the testnet fixed seeds are all manually curated and sipa's seeder does not appear to publish any testnet data. Since I am also running the seeder for testnet, I've added the commands to generate testnet fixed seeds from my seeder's data too.

  Lastly, I've updated all of the fixed seeds. However, since my seeder has not found any cjdns nodes that met the reliability criteria (possibly due to connectivity issues present in those networks), I've left the previous manual seeds for that network.

ACKs for top commit:
  fjahr:
    re-ACK 41ad84a00c
  virtu:
    ACK [41ad84a](41ad84a00c)

Tree-SHA512: 6ba0141f053d9d6ae7d8c9574f061be38f3e65b28de1d6660c1885ab942623b5a0ec70754b4fcfc5d98fe970f5f179a940d5880b5061ed698f7932500e01d3ee
2024-08-26 15:49:42 -04:00
Ava Chow
a1f2b5bbb5
Merge bitcoin/bitcoin#30690: devtools, utxo-snapshot: Fix block height out of range in script
5b4f34006d devtools, utxo-snapshot: Fix block height out of range (pablomartin4btc)

Pull request description:

  <details>
  <summary>Fixing a <a href="https://github.com/bitcoin/bitcoin/pull/28553#pullrequestreview-2251032570">bug</a> in <code>utxo_snapshot.sh</code>.</summary>

  ```
  /contrib/devtools/utxo_snapshot.sh 840000 snapshot2.dat ./src/bitcoin-cli -datadir=${AU_DATADIR}
  Do you want to disable network activity (setnetworkactive false) before running invalidateblock? (Y/n):
  Disabling network activity
  false
  error code: -8
  error message:
  Block height out of range
  ```

  And the user will see the following in the node and it would stay there if not reset:

  ```
  2024-08-21T14:44:13Z UpdateTip: new best=00000000000000afa0cd000a16e244f56032735d41acd32ac00337aceb2a5240 height=235382 version=0x00000002 log2_work=69.987697 tx=17492185 date='2013-05-09T23:54:32Z' progress=0.016219 cache=71.0MiB(571085txo)
  2024-08-21T14:44:13Z UpdateTip: new best=0000000000000087c5e0b820afff496b95ba44ad64640c73b234d3261d3f99d2 height=235383 version=0x00000002 log2_work=69.987750 tx=17492341 date='2013-05-09T23:54:47Z' progress=0.016219 cache=71.0MiB(571291txo)
  2024-08-21T14:44:13Z UpdateTip: new best=000000000000014a4b5fddf3c8abb6209247255ca9e8df786b271dd1b2ac82a6 height=235384 version=0x00000002 log2_work=69.987804 tx=17492344 date='2013-05-10T00:20:18Z' progress=0.016219 cache=71.0MiB(571297txo)
  2024-08-21T14:44:13Z SetNetworkActive: false

  ```

  </details>

  This is a "temporary" fix until #29553 gets merged, which will remove the script entirely.

  Handle the "Block height out of range" error gracefully by checking if the node has synchronized to or beyond the required block height, otherwise without this validation the node would keep the network disabled if the user selected that option.

  <details>
  <summary>Provide a user-friendly message if the block height is out of range and exit the script cleanly.</summary>

  ```
  /contrib/devtools/utxo_snapshot.sh 840000 snapshot2.dat ./src/bitcoin-cli -datadir=${AU_DATADIR}
  Error: The node has not yet synchronized to block height 840001.
  Please wait until the node has synchronized past this block height and try again.
  ```

  </details>

ACKs for top commit:
  achow101:
    ACK 5b4f34006d
  fjahr:
    tACK 5b4f34006d

Tree-SHA512: 2b71286b627872d7cfdb367e29361afa3806a7ef9d65075b93892b735ff2ab729069e2f7259d30262909e73cef17fb7dca231615cc1863968cd042f4a2a4f901
2024-08-26 14:55:10 -04:00
pablomartin4btc
5b4f34006d devtools, utxo-snapshot: Fix block height out of range
Handle the Block height out of range error gracefully by checking if
the node has synchronized to or beyond the required block height,
otherwise without this validation the node would keep the network
disabled if the user selected that option.

Provide a user-friendly message if the block height is out of range
and exit the script cleanly.
2024-08-21 12:52:52 -03:00
Hennadii Stepanov
6ce50fd9d0
doc: Update for CMake-based build system
Co-authored-by: Lőrinc <pap.lorinc@gmail.com>
Co-authored-by: pablomartin4btc <pablomartin4btc@gmail.com>
2024-08-16 21:24:08 +01:00
Hennadii Stepanov
e821f0a37a
cmake: Migrate Guix build scripts to CMake 2024-08-16 21:19:11 +01:00
Ava Chow
41ad84a00c seeds: Use fjahr's more up to date asmap 2024-08-16 12:53:21 -04:00
Ava Chow
d8fd1e0faf seeds: Fixed seeds update
Update the fixed seeds for both mainnet and testnet
2024-08-16 11:29:25 -04:00
Ava Chow
f1f24d7214 seeds: Add testnet4 fixed seeds file 2024-08-16 11:29:25 -04:00
Ava Chow
8ace71c737 seeds: Remove manual onion and i2p seeds
The seeders now produce onion and i2p seeds, so there is no need to keep these
in the manual list.

Although should also be produced, there are not enough
good ones detected by the seeder, so we keep the manual seeds for them.
2024-08-16 11:29:25 -04:00
Ava Chow
ed5b86cbe4 seeds: Add testnet instructions 2024-08-16 11:28:51 -04:00
Ava Chow
0676515397 seeds: Also pull from achow101 seeder 2024-08-16 11:25:14 -04:00
Ava Chow
5bab3175a6 makeseeds: Configurable minimum blocks for testnet4's smaller chain 2024-08-16 11:25:14 -04:00
Ava Chow
221809b81c headerssync: Update headerssync configuration 2024-08-16 11:23:23 -04:00
Ava Chow
d2465dfac6 makeseeds: Shuffle ips after parsing
The crawlers are not guaranteed to output nodes in a random order, so
shuffle the ips list after parsing to break any biasing that may be
caused by the output order.
2024-08-14 13:20:22 -04:00
Ava Chow
af550b3a0f makeseeds: Support CJDNS 2024-08-14 13:20:19 -04:00
Ava Chow
d5a8c4c4bd makeseeds: Update user agent regex
Update the user agent regex to match all 3 digits of the version number,
not just the first 2 digits.

Also updates it to include 24.2, 25.2, 26.1, 27.0, 27.1, 27.99, 28.0 and
28.99.
2024-08-14 13:19:59 -04:00
Hennadii Stepanov
c7fb80a08f
guix: Drop unused module from manifest 2024-08-14 10:44:16 +01:00
Ava Chow
5fdbc8b4ee
Merge bitcoin/bitcoin#30246: contrib: asmap-tool - Compare ASMaps with respect to specific addresses
5215c925d1 Compare ASMaps with respect to specific addresses (virtu)

Pull request description:

  Right now, we have no way to quantify the "degradation" of an ASMap over time in the context of Bitcoin's P2P network in a meaningful way. However, such data would be useful for:
  1. Making sure the minimum shelf life of ASMaps is compatible with the release cycle (we wouldn't want to start shipping ASMaps with releases before making sure ASMaps typically do not become obsolete before the time of the next release)
  2. Node operators eager to keep their ASMaps up-to-date between releases.

  While `asmap-tool.py` has a `diff` command to perform a prefix-based comparison of two ASMaps, it is hard to reason about whether an old ASMap still is "good enough" or should be replaced with a newer one based on a prefix-based diff such as the following:

  ```shell
  $ ./asmap-tool.py diff 1704463200_asmap.dat 1710770400_asmap.dat
  [...]
  # 2c0f:fc98::/32 was AS37282
  # 2c0f:fcb8::/32 was AS37323
  2c0f:ff18::/32 AS37044 # was unassigned
  2c0f:ff98::/32 AS37113 # was unassigned
  2c0f:ffa0::/32 AS37273 # was unassigned
  # 76082350 (2^26.18) IPv4 addresses changed; 834271985742505274886878979424260 (2^109.36) IPv6 addresses changed
  ```

  One option for a more Bitcoin-centric ASMap comparison comprises comparing ASNs for the addresses of Bitcoin nodes and reporting on the number/share of addresses of nodes with disagreeing ASNs. By applying this approach to a node's set of known peers, a node operator can estimate how many of the node's peers are mapped to out-of-date AS when using the currently deployed and an up-to-date ASMap as input.

  This PR adds this functionality to `asmap-tool.py` by introducing a `diff_addrs` subcommand. In addition to two ASMaps, the subcommand reads addresses from a (`getnodeaddresses`-compatible) file, and computes statistics for those addresses:

  ```bash
  $ ./asmap-tool.py diff_addrs 1704463200_asmap.dat 1710770400_asmap.dat <(bitcoin-cli getnodeaddresses 0)
  275 address(es) reassigned from unassigned to AS51167
  84 address(es) reassigned from AS198949 to AS15557
  66 address(es) reassigned from AS45758 to AS45629
  33 address(es) reassigned from AS174 to AS212238
  [...]
  1 address(es) reassigned from unassigned to AS399619
  Summary: 919 (1.67%) of 54,901 addresses were reassigned.
  ```

  When the `-s / --show-addresses` flag is used, addresses subject to reassignment are included in the output.

ACKs for top commit:
  fjahr:
    tACK 5215c925d1
  achow101:
    ACK 5215c925d1
  brunoerg:
    reACK 5215c925d1

Tree-SHA512: ebcf47754bce92794fad9f4c3bfc1c5e9daf077db5975f444c5135092eb6a26ecaa1eca6748a03ae0c87d9e45532426966fe8f3c17249b17f9dcad490d6dd3bf
2024-08-12 16:17:42 -04:00
Ava Chow
5b0059fdf9
Merge bitcoin/bitcoin#29999: guix: fix suggested fake date for openssl-1.1.1l
8fee5355ee guix: fix suggested fake date for openssl -1.1.1l (Sjors Provoost)

Pull request description:

  Using `2020-10-01` as the fake timestamp will cause many test failures with `/gnu/store/bfirgq65ndhf63nn4q6vlkbha9zd931q-openssl-1.1.1l.drv`. I didn't investigate why, but I guess because it's _before_ the test certificates were created. They expired in June 2022. I tried a month before that, which worked.

  Also fixes layout of instructions.

ACKs for top commit:
  achow101:
    ACK 8fee5355ee
  maflcko:
    review ACK 8fee5355ee

Tree-SHA512: df5dd3aa961e25bd57d0b8b73daeb3ec76856b06e35277f24b6b19be81774512228f75e2b779afa8ea92fcc39beb869f43e0c57fba19ad16a82812e7c0bea38b
2024-08-12 15:22:58 -04:00
Ava Chow
ba5fdd1a68
Merge bitcoin/bitcoin#30607: contrib: support reading XORed blocks in linearize-data.py script
77ff0ec1f1 contrib: support reading XORed blocks in linearize-data.py script (Sebastian Falbesoner)

Pull request description:

  This PR is a small follow-up for #28052, adding support for the block linearization script to handle XORed blocksdir *.dat files. Note that if no xor.dat file exists, the XOR pattern is set to all-zeros, in order to still support blockdirs that have been created with versions earlier than 28.x.

  Partly fixes issue #30599.

ACKs for top commit:
  achow101:
    ACK 77ff0ec1f1
  tdb3:
    ACK 77ff0ec1f1
  hodlinator:
    ACK 77ff0ec1f1

Tree-SHA512: 011eb02e2411de373cbbf4b26db4640fc693a20be8c2430529fba6e36a3a3abfdfdc3b005d330f9ec2846bfad9bfbf34231c574ba99289ef37dd51a68e6e7f3d
2024-08-12 15:03:35 -04:00
Anthony Towns
fb6d51eb25 signet/miner: Use argparse exclusive groups
Let argparse take care of making arguments make sense in more cases.

Co-Authored-By: Ava Chow <github@achow101.com>
2024-08-10 02:12:48 +10:00
merge-script
bacab1380e
Merge bitcoin/bitcoin#30609: guix: bump time-machine to 7bf1d7aeaffba15c4f680f93ae88fbef25427252
eca20bead2 guix: bump time-machine to 7bf1d7aeaffba15c4f680f93ae88fbef25427252 (fanquake)

Pull request description:

  Includes:
  https://git.savannah.gnu.org/cgit/guix.git/commit/?id=d428237642e1e4ac8fda4597205ffec89926c0ec.

  which removes the need to build Python2, and OpenSSL `1.x` (which has historically caused issues) when building for Windows (Python2 (with a dependency on OpenSSL `1.x`) used to be a dependency of NSIS).

  Linux Kernel Headers `6.1.100` -> `6.1.102`

  ```bash
  d079858fb1bc526217ee06f312d97a56c34986440e5f9e108af66eaecacea073  guix-build-eca20bead2da/output/aarch64-linux-gnu/SHA256SUMS.part
  2db780ffe39210a3ba113e52362d94840449218ac1747e3a3484606cc36acead  guix-build-eca20bead2da/output/aarch64-linux-gnu/bitcoin-eca20bead2da-aarch64-linux-gnu-debug.tar.gz
  b56b602bd87e73b11a6b68147c52c6dfa53f0ec4bac52ac749765025e7b43bc9  guix-build-eca20bead2da/output/aarch64-linux-gnu/bitcoin-eca20bead2da-aarch64-linux-gnu.tar.gz
  d56a9a6ac683da2e347d2ea71fab0cd54a126604ac1c9cc4d8fa89f6343ddb52  guix-build-eca20bead2da/output/arm-linux-gnueabihf/SHA256SUMS.part
  6555b6d837605b35c5cf72ab4e5728d9205f8481e3e4bc9e1bbe44e09a1aa1a3  guix-build-eca20bead2da/output/arm-linux-gnueabihf/bitcoin-eca20bead2da-arm-linux-gnueabihf-debug.tar.gz
  d310e9a532d035db238552ad3fa3779b93d062e655f8e477ff029682af4f7cf4  guix-build-eca20bead2da/output/arm-linux-gnueabihf/bitcoin-eca20bead2da-arm-linux-gnueabihf.tar.gz
  eab39d953890e2d36b92b53e43a711ab615090d5b9030861229386e4a41344d8  guix-build-eca20bead2da/output/arm64-apple-darwin/SHA256SUMS.part
  394473362a4d4895431d9250702e9e87f8ccb880a2b723eeb0cfd8eed1635518  guix-build-eca20bead2da/output/arm64-apple-darwin/bitcoin-eca20bead2da-arm64-apple-darwin-unsigned.tar.gz
  3e72306a34e69647200fe5b3d5e8da3bc3b75105d3eeb9f5d5b5332de5d8e464  guix-build-eca20bead2da/output/arm64-apple-darwin/bitcoin-eca20bead2da-arm64-apple-darwin-unsigned.zip
  1b0515ab24a57706278bde37b88a0dc51188373154876997dcbf61f2c9cf2c65  guix-build-eca20bead2da/output/arm64-apple-darwin/bitcoin-eca20bead2da-arm64-apple-darwin.tar.gz
  fba7470833ff076c01de5f2ed4a4d697f8a2e06cec49098f89d40e84c4798357  guix-build-eca20bead2da/output/dist-archive/bitcoin-eca20bead2da.tar.gz
  935cc2ebec9b595da67bcde22a395060817fdf16b3a31f14e6b2252cb5073640  guix-build-eca20bead2da/output/powerpc64-linux-gnu/SHA256SUMS.part
  85ee64aa6d0ab6d3431b7c0af3e26a9bfdb365343ba1b5198e321ae0f6778d33  guix-build-eca20bead2da/output/powerpc64-linux-gnu/bitcoin-eca20bead2da-powerpc64-linux-gnu-debug.tar.gz
  52a1a8e8fdb48589cfb00c35001ae8765f6127d472d11ad03c3faa3621e45032  guix-build-eca20bead2da/output/powerpc64-linux-gnu/bitcoin-eca20bead2da-powerpc64-linux-gnu.tar.gz
  72ccb2577dd11342dfce124346d359b19d8bc4af12cd445447e0568321dd39b9  guix-build-eca20bead2da/output/riscv64-linux-gnu/SHA256SUMS.part
  80a0d80c3adb8e2de27605ed0b2bd7f5442c8316397a53a3e0e840a14587b057  guix-build-eca20bead2da/output/riscv64-linux-gnu/bitcoin-eca20bead2da-riscv64-linux-gnu-debug.tar.gz
  62de93f8defc9e561caed1586bee20e208be1d66cdc8bf593f5e09e3c28d03a6  guix-build-eca20bead2da/output/riscv64-linux-gnu/bitcoin-eca20bead2da-riscv64-linux-gnu.tar.gz
  e5af6b6bb63d88f7797531f855ad0a8fb5bf0e4645a7b2f83516b4cb26bf1da4  guix-build-eca20bead2da/output/x86_64-apple-darwin/SHA256SUMS.part
  3743509c6ad5fb3837bd8d420885b49221515e89d1bba12f8816f401879bee7a  guix-build-eca20bead2da/output/x86_64-apple-darwin/bitcoin-eca20bead2da-x86_64-apple-darwin-unsigned.tar.gz
  cc6fb35a57506250790ddea4aaa7888aa9d1db66f8ce3f09c830898f83f2f39f  guix-build-eca20bead2da/output/x86_64-apple-darwin/bitcoin-eca20bead2da-x86_64-apple-darwin-unsigned.zip
  4b4d2096e87ca10847e5a543ff32f002325c882856523f0fc5d70564009f9244  guix-build-eca20bead2da/output/x86_64-apple-darwin/bitcoin-eca20bead2da-x86_64-apple-darwin.tar.gz
  1989106147fc5f77bc27a08886bb2120ff0c49cbe6ea97b9e234752740ec81ad  guix-build-eca20bead2da/output/x86_64-linux-gnu/SHA256SUMS.part
  bdb48a649f9ca026e6bbab28159f716a1ad4b84257588e1a12bf4467e4c7acb6  guix-build-eca20bead2da/output/x86_64-linux-gnu/bitcoin-eca20bead2da-x86_64-linux-gnu-debug.tar.gz
  aff4717e841508bd6284d846d8c6da7da3622bf54d68a8919e3fd95814beb309  guix-build-eca20bead2da/output/x86_64-linux-gnu/bitcoin-eca20bead2da-x86_64-linux-gnu.tar.gz
  fdc8346e0b0f03648399b74a0d38d961c985c5ec8128193443be0b7208632f06  guix-build-eca20bead2da/output/x86_64-w64-mingw32/SHA256SUMS.part
  a50f517e3f2467e5931349315bbe0968e190e8bcdbb024e3a8d4c37333938155  guix-build-eca20bead2da/output/x86_64-w64-mingw32/bitcoin-eca20bead2da-win64-debug.zip
  38223484c214a90193f88f8c60743b376ce0c80f9401ec863ccb36a1337c85a2  guix-build-eca20bead2da/output/x86_64-w64-mingw32/bitcoin-eca20bead2da-win64-setup-unsigned.exe
  07fca2496b2c59ea928684c4bf4ef163686f8fb11934117c6c37407a3a374363  guix-build-eca20bead2da/output/x86_64-w64-mingw32/bitcoin-eca20bead2da-win64-unsigned.tar.gz
  8e71711db17c69000627c44965eb7070fc92788f792ea3d0778a55bdadf36cdb  guix-build-eca20bead2da/output/x86_64-w64-mingw32/bitcoin-eca20bead2da-win64.zip
  ```

ACKs for top commit:
  TheCharlatan:
    Nice, ACK eca20bead2

Tree-SHA512: eb1795dcc82bd975b76631326c72c4456d71be8b8cf509195295021c0581abee6da36b55d7faddb440f953e24996ee70b01b35ae9e945fcbb0799efb2e29b916
2024-08-09 10:48:10 +01:00
merge-script
24ced52744
Merge bitcoin/bitcoin#28687: C++20 std::views::reverse
2925bd537c refactor: use c++20 std::views::reverse instead of reverse_iterator.h (stickies-v)

Pull request description:

  C++20 introduces [`std::ranges::views::reverse`](https://en.cppreference.com/w/cpp/ranges/reverse_view), which allows us to drop our own `reverse_iterator.h` implementation and also makes it easier to chain views (even though I think we currently don't use this).

ACKs for top commit:
  achow101:
    ACK 2925bd537c
  maflcko:
    ACK 2925bd537c 🎷

Tree-SHA512: 567666ec44af5d1beb7a271836bcc89c4c577abc77f522fcc18bc6d4de516ae9b0df766d0bfa6dd217569e6878331c2aee1d9815620860375e3510dad7fed476
2024-08-09 09:51:19 +01:00
fanquake
eca20bead2
guix: bump time-machine to 7bf1d7aeaffba15c4f680f93ae88fbef25427252
Includes:
https://git.savannah.gnu.org/cgit/guix.git/commit/?id=d428237642e1e4ac8fda4597205ffec89926c0ec.

which removes the need to build Python2, and OpenSSL 1.x when building
for Windows.
2024-08-08 10:44:43 +01:00
Sebastian Falbesoner
77ff0ec1f1 contrib: support reading XORed blocks in linearize-data.py script
Partly fixes issue #30599.
2024-08-07 23:53:39 +02:00
Fabian Jahr
74a04f9e7a
testnet: Introduce Testnet4 2024-08-06 01:38:10 +02:00
stickies-v
2925bd537c
refactor: use c++20 std::views::reverse instead of reverse_iterator.h
Use std::ranges::views::reverse instead of the implementation in
reverse_iterator.h, and remove it as it is no longer used.
2024-08-06 00:23:38 +01:00
Hodlinator
c06f2368e2
refactor: Hand-replace some uint256S -> uint256
chainparams.cpp - workaround for MSVC bug triggering C7595 - Calling consteval constructors in initializer lists fails, but works on GCC (13.2.0) & Clang (17.0.6).
2024-08-05 14:51:47 +02:00
merge-script
2401a24387
Merge bitcoin/bitcoin#30452: guix: bump time-machine to efc26826400762207cde9f23802cfe75a737963c
6ee000e56f guix: bump time-machine to efc26826400762207cde9f23802cfe75a737963c (fanquake)
cbeb2c20e1 guix: patch /gnu/store paths out of winpthreads (fanquake)

Pull request description:

  Needed for https://github.com/bitcoin/bitcoin/issues/30210. This doesn't switch runtimes, because upstream is
  still configured to use the old runtime. See:
  https://git.savannah.gnu.org/cgit/guix.git/commit/?id=17188be0f723e00377b21b767f5447d7938a116e.

  git-mimimal `2.45.1` -> `2.45.2`
  Kernel Headers `6.1.92` -> `6.1.100`
  LLVM `18.1.6` -> `18.1.8`
  mingw-w64 `11.0.1` -> `12.0.0`
  NSIS `3.09` -> `3.10`
  patch `2.7.6` -> `2.7.6-0.f144b35`

ACKs for top commit:
  TheCharlatan:
    ACK 6ee000e56f

Tree-SHA512: f4f99d16dd8cab5b2b7c5d82111af86de20e1669cc3b4054d72ab4a67b2956757df170f0df28c96d18653c1c9d2ebdd0ecc441005726a20cd963d98513b4a851
2024-07-31 09:50:10 +01:00
merge-script
4c62f4b535
Merge bitcoin/bitcoin#30451: depends: remove Darwin ENV unsetting
bda537f7c4 depends: remove ENV unsetting for darwin (fanquake)
1807760f09 guix: improve ENV unsetting for macOS (fanquake)
0b2aeee21d depends: patch explicit -lm usage out of Qt tools (fanquake)

Pull request description:

  Now that we use the native compiler, and have fixed Qt, and these vars
  are (almost) unset in Guix, we can remove the unsetting from our compiler
  command here.

  I couldn't manage to make a darwin-clang-cross only exclusion of `-lm` work properly
  for Qt, so opted for just removing the explicit link entirely. I do not think this should have
  any other unwanted side-effects.

  Fixes #21552.

ACKs for top commit:
  TheCharlatan:
    ACK bda537f7c4

Tree-SHA512: 97a2d85de7d4b1d65717ecb521399ecba5f53863b8aef21af62ede5ceee59ee1a9392663da3a3852cad1b6d8b420dd4b0b5f0eea38d30a81785d8b2718620b5f
2024-07-30 14:32:14 +01:00
fanquake
e6df3485ed
guix: move bison from global scope, to Linux
This is only needed for the Qt build, on Linux, so does not need to be
built/present for the macOS or Windows builds.
2024-07-26 17:17:45 +01:00
fanquake
6ee000e56f
guix: bump time-machine to efc26826400762207cde9f23802cfe75a737963c
Needed for 30210. This doesn't switch runtimes, because upstream is
still configured to use the old runtime. See:
https://git.savannah.gnu.org/cgit/guix.git/commit/?id=17188be0f723e00377b21b767f5447d7938a116e.

git-mimimal 2.45.1 -> 2.45.2
Kernel Headers 6.1.92 -> 6.1.100
LLVM 18.1.6 -> 18.1.8
mingw-w64 11.0.1 -> 12.0.0
NSIS 3.09 -> 3.10
patch 2.7.6 -> 2.7.6-0.f144b35
2024-07-26 09:31:16 +01:00
fanquake
cbeb2c20e1
guix: patch /gnu/store paths out of winpthreads
At the same time, align the docs for all patches that do the same thing.
2024-07-26 09:30:47 +01:00
fanquake
1807760f09
guix: improve ENV unsetting for macOS 2024-07-25 14:18:22 +01:00
merge-script
ab8e05eb53
Merge bitcoin/bitcoin#30511: guix: GCC 12 consolidation
d1592d2eee guix: use gcc-12 to compile winpthreads (fanquake)
b23690e821 guix: use GCC 12.4.0 over 12.3.0 (fanquake)
8b41ede55e guix: consolidate back to GCC 12 toolchain for all HOSTS (fanquake)

Pull request description:

  This PR contains 3 changes:

  * Bump GCC in Guix from [12.3.0 to 12.4.0](https://gcc.gnu.org/gcc-12/). A patch was sent upstream, https://lists.gnu.org/archive/html/guix-patches/2024-06/msg01025.html, but has not landed.
  * Consolidate all build environments back to using a GCC 12 toolchain. After #21778, the macOS environment is no-longer pinned to 11 (12 would otherwise cause issues building cctools). So, instead of requiring all builders to compile an additional GCC toolchain, use 12.
  * Use GCC 12 to compile winpthreads. Currently, GCC 11 is used; which became apparent in https://github.com/bitcoin/bitcoin/pull/30452#issuecomment-2244715566.

ACKs for top commit:
  TheCharlatan:
    ACK d1592d2eee
  hebasto:
    ACK d1592d2eee.

Tree-SHA512: e3aa1fa3e69500c93180e07cb4684661247ec6bc45245f746538d81406ff1d8777131590307496dda3287a112b6633e4991168586ca4c2036fa3a57b1efa9c87
2024-07-25 13:58:34 +01:00
fanquake
d1592d2eee
guix: use gcc-12 to compile winpthreads
Currently, winpthreads is compiled with GCC 11, when we want to be using
GCC 12 for all compilation.
2024-07-23 16:57:02 +01:00
fanquake
b23690e821
guix: use GCC 12.4.0 over 12.3.0
Our patch might be merged upstream soon:
https://lists.gnu.org/archive/html/guix-patches/2024-06/msg01025.html.

In the mean time, it's easy us for us to use the newer version of GCC.
2024-07-23 14:37:28 +01:00
fanquake
8b41ede55e
guix: consolidate back to GCC 12 toolchain for all HOSTS
Using GCC 11 for the macOS build hasn't been required since #21778, and
at this point, given a toolchain is still needed (#30206), it makes more
sense to (re-)use 12, rather than make all builders compile another
GCC toolchain.
2024-07-23 13:54:14 +01:00
fanquake
1bc9f64bee
contrib: assume binary existence in sec/sym checks
If the binaries don't exist, the Guix build has failed for some other
reason.

There's no need to check for unknown architectures, or executable
formats, as the only ones that could be built are those that we've
configured toolchains for in Guix.

We've also been doing this inconsistently across the two scripts.
2024-07-18 14:05:09 +01:00
fanquake
51d8f435c9
contrib: simplify ELF test-security-check 2024-07-18 10:31:05 +01:00
fanquake
1810e20677
contrib: simplify PE test-security-check 2024-07-18 10:31:01 +01:00
fanquake
6c9746ff92
contrib: simplify MACHO test-security-check 2024-07-18 09:49:51 +01:00
merge-script
5f538f2a7c
Merge bitcoin/bitcoin#30387: contrib: use c++ compiler rather than c compiler for binary checks
9010b1343b contrib: c++ify test stubs after switching to c++ compilers (Cory Fields)
261f770333 contrib: rename cc to cxx in binary checking scripts (Cory Fields)
a38c960005 contrib: use c++ rather than c for binary tests (Cory Fields)

Pull request description:

  From hebasto's CMake repo. See discussion here: https://github.com/hebasto/bitcoin/pull/252#discussion_r1664657488

  Use CXX/CXXFLAGS rather than CC/CFLAGS to test our actual compiler for binary checks rather than the one we only forward to secp256k1.

ACKs for top commit:
  hebasto:
    ACK 9010b1343b.
  fanquake:
    ACK 9010b1343b

Tree-SHA512: 7b8788d7d3760103062eff10056c995e1ad14c0c487d9414683ad54d816c255d0ca751f4d0e2d2ad7f9e8a7101d8c7f1e9333fa5b137558ed68fa593c4b4ce6d
2024-07-16 09:48:11 +01:00
merge-script
c2c0b4f002
Merge bitcoin/bitcoin#30146: Add clang-tidy check for thread_local vars
34c9cee380 clang-tidy: add check for non-trivial thread_local vars (Cory Fields)

Pull request description:

  Forbid thread_local vars with non-trivial destructors.

  This is a follow-up from: https://github.com/bitcoin/bitcoin/pull/30095#discussion_r1608423170

ACKs for top commit:
  maflcko:
    ACK 34c9cee380
  TheCharlatan:
    Re-ACK 34c9cee380

Tree-SHA512: 3a798607fb189a5bbc714ed6e86dea462fe29d366b790e96d10a7b4ffcf1f194da9b8f4cd0b82154408709b8e3c58d3f613d6311903bd65a76d8b556ab230d21
2024-07-11 18:59:49 +01:00
Cory Fields
9010b1343b contrib: c++ify test stubs after switching to c++ compilers 2024-07-11 17:29:06 +00:00
Cory Fields
261f770333 contrib: rename cc to cxx in binary checking scripts 2024-07-04 20:16:16 +00:00
Cory Fields
a38c960005 contrib: use c++ rather than c for binary tests
We don't actually use a c compiler as part of Core's build (only for secp).
We should be testing against what we're actually using instead.
2024-07-04 20:16:16 +00:00
virtu
5215c925d1 Compare ASMaps with respect to specific addresses
Introduce diff_addrs subcommand as means for a Bitcoin-centric
comparison of two ASMaps.

In addition to two ASMaps, the subcommand reads addresses from
a (getnodeaddresses-compatible) file, and provides information on
addresses that have mismatching ASN according to the two ASMaps.
2024-06-27 16:35:15 +02:00
merge-script
0c57a798b5
Merge bitcoin/bitcoin#29987: guix: build with glibc 2.31
b5fc6d46a3 guix: use glibc 2.31 (fanquake)

Pull request description:

  Set minimum required glibc to 2.31.
  The glibc 2.31 branch is still maintained: https://sourceware.org/git/?p=glibc.git;a=shortlog;h=refs/heads/release/2.31/master.

  Remove the stack-protector check from test-security-check, as the test
  no-longer fails, and given the control we have of the end, the actual
  security-check test seems sufficient (this might also be applied to some
  of the other checks).

  Drops runtime support for Ubuntu Bionic 18.04 and RHEL-8 from the release binaries.

ACKs for top commit:
  TheCharlatan:
    ACK b5fc6d46a3

Tree-SHA512: ba7e727240fa0ebebfb8b749024c71cbfdec37c33b39627866d78f9318ccdc687fd5103a63ee0e98cf809d9954dde56b1b305691c33d1de275ed0519f716c921
2024-06-26 15:21:44 +01:00
merge-script
2cd7c6bd93
Merge bitcoin/bitcoin#30147: contrib: Fixup verify-binaries OS platform parsing
3ab2520190 contrib: Fixup verify-binaries OS platform parsing (Ben Westgate)

Pull request description:

  Closes #30145.

  This PR solves two major issues in the `parse_version_string` function of verify-binaries:
  1. `-aarch64` binaries cannot be specifically downloaded. The -platform string gets interpreted as a release candidate that doesn't exist due to containing sub-string "rc".
  2. Specifying a platform with a "-" in the name causes the parser to ignore both "-platform" AND "-rcN" and download the potentially wrong (non-rc) version for every platform. This also prevented specifying just one platform binary the user wished to download.

  It also updates the accompanying `test.py` to cover problem two and adds two examples that were formerly broken to `README.md` to show what is now possible. Including the most useful case of downloading only 1 specific platform's binary.

  This improves the Bitcoin verify-binaries tools user experience by not:
  1. Failing to download for inexplicable reasons,
  2. Downloading more files than what the user told it to, or in the worst case
  3. Downloading only the wrong files.

  * A test was added to cover the command `verify-binaries/verify.py pub 22.0-x86_64-linux-gnu.tar.gz` which checks that _bitcoin-22.0-x86_64-linux-gnu.tar.gz_ downloads successfully AND ONLY _bitcoin-22.0-x86_64-linux-gnu.tar.gz_ downloads.
  * The steps to reproduce each bug are in the referenced issue #30145. Explanation of the potential issue as well as reasoning for the way the bug was fixed are in my commit descriptions.
  * This delivers the promised feature of "only download the binaries for a certain platform", by allowing strings with '-' to be accepted, allowing for single file downloads for any specific platform which was not always possible before.
  * Removes 6 lines of code from the offending `parse_version_string` function, while fixing the bugs/errors, and extending the functionality to be practical for users with slow connections.
  * Makes the error message more helpful when no file matches the provided platform string, now prints "Did you mean: `closest-match`" to help correct typos.

  Thanks for reading my PR. I look forward to getting this helpful tool in its best shape yet.

  Log of this branch passing the new test.py:
  ```
  python3 test.py
  ✓ 'Nonexistent version should fail' passed
  ✓ 'Malformed version should fail' passed
  ✓ '--min-good-sigs 20 should fail' passed
  - testing verification (22.0-x86_64-linux-gnu.tar.gz)
  ✓ '22.0-x86_64-linux-gnu.tar.gz should succeed' passed
  - testing verification (22.0)
  ✓ '22.0 should succeed' passed
  ```

  Log of master failing the new test.py:
  ```
  python3 test.py
  ✓ 'Nonexistent version should fail' passed
  ✓ 'Malformed version should fail' passed
  ✓ '--min-good-sigs 20 should fail' passed
  - testing verification (22.0-x86_64-linux-gnu.tar.gz)
  ✓ '22.0-x86_64-linux-gnu.tar.gz should succeed' passed
  Traceback (most recent call last):
    File "/home/ben/Documents/GitHub/bitcoin/contrib/verify-binaries/test.py", line 74, in <module>
      main()
    File "/home/ben/Documents/GitHub/bitcoin/contrib/verify-binaries/test.py", line 27, in main
      assert len(v) == 1
             ^^^^^^^^^^^
  AssertionError
  ```

ACKs for top commit:
  stickies-v:
    re-ACK 3ab2520190
  willcl-ark:
    re-ACK 3ab2520190

Tree-SHA512: 6093228bb876cd0ac84d1cd2630074e17a3f09c4b23325b9419d859a5721a802f928844575233b135df52b882287dd18d6fadf4419d88ec0a2cdf82db315329e
2024-06-26 10:28:44 +01:00
Ben Westgate
3ab2520190 contrib: Fixup verify-binaries OS platform parsing
Parse platform strings with "-" or '.' correctly such as "linux-gnu" or
"x86_64-linux-gnu.tar.gz" to download the matching files or file. String
partition() is used to tolerate more dashes. Update `VERSION_EXAMPLE`
with a new string parsed correctly now. Fix "-aarch64" interpreted as a
release candidate due to sub-string "rc", causing all downloads to fail.
Now "rc" must immediately follow first "-" to indicate an [-rc] string.
Local variables `version_rc`, `version_os` renamed to `rc`, `platform`.
If "-rcN" is specified, `platform` is reassigned to remove the '-rcN'.

Changes are useful to only download one bitcoin core binary on slow
connections. Making `verify.py pub` more intuitive, robust, and
versatile. Closes #30145

When user types a platform string not found in any filename lets help
and say the platform closest to what they typed in a `f"No files
matched the platform specified. Did you mean: {closest_match}"` log.
Improves UX when unaware how we name our files.
Uses the difflib Python built-in which was already imported elsewhere.

Update test.py to test single file verification
verify-binaries/verify.py can accept an entire filename filter for its
"-platform" parameter now so let us test that it succeeds and downloads
and verifies only one file. `verify.py pub 22.0-x86_64-linux-gnu.tar.gz`
should get and verify only the requested binary. It is placed before the
existing <version> wide verification as it is a faster test and possibly
easier to break.

Update doc with examples now possible after bugfix
Add example to show release candidates now work with "-platform" strings
containing "-" and string provided can be from the middle of filename:
`./contrib/verify-binaries/verify.py --json pub 23.0-rc5-linux-gnu`
Change example 5 to not match example 3.
New examples to show platform can now be provided specifically enough to
download only a single binary down to its file extension:
`./contrib/verify-binaries/verify.py pub 25.2-x86_64-linux`
`./contrib/verify-binaries/verify.py pub 24.1-rc1-darwin`
`./contrib/verify-binaries/verify.py pub 27.0-win64-setup.exe`
This is the most common use if not verifying all files so users see it
as the first example for "only download the binaries for a certain
architecture and/or platform". Downloading one file is intuitively what
most will think this meant and this change delivers on that expectation.

Co-authored-by: stickies-v
2024-06-25 11:32:56 -05:00
fanquake
4289dd02cc
contrib: add R(UN)PATH check to ELF symbol-check
Our binaries shouldn't contains any rpaths, or runpaths, so check that
at release time.
2024-06-20 12:32:07 +01:00
merge-script
9c5cdf07f3
Merge bitcoin/bitcoin#30287: macOS: rewrite some docs & swap mmacosx-version-min for mmacos-version-min
7c298fe0df doc: rewrite some of the macdeploy docs (fanquake)
d042230f7a depends: swap mmacosx-version-min for mmacos-version-min (fanquake)

Pull request description:

  Whilst `-mmacosx-version-min` and `-mmacos-version-min` remain aliases for each other, the later is preferred,
  and I assume the former will be removed at some point in the future; see: https://github.com/llvm/llvm-project/pull/95374.

  Somewhat of a followup to #21778. Rewrite some of the mac deploy docs.

ACKs for top commit:
  theuni:
    utACK 7c298fe0df
  TheCharlatan:
    ACK 7c298fe0df
  hebasto:
    ACK 7c298fe0df.

Tree-SHA512: 6493f087fde93e0eec319af0e105d163b3f047d8a03f7d4b0d6cd7c64b58d0a978b7d67c6b8dba5c6ccf8b10e188aab5dc98eec400b0546dc9ee801a689b4332
2024-06-18 10:55:46 +01:00
fanquake
7c298fe0df
doc: rewrite some of the macdeploy docs
Somewhat of a followup to #21778.
2024-06-14 09:43:36 +01:00
fanquake
b03a45b13e
Revert "contrib: macdeploy: monkey-patch gen-sdk to be deterministic"
This reverts commit ba30a5407e.
2024-06-13 13:48:26 +01:00
Ava Chow
011a895a82
Merge bitcoin/bitcoin#29015: kernel: Streamline util library
c7376babd1 doc: Clarify distinction between util and common libraries in libraries.md (Ryan Ofsky)
4f74c59334 util: Move util/string.h functions to util namespace (Ryan Ofsky)
4d05d3f3b4 util: add TransactionError includes and namespace declarations (Ryan Ofsky)
680eafdc74 util: move fees.h and error.h to common/messages.h (Ryan Ofsky)
02e62c6c9a common: Add PSBTError enum (Ryan Ofsky)
0d44c44ae3 util: move error.h TransactionError enum to node/types.h (Ryan Ofsky)
9bcce2608d util: move spanparsing.h to script/parsing.h (Ryan Ofsky)
6dd2ad4792 util: move spanparsing.h Split functions to string.h (Ryan Ofsky)
23cc8ddff4 util: move HexStr and HexDigit from util to crypto (TheCharlatan)
6861f954f8 util: move util/message to common/signmessage (Ryan Ofsky)
cc5f29fbea build: move memory_cleanse from util to crypto (Ryan Ofsky)
5b9309420c build: move chainparamsbase from util to common (Ryan Ofsky)
ffa27af24d test: Add check-deps.sh script to check for unexpected library dependencies (Ryan Ofsky)

Pull request description:

  Remove `fees.h`, `errors.h`, and `spanparsing.h` from the util library. Specifically:

  - Move `Split` functions from `util/spanparsing.h` to `util/string.h`, using `util` namespace for clarity.
  - Move remaining spanparsing functions to `script/parsing.h` since they are used for descriptor and miniscript parsing.
  - Combine `util/fees.h` and `util/errors.h` into `common/messages.h` so there is a place for simple functions that generate user messages to live, and these functions are not part of the util library.

  Motivation for this change is that the util library is a dependency of the kernel, and we should remove functionality from util that shouldn't be called by kernel code or kernel applications. These changes should also improve code organization and make functions easier to discover. Some of these same moves are (or were) part of #28690, but did not help with code organization, or made it worse, so it is better to move them and clean them up in the same PR so code only has to change one time.

ACKs for top commit:
  achow101:
    ACK c7376babd1
  TheCharlatan:
    Re-ACK c7376babd1
  hebasto:
    re-ACK c7376babd1.

Tree-SHA512: 5bcef16c1255463b1b69270548711e7ff78ca0dd34e300b95e3ca1ce52ceb34f83d9ddb2839e83800ba36b200de30396e504bbb04fa02c6d0c24a16d06ae523d
2024-06-12 17:12:54 -04:00
fanquake
b5fc6d46a3
guix: use glibc 2.31
Set minimum required glibc to 2.31.
The glibc 2.31 branch is still maintained:
https://sourceware.org/git/?p=glibc.git;a=shortlog;h=refs/heads/release/2.31/master.

Remove the stack-protector check from test-security-check, as the test
no-longer fails, and given the control we have of the end, the actual
security-check test seems sufficient (this might also be applied to some
of the other checks).

Drops runtime support for Ubuntu Bionic 18.04 and RHEL-8 from the release binaries.
2024-06-12 10:33:17 +01:00
merge-script
5ee6b76c69
Merge bitcoin/bitcoin#29325: consensus: Store transaction nVersion as uint32_t
429ec1aaaa refactor: Rename CTransaction::nVersion to version (Ava Chow)
27e70f1f5b consensus: Store transaction nVersion as uint32_t (Ava Chow)

Pull request description:

  Given that the use of a transaction's nVersion is always as an unsigned int, it doesn't make sense to store it as signed and then cast it to unsigned everywhere it is used and displayed.

  Since a few alternative implementations have recently been revealed to have made an error with this signedness that would have resulted in consensus failure, I think it makes sense for us to just make this always unsigned to make it clear that the version is treated as unsigned. This would also help us avoid future potential issues with signedness of this value.

  I believe that this is safe and does not actually change what transactions would or would not be considered both standard and consensus valid. Within consensus, the only use of the version in consensus is in BIP68 validation which was already casting it to uint32_t. Within policy, although it is used as a signed int for the transaction version number check, I do not think that this change would change standardness. Standard transactions are limited to the range [1, 2]. Negative numbers would have fallen under the < 1 condition, but by making it unsigned, they are still non-standard under the > 2 condition.

  Unsigned and signed ints are serialized and unserialized the same way so there is no change in serialization.

ACKs for top commit:
  maflcko:
    ACK 429ec1aaaa 🐿
  glozow:
    ACK 429ec1aaaa
  shaavan:
    ACK 429ec1aaaa 💯

Tree-SHA512: 0bcd92a245d7d16c3665d2d4e815a4ef28207ad4a1fb46c6f0203cdafeab1b82c4e95e4bdce7805d80a4f4a46074f6542abad708e970550d38a00d759e3dcef1
2024-06-12 10:32:31 +01:00
fanquake
7cbfd7a7ce
refactor: rename (macho) ld64 to lld
Change some references to the macho ld64 to lld, which is now what is
used.
2024-06-10 13:20:54 +01:00
fanquake
e9a44faf14
depends: remove FORCE_USE_SYSTEM_CLANG 2024-06-10 13:15:23 +01:00
fanquake
9946618f61
guix: use clang-toolchain-18 for macOS build
Version is 18.1.6.
2024-06-10 13:15:22 +01:00
merge-script
2ad6e8efa3
Merge bitcoin/bitcoin#30231: guix: bump time-machine to f0bb724211872cd6158fce6162e0b8c73efed126
2599655c1f guix: bump time-machine to f0bb724211872cd6158fce6162e0b8c73efed126 (fanquake)

Pull request description:

  Includes:
  LLVM 18.1.x (#30201)
  GCC 13.x (#29881)

  git-minimal 2.41.0 -> 2.45.1
  Kernel Headers 6.1.80 -> 6.1.92
  moreutils 0.68 -> 0.69

  Commits like https://git.savannah.gnu.org/cgit/guix.git/commit/?id=7b0f145802f0c2c785014293d748721678fef824, which should improve the bootstrap situation (#30042). This can somewhat be visualised by comparing the (simplified) dependencies of guix itself, between the two time-machines.

  Master:
  ![master_2](https://github.com/bitcoin/bitcoin/assets/863730/714402a2-345e-43c7-974b-5112d03d44c2)

  PR:
  ![pr](https://github.com/bitcoin/bitcoin/assets/863730/7079a155-e013-4d59-9ea1-21a64d71e2d8)

  Note that in the case of this PR, we are better off, no-longer having to build a number of tex packages, ruby, cairo, graphics libs, openssl 1.x etc.

ACKs for top commit:
  TheCharlatan:
    ACK 2599655c1f

Tree-SHA512: 9c5675a5d563c17744c89c8a392bc7865aa1c9e71a5e3044c23f31e51458dac28c0c238d2055c86dc732df595dae60bcbc8b85266b23b7991c4c770d56f7d23a
2024-06-08 09:29:39 +01:00
Ava Chow
429ec1aaaa refactor: Rename CTransaction::nVersion to version
In order to ensure that the change of nVersion to a uint32_t in the
previous commit has no effect, rename nVersion to version in this commit
so that reviewers can easily spot if a spot was missed or if there is a
check somewhere whose semantics have changed.
2024-06-07 13:55:23 -04:00
Ava Chow
4a020ca443
Merge bitcoin/bitcoin#29401: test: Remove struct.pack from almost all places
fa52e13ee8 test: Remove struct.pack from almost all places (MarcoFalke)
fa826db477 scripted-diff: test: Use int.to_bytes over struct packing (MarcoFalke)
faf2a975ad test: Use int.to_bytes over struct packing (MarcoFalke)
faf3cd659a test: Normalize struct.pack format (MarcoFalke)

Pull request description:

  `struct.pack` has many issues:

  * The format string consists of characters that may be confusing and may need to be looked up in the documentation, as opposed to using easy to understand self-documenting code.

  This lead to many test bugs, which weren't hit, which is fine, but still confusing. Ref: https://github.com/bitcoin/bitcoin/pull/29400, https://github.com/bitcoin/bitcoin/pull/29399, https://github.com/bitcoin/bitcoin/pull/29363, fa3886b7c6, ...

  Fix all issues by using the built-in `int` helpers `to_bytes` via a scripted diff.

  Review notes:

  * For `struct.pack` and `int.to_bytes` the error behavior is the same, although the error messages are not identical.
  * Two `struct.pack` remain. One for float serialization in a C++ code comment, and one for native serialization.

ACKs for top commit:
  achow101:
    ACK fa52e13ee8
  rkrux:
    tACK [fa52e13](fa52e13ee8)
  theStack:
    Code-review ACK fa52e13ee8

Tree-SHA512: ee80d935b68ae43d1654b047e84ceb80abbd20306df35cca848b3f7874634b518560ddcbc7e714e2e7a19241e153dee64556dc4701287ae811e26e4f8c57fe3e
2024-06-06 19:18:55 -04:00
fanquake
2599655c1f
guix: bump time-machine to f0bb724211872cd6158fce6162e0b8c73efed126
Includes:
LLVM 18.1.x (#30201)
GCC 13.x (#29881)

git-minimal 2.41.0 -> 2.45.1
Kernel Headers 6.1.80 -> 6.1.92
moreutils 0.68 -> 0.69

Commits like
https://git.savannah.gnu.org/cgit/guix.git/commit/?id=7b0f145802f0c2c785014293d748721678fef824,
which should improve the bootstrap situation (#30042).
2024-06-05 14:15:10 +01:00
fanquake
5f2c1d84e3
guix: show *_FLAGS variables in pre-build output
For example:
```bash
ADDITIONAL_GUIX_COMMON_FLAGS set in the ENV
ADDITIONAL_GUIX_ENVIRONMENT_FLAGS="--emulate-fhs" ./contrib/guix/guix-build
<snip>
INFO: Building f75199182133 for platform triple x86_64-linux-gnu:
      ...using reference timestamp: 1716905119
      ...running at most 10 jobs
      ...from worktree directory: '/bitcoin'
          ...bind-mounted in container to: '/bitcoin'
      ...in build directory: '/bitcoin/guix-build-f75199182133/distsrc-f75199182133-x86_64-linux-gnu'
          ...bind-mounted in container to: '/distsrc-base/distsrc-f75199182133-x86_64-linux-gnu'
      ...outputting in: '/bitcoin/guix-build-f75199182133/output/x86_64-linux-gnu'
          ...bind-mounted in container to: '/outdir-base/x86_64-linux-gnu'
      ADDITIONAL FLAGS (if set)
          ADDITIONAL_GUIX_COMMON_FLAGS: --no-substitutes
          ADDITIONAL_GUIX_ENVIRONMENT_FLAGS: --emulate-fhs
          ADDITIONAL_GUIX_TIMEMACHINE_FLAGS:
```
2024-06-03 11:56:40 +01:00
merge-script
be100cf4c7
Merge bitcoin/bitcoin#21778: build: LLD based macOS toolchain
e8c25e8a35 guix: drop binutils from macOS env (fanquake)
555fddf646 guix: use GUIX_LD_WRAPPER_DISABLE_RPATH for all HOSTS (fanquake)
9ec238d0f3 guix: remove ZERO_AR_DATE export (fanquake)
f836f7e9b3 depends: remove cctools & libtapi (fanquake)
4a0536c5d9 build: switch to using lld for macOS builds (fanquake)
c6a6b2d6fd build: add lld into macOS build environment(s) (fanquake)
437e908ebd depends: swap cctools-x for llvm-x (fanquake)
bab287d1ba depends: don't use -no_warning_for_no_symbols in macOS qt build (fanquake)

Pull request description:

  This switches us to using a [LLD](https://lld.llvm.org/) based toolchain for macOS builds.

  ### Benefits
  * Less complicated macOS toolchain.
  * No longer beholden to Apple releasing it's [source](https://opensource.apple.com/source/) for [cctools](https://opensource.apple.com/source/cctools/), [ld64](https://opensource.apple.com/source/ld64/) & [libtapi](https://opensource.apple.com/source/tapi/).
  * No more reliance on third parties to modify those sources for us. i.e [apple-libtapi](https://github.com/tpoechtrager/apple-libtapi), [cctools-port](https://github.com/tpoechtrager/cctools-port) (cctools + ld64).

ACKs for top commit:
  theuni:
    Tentative ACK e8c25e8a35.

Tree-SHA512: ec73304e8a2cd4c71041f7863d7d2e4e0408787299fb4fa3745076853156e8f64e4742e16f30d65e3a27f1e9c0d19cdf802248366b72a4fcb4ea821f92bb7a00
2024-05-29 09:42:05 +01:00
Cory Fields
34c9cee380 clang-tidy: add check for non-trivial thread_local vars
Do not allow thread_local vars with non-trivial destructors
2024-05-22 13:47:09 +00:00
fanquake
e8c25e8a35
guix: drop binutils from macOS env 2024-05-22 08:51:34 +01:00
fanquake
555fddf646
guix: use GUIX_LD_WRAPPER_DISABLE_RPATH for all HOSTS 2024-05-22 08:51:33 +01:00
fanquake
9ec238d0f3
guix: remove ZERO_AR_DATE export
LLD enables ZERO_AR_DATE by default, setting it to zero would enable
non-determinism, setting it to any other value is ignored.

See:
https://github.com/llvm/llvm-project/blob/main/lld/docs/MachO/ld64-vs-lld.rst.
2024-05-22 08:51:33 +01:00
fanquake
f836f7e9b3
depends: remove cctools & libtapi 2024-05-22 08:51:33 +01:00
fanquake
4a0536c5d9
build: switch to using lld for macOS builds
Adjust the security check for:
ld64.lld: warning: Option `-allow_stack_execute' is not yet implemented.
ld64.lld: error: -fixup_chains is incompatible with -no_pie
and to account for the embedding of LLVMs version number.
2024-05-22 08:51:33 +01:00
fanquake
c6a6b2d6fd
build: add lld into macOS build environment(s) 2024-05-22 08:51:33 +01:00
Ava Chow
9f4ff1e965 windeploy: Renew certificate 2024-05-21 23:19:51 -04:00
Ryan Ofsky
ffa27af24d test: Add check-deps.sh script to check for unexpected library dependencies 2024-05-16 11:16:08 -04:00
merge-script
695d80126f
Merge bitcoin/bitcoin#30074: contrib: use ENV flags in get_arch
b59a027d95 contrib: drop dead get_machine from test sym check (fanquake)
e6aba463ad contrib: use env_flags in get_arch (fanquake)

Pull request description:

  This isn't an issue right now (because the get_arch check is simple), but becomes one as soon as we want to use `lld` for linking, and need LDFLAGS (otherwise we call `ld` and fail, see it's usage in #21778). So I've split this out for review. It also makes sense to use the same flags for all compilation in these checks.

  Also drops some dead code in test-symbol-check.

ACKs for top commit:
  TheCharlatan:
    ACK b59a027d95

Tree-SHA512: d8afc4144815369aae63cf6dc6e983af46f208c7043d6ea5c9c811152649c256a8e67eb6864ea9d385d87b6b049fece07710a84b90da325da7fc3f05efcaacd6
2024-05-15 09:02:32 +08:00
merge-script
4d3f1d08db
Merge bitcoin/bitcoin#29739: build: swap cctools otool for llvm-objdump
7f5ac4520d build: swap otool for (llvm-)objdump (fanquake)

Pull request description:

  This tool is used in GUI packaging on macOS, and also somewhat of a blocker for #21778. The main issue is that some distros don't really ship this tool in a standard ways, i.e Ubuntu only ships `llvm-otool` with a version suffix, i.e `llvm-otool-17`, which makes it hard to find and use. Rather than trying to deal with that mess, switch to using the equivalent LLVM tool (objdump), which is a drop-in replacement.

ACKs for top commit:
  TheCharlatan:
    ACK 7f5ac4520d
  theuni:
    ACK 7f5ac4520d. Tested `make deploy` on native macOS. Looks good.
  hebasto:
    ACK 7f5ac4520d.

Tree-SHA512: ac978043f14fb448010542a4a7ce8c6c74b4cbd90f83b4cb4d0bff55974010f10a70b5354f65b239a8bd961d7a3aca22ca165b42954ca87879b9e0524db5f879
2024-05-11 18:34:42 +08:00
fanquake
b59a027d95
contrib: drop dead get_machine from test sym check 2024-05-10 00:13:50 +08:00
fanquake
e6aba463ad
contrib: use env_flags in get_arch
Otherwise we fail to link when trying to use lld.
2024-05-10 00:13:31 +08:00
Ava Chow
ceb1e078f8
Merge bitcoin/bitcoin#28793: contrib: Add asmap-tool
6abe772a17 contrib: Add asmap-tool (Fabian Jahr)

Pull request description:

  This adds `asmap.py` and `asmap-tool.py` from sipa's `nextgen` branch: https://github.com/sipa/asmap/tree/nextgen

  The motivation is that we should maintain the tooling for de- and encoding asmap files within the bitcoin core repository because it is not possible to use an asmap file that is not encoded.

  We already had an earlier version of `asmap.py` within the seeds contrib tools. The newer version only had a small amount of changes and is still compatible, so the old version is removed from contrib/seeds and the new version is made available to `makeseeds.py`.

ACKs for top commit:
  virtu:
    ACK [6abe772](6abe772a17)
  0xB10C:
    ACK 6abe772a17
  achow101:
    ACK 6abe772a17
  brunoerg:
    ACK 6abe772a17

Tree-SHA512: cc2a82ffa4eb46fa0ce4ca769dd82f8d0d2f37fc3652aa748eeb060e1142f9da4035008fe89433e2fd524a4dc153b7b9c085748944b49137b37009b0c0be8afb
2024-05-09 11:57:30 -04:00
fanquake
7f5ac4520d
build: swap otool for (llvm-)objdump
Similar to libtool, (llvm-)otool only exists with a version suffix
on some systems (Ubuntu), which makes it annoying to use/find. Avoid
this, by switching to objdump. Which is a drop-in replacement.

This is related to #21778, and the switchover to using vanilla LLVM for
macOS.
2024-05-08 16:36:41 +08:00
MarcoFalke
fa52e13ee8
test: Remove struct.pack from almost all places 2024-05-07 15:41:17 +02:00
MarcoFalke
fa826db477
scripted-diff: test: Use int.to_bytes over struct packing
-BEGIN VERIFY SCRIPT-
 sed -i --regexp-extended 's!struct.pack\(.<?B., (.*)\)!\1.to_bytes(1, "little")!g'             $( git grep -l struct.pack )
 sed -i --regexp-extended 's!struct.pack\(.<I., (.*)\)!\1.to_bytes(4, "little")!g'              $( git grep -l struct.pack )
 sed -i --regexp-extended 's!struct.pack\(.<H., (.*)\)!\1.to_bytes(2, "little")!g'              $( git grep -l struct.pack )
 sed -i --regexp-extended 's!struct.pack\(.<i., (.*)\)!\1.to_bytes(4, "little", signed=True)!g' $( git grep -l struct.pack )
 sed -i --regexp-extended 's!struct.pack\(.<q., (.*)\)!\1.to_bytes(8, "little", signed=True)!g' $( git grep -l struct.pack )
 sed -i --regexp-extended 's!struct.pack\(.>H., (.*)\)!\1.to_bytes(2, "big")!g'                 $( git grep -l struct.pack )
-END VERIFY SCRIPT-
2024-05-07 15:40:47 +02:00
Sjors Provoost
8fee5355ee
guix: fix suggested fake date for openssl -1.1.1l
Also fix layout of instructions.
2024-04-29 20:44:37 +02:00
merge-script
a46065e36c
Merge bitcoin/bitcoin#29895: guix: remove bzip2 from deps
b8e084b978 guix: remove no-longer-used bzip2 (fanquake)
bd6e1d6718 depends: switch qrencode to .tar.gz (fanquake)
4a9b71b900 depends: switch libxcb_util_wm to .tar.gz (fanquake)
fad989852d depends: switch libxcb_util_render to .tar.gz (fanquake)
ce28cb31b4 depends: switch libxcb_util_keysyms to .tar.gz (fanquake)
00a6896346 depends: switch libxcb_util_image to .tar.gz (fanquake)
8e9190c6aa depends: switch libxcb_util to .tar.gz (fanquake)
b845029d46 depends: switch xproto to .tar.gz (fanquake)
5996c30384 depends: switch libXau to .tar.gz (fanquake)
e7a8dd5931 depends: switch fontconfig to .tar.gz (fanquake)
58c423def3 depends: switch boost to .tar.gz (fanquake)

Pull request description:

  This moves packages in depends that use `.tar.bzip2` to `.tar.gz` (which is what we use for our own release tarballs). Doing so means we can drop `bzip2` from our Guix release env. You can observe that Guix building master without it would currently fail:
  ```diff
  diff --git a/contrib/guix/manifest.scm b/contrib/guix/manifest.scm
  index 8f13c642d3..96818c7748 100644
  --- a/contrib/guix/manifest.scm
  +++ b/contrib/guix/manifest.scm
  @@ -499,7 +499,6 @@ inspecting signatures in Mach-O binaries.")
           moreutils
           ;; Compression and archiving
           tar
  -        bzip2
           gzip
           xz
           ;; Build tools
  ```
  `FORCE_DIRTY_WORKTREE=1 ./contrib/guix/guix-build`
  ```bash
  Extracting boost...
  /sources/boost_1_81_0.tar.bz2: OK
  tar (child): lbzip2: Cannot exec: No such file or directory
  tar (child): Error is not recoverable: exiting now
  tar: Child returned status 2
  tar: Error is not recoverable: exiting now
  ```

  Guix Build:
  ```bash
  8f6959d01ae972bae1340dfaf18753607152eca9844e6d8c4fa128314a4ba762  guix-build-b8e084b9781e/output/aarch64-linux-gnu/SHA256SUMS.part
  3c9c1cc000e3e6b7c2853c9d530c9afa1c880a43e7ab4c766aaa88283ff0908c  guix-build-b8e084b9781e/output/aarch64-linux-gnu/bitcoin-b8e084b9781e-aarch64-linux-gnu-debug.tar.gz
  f45fbece697b450538aded11f568e92b2af391e873e113c3038d022eff41688f  guix-build-b8e084b9781e/output/aarch64-linux-gnu/bitcoin-b8e084b9781e-aarch64-linux-gnu.tar.gz
  08295d770c11b2057206f98aaf4123007c7475bd942840d048f5f9d5efec1ce1  guix-build-b8e084b9781e/output/arm-linux-gnueabihf/SHA256SUMS.part
  0a0db6967168019b8b890ec4d31b3a87a88c4956b703938ec4447d514cfc231e  guix-build-b8e084b9781e/output/arm-linux-gnueabihf/bitcoin-b8e084b9781e-arm-linux-gnueabihf-debug.tar.gz
  3d1538e8bf4edfb66a4875198dfa90b79dcfe44eb9c4e76e47d73a18175c838a  guix-build-b8e084b9781e/output/arm-linux-gnueabihf/bitcoin-b8e084b9781e-arm-linux-gnueabihf.tar.gz
  87e7805155dbed3bd64763f199ea63843ed8c4eb37873753c7e60b0b42565eaf  guix-build-b8e084b9781e/output/arm64-apple-darwin/SHA256SUMS.part
  fa33590296aeae2b738b023a4cbf2de4a4e06662a5f7d407c251a8af714bd587  guix-build-b8e084b9781e/output/arm64-apple-darwin/bitcoin-b8e084b9781e-arm64-apple-darwin-unsigned.tar.gz
  32b8fbbdf240f9f08e44c7bb0a8ea2e8a40537e59ec2231cf6635edc6592f226  guix-build-b8e084b9781e/output/arm64-apple-darwin/bitcoin-b8e084b9781e-arm64-apple-darwin-unsigned.zip
  d176f3b7c8140c8dfde03bd87fd5abd4a89b497ba11fa6849bc92a33cb621a07  guix-build-b8e084b9781e/output/arm64-apple-darwin/bitcoin-b8e084b9781e-arm64-apple-darwin.tar.gz
  5273b17087e3565ab042a7989cfba71cf1629331d0267137d7eccabee1a06a13  guix-build-b8e084b9781e/output/dist-archive/bitcoin-b8e084b9781e.tar.gz
  b84a9180181994a6a17a1c2a4701f8ba5a82654233d5a8afcf596d28dd8b3924  guix-build-b8e084b9781e/output/powerpc64-linux-gnu/SHA256SUMS.part
  fd3396f6b64425a31b5a3565ab4d8a1c1668c291349a0f9e9b8904dad04ee24c  guix-build-b8e084b9781e/output/powerpc64-linux-gnu/bitcoin-b8e084b9781e-powerpc64-linux-gnu-debug.tar.gz
  73cb4bd2a67934c93ea8e3f3bc04b8917627ec09d75c151bb01977bba97522c8  guix-build-b8e084b9781e/output/powerpc64-linux-gnu/bitcoin-b8e084b9781e-powerpc64-linux-gnu.tar.gz
  15938e7f0f71303b96566d60e3b255816e7fd70d628601e592e1d6840eb8d2a1  guix-build-b8e084b9781e/output/riscv64-linux-gnu/SHA256SUMS.part
  408b4973865e3a77be833438f71181fd88acd0490127257b3667309e8421030e  guix-build-b8e084b9781e/output/riscv64-linux-gnu/bitcoin-b8e084b9781e-riscv64-linux-gnu-debug.tar.gz
  a5c02144ffb79cfa0179ff0d7ac0f81192ef1d3b1acfad334adf486e50b776bb  guix-build-b8e084b9781e/output/riscv64-linux-gnu/bitcoin-b8e084b9781e-riscv64-linux-gnu.tar.gz
  de904843d8bb8601a2d763701ebb929e61b447e01040267a12149a2902489535  guix-build-b8e084b9781e/output/x86_64-apple-darwin/SHA256SUMS.part
  414cb3cf3fa10b9a3cda47e98858222f01fdd164371dd54761642e6793099849  guix-build-b8e084b9781e/output/x86_64-apple-darwin/bitcoin-b8e084b9781e-x86_64-apple-darwin-unsigned.tar.gz
  6ce43d7f007bf17eca16d3ee48190318e09aacd82c5396f9565e6345ec6bd2fa  guix-build-b8e084b9781e/output/x86_64-apple-darwin/bitcoin-b8e084b9781e-x86_64-apple-darwin-unsigned.zip
  24eba9c0dd1312a68c2b2a800cc915595e343c0ead982b6cbe025abe7a7bff19  guix-build-b8e084b9781e/output/x86_64-apple-darwin/bitcoin-b8e084b9781e-x86_64-apple-darwin.tar.gz
  2869a01ce847298950a91b3b8514bc8fa39cc274a8e9cd4f68f4f038c1bb3040  guix-build-b8e084b9781e/output/x86_64-linux-gnu/SHA256SUMS.part
  3f63e1d3b19b640d3994074b344d595bcd6fca420a1a8669b63b4ad22978308b  guix-build-b8e084b9781e/output/x86_64-linux-gnu/bitcoin-b8e084b9781e-x86_64-linux-gnu-debug.tar.gz
  ccc3eb8eb56c1596981e81c8c95cadee3db799ed69b0cd1fb1e102da10adacfb  guix-build-b8e084b9781e/output/x86_64-linux-gnu/bitcoin-b8e084b9781e-x86_64-linux-gnu.tar.gz
  1ff6dab6dcde9ddbbe407cca02119c4a5d545034c91389a1c647020902b7b40e  guix-build-b8e084b9781e/output/x86_64-w64-mingw32/SHA256SUMS.part
  a91c2247fd9d886e3f3ada551c0a4f9f7ffc4874e07ea5ab9de14f2743b9b8c7  guix-build-b8e084b9781e/output/x86_64-w64-mingw32/bitcoin-b8e084b9781e-win64-debug.zip
  6fbc8d5df571fd535990370009bdfcbb37b9697c33446a08eadb1279ba6e4649  guix-build-b8e084b9781e/output/x86_64-w64-mingw32/bitcoin-b8e084b9781e-win64-setup-unsigned.exe
  38f7a981fd2999c1e138860e1ddc183dafec090d867e37f5ab5c2d48ad4ef9ee  guix-build-b8e084b9781e/output/x86_64-w64-mingw32/bitcoin-b8e084b9781e-win64-unsigned.tar.gz
  88aca0a40a64a289617aad060a9ccf8c78bc6a201470720d8caf48d793d5207f  guix-build-b8e084b9781e/output/x86_64-w64-mingw32/bitcoin-b8e084b9781e-win64.zip
  ```

ACKs for top commit:
  laanwj:
    This is fully expected (no weird changes from dropping bzip2 from the build env). ACK b8e084b978

Tree-SHA512: 7da9a75a3ff7fa0c9ff464e3a82f5b1d0cfdd28d5de049c910142179f7e1211c922b705361844c7029ce9baaa8e97e8016b454d2e4eee98e31fae1379674fbe2
2024-04-29 10:00:23 +08:00
Fabian Jahr
6abe772a17
contrib: Add asmap-tool
Co-authored-by: Pieter Wuille <pieter@wuille.net>
2024-04-25 17:27:08 +02:00