Commit Graph

2112 Commits

Author SHA1 Message Date
fanquake
7c3ac598dd
contrib: list other binaries in manpage output 2024-03-07 13:07:53 +00:00
Ava Chow
7ab54397f8 seeds: Update testnet seeds 2024-03-04 19:53:30 -05:00
Ava Chow
34a233b6d8 seeds: Update mainnet seeds 2024-03-04 19:53:24 -05:00
Ava Chow
9701bc435f makeseeds: Check i2p seeds too 2024-03-04 19:42:11 -05:00
Ava Chow
a8ec9eede4 makeseeds: Update PATTERN_AGENT 2024-03-04 11:44:16 -05:00
fanquake
ba90b058bd
Merge bitcoin/bitcoin#29345: rpc: Do not wait for headers inside loadtxoutset
faa30a4c56 rpc: Do not wait for headers inside loadtxoutset (MarcoFalke)

Pull request description:

  While the `loadtxoutset` default 10 minute timeout is convenient when it is sufficient, it may cause hassle where it is not. For example:

  * When P2P connections are missing, it seems better to abort early than wait for the timeout.
  * When the 10 minute timeout is not sufficient, the RPC will have to be called again, so a check or loop is needed outside the RPC either way. So might as well remove the loop inside the RPC.

ACKs for top commit:
  fjahr:
    ACK faa30a4c56
  theStack:
    Code-review ACK faa30a4c56
  pablomartin4btc:
    tACK faa30a4c56
  TheCharlatan:
    ACK faa30a4c56

Tree-SHA512: 9167c7d8b2889bb3fd369de4acd2cc4d24a2fe225018d82bd9568ecd737093f6e19be7cc62815b574137b61076a6f773c29bff75398991b5cd702423aab2322b
2024-02-26 11:11:25 +00:00
Ava Chow
0b768746ef
Merge bitcoin/bitcoin#28170: p2p: adaptive connections services flags
27f260aa6e net: remove now unused global 'g_initial_block_download_completed' (furszy)
aff7d92b15 test: add coverage for peerman adaptive connections service flags (furszy)
6ed53602ac net: peer manager, dynamically adjust desirable services flag (furszy)
9f36e591c5 net: move state dependent peer services flags (furszy)
f9ac96b8d6 net: decouple state independent service flags from desirable ones (furszy)
97df4e3887 net: store best block tip time inside PeerManager (furszy)

Pull request description:

  Derived from #28120 discussion.

  By relocating the peer desirable services flags into the peer manager, we
  allow the connections acceptance process to handle post-IBD potential
  stalling scenarios.

  The peer manager will be able to dynamically adjust the services flags
  based on the node's proximity to the tip (back and forth). Allowing the node
  to recover from the following post-IBD scenario:
  Suppose the node has successfully synced the chain, but later experienced
  dropped connections and remained inactive for a duration longer than the limited
  peers threshold (the timeframe within which limited peers can provide blocks). In
  such cases, upon reconnecting to the network, the node might only establish
  connections with limited peers, filling up all available outbound slots. Resulting
  in an inability to synchronize the chain (because limited peers will not provide
  blocks older than the `NODE_NETWORK_LIMITED_MIN_BLOCKS` threshold).

ACKs for top commit:
  achow101:
    ACK 27f260aa6e
  vasild:
    ACK 27f260aa6e
  naumenkogs:
    ACK 27f260aa6e
  mzumsande:
    Light Code Review ACK 27f260aa6e
  andrewtoth:
    ACK 27f260aa6e

Tree-SHA512: 07befb9bcd0b60a4e7c45e4429c02e7b6c66244f0910f4b2ad97c9b98258b6f46c914660a717b5ed4ef4814d0dbfae6e18e6559fe9bec7d0fbc2034109200953
2024-01-31 11:44:41 -05:00
MarcoFalke
faa30a4c56
rpc: Do not wait for headers inside loadtxoutset 2024-01-30 18:09:58 +01:00
fanquake
3d52cedb49
Merge bitcoin/bitcoin#29251: contrib: Update clang-format-diff
52149b7a2c contrib: Fix clang-format-diff.py lint errors (TheCharlatan)
008e81e025 contrib: Latest clang-format-diff.py script (TheCharlatan)

Pull request description:

  This was taken from 900bb318b5/clang/tools/clang-format/clang-format-diff.py and is useful for systems where clang tools are shipped with a version suffix.

ACKs for top commit:
  maflcko:
    lgtm ACK 52149b7a2c  🌱

Tree-SHA512: cad720b283650e36c5b3ec597278112899ae6413a42c79b6296c58242000f32ae6ab7ed732a3a0f30f1f2586d7e3c0d1ef856a4821e28272bae6f428ed9497e9
2024-01-17 16:08:10 +00:00
TheCharlatan
52149b7a2c
contrib: Fix clang-format-diff.py lint errors
We assume to be using python3, so don't check for it. This removes a
type error on the line `from io import BytesIO as StringIO`.

Specify the encoding as "utf8" when opening a file.
2024-01-17 11:10:15 +01:00
fanquake
f1fcc9638c
Merge bitcoin/bitcoin#29170: contrib: add macho branch protection check
5335e454c0 contrib: add macho branch protection check (fanquake)

Pull request description:

  Followup to https://github.com/bitcoin/bitcoin/pull/28459. Add a sanity check that `bti` instructions are present in the arm macho binary, similar to our x86_64 check for control flow.

  Could do something similar for aarch64 linux in future, and maybe could use https://github.com/lief-project/LIEF/issues/975.

ACKs for top commit:
  TheCharlatan:
    ACK 5335e454c0

Tree-SHA512: 6cc8721209fe07fe07f0524ef6f114004e2b98844f73d31ff16547f7055c7cb4a5609480058c45ede21b457b2dea5357f1475eaa5063ea1f9772aa260f49039b
2024-01-16 15:33:41 +00:00
TheCharlatan
008e81e025
contrib: Latest clang-format-diff.py script
This was take from
900bb318b5/clang/tools/clang-format/clang-format-diff.py

Updating it introduces some new options. For example specifying the
clang-format binary, which is useful for systems where clang tools are
shipped with a version suffix.
2024-01-16 16:33:12 +01:00
furszy
f9ac96b8d6
net: decouple state independent service flags from desirable ones
This former one will be moved to the peer manager class in the
following-up commit.
2024-01-15 10:28:20 -03:00
fanquake
dff6d1884a
Merge bitcoin/bitcoin#29222: doc: update Bitcoin Core license to 2024
1f8450f066 doc: upgrade Bitcoin Core license to 2024 (22388o️)

Pull request description:

  See  https://github.com/bitcoin/bitcoin/pull/26748.

  Cherry-picked these commits from 22388o and then squashed them.

ACKs for top commit:
  fanquake:
    ACK 1f8450f066

Tree-SHA512: 6d12f24a6c7cd421f7d975d7e445de4583144a4d0902d4e68e7648395074ca804e3ee585b2d3f307d193690e2ed2f9fbd8e7938f8fb8af263888b8701993782a
2024-01-11 16:47:56 +00:00
fanquake
014f52550b
Merge bitcoin/bitcoin#29186: ci, iwyu: Drop backported mappings
a395218d8c ci, iwyu: Drop backported mappings (Hennadii Stepanov)

Pull request description:

  See https://github.com/include-what-you-use/include-what-you-use/pull/1026.

  Split from https://github.com/bitcoin/bitcoin/pull/27710 as a non-controversial change.

ACKs for top commit:
  fanquake:
    ACK a395218d8c

Tree-SHA512: ae7955a99396ab4f62ab7c989dba59c26448837f0ba4436bf3fddebe4099b5d3c03492e22a8497104c6afcceede1bb1b81f9d71c7c7e43692e6d70dcdfc11e7c
2024-01-11 16:18:26 +00:00
fanquake
522b8370d9
Merge bitcoin/bitcoin#29127: Use hardened runtime on macOS release builds.
4fdd836db9 Use hardened runtime on macOS release builds. (Mark Friedenbach)

Pull request description:

  The Apple notary service requires submitted app bundles to be configured to use the hardened runtime libraries.  This is configured at signing time, and supported by the signapple tool Bitcoin Core uses for reproduceable signed binaries.  We simply need to pass "--hardened-runtime" when the signature is created.  Once attached to the bundle, the resulting codesigned binary can be successfully submitted to the Apple binary notarization service by any Apple Developer.

  This partially resolves #15774. The release maintainer, or any authorized Apple Developer, will need to run `xcrun notarytool` to prevent gatekeeper warnings on macOS. Using `xcrun staple` to generate a binary that doesn't call home on first launch would be bonus, but at least this would massively improve the user experience.

ACKs for top commit:
  fanquake:
    ACK 4fdd836db9 - we can move ahead with this, and figure out notarisation / stapling as a followup.

Tree-SHA512: 7b8ba50030fb230d44bd63d12ed082537e8eaaa61396114c5df715f8dd6772fd8d84b00dc819f88d9a463996c2170a84981fce1bde7f7999b4bdb914fbcdfdac
2024-01-11 10:03:09 +00:00
22388o⚡️
1f8450f066
doc: upgrade Bitcoin Core license to 2024 2024-01-10 16:29:01 -06:00
fanquake
82ba0f80a0
Merge bitcoin/bitcoin#28962: doc: Rework guix docs after 1.4 release
fad444f6e1 doc: Rework guix docs after 1.4 release (MarcoFalke)

Pull request description:

  Follow-up to https://github.com/bitcoin/bitcoin/pull/28902

  Fixes https://github.com/bitcoin/bitcoin/issues/28957

ACKs for top commit:
  TheCharlatan:
    ACK fad444f6e1
  fanquake:
    ACK fad444f6e1

Tree-SHA512: 23f270b438ede4e3173da68e63c1d022e2ef23bfd83f0ec038ec63a62348038722278385c5dac63ac29a460b4b61f23d8c9939667e00a1a3571b041d3eecb4cb
2024-01-05 17:44:37 +00:00
Hennadii Stepanov
a395218d8c
ci, iwyu: Drop backported mappings
See https://github.com/include-what-you-use/include-what-you-use/pull/1026
2024-01-05 16:01:52 +00:00
fanquake
5335e454c0
contrib: add macho branch protection check 2024-01-03 17:28:39 +00:00
fanquake
558250dec1
guix: use clang-toolchain-17 for macOS build
Version is 17.0.6.
2023-12-21 09:37:33 +00:00
Mark Friedenbach
4fdd836db9 Use hardened runtime on macOS release builds.
The Apple notary service requires submitted app bundles to be configured to use the hardened runtime libraries.  This is configured at signing time, and supported by the signapple tool Bitcoin Core uses for reproduceable signed binaries.  We simply need to pass "--hardened-runtime" when the signature is created.  Once attached to the bundle, the resulting codesigned binary can be successfully submitted to the Apple binary notarization service by any Apple Developer.
2023-12-20 16:24:37 -08:00
fanquake
c840dea27e
Merge bitcoin/bitcoin#29078: build: Bump guix time-machine to unlock riscv64 metal
fa87a2072b build: Bump guix time-machine to unlock riscv64 metal (MarcoFalke)

Pull request description:

  Closes https://github.com/bitcoin/bitcoin/issues/29020

ACKs for top commit:
  fanquake:
    ACK fa87a2072b

Tree-SHA512: a4681f560ebab2f74c2dc8e5a9851d23c1f3fd7235b19343950afdc126d4bc77fc733fa852f55d18656ba592f37a9fff487d8af776f6b952eb4f52c1affa8ba4
2023-12-18 12:54:31 +00:00
fanquake
925a750d99
Merge bitcoin/bitcoin#28844: contrib: drop GCC MAX_VERSION to 4.3.0 in symbol-check
ff896d2581 contrib: drop GCC MAX_VERSION to 4.3.0 in symbol-check (fanquake)

Pull request description:

  Reflect the actual symbols used, i.e:

  ```bash
  bitcoind: symbol __bswapsi2 from unsupported version GCC_4.3.0(7)
  ```

ACKs for top commit:
  TheCharlatan:
    ACK ff896d2581

Tree-SHA512: b38ff8f4dd78d2d1c9063c53544dc4f240c3043f142e1581f7ba42f088a509293f6f17cc402c60ac82bff3b36668866b87e0e9e4d10d929484bb4c7a3e654f25
2023-12-18 12:48:14 +00:00
MarcoFalke
fad444f6e1
doc: Rework guix docs after 1.4 release 2023-12-18 10:31:11 +01:00
MarcoFalke
fa87a2072b
build: Bump guix time-machine to unlock riscv64 metal 2023-12-14 11:41:40 +01:00
fanquake
8ea45e626e
build: use macOS 14 SDK (Xcode 15.0) 2023-12-05 09:55:01 +00:00
Ryan Ofsky
1c8893bd1c
Merge bitcoin/bitcoin#28852: script, assumeutxo: Enhance validations in utxo_snapshot.sh
11b7269d83 script: Enhance validations in utxo_snapshot.sh (pablomartin4btc)

Pull request description:

  This PR resolves #27841 and some more:

  - Ensure that the snapshot height is higher than the pruned block height when the node is pruned (Suggested by @Sjors [here](https://github.com/bitcoin/bitcoin/pull/28553#issuecomment-1804941396)).

  - Validate the correctness of the file path and check if the file already exists (@hazeycode's [#27845](https://github.com/bitcoin/bitcoin/pull/27845)).

  - Make network activity disablement optional for the user (Suggested by @Sjors [here](https://github.com/bitcoin/bitcoin/pull/16899#discussion_r342735815) and [here](https://github.com/bitcoin/bitcoin/pull/16899#issuecomment-536520911)).

  - Ensure the `reconsiderblock` command is triggered on exit (@hazeycode's same PR as above), even in the case of user interruption (Ctrl-C).

  In order to perform some testing please follow the instructions in the description of previous @hazeycode's PR #27845.

ACKs for top commit:
  Sjors:
    tACK 11b7269d83
  ryanofsky:
    Code review ACK 11b7269d83

Tree-SHA512: 2b699894c6f732ad5104f5a2bcf5dc86ed31edcc9d664690cab55b94a8ab00e2ca5bde901ee1d63acddca7ea80ad1734d8cfe78f9c02f8470f264fe93a2af759
2023-12-04 17:07:14 -05:00
fanquake
ff896d2581
contrib: drop GCC MAX_VERSION to 4.3.0 in symbol-check
Reflect the actual symbols used, i.e:

```bash
bitcoind: symbol __bswapsi2 from unsupported version GCC_4.3.0(7)
```
2023-11-30 17:42:26 +00:00
fanquake
cdb772313c
Merge bitcoin/bitcoin#28965: guix: remove input labels
a4980da1ce guix: remove input labels (fanquake)

Pull request description:

  Migrate package definitions to use the newer format for propogated inputs. See https://guix.gnu.org/manual/en/html_node/package-Reference.html#index-inputs_002c-of-packages.

  This change remains compatible with Guix 1.2.0+.

  See also: https://guix.gnu.org/blog/2021/the-big-change/

  Guix Build (aarch64 & x86_64):
  ```bash
  4627c4eb83764f787f48b2aeab87b65bbaacb9ebfe33a5733d713165eec779af  guix-build-a4980da1ce5e/output/aarch64-linux-gnu/SHA256SUMS.part
  ecdd6db7fe0ee45fee1bd91ceaf23c0d8154ed5ad73586b74d86ee36964e18d4  guix-build-a4980da1ce5e/output/aarch64-linux-gnu/bitcoin-a4980da1ce5e-aarch64-linux-gnu-debug.tar.gz
  5f78980f95f3968248c27c4acd9993ec150ed3fa32802d89ccc6c6dc661a41bd  guix-build-a4980da1ce5e/output/aarch64-linux-gnu/bitcoin-a4980da1ce5e-aarch64-linux-gnu.tar.gz
  9af3dff2a8a4decf73048acea67d05f76d54ff84cecde833ea6860825bdaddc3  guix-build-a4980da1ce5e/output/arm-linux-gnueabihf/SHA256SUMS.part
  f53c6a5a229462a71f477db6f91112a2e9d31aafef294fca3c893916e904e2ed  guix-build-a4980da1ce5e/output/arm-linux-gnueabihf/bitcoin-a4980da1ce5e-arm-linux-gnueabihf-debug.tar.gz
  6ed01ecb71ed32098f70c8d667b1a48305b4b5b10f7bfc575eb8b5f787fe9534  guix-build-a4980da1ce5e/output/arm-linux-gnueabihf/bitcoin-a4980da1ce5e-arm-linux-gnueabihf.tar.gz
  6ceaaa7dc2959626f280b1e1de28ac9ff9223216e1a3fa333cdd55c416ff550d  guix-build-a4980da1ce5e/output/arm64-apple-darwin/SHA256SUMS.part
  633df184701a21746ee56a5de6e3705c229eac8712b9a1563a82f4de52130d05  guix-build-a4980da1ce5e/output/arm64-apple-darwin/bitcoin-a4980da1ce5e-arm64-apple-darwin-unsigned.tar.gz
  23b94cb4e870d71ae60bbb5a974362bbfabe901a73eeeb9d3bb5fbd70f5d649e  guix-build-a4980da1ce5e/output/arm64-apple-darwin/bitcoin-a4980da1ce5e-arm64-apple-darwin-unsigned.zip
  f60b802b3e92fb9cf3b45b835f6cfb8988221cfdd39146ee3a11dbab977733bc  guix-build-a4980da1ce5e/output/arm64-apple-darwin/bitcoin-a4980da1ce5e-arm64-apple-darwin.tar.gz
  9df0a08896a2bc42f97193b34beb29536783eab04d3ae5fe5642258188fc6e55  guix-build-a4980da1ce5e/output/dist-archive/bitcoin-a4980da1ce5e.tar.gz
  3fef561dd35dd4a4e9d0308591ebbdd5b1d26814ea48ff1f0c2732c62aef961b  guix-build-a4980da1ce5e/output/powerpc64-linux-gnu/SHA256SUMS.part
  187b8283f443bb29ed27546f983a5d098dfe49a059f52bc8ba0607242d37a5ae  guix-build-a4980da1ce5e/output/powerpc64-linux-gnu/bitcoin-a4980da1ce5e-powerpc64-linux-gnu-debug.tar.gz
  3f520b4bf1fbf955f9d25b5aa333f90989428cc9e417431998daa7c1041cb3bb  guix-build-a4980da1ce5e/output/powerpc64-linux-gnu/bitcoin-a4980da1ce5e-powerpc64-linux-gnu.tar.gz
  39abec9623d5086990a303c964a36e7f767bd6218e57261df95b616603eca0b8  guix-build-a4980da1ce5e/output/powerpc64le-linux-gnu/SHA256SUMS.part
  b71352ad4e8849937e42ad897d75f65866a529fd4d18059c5e6c39659a17f723  guix-build-a4980da1ce5e/output/powerpc64le-linux-gnu/bitcoin-a4980da1ce5e-powerpc64le-linux-gnu-debug.tar.gz
  4fb92753e1baa253780088649bfe6816525e0ada7b17c5acc57ec804d9ab32f8  guix-build-a4980da1ce5e/output/powerpc64le-linux-gnu/bitcoin-a4980da1ce5e-powerpc64le-linux-gnu.tar.gz
  ed422d4365354a16b98ba7d4184a118ce98473e1b70ac8ba62a617aa3af3c784  guix-build-a4980da1ce5e/output/riscv64-linux-gnu/SHA256SUMS.part
  9f002a8893748b0f6b581ab9d158a524e32140a3c271604b50cf1580b30b3000  guix-build-a4980da1ce5e/output/riscv64-linux-gnu/bitcoin-a4980da1ce5e-riscv64-linux-gnu-debug.tar.gz
  6844df378ad2f4c209d323ffa3e77c6aa28f7f087b8755b2baa2a0d1119c365b  guix-build-a4980da1ce5e/output/riscv64-linux-gnu/bitcoin-a4980da1ce5e-riscv64-linux-gnu.tar.gz
  ce0e27b6d831d5836ba3c5c8be377f08f4b92e9f390a7242aca5b68e67d1975e  guix-build-a4980da1ce5e/output/x86_64-apple-darwin/SHA256SUMS.part
  329c990fa71e694869bdcdd3e327a28eed2ad0b12f06d86e0957c6cb05e88910  guix-build-a4980da1ce5e/output/x86_64-apple-darwin/bitcoin-a4980da1ce5e-x86_64-apple-darwin-unsigned.tar.gz
  c44ec330e40285c1eba421f8d2e70a1538742fadbcc87f7f2f5a49bd83a72a7b  guix-build-a4980da1ce5e/output/x86_64-apple-darwin/bitcoin-a4980da1ce5e-x86_64-apple-darwin-unsigned.zip
  e3626284d9bd61b67b170433d7bdb226b0f7f63d20dad4dd0482e55d7418ef64  guix-build-a4980da1ce5e/output/x86_64-apple-darwin/bitcoin-a4980da1ce5e-x86_64-apple-darwin.tar.gz
  3e2a16e9dbb89d86e1e1884e0277160c3d1953c5ea5f88f29fe0a093a6f89599  guix-build-a4980da1ce5e/output/x86_64-linux-gnu/SHA256SUMS.part
  eb389467219c4af983f30e50e1f8d48601ed74690538bff76a55c0e585594a92  guix-build-a4980da1ce5e/output/x86_64-linux-gnu/bitcoin-a4980da1ce5e-x86_64-linux-gnu-debug.tar.gz
  d81fd209c03e74aebd7b28b42d3ea21f57957ede7fcb7baae721c8abb2885b6c  guix-build-a4980da1ce5e/output/x86_64-linux-gnu/bitcoin-a4980da1ce5e-x86_64-linux-gnu.tar.gz
  51de8a813459c1ce79bf9a2e39bf9f17b4771c6146ef55829f3ee0415d0ec9ec  guix-build-a4980da1ce5e/output/x86_64-w64-mingw32/SHA256SUMS.part
  63dc5386467d0fc7f3c7b621273d019a822551fc9ac00be94c7d4ee446201836  guix-build-a4980da1ce5e/output/x86_64-w64-mingw32/bitcoin-a4980da1ce5e-win64-debug.zip
  3a4f2ef53165031648b1c3badc05698891d7c6541de3f67e9df513395c5c88c3  guix-build-a4980da1ce5e/output/x86_64-w64-mingw32/bitcoin-a4980da1ce5e-win64-setup-unsigned.exe
  92f0d67fbb8b37b6026287073df95431c961ad1820d7f8b9cd3b1ffcf58d4188  guix-build-a4980da1ce5e/output/x86_64-w64-mingw32/bitcoin-a4980da1ce5e-win64-unsigned.tar.gz
  3414b6c99d0bbd9ad88c0f88aafa70561dc107d1180fd42c90ad85033871c160  guix-build-a4980da1ce5e/output/x86_64-w64-mingw32/bitcoin-a4980da1ce5e-win64.zip
  ```

ACKs for top commit:
  TheCharlatan:
    lgtm ACK a4980da1ce

Tree-SHA512: cbb8ca9613125d4c443124b99a600b44533688f322c8535c9d82fb3bb8de66b46e63c6aafcf2917f169494181ece6efd02e2efaa32ef4f138a520731540d600c
2023-11-30 15:09:50 +00:00
fanquake
66c4b58e51
guix: switch from guix environment to guix shell
See https://guix.gnu.org/manual/devel/en/html_node/Invoking-guix-environment.html.

> Deprecation warning: The guix environment command is deprecated
in favor of guix shell, which performs similar functions but is more
convenient to use. See Invoking guix shell.

> Being deprecated, guix environment is slated for eventual removal,
but the Guix project is committed to keeping it until May 1st, 2023.
Please get in touch with us at guix-devel@gnu.org if you would like
to discuss it.

See also https://guix.gnu.org/blog/2021/from-guix-environment-to-guix-shell/
for a blog post and additional details.

Guix shell was added to guix in this commit,
https://git.savannah.gnu.org/cgit/guix.git/commit/?id=80edb7df6586464aa40e84e103f0045452de95db
which isn't part of the 1.3.0 release binaries out of the box, but
invoking a guix pull, and updating will make it available for all
builders.
2023-11-29 21:24:47 +00:00
fanquake
a4980da1ce
guix: remove input labels
Migrate package definitions to use the new format for propogated inputs.
See
https://guix.gnu.org/manual/en/html_node/package-Reference.html#index-inputs_002c-of-packages.

See also: https://guix.gnu.org/blog/2021/the-big-change/
2023-11-28 16:50:04 +00:00
fanquake
5d13b9586e
Merge bitcoin/bitcoin#28461: build: Windows SSP roundup
f95af98128 guix: default ssp for Windows GCC (fanquake)
95d55b96c2 guix: remove ssp workaround from Windows GCC (fanquake)
8f43302a0a build: remove explicit libssp linking from Windows build (fanquake)

Pull request description:

  I was expecting this to fail to compile somewhere, maybe in the CI, but that doesn't seem to be the case?
  Seems workable given the SSP related changes in the newer mingw-w64 headers (which are in Guix):
  > Implement some of the stack protector functions/variables so -lssp is now optional when _FORTIFY_SOURCE or -fstack-protector-strong is used.

  However I think this would still be broken in some older environments, so we might have to wait for a compiler bump, or similar. The optional -lssp also seems to work when using older headers, which doesn't make sense.

  Would fix #28104.

ACKs for top commit:
  hebasto:
    ACK f95af98128, I've verified binaries from `bitcoin-f95af98128f1-win64.zip` on Windows 11 Pro 23H2.
  TheCharlatan:
    ACK f95af98128

Tree-SHA512: 71169ec513cfe692dfa7741d2bf37b45da05627c0af1cbd50cf8c3c04cc21c4bf88f3284532bddc1e3e648391ec78dbaca5170987a13c21ac204a7bcaf27f349
2023-11-22 17:17:12 +00:00
fanquake
b2309c47da
Merge bitcoin/bitcoin#28902: doc: Simplify guix install doc, after 1.4 release
fa552e8a4e doc: Simplify guix install doc, after 1.4 release (MarcoFalke)

Pull request description:

  Now that 1.4 is out (for a while), remove the recommendation to build a random commit.

ACKs for top commit:
  fanquake:
    ACK fa552e8a4e
  hebasto:
    ACK fa552e8a4e.

Tree-SHA512: f5642df201ff0e2af8a7ae9660a66920ddbb5f522b3e921f6f4aa7c411ced23afa91bdfe43b943ac012228eebbaad3396df505d00aa8f721a4358f03fda9d8e3
2023-11-17 14:18:58 +00:00
MarcoFalke
fa552e8a4e
doc: Simplify guix install doc, after 1.4 release 2023-11-17 12:45:00 +01:00
fanquake
98b0acda0f
Merge bitcoin/bitcoin#28725: test: refactor: use built-in collection types for type hints (Python 3.9 / PEP 585)
a478c817b2 test: replace `Callable`/`Iterable` with their `collections.abc` alternative (PEP 585) (stickies-v)
4b9afb18e6 scripted-diff: use PEP 585 built-in collection types for verify-binary script (Sebastian Falbesoner)
d516cf83ed test: use built-in collection types for type hints (Python 3.9 / PEP 585) (Sebastian Falbesoner)

Pull request description:

  With Python 3.9 / [PEP 585](https://peps.python.org/pep-0585/), [type hinting has become a little less awkward](https://docs.python.org/3.9/whatsnew/3.9.html#type-hinting-generics-in-standard-collections), as for collection types one doesn't need to import the corresponding capitalized types (`Dict`, `List`, `Set`, `Tuple`, ...) anymore, but can use the built-in types directly (see  https://peps.python.org/pep-0585/#implementation for the full list).

  This PR applies the replacement for all Python scripts (i.e. in the contrib and test folders) for the basic types, i.e.:

  - typing.Dict -> dict
  - typing.List -> list
  - typing.Set  -> set
  - typing.Tuple -> tuple

  For an additional check, I ran mypy 1.6.1 on both master and the PR branch via
  ```
  $ mypy --ignore-missing-imports --explicit-package-bases $(git ls-files "*.py")
  ```
  and verified that the output is identical -- (from the 22 identified problems, most look like false-positives, it's probably worth it to go deeper here and address them in a follow-up though).

ACKs for top commit:
  stickies-v:
    ACK a478c817b2
  fanquake:
    ACK a478c817b2

Tree-SHA512: 6948c905f6abd644d84f09fcb3661d7edb2742e8f2b28560008697d251d77a61a1146ab4b070e65b0d27acede7a5256703da7bf6eb1c7c3a897755478c76c6e8
2023-11-17 11:19:17 +00:00
stickies-v
a478c817b2 test: replace Callable/Iterable with their collections.abc alternative (PEP 585) 2023-11-16 19:12:14 +01:00
muxator
defdf67765 contrib: use a raw string for a regular expression literal that contains backslashes in signet/miner
Running the miner under python >= 3.12 causes a SyntaxWarning. The problem was
already present in previous versions, but it only triggered a
DeprecationWarning, which was not shown by default.

The change is useful for future-proofing the code base, since future python
versions will start to exit with a runtime exception (see the reference given
later).

Command to see the warning at runtime under python3.11 (DeprecationWarning,
needs "-Walways"):
    $ python3.11 -Walways ./contrib/signet/miner
    <BASE>/contrib/signet/miner:33: DeprecationWarning: invalid escape sequence '\d'
      RE_MULTIMINER = re.compile("^(\d+)(-(\d+))?/(\d+)$")
    2023-11-15 16:02:49 ERROR Must specify command

Command to see the warning at runtime under python3.12 (SyntaxWarning, no
modifiers needed):
    $ python3.12 ./contrib/signet/miner
    <BASE>/contrib/signet/miner:33: SyntaxWarning: invalid escape sequence '\d'
      RE_MULTIMINER = re.compile("^(\d+)(-(\d+))?/(\d+)$")
    2023-11-15 16:03:00 ERROR Must specify command

Reference ( https://docs.python.org/3.8/library/re.html ):
    Regular expressions use the backslash character ('\') [...]. This collides
    with Python’s usage of the same character for the same purpose in string
    literals; [...]

    Also, please note that any invalid escape sequences in Python’s usage of the
    backslash in string literals now generate a DeprecationWarning and in the
    future this will become a SyntaxError.

    The solution is to use Python’s raw string notation for regular expression
    patterns;
2023-11-15 15:55:20 +01:00
fanquake
0aa014d5a3
Merge bitcoin/bitcoin#28859: guix: update signapple (drop macho & altgraph)
f718a74b12 guix: remove python-macholib (fanquake)
d3cbff16c2 guix: update signapple (fanquake)

Pull request description:

  Update to the latest signapple, which includes https://github.com/achow101/signapple/pull/13.
  Drop python-macholib and python-altgraph.

ACKs for top commit:
  Sjors:
    ACK f718a74b12

Tree-SHA512: 199b2108f2f063b6b0fb5354ac79a30b46e848c923ebe7d02f7d7d3f08749817a1f6b4c14d21658fd2f2d68f8be1698e1999edf7e2366b1cae3bf2709a665e30
2023-11-15 15:18:08 +00:00
fanquake
fb85bb2776
Merge bitcoin/bitcoin#28783: build: remove -bind_at_load usage
3c61c60b90 build: Add an old hack to remove bind_at_load from libtool. (Cory Fields)
45257601da build: remove -bind_at_load usage (fanquake)

Pull request description:

  This is deprecated on macOS:
  ```bash
  ld: warning: -bind_at_load is deprecated on macOS
  ```
  and likely redundant anyways, given the behaviour of dyld3.

  Unfortunately libtool is still injecting a `-bind_at_load`, because it's version check is broken:
  ```bash
  # Don't allow lazy linking, it breaks C++ global constructors
  # But is supposedly fixed on 10.4 or later (yay!).
  if test CXX = "$tagname"; then
    case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
      10.[0123])
        func_append compile_command " $wl-bind_at_load"
        func_append finalize_command " $wl-bind_at_load"
      ;;
    esac
  fi
  ```
  so this adds another change to strip them out at the end of configure.

  Note that anywhere the ld64 warnings are being emitted, we are already not adding this flag to our hardened ldflags, because of `-Wl,-fatal_warnings`.

ACKs for top commit:
  theuni:
    utACK 3c61c60b90.
  hebasto:
    ACK 3c61c60b90, tested on macOS Sonoma 14.1.1 (23B81, Apple M1) and Ubuntu 23.10 (cross-compiling for macOS). Also I've verified the actual diff in the `libtool` script.

Tree-SHA512: 98e6a095dc2d2409f8ec3b9d462e0db3643d7873d7903a12f8acd664829e7e84e797638556fa42ca8ebc1003f13a38fe9bb8a2a50cecfa991155da818574bf08
2023-11-14 09:47:36 +00:00
pablomartin4btc
11b7269d83 script: Enhance validations in utxo_snapshot.sh
- Ensure that the snapshot height is higher than the pruned block height when the node is pruned.
- Validate the correctness of the file path and check if the file already exists.
- Make network activity disablement optional for the user.
- Ensure the reconsiderblock command is triggered on exit, even in the case of user interruption (Ctrl-C).

Co-authored-by: Chris Heyes <22148308+hazeycode@users.noreply.github.com>
Co-authored-by: Sjors Provoost <sjors@sprovoost.nl>
2023-11-13 19:01:07 -03:00
fanquake
f95af98128
guix: default ssp for Windows GCC 2023-11-13 16:59:20 +00:00
fanquake
95d55b96c2
guix: remove ssp workaround from Windows GCC 2023-11-13 16:57:55 +00:00
fanquake
f718a74b12
guix: remove python-macholib 2023-11-13 16:44:39 +00:00
fanquake
d3cbff16c2
guix: update signapple
Which includes https://github.com/achow101/signapple/pull/13.
We can drop macholib (and altgraph) as deps.
2023-11-13 16:44:17 +00:00
fanquake
92d12f1c89
guix: update time-machine to 77386bdbfe6b0c649c05ab37f08051d1ab3e5074
python-altgraph (0.17.4) has been upstreamed. See:
https://git.savannah.gnu.org/cgit/guix.git/commit/?id=0c6198319a61d85cd8925af418466dcdccf3daff

Also includes:
GCC 10.4.0 -> 10.5.0:
https://git.savannah.gnu.org/cgit/guix.git/commit/?id=2fbb5398a39bf18e41235891a0740fa0bc4d7a4d.
Linux Kernel Headers 6.1.46 -> 6.1.61
LLVM 16 & 17 become available.
2023-11-13 09:44:56 +00:00
fanquake
45257601da
build: remove -bind_at_load usage
This is deprecated on macOS:
```bash
ld: warning: -bind_at_load is deprecated on macOS
```
and likely redundant anyways, given the behaviour of dyld3.

Unfortunately libtool is still injecting a `-bind_at_load`:
```bash
	# Don't allow lazy linking, it breaks C++ global constructors
	# But is supposedly fixed on 10.4 or later (yay!).
	if test CXX = "$tagname"; then
	  case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
	    10.[0123])
	      func_append compile_command " $wl-bind_at_load"
	      func_append finalize_command " $wl-bind_at_load"
	    ;;
	  esac
	fi
```
so this doesn't remove all the warnings, but removes us as a potential
source of them.

Note that anywhere the ld64 warnings are being emitted, we are already
not adding this flag to our hardened ldflags, because of `-Wl,-fatal_warnings`.
2023-11-09 17:07:21 +00:00
fanquake
380e365563
guix: switch to 6.1 kernel headers over 5.15
6.1 is the current longterm release: https://kernel.org/.

Note that using an older version of the kernel headers inside Guix, is
not a "hack" for compatibility, and is explicitly recommended against by glibc:

https://sourceware.org/glibc/wiki/FAQ#What_version_of_the_Linux_kernel_headers_should_be_used.3F.

so using the latest version of the longterm headers seems appropriate.

The last time we changed this was when we consolidated all builds to
5.15, in #25006.
2023-11-03 17:30:27 +00:00
fanquake
3c0b66c2ec
Merge bitcoin/bitcoin#28759: guix: update signapple to latest master
79539fbfbf guix: update signapple (fanquake)

Pull request description:

  Fixes #28449, and removes the need to boostrap Rust, by avoiding the `python-requests` dependency.

  Comparing a `--no-substitutes` build of this PR, to master, signapple requires ~1350 _less_ packages to boostrap:
  Master derivation - https://gist.github.com/fanquake/dbf69a62c9a78b7ae8c183a160e6d58d
  PR derivation - https://gist.github.com/fanquake/0aa2d8eddaba861ba489ed3d936f727d

ACKs for top commit:
  achow101:
    ACK 79539fbfbf

Tree-SHA512: 341ddcae27e53c31d114465cb5173573dcc9e1c0874ee160715630f686da6f69255f6080ec0181ffeffc26efbdb545599d667784b1cd17dfa7e3da0998ec9bd6
2023-10-31 17:09:36 +00:00
Andrew Chow
f6f18eeaa8 guix: Zip needs to include all files with time as SOURCE_DATE_EPOCH
The zip for codesigned MacOS distribution needs to have all files have
the same timestamp. These files also need to be included in the zip as
zip is not automatically recursive. We use the same pattern for zip as
is done for the other zip files produced by guix.
2023-10-31 11:24:21 -04:00