Commit graph

33994 commits

Author SHA1 Message Date
MacroFake
fab9e8a29c
Remove unused GetTimeSeconds 2022-05-11 16:39:23 +02:00
MacroFake
27d7b11e8c
Merge bitcoin/bitcoin#25106: rpc: dumptxoutset: check fopen return code
9feb887082 rpc: check `fopen` return code in dumptxoutset (Sebastian Falbesoner)

Pull request description:

  This change improves the usability of the `dumptxoutset` RPC in two ways, in the case that an invalid path is passed:
  1. return from the RPC immediately, rather then when the file is first tried to be written (which is _after_ calculating the UTXO set hash)
  2. return a proper return code and error message instead of the cryptic message that appears on master currently (see below)

  master branch:
  (error message appears after several minutes on my machine)
  ```
  $ ./src/bitcoin-cli dumptxoutset /invalid/path
  error code: -1
  error message:
  CAutoFile::operator<<: file handle is nullptr: unspecified iostream_category error
  ```

  PR branch:
  (error message appears immediately)
  ```
  $ ./src/bitcoin-cli dumptxoutset /invalid/path
  error code: -8
  error message:
  Couldn't open file /invalid/path.incomplete for writing.
  ```

ACKs for top commit:
  w0xlt:
    Code Review ACK 9feb887082

Tree-SHA512: e8695a7e86f26cc3b086d6bc6888388061f1dee439f76409b3ee11d35032bfd9cfa5349b728cd7f45bcffd999ecf9a6a991be172ce587b9b14503d9916b6e984
2022-05-11 16:32:45 +02:00
Sebastian Falbesoner
9feb887082 rpc: check fopen return code in dumptxoutset
This change improves the usability of the `dumptxoutset` RPC in two ways,
in the case that an invalid path is passed:
  1. return from the RPC immediately, rather then when the file is first
     tried to be written (which is _after_ calculating the UTXO set hash)
  2. return a proper return code and error message instead of the cryptic
     "CAutoFile::operator<<: file handle is nullptr: unspecified
      iostream_category error" (-1)
2022-05-11 16:03:40 +02:00
fanquake
b8ded26ef3
Merge bitcoin/bitcoin#25090: doc: Explain Bitcoin Core instead of Bitcoin in README.md
faeb5b59a0 doc: Explain Bitcoin Core in README.md (MacroFake)

Pull request description:

  Currently the README doesn't explain what Bitcoin Core is. Fix that.

  Further reading / Inspired by:

  * https://github.com/bitcoin/bitcoin/pull/25012
  * https://github.com/bitcoin-core/bitcoincore.org/pull/783
  * https://github.com/bitcoin-core/bitcoincore.org/pull/784

ACKs for top commit:
  laanwj:
    re-ACK faeb5b59a0
  brunoerg:
    ACK faeb5b59a0
  1440000bytes:
    ACK faeb5b59a0
  w0xlt:
    ACK faeb5b59a0

Tree-SHA512: f9a9460853487a46ba0219d26cefa1fcf8d650deb3c2656737a54648016af0cdac58c5d4641a390be8c05f3e78185bd99801e239fcb87d410c4df31f61bc7016
2022-05-11 07:23:25 +01:00
w0xlt
bdc6881e2f wallet: Change log interval to use steady_clock
This refactors the log interval variables to use `steady_clock`
as it is best suitable for measuring intervals.
2022-05-10 21:12:52 -03:00
Jon Atack
654284209f Add clang lifetimebound section to developer notes 2022-05-10 16:29:26 +02:00
Jon Atack
e66b321fd1 Add C++ functions and methods section to developer notes
Credit for some parts to the Google C++ Style Guide "Inputs and Outputs"
section at https://google.github.io/styleguide/cppguide.html#Inputs_and_Outputs

Co-authored-by: laanwj <126646+laanwj@users.noreply.github.com>
2022-05-10 14:57:50 +02:00
laanwj
ed4eeafbb6
Merge bitcoin/bitcoin#24793: test: Change color of skipped functional tests
3258bad996 changes color of skipped functional tests (Jacob P. Fickes)

Pull request description:

  changes the color of skipped functional tests (currently grey and can be hard to read/invisible on dark backgrounds) to yellow.

  resolves #24791

ACKs for top commit:
  theStack:
    Tested ACK 3258bad996
  jarolrod:
    Tested ACK 3258bad996

Tree-SHA512: 3fe5ae0d3b4902b2b6bda6e89ab780feb8bf4b7cb1ce7e8467057b94a1e0a26ddeaf3cac0bc19b06ef10d8bccaac9c495029d42740fbedab8fb0d5fdd7d02eaf
2022-05-10 13:12:38 +02:00
MacroFake
fa90516422
Switch scheduler to steady_clock 2022-05-10 10:54:54 +02:00
MacroFake
fb7c12c26f
Merge bitcoin/bitcoin#24921: Add time helpers for std::chrono::steady_clock and FastRandomContext::rand_uniform_delay
fa4fb8d98b random: Add FastRandomContext::rand_uniform_delay (MarcoFalke)
faa5c62967 Add time helpers for std::chrono::steady_clock (MarcoFalke)

Pull request description:

  A steady clock can be used in the future for the scheduler, for example.

  A random uniform delay applied to a time point can be used in the future for time points passed to the scheduler, or delays in net processing.

  Currently they are unused outside of tests, but if they turn out unused in the future (unlikely), they can trivially be removed again. I am splitting them out, so that several branches/pulls can build on top of them without duplicating the commits.

ACKs for top commit:
  ajtowns:
    ACK fa4fb8d98b

Tree-SHA512: 2c37174468fe84b1cdf2a032f458706df44b99a5f99062417bb42078b6f69e2f1738d20c21cd9386ca5a35f3bc0583e547ba40168c66f6aa42f700ba35dd95d4
2022-05-10 07:56:06 +02:00
MacroFake
faeb5b59a0
doc: Explain Bitcoin Core in README.md 2022-05-10 07:49:09 +02:00
MacroFake
967654d079
Merge bitcoin/bitcoin#25079: index: Change sync variables to use std::chrono::steady_clock
92b35aba22 index, refactor: Change sync variables to use `std::chrono::steady_clock` (w0xlt)

Pull request description:

  This PR refactors the sync variables to use `std::chrono::steady_clock` as it is best suitable for measuring intervals.

ACKs for top commit:
  jonatack:
    utACK 92b35aba22
  ajtowns:
    ACK 92b35aba22 - code review only

Tree-SHA512: cd4bafde47b30beb88c0aac247e41b4dced2ff2845c67a7043619da058dcff4f84374a7c704a698f3055c888d076d25503c2f38ace8fbc5456f624e0efe1e188
2022-05-10 07:35:36 +02:00
Anthony Towns
bb5c24b120 validation: move g_versionbitscache into ChainstateManager 2022-05-10 12:09:33 +10:00
Anthony Towns
eca22c726a test/versionbits: make versionbitscache a parameter 2022-05-10 12:09:33 +10:00
Anthony Towns
d603f1d8a7 deploymentstatus: make versionbitscache a parameter 2022-05-10 12:09:33 +10:00
Anthony Towns
78adef1753 refactor: use chainman instead of chainParams for DeploymentActive* 2022-05-10 12:09:33 +10:00
Anthony Towns
deffe0df6c deploymentstatus: allow chainman in place of consensusParams 2022-05-10 12:09:33 +10:00
Anthony Towns
eaa2e3f25c validation: move UpdateUncommittedBlockStructures and GenerateCoinbaseCommitment into ChainstateManager 2022-05-10 12:09:33 +10:00
Anthony Towns
5c67e84d37 validation: replace ::Params() calls with chainstate/chainman member 2022-05-10 12:09:33 +10:00
Anthony Towns
38860f93b6 validation: remove redundant CChainParams params from ChainstateManager methods 2022-05-10 12:09:33 +10:00
Anthony Towns
69675ea4e7 validation: add CChainParams to ChainstateManager 2022-05-10 12:09:27 +10:00
Hennadii Stepanov
b9219b233f
Merge bitcoin-core/gui#590: refactor: Declare WalletModel member functions with const
f70ee34c71 qt, refactor: Declare `WalletModel` member functions with `const` (Hennadii Stepanov)

Pull request description:

  After bitcoin/bitcoin#12830 the `WalletModel` class has two member functions: be7a5f2fc4/src/qt/walletmodel.h (L81) and be7a5f2fc4/src/qt/walletmodel.h (L154)

  This PR drops the former one as redundant, and declares `WalletModel` member functions with the `const` qualifier where appropriate.

ACKs for top commit:
  promag:
    Code review ACK f70ee34c71.
  kristapsk:
    cr ACK f70ee34c71
  w0xlt:
    Code Review ACK f70ee34c71

Tree-SHA512: 43e6661822c667229ea860fb94c2e3154c33773dbd9fca1f6f76cc31c5875a1a0e8caa65ddfc20dec2a43e29e7b2469b3b6fa148fe7ec000ded518b4958b2b38
2022-05-09 22:33:58 +02:00
fanquake
298389e3b5
guix: bump time-machine to 998eda3067c7d21e0d9bb3310d2f5a14b8f1c681
There are two reasons to perform this bump:
* Fixes #25082 by bumping to a commit that includes a fix for time-dependent unit
tests in libgit2 (f5fe0082abe4547f3fb9f29d8351473cfb3a387b).
* Gives us access to clang-toolchain-14 (14.0.3, 998eda3067c7d21e0d9bb3310d2f5a14b8f1c681),
which is useful for the Guix portion of #21778.

Note that with this bump:
Linux kernels headers update from 5.15.28 to 5.15.37.
2022-05-09 21:23:53 +01:00
Hennadii Stepanov
3dd95cb5c2
Merge bitcoin-core/gui#591: test: Add tests for tableView in AddressBookPage dialog
15069130c6 qt, test: Add tests for `tableView` in `AddressBookPage` dialog (Hennadii Stepanov)
edae3ab699 qt: No need to force Qt::QueuedConnection for NotifyAddressBookChanged (Hennadii Stepanov)

Pull request description:

  This PR is a prerequisite for more thorough testing of filtering in the `AddressBookPage` class in context of bitcoin-core/gui#578 and bitcoin-core/gui#585.

  Required for bitcoin-core/gui#592.

ACKs for top commit:
  promag:
    Code review ACK 15069130c6.

Tree-SHA512: 86986d47606cbd54d813436c7afb21894e2200b6d3042a7aa0b5e84821c765bd68b14ad38a445069891ab33f2d7bcd4933b8373e14e9afb0c91f1a6ddf4da740
2022-05-09 22:19:39 +02:00
Jon Atack
ca1ac1f0e0 scripted-diff: Rename MainSignalsInstance() class to MainSignalsImpl()
```
-BEGIN VERIFY SCRIPT-
s() { git grep -l "$1" src test doc | xargs sed -i "s/$1/$2/g"; }
s 'MainSignalsInstance' 'MainSignalsImpl'
-END VERIFY SCRIPT-
2022-05-09 18:35:44 +02:00
Jon Atack
2aaec2352d refactor: remove unused forward declarations in validationinterface.h 2022-05-09 18:33:40 +02:00
Jon Atack
23854f8402 refactor: make MainSignalsInstance() a class
and use Doxygen documentation for it, per our developer notes.

Context:

MainSignalsInstance was created in 3a19fed9db and originally was a struct
collection of boost::signals methods moved to validationinterface.cpp, in order
to no longer need to include boost/signals in validationinterface.h.

MainSignalsInstance then evolved in d6815a2313 to remove boost/signals2 and became class-like.

[C.8: Use class rather than struct if any member is
non-public](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Rc-class)

[C.2: Use class if the class has an invariant; use struct if the data members can vary
independently](https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#c2-use-class-if-the-class-has-an-invariant-use-struct-if-the-data-members-can-vary-independently)

A class also has the advantage of default private access, as opposed to public for a struct.
2022-05-09 18:33:32 +02:00
Jon Atack
5fca70f5b1 Link in developer notes style to internal interface exception 2022-05-09 16:14:04 +02:00
Jon Atack
fc4cb857cc Prefer Python for scripts in developer notes
along with a few miscellaneous touch-ups.
2022-05-09 16:13:38 +02:00
MacroFake
a8098f2cef
Merge bitcoin/bitcoin#25091: test: Remove extended lint (cppcheck)
efae252f30 test: Remove extended lint (cppcheck) (laanwj)

Pull request description:

  These are unreferenced in the CI and documentation, and have been since 2019 (see #17549).

  I'm not sure the cppcheck is worthwhile. It takes a long time to run (I think this is why it isn't in the normal lints), and right
  now it only appears to find implicit constructors. The list of exceptions is out of date. But if anyone wants to bring it back at any
  time in the future they can do so from git history (and port it to Python).

ACKs for top commit:
  fanquake:
    ACK efae252f30

Tree-SHA512: 1a770b5d20ff1199d0d6bc471ae3d2c3438f0f0b169ce8d2fe73480daf8d3a7146c066b799afc90aa7898982c5fee79c1daca10e16e2bff0a7b38850aedd55b2
2022-05-09 15:08:33 +02:00
laanwj
efae252f30 test: Remove extended lint (cppcheck)
These are unreferenced in the CI and documentation, and have been since
2019 (see #17549).

I'm not sure the cppcheck is worthwhile. It takes a long time
to run (I think this is why it isn't in the normal lints), and right
now it only appears to find implicit constructors. The list of
exceptions is out of date. But if anyone wants to bring it back at any
time in the future they can do so from git history (and port it to Python).
2022-05-09 15:01:00 +02:00
MacroFake
dab18f03f7
Merge bitcoin/bitcoin#24946: Unroll the ChaCha20 inner loop for performance
81c09ee45c Unroll the ChaCha20 inner loop for performance (Pieter Wuille)

Pull request description:

  Unrolling the inner ChaCha20 loop gives a ~15% speedup for me in the CHACHA20_* benchmarks. It's a simple change, this performance helps with RNG generation, and will matter more for BIP324.

ACKs for top commit:
  martinus:
    tested ACK  81c09ee with clang++ 13.0.1, test `CHACHA20_1MB`:
  MarcoFalke:
    ACK 81c09ee45c 🍟

Tree-SHA512: 108bd0ba573bb08de92d611e7be7c09a2c2700f9655f44129b87f9b71f7e101dfc6bd345783e7b4b9b40f0b003913cf59187f422da8cdb5b20887f7855b2611a
2022-05-09 13:56:36 +02:00
fanquake
8abe79aedd
Merge bitcoin/bitcoin#25078: doc: Shorten explanation of "maintainers"
fa32ced49c doc: Shorten explanation of "maintainers" (MacroFake)

Pull request description:

  GitHub has an extensive documentation about permissions ( https://docs.github.com/en/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization#permissions-for-each-role ), so I don't think we should be trying to mirror them here.

  Specifically, this pull makes three changes:

  * Clarify that all "merge maintainers" can merge pull requests. Obviously, while GitHub users with the `Maintain` permission can not force push to protected branches, and GitHub users with the `Admin` permission can, I don't think this is worthy to mention in the contribution guidelines. During the whole time I was working on the project, I think this permission was only used once or twice, when I accidentally pushed an unsigned draft commit directly to `master`. See https://bitcoin-irc.chaincode.com/bitcoin-core-dev/2016-06-13#473584 . One could argue that there should be a list of maintainers in the doc. Though, as there is already a list of keys for verify-commits, this seems like unnecessary overhead.
  * Clarify that the release process is executed collectively by the developers. For example, release process code changes that are reproducible can be done by anyone without permission. Also, detached signatures are created by several people (see for example https://github.com/bitcoin-core/bitcoin-detached-sigs/commits/23.0), which (I believe) are also separate from the people that can push the binaries to the `bin` folder, which again are separate from the people who can release the snap/flatpak package.
  * Clarify that moderation is also done collectively by people with `Triage`, `Write`, `Maintain`, and `Admin` permission. I think it is fine to refer to everyone in that group as "maintainers", or at least don't clarify it further, as any attempt at that would start to duplicate GitHub docs.

ACKs for top commit:
  laanwj:
    ACK fa32ced49c
  prusnak:
    Approach ACK fa32ced49c
  fanquake:
    ACK fa32ced49c

Tree-SHA512: ed87c2e538a32ff1611208a7262425160a4340a3112a1b2712d7e9a550fa191ddbebea0d8e45d3e578ead02d5ef17bddcaab3f6ee876f9018a5acbc65ffd0e1c
2022-05-09 10:56:28 +01:00
Luke Dashjr
ba10b90915 Wallet: Ensure m_attaching_chain is set before registering for signals
Avoids a race where chainStateFlushed could be called before rescanning began, yet rescan gets interrupted or fails
2022-05-09 01:54:16 +00:00
MarcoFalke
fa4fb8d98b
random: Add FastRandomContext::rand_uniform_delay 2022-05-08 11:47:55 +02:00
MarcoFalke
faa5c62967
Add time helpers for std::chrono::steady_clock 2022-05-08 11:47:45 +02:00
w0xlt
92b35aba22 index, refactor: Change sync variables to use std::chrono::steady_clock
This refactors the sync variables to use `std::chrono::steady_clock`
as it is best suitable for measuring intervals.
2022-05-08 04:02:33 -03:00
avirgovi
2a22f034ca parsing external signer master fingerprint string as bytes instead of caring for lower/upper case in ExternalSigner::SignTransaction 2022-05-07 11:09:52 +02:00
Jon Atack
370120ec2f Remove obsolete BDB ENABLE_WALLET section in developer notes 2022-05-06 18:29:59 +02:00
MacroFake
fa32ced49c
doc: Shorten explanation of "maintainers" 2022-05-06 16:49:01 +02:00
MacroFake
59ac8bacd5
Merge bitcoin/bitcoin#24804: Sanity assert GetAncestor() != nullptr where appropriate
308dd2e93e Sanity assert GetAncestor() != nullptr where appropriate (Adam Jonas)

Pull request description:

  Re-opening #17232. I have rebased the PR and addressed jonatack's nit suggestions.

  Add sanity asserts for return value of `CBlockIndex::GetAncestor()` where appropriate.

  In validation.cpp `CheckSequenceLocks`, check the return value of `tip->GetAncestor(maxInputHeight)` stored into `lp->maxInputBlock`. If it ever returns `nullptr` because the ancestor isn't found, it's going to be a bad bug to keep going, since a `LockPoints` object with the `maxInputBlock` member set to `nullptr` signifies no relative lock time.

  In the other places, the added asserts would prevent accidental dereferencing of a null pointer which is undefined behavior.

  Co-Authored-By: Adam Jonas <jonas@chaincode.com>
  Co-Authored-By: danra <danra@users.noreply.github.com>

ACKs for top commit:
  jonatack:
    ACK 308dd2e93e

Tree-SHA512: 5bfdaab1499607ae2c3cd3e2e9e8c37850bfd0e327e680f4e36c81f9c6d98a543af78ecfac1ab0e06325d264412615a04d52005875780c7db2a4d81bd2d2259a
2022-05-06 11:46:20 +02:00
MacroFake
77a9997d97
Merge bitcoin/bitcoin#25063: test: previous releases: add v23.0
dba1231672 test: previous releases: add v23.0 (Sjors Provoost)

Pull request description:

  Follows the same pattern as d8b705f1ca (v22.0) and 8a57a06a50 (v0.21.0).

  Starting from v23.0 there is a separate macOS release for x86_64 and aarch64.

ACKs for top commit:
  prusnak:
    Approach ACK dba1231672

Tree-SHA512: 249aeddd5e80e163578581e5c8e9b6579f3694abc3d1fb68dddb7b42d75021ad85266688ec4a365a6631d82a65a19873aff7ba61c0ea59d21f8adbe4b772dc16
2022-05-06 11:38:03 +02:00
MacroFake
b557a24be9
Merge bitcoin/bitcoin#19426: refactor: Change * to & in MutableTransactionSignatureCreator
fac6cfc50f refactor: Change * to & in MutableTransactionSignatureCreator (MarcoFalke)

Pull request description:

  The `MutableTransactionSignatureCreator` constructor takes in a pointer to a mutable transaction. This is problematic for several reasons:

  * It would be undefined behaviour to pass in a nullptr because for signature creation, the memory of the mutable transaction is accessed
  * No caller currently passes in a nullptr, so passing a reference as a pointer is confusing

  Fix all issues by replacing `*` with `&` in `MutableTransactionSignatureCreator`

ACKs for top commit:
  theStack:
    Code-review ACK fac6cfc50f
  jonatack:
    ACK fac6cfc50f

Tree-SHA512: d84296b030bd4fa2709e5adbfe43a5f8377d218957d844af69a819893252af671df7f00004f5ba601a0bd70f3c1c2e58c4f00e75684da663f28432bb5c89fb86
2022-05-06 11:12:10 +02:00
MacroFake
b2e7811c62
Merge bitcoin/bitcoin#24538: miner: bug fix? update for ancestor inclusion using modified fees, not base
e4303c337c [unit test] prioritisation in mining (glozow)
7a8d60676b [miner] bug fix: update for parent inclusion using modified fee (glozow)
0f9a44461c MOVEONLY: group miner tests into MinerTestingSetup functions (glozow)

Pull request description:

  Came up while reviewing #24364, where some of us incorrectly assumed that we use the same fee deduction in `CTxMemPoolModifiedEntry::nModFeesWithAncestors` when first constructing an entry and in `update_for_parent_inclusion`.

  Actually, the behavior is this: when a mempool entry's ancestor is included in the block template, we create a `CTxMemPoolModifiedEntry` for it, subtracting the ancestor's modified fees from `nModFeesWithAncestors`. If another ancestor is included, we update it again, but use the ancestor's _base_ fees instead.

  I can't explain why we use `GetFee` in one place and `GetModifiedFee` in the other, but I'm quite certain we should be using the same one for both.

  And should it be base or modified fees? Modified, otherwise the child inherits the prioritisation of the parent, but only until the parent gets mined. If we want prioritisation to cascade down to current in-mempool descendants, we should probably document that in the `prioritsetransaction` helpstring and implement it in `CTxMemPool::mapDeltas`, not as a quirk in the mining code?

  Wrote a test in which a mempool entry has 2 ancestors, both prioritised, and both included in a block template individually. This test should fail without the s/GetFee/GetModifiedFee commit.

ACKs for top commit:
  ccdle12:
    tested ACK e4303c3
  MarcoFalke:
    ACK e4303c337c 🚗

Tree-SHA512: 4cd94106fbc9353e9f9b6d5af268ecda5aec7539245298c940ca220606dd0737264505bfaae1f83d94765cc2d9e1a6e913a765048fe6c19292482241761a6762
2022-05-06 11:06:13 +02:00
Sjors Provoost
dba1231672
test: previous releases: add v23.0
Starting from v23.0 there is a separate macOS release for x86_64 and aarch64.

Co-authored-by: Pavol Rusnak <pavol@rusnak.io>
2022-05-06 10:00:47 +02:00
MacroFake
74d9f4bd95
Merge bitcoin/bitcoin#25068: Wrap boost::replace_all
fa2deae2a8 Wrap boost::replace_all (MacroFake)

Pull request description:

  The included header is thousand lines of template code (not counting the recursive includes) for basically one function.

ACKs for top commit:
  pk-b2:
    ACK fa2deae2a8
  seejee:
    ACK fa2deae2a8
  martinus:
    ACK fa2deae2a8. Next step, replace with custom implementation to get rid of another boost header?

Tree-SHA512: 176c2b97fb1d1fc35b63f2e2ee9b47304ff40f7a0b1431df4e4a30ee4c039c9e97d635b0a2b55c4494061735061700c8bf7e99412dc347d18bbce1db61e14909
2022-05-06 09:04:20 +02:00
MacroFake
fa2deae2a8
Wrap boost::replace_all 2022-05-05 20:50:24 +02:00
fanquake
4604508363
Merge bitcoin/bitcoin#25070: contrib: fix dirname on verify-commits
ded915e842 contrib: fix dirname on `verify-commits` (brunoerg)

Pull request description:

  Fixes: https://github.com/bitcoin/bitcoin/runs/6309423255

ACKs for top commit:
  fanquake:
    ACK ded915e842

Tree-SHA512: fbc46e907ec6151aca76360b471f0f34b9fc7d7eb054616df61feaf392bc4710dc26a965adb432e91e18498d446787c388c7989d07e4858d0fbf6bf28074b24c
2022-05-05 17:45:15 +01:00
brunoerg
ded915e842 contrib: fix dirname on verify-commits 2022-05-05 13:27:11 -03:00
fanquake
e4478d312f
Merge bitcoin/bitcoin#25006: guix: consolidate kernel headers to 5.15, specify 3.2.0 as minimum supported
eb02713efc doc: add minimum required kernel version to dependencies.md (fanquake)
dcad5f70f1 guix: consolidate kernel headers to 5.15 (fanquake)

Pull request description:

  Our minimum supported kernel version is currently defined by Guix, as the version passed to the [`--enable-kernel=`](https://www.gnu.org/software/libc/manual/html_node/Configuring-and-compiling.html) option when configuring glibc. That version is [currently set to 3.2.0](https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/base.scm?id=34e9eae68c9583acce5abc4100add3d88932a5ae#n776):
  ```scheme
              ;; This is the default for most architectures as of GNU libc 2.26,
              ;; but we specify it explicitly for clarity and consistency.  See
              ;; "kernel-features.h" in the GNU libc for details.
              "--enable-kernel=3.2.0"
  ```
  and has been that way since we started using Guix (i.e from Guix 1.3.0, with the release v22.0).

  Passing `--enable-kernel` defines `__LINUX_KERNEL_VERSION` inside glibc, which is then used to determine supported features & syscall usage. For example, some defines in `unix/sysv/linux/kernel-features.h`, from glibc version 2.24, where glibcs default supported kernel version was still 2.6.32 (it's more modern as of recent releases):
  ```cpp
  #ifndef __LINUX_KERNEL_VERSION
  /* We assume the worst; all kernels should be supported.  */
  # define __LINUX_KERNEL_VERSION0
  #endif

  /* Support for various CLOEXEC and NONBLOCK flags was added in
     2.6.23.  */
  #define __ASSUME_O_CLOEXEC1

  /* prlimit64 is available in 2.6.36.  */
  #if __LINUX_KERNEL_VERSION >= 0x020624
  # define __ASSUME_PRLIMIT641
  #endif
  ```

  Note that because we currently specify the `5.15` headers, the exact version being used, i.e 5.15.x, changes when we update our time-machine commit, as Guix updates all it's header packages as new point releases become available. Currently it is [`5.15.28`](https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/linux.scm?id=34e9eae68c9583acce5abc4100add3d88932a5ae#n380). The changelog for the 5.15 headers is available [here](https://cdn.kernel.org/pub/linux/kernel/v5.x/ChangeLog-5.15.36).

  Similar to glibc, it may currently be possible to build and run bitcoind against older kernels, however, for the purposes of documenting what we support for our release binaries, I can't see a reason to document anything other than the version that we are targeting when building the glibc used to build the release binaries.

  Guix Build (on x86_64):
  ```bash
  22ff2d3a72d337c4eccbfa4c834a67c7c3397f225aedb71a3c636f2708964e93  guix-build-eb02713efc17/output/aarch64-linux-gnu/SHA256SUMS.part
  e316b2d0806183e0e51a25722f48af85d145b1581f44f68b925d9f484a5aa0d3  guix-build-eb02713efc17/output/aarch64-linux-gnu/bitcoin-eb02713efc17-aarch64-linux-gnu-debug.tar.gz
  da667d935d9331c5cbca2e0e334cd7e56202ee294553459672fa50f13f501c4d  guix-build-eb02713efc17/output/aarch64-linux-gnu/bitcoin-eb02713efc17-aarch64-linux-gnu.tar.gz
  f44f2921f3dac2c545806dffb579137fb9eeeee15671395f6a7f817ed6213143  guix-build-eb02713efc17/output/arm-linux-gnueabihf/SHA256SUMS.part
  101bab25ab2a6c36729cdf840264a85700cc3cfa23d3900b0bee0ac9ae637e8d  guix-build-eb02713efc17/output/arm-linux-gnueabihf/bitcoin-eb02713efc17-arm-linux-gnueabihf-debug.tar.gz
  9f7338ee42234949ef3104c6cb2b8a723d616a46d0047d833062adc92e3b6b72  guix-build-eb02713efc17/output/arm-linux-gnueabihf/bitcoin-eb02713efc17-arm-linux-gnueabihf.tar.gz
  5ca08e7b38c4dd4456145602f25b015c164c0cd0317dd2a26855dc0495605418  guix-build-eb02713efc17/output/arm64-apple-darwin/SHA256SUMS.part
  186c9e2df4034472107964e835ee7a05777c7a0fa5e0db12b5740f18e732d7d5  guix-build-eb02713efc17/output/arm64-apple-darwin/bitcoin-eb02713efc17-arm64-apple-darwin-unsigned.dmg
  4e252c7775662777ddcb0a1b0efac6b6e71c25479d6b44b821199ae00abd18ca  guix-build-eb02713efc17/output/arm64-apple-darwin/bitcoin-eb02713efc17-arm64-apple-darwin-unsigned.tar.gz
  4360342994d54839bbf5fb4d86c6c0b0a3cbcef68b0d2c991aab6e81301638e7  guix-build-eb02713efc17/output/arm64-apple-darwin/bitcoin-eb02713efc17-arm64-apple-darwin.tar.gz
  f354822050cd625de7445cfa317475cfad90a7e39d135c5b99950ee69969f445  guix-build-eb02713efc17/output/dist-archive/bitcoin-eb02713efc17.tar.gz
  aa864574dd692bb40df95e17c08113f5bcd04b7d5997a2f74ca0557cae3edfcd  guix-build-eb02713efc17/output/powerpc64-linux-gnu/SHA256SUMS.part
  45df2a4ec5592834fd08d36068cd0968de281870cb9df48cc4783078b85985dd  guix-build-eb02713efc17/output/powerpc64-linux-gnu/bitcoin-eb02713efc17-powerpc64-linux-gnu-debug.tar.gz
  2bc1c481635ac073d61f51db425576a42a54b16218a00e5f80579426dbf9677b  guix-build-eb02713efc17/output/powerpc64-linux-gnu/bitcoin-eb02713efc17-powerpc64-linux-gnu.tar.gz
  403d7790e611d3e07b25e02549c9f50e51fff2e1a323605db4f9a569712771a7  guix-build-eb02713efc17/output/powerpc64le-linux-gnu/SHA256SUMS.part
  db40032c3b25d95012496f1b3fa5df7f207dcbeefa510bd140b96df4dfd84c88  guix-build-eb02713efc17/output/powerpc64le-linux-gnu/bitcoin-eb02713efc17-powerpc64le-linux-gnu-debug.tar.gz
  eea8b4ee96dc8a9813b727550bf07202a6f9cba99605247813beb5251c7f2623  guix-build-eb02713efc17/output/powerpc64le-linux-gnu/bitcoin-eb02713efc17-powerpc64le-linux-gnu.tar.gz
  7164e539d25c300b993a620caacdcef659bb6a7c4775a873e30ee645c9ceed15  guix-build-eb02713efc17/output/riscv64-linux-gnu/SHA256SUMS.part
  3ae271e6fb94e5d4e46a402508a02d659e879d222c6696e57c78530157eb39ae  guix-build-eb02713efc17/output/riscv64-linux-gnu/bitcoin-eb02713efc17-riscv64-linux-gnu-debug.tar.gz
  8c37d0b790c28b692804b360605baec4371af4f080c0024ba75f06c0096a4356  guix-build-eb02713efc17/output/riscv64-linux-gnu/bitcoin-eb02713efc17-riscv64-linux-gnu.tar.gz
  51bbf04cb32b579ba5609fe3ef24e9901f8d49e3311fe9776ee1fdb644f7e0b1  guix-build-eb02713efc17/output/x86_64-apple-darwin/SHA256SUMS.part
  8e81f8badb0cff1aa430a899065cf9744b4b2d45addb8e30606a2f8bf08faa26  guix-build-eb02713efc17/output/x86_64-apple-darwin/bitcoin-eb02713efc17-x86_64-apple-darwin-unsigned.dmg
  8b4120b6d83c03dae34b0b5a189522d01c523ab005d816339fdfddf9c412ef15  guix-build-eb02713efc17/output/x86_64-apple-darwin/bitcoin-eb02713efc17-x86_64-apple-darwin-unsigned.tar.gz
  26e633faba4f05f51f4e0bffaa2bbbf8c2d5d134d6777c9395bf9b65af6a808c  guix-build-eb02713efc17/output/x86_64-apple-darwin/bitcoin-eb02713efc17-x86_64-apple-darwin.tar.gz
  16c96d1f349ca3fbf5ffb8e00d5defe1af5a14abb6f61abdbd367e9a5e99bf33  guix-build-eb02713efc17/output/x86_64-linux-gnu/SHA256SUMS.part
  faa203c9c3943c2f30ca3f4f30c3eee52e38ac9a2f15c6303b0c8ff0be146e07  guix-build-eb02713efc17/output/x86_64-linux-gnu/bitcoin-eb02713efc17-x86_64-linux-gnu-debug.tar.gz
  b5cf5154ac0e2138a4ccbc7639026d909e606b9f55c5859ae54d941eb950759b  guix-build-eb02713efc17/output/x86_64-linux-gnu/bitcoin-eb02713efc17-x86_64-linux-gnu.tar.gz
  bc14a09399ef3a6d9696116ddda6509b6cb1726719dfd462106cb9d2fde32efc  guix-build-eb02713efc17/output/x86_64-w64-mingw32/SHA256SUMS.part
  7c0a773f0e892e41fe8f7b299be655e53f110a64bd6e77c2e7a6b4c699605498  guix-build-eb02713efc17/output/x86_64-w64-mingw32/bitcoin-eb02713efc17-win64-debug.zip
  27f6a50394c61c0efa2f3afe655a265c64a34249041ef0090f9043cd4cdc8c71  guix-build-eb02713efc17/output/x86_64-w64-mingw32/bitcoin-eb02713efc17-win64-setup-unsigned.exe
  dd5bb661a9d99bbc2c2c7256996b26bef116b2e61b7497ada26b3322550d53cb  guix-build-eb02713efc17/output/x86_64-w64-mingw32/bitcoin-eb02713efc17-win64-unsigned.tar.gz
  84d5068dd59180498473263d757192a422859c0704a2e45a762d1635e49efb80  guix-build-eb02713efc17/output/x86_64-w64-mingw32/bitcoin-eb02713efc17-win64.zip
  ```

  Guix build (on arm64):
  ```bash
  2bbcf455381d4be6bb402c705dba5655de3e1b62a0ed1dbbfcb573450a63d148  guix-build-eb02713efc17/output/arm-linux-gnueabihf/SHA256SUMS.part
  c9d982eb6c9efc752fffb3a1d2b14e8cc4d9e2cf4c03c2f02eb320d04f52a86d  guix-build-eb02713efc17/output/arm-linux-gnueabihf/bitcoin-eb02713efc17-arm-linux-gnueabihf-debug.tar.gz
  0c0b3122dcdc051bee1022dc9b0cf7771b7f6b30fa3e7369c97907d8c10d7ea3  guix-build-eb02713efc17/output/arm-linux-gnueabihf/bitcoin-eb02713efc17-arm-linux-gnueabihf.tar.gz
  5388f8a7525ed49d11569988e598a0ec68ddcaf9b35cff0c8bcb02187b0fbaad  guix-build-eb02713efc17/output/arm64-apple-darwin/SHA256SUMS.part
  16b745e2b2e036d65b549be740116d9b6e819730cc76075f01bdbc4beb166724  guix-build-eb02713efc17/output/arm64-apple-darwin/bitcoin-eb02713efc17-arm64-apple-darwin-unsigned.dmg
  18eaede02d12dcbb83003272b5b79a08a10067a326542687ab445bfc623ce9e8  guix-build-eb02713efc17/output/arm64-apple-darwin/bitcoin-eb02713efc17-arm64-apple-darwin-unsigned.tar.gz
  5fb73968c7ea50c9642d3cddcd745a512be3043ada314b8a1fc94f179744a1d8  guix-build-eb02713efc17/output/arm64-apple-darwin/bitcoin-eb02713efc17-arm64-apple-darwin.tar.gz
  f354822050cd625de7445cfa317475cfad90a7e39d135c5b99950ee69969f445  guix-build-eb02713efc17/output/dist-archive/bitcoin-eb02713efc17.tar.gz
  fad672b9e5d372ba5511c14ed48ef77bcf303d475f35680bd4a668fee150225a  guix-build-eb02713efc17/output/powerpc64-linux-gnu/SHA256SUMS.part
  246aa854e87675a0b90cc14f7b6affcfefabfc0f79edd3dc96ae6b98010b8b1c  guix-build-eb02713efc17/output/powerpc64-linux-gnu/bitcoin-eb02713efc17-powerpc64-linux-gnu-debug.tar.gz
  90e968e0bab84e80a9f2fe9498eea7c59d8908f5a16accd93d7f9318a7098ce0  guix-build-eb02713efc17/output/powerpc64-linux-gnu/bitcoin-eb02713efc17-powerpc64-linux-gnu.tar.gz
  65f0c018d882d7fc845a9bb1581824b17e7ecf0df7081ab2538f0e617e120a8b  guix-build-eb02713efc17/output/powerpc64le-linux-gnu/SHA256SUMS.part
  0bf7fcd127180e5e04112914747496db535226bf05126690f259fa0cf2a96642  guix-build-eb02713efc17/output/powerpc64le-linux-gnu/bitcoin-eb02713efc17-powerpc64le-linux-gnu-debug.tar.gz
  14fc3e17dfa903f83e44f970c8b4e4726e7476c59d0fffdec815a1c80ec1b51a  guix-build-eb02713efc17/output/powerpc64le-linux-gnu/bitcoin-eb02713efc17-powerpc64le-linux-gnu.tar.gz
  9018f95b54d0643d734260b6eb69ee5f086c98e62f25dd579675b467a844793d  guix-build-eb02713efc17/output/riscv64-linux-gnu/SHA256SUMS.part
  e1f2b3678c22103d7b89cbbeec9b2863c9c6f749ff4cbedd74cb6e62598c0a04  guix-build-eb02713efc17/output/riscv64-linux-gnu/bitcoin-eb02713efc17-riscv64-linux-gnu-debug.tar.gz
  bf9fa35119344dfc93048196dd9cd5bb230b0785350ae5150bb4bdb28fd8423d  guix-build-eb02713efc17/output/riscv64-linux-gnu/bitcoin-eb02713efc17-riscv64-linux-gnu.tar.gz
  51bbf04cb32b579ba5609fe3ef24e9901f8d49e3311fe9776ee1fdb644f7e0b1  guix-build-eb02713efc17/output/x86_64-apple-darwin/SHA256SUMS.part
  8e81f8badb0cff1aa430a899065cf9744b4b2d45addb8e30606a2f8bf08faa26  guix-build-eb02713efc17/output/x86_64-apple-darwin/bitcoin-eb02713efc17-x86_64-apple-darwin-unsigned.dmg
  8b4120b6d83c03dae34b0b5a189522d01c523ab005d816339fdfddf9c412ef15  guix-build-eb02713efc17/output/x86_64-apple-darwin/bitcoin-eb02713efc17-x86_64-apple-darwin-unsigned.tar.gz
  26e633faba4f05f51f4e0bffaa2bbbf8c2d5d134d6777c9395bf9b65af6a808c  guix-build-eb02713efc17/output/x86_64-apple-darwin/bitcoin-eb02713efc17-x86_64-apple-darwin.tar.gz
  6e5828e2efa4e951b147b8de42f79dee1652933e04c50093bd31ee375c0c4ca9  guix-build-eb02713efc17/output/x86_64-linux-gnu/SHA256SUMS.part
  3d3af1d078eee6f66aac2af891fd7d7a77abc3d7164a807d0a7cc44f15e52b9d  guix-build-eb02713efc17/output/x86_64-linux-gnu/bitcoin-eb02713efc17-x86_64-linux-gnu-debug.tar.gz
  13f452bc65194de16fa91ed87be9790ed0d1a178deefb102fa54d3f9832b8c25  guix-build-eb02713efc17/output/x86_64-linux-gnu/bitcoin-eb02713efc17-x86_64-linux-gnu.tar.gz
  1673b5fca6687ea0f196a5f2ce2b79662b3efe01b71f341fc596069a1ade610c  guix-build-eb02713efc17/output/x86_64-w64-mingw32/SHA256SUMS.part
  d6228bdfb4fbc7b895ed4f0c30e1343c3392bd6e8e5ed33a973887ba0bb749ba  guix-build-eb02713efc17/output/x86_64-w64-mingw32/bitcoin-eb02713efc17-win64-debug.zip
  27f6a50394c61c0efa2f3afe655a265c64a34249041ef0090f9043cd4cdc8c71  guix-build-eb02713efc17/output/x86_64-w64-mingw32/bitcoin-eb02713efc17-win64-setup-unsigned.exe
  dd5bb661a9d99bbc2c2c7256996b26bef116b2e61b7497ada26b3322550d53cb  guix-build-eb02713efc17/output/x86_64-w64-mingw32/bitcoin-eb02713efc17-win64-unsigned.tar.gz
  50a68d3644dbe5cb5de21993cd0e8992ab9c6aa88c009a75e5d5a55180476ea6  guix-build-eb02713efc17/output/x86_64-w64-mingw32/bitcoin-eb02713efc17-win64.zip

  ```

ACKs for top commit:
  laanwj:
    ACK eb02713efc
  dongcarl:
    Code Review ACK eb02713efc
  vincenzopalazzo:
    ACK eb02713efc

Tree-SHA512: afee459d881d3231b72711b0beec5410d6b37deb0d94aa0aaca13010f54bf95fadaf7e5081ea8b9c6975a9e2b8be48b761e3b6ce284c06f82be2210db1156e96
2022-05-05 16:44:50 +01:00