Commit graph

33813 commits

Author SHA1 Message Date
fanquake
508bd4d357
guix: adjust RISC-V __has_include() patch to work with GCC 10
The actual macro is __has_include(), not __has_include__(), using the
later would result in build failures when using GCC 10. i.e:
```bash
../sysdeps/unix/sysv/linux/riscv/flush-icache.c:24:5: warning: "__has_include__" is not defined, evaluates to 0 [-Wundef]
   24 | #if __has_include__ (<asm/syscalls.h>)
```

Looks like at least someone else has run into the same thing, see:
http://lists.busybox.net/pipermail/buildroot/2020-July/590376.html.

See also:
https://gcc.gnu.org/onlinedocs/cpp/_005f_005fhas_005finclude.html
https://clang.llvm.org/docs/LanguageExtensions.html#has-include
2022-05-12 08:21:15 +01:00
fanquake
c9c5b3060d
guix: compile glibc without -werror
Compiling glibc 2.24 and 2.27 with the new GCC 10 results in a number of new warnings,
i.e:
```bash
libc-tls.c: In function ‘__libc_setup_tls’:
libc-tls.c:208:30: error: array subscript 1 is outside the bounds of an interior zero-length array ‘struct dtv_slotinfo[0]’ [-Werror=zero-length-bounds]
  208 |   static_slotinfo.si.slotinfo[1].map = main_map;
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
In file included from ../sysdeps/x86_64/ldsodefs.h:54,
                 from ../sysdeps/gnu/ldsodefs.h:46,
                 from ../sysdeps/unix/sysv/linux/ldsodefs.h:25,
                 from libc-tls.c:20:
../sysdeps/generic/ldsodefs.h:398:7: note: while referencing ‘slotinfo’
  398 |     } slotinfo[0];
      |       ^~~~~~~~
```

While we could try and backport all the patches required to fix these up, it would
currently seem easier to disable -Werror, which Guix uses by default when building
glibc.
2022-05-12 08:21:15 +01:00
fanquake
e3bab43329
Merge bitcoin/bitcoin#25099: guix: bump time-machine to 998eda3067c7d21e0d9bb3310d2f5a14b8f1c681
298389e3b5 guix: bump time-machine to 998eda3067c7d21e0d9bb3310d2f5a14b8f1c681 (fanquake)

Pull request description:

  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](https://git.savannah.gnu.org/cgit/guix.git/commit/?id=f5fe0082abe4547f3fb9f29d8351473cfb3a387b)).
  * Gives us access to clang-toolchain-14 (14.0.3, [998eda3067c7d21e0d9bb3310d2f5a14b8f1c681](https://git.savannah.gnu.org/cgit/guix.git/commit/?id=998eda3067c7d21e0d9bb3310d2f5a14b8f1c681)), which is useful for the Guix portion of #21778.

  Note that with this bump our Linux kernels headers also update from 5.15.28 to [5.15.37](https://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/linux.scm?id=998eda3067c7d21e0d9bb3310d2f5a14b8f1c681#n382).

  Guix Build x86_64:
  ```bash
  9362d95e562650aa8311550650bed4610548366e6aa97af069c164251a51a1bb  guix-build-298389e3b51e/output/aarch64-linux-gnu/SHA256SUMS.part
  29ddd7d05a9086c76bca0c0dd2453eb6756c3442454ddb1a9427ebf8b9e0d225  guix-build-298389e3b51e/output/aarch64-linux-gnu/bitcoin-298389e3b51e-aarch64-linux-gnu-debug.tar.gz
  407e34deff56c2e39e74da4a028b9597e29f320ff03c5ba250ef1e96fde9c400  guix-build-298389e3b51e/output/aarch64-linux-gnu/bitcoin-298389e3b51e-aarch64-linux-gnu.tar.gz
  3c26a2489c166677d5d36857b0b37ffa477ce1adf86ed5ce7a0dc320b9f40078  guix-build-298389e3b51e/output/arm-linux-gnueabihf/SHA256SUMS.part
  32e20991bb881b9251f33b7806b46add5058b2ca67a565025539571575f02b8b  guix-build-298389e3b51e/output/arm-linux-gnueabihf/bitcoin-298389e3b51e-arm-linux-gnueabihf-debug.tar.gz
  b6be5e6e4c86f696fc0d8b891912405f6ebdf2a41f1732f32dde561bc7e35bc3  guix-build-298389e3b51e/output/arm-linux-gnueabihf/bitcoin-298389e3b51e-arm-linux-gnueabihf.tar.gz
  c94a0d1226227617d8347d0b6e3a3c717784781a0dbf1fb9954808f80baf194e  guix-build-298389e3b51e/output/arm64-apple-darwin/SHA256SUMS.part
  e5b08c3ff5b7bed3ef71fe9f3291e3abc019342324dccc41e2d18ce5613f165c  guix-build-298389e3b51e/output/arm64-apple-darwin/bitcoin-298389e3b51e-arm64-apple-darwin-unsigned.dmg
  450b00bd439dbe3e7a332cc0c137edbbfb5aa14333b29489c678f284e9ce73b5  guix-build-298389e3b51e/output/arm64-apple-darwin/bitcoin-298389e3b51e-arm64-apple-darwin-unsigned.tar.gz
  1efb0ad7a8c655b0b618666259427752570bdeed181b08eb295344e63c185fc5  guix-build-298389e3b51e/output/arm64-apple-darwin/bitcoin-298389e3b51e-arm64-apple-darwin.tar.gz
  e632f3667ede2c4b29966da481556957371a75feadd4b991bb63c51cd8f26365  guix-build-298389e3b51e/output/dist-archive/bitcoin-298389e3b51e.tar.gz
  6146a8fe15189724cdcae78d4dcb1e7d2224f9dd170d1a5bebb32abf5a8a5fca  guix-build-298389e3b51e/output/powerpc64-linux-gnu/SHA256SUMS.part
  c57e87316c72fadb6388e3c6bbb946120e3dacc36d6e31f5a5bec6717e1117a3  guix-build-298389e3b51e/output/powerpc64-linux-gnu/bitcoin-298389e3b51e-powerpc64-linux-gnu-debug.tar.gz
  7eecdd0628b384a874e8ff9d991498ad1122fe10ff6cd14d8be328e7b6adaa15  guix-build-298389e3b51e/output/powerpc64-linux-gnu/bitcoin-298389e3b51e-powerpc64-linux-gnu.tar.gz
  acf9384d2cc9a916f867250f65d955086ba15575f1d4eb274e2b8bee3e26a5dc  guix-build-298389e3b51e/output/powerpc64le-linux-gnu/SHA256SUMS.part
  1dfe717291519412f699df0586cbbf87aa50a51c0e06591ae94ef41554d09463  guix-build-298389e3b51e/output/powerpc64le-linux-gnu/bitcoin-298389e3b51e-powerpc64le-linux-gnu-debug.tar.gz
  855a254be01d13f7ea5d7f369232d889da32f2d05c60f90d8e001fb3630d2c6b  guix-build-298389e3b51e/output/powerpc64le-linux-gnu/bitcoin-298389e3b51e-powerpc64le-linux-gnu.tar.gz
  1c6c90479086a50728e3f82efecf56329cca46f6653daa738202386e6b47c26a  guix-build-298389e3b51e/output/riscv64-linux-gnu/SHA256SUMS.part
  0aad597ba84228ede14ebd799a8ba46f10f531f773c49644a2c022d686d29d8c  guix-build-298389e3b51e/output/riscv64-linux-gnu/bitcoin-298389e3b51e-riscv64-linux-gnu-debug.tar.gz
  d7688db3e84e8f60147744cbcb16a0a3d15819f575343e2ecd4a1ccf089c91e6  guix-build-298389e3b51e/output/riscv64-linux-gnu/bitcoin-298389e3b51e-riscv64-linux-gnu.tar.gz
  8f63eeb1c6b28ce3846b240e5f594bdae03bf586255adc9c7b80c67e66d8c3b5  guix-build-298389e3b51e/output/x86_64-apple-darwin/SHA256SUMS.part
  1fcbe9c97ff2b7d5b3fd4360dde7027949fd457a089491e176f90e406c731abf  guix-build-298389e3b51e/output/x86_64-apple-darwin/bitcoin-298389e3b51e-x86_64-apple-darwin-unsigned.dmg
  cb5203c422c113c3c8c40183353e75618d26fabe59becc7e1414cdca12496fb9  guix-build-298389e3b51e/output/x86_64-apple-darwin/bitcoin-298389e3b51e-x86_64-apple-darwin-unsigned.tar.gz
  7eaf1df97ff30f05f2fbd823a2b8b84e746d284ddaf3ece57a38edd19830c153  guix-build-298389e3b51e/output/x86_64-apple-darwin/bitcoin-298389e3b51e-x86_64-apple-darwin.tar.gz
  bec9db8a9f0667b23a1ee950971e9ab019e4370f9cf8f7d7b3d2587d9c83ca92  guix-build-298389e3b51e/output/x86_64-linux-gnu/SHA256SUMS.part
  199e22b5e9b37955caa73d5afe3b2de122a42f941395c45deab9be5dac40e437  guix-build-298389e3b51e/output/x86_64-linux-gnu/bitcoin-298389e3b51e-x86_64-linux-gnu-debug.tar.gz
  c084c3b1cdda799cf7530ab1b648c4728ffb79e46f8ab4cd33a8634bcab08d4b  guix-build-298389e3b51e/output/x86_64-linux-gnu/bitcoin-298389e3b51e-x86_64-linux-gnu.tar.gz
  8cc6a3bfca126ace0b37136ef1a6e3be5ed3e676d50633010b91956d7be3afb6  guix-build-298389e3b51e/output/x86_64-w64-mingw32/SHA256SUMS.part
  1d8b60b280d82527960ae5b4e5bfd5167e2643039ac7d2638142d3305f76ab15  guix-build-298389e3b51e/output/x86_64-w64-mingw32/bitcoin-298389e3b51e-win64-debug.zip
  d2400426c56de368e5988fb243a92bb134436936f8fc744a09d376ca74f051af  guix-build-298389e3b51e/output/x86_64-w64-mingw32/bitcoin-298389e3b51e-win64-setup-unsigned.exe
  dc259648446fa94e8d5a187582489a7dd3386a4c9c214f56919a84e64625c733  guix-build-298389e3b51e/output/x86_64-w64-mingw32/bitcoin-298389e3b51e-win64-unsigned.tar.gz
  62094d08c406d8672e00a86c6e102ff6bdac7a279216824fbef68bcc0c456297  guix-build-298389e3b51e/output/x86_64-w64-mingw32/bitcoin-298389e3b51e-win64.zip
  ```

  Guix Build arm64:
  ```bash
  dac7955a62e6c67323849103662c8ef34046093cb4ba524b803ee2dbdfa6bc47  guix-build-298389e3b51e/output/arm-linux-gnueabihf/SHA256SUMS.part
  c9b0e43e0c665005d22b1af0191aa7df10c1e7302c6f9fa8a1aaa10703e1861f  guix-build-298389e3b51e/output/arm-linux-gnueabihf/bitcoin-298389e3b51e-arm-linux-gnueabihf-debug.tar.gz
  85f7205fc4d4eaf1834f6e83f36d6c25626ca3b82180166be171161ebd893899  guix-build-298389e3b51e/output/arm-linux-gnueabihf/bitcoin-298389e3b51e-arm-linux-gnueabihf.tar.gz
  b902698168c6b5521054c607d101fe0c1c2044ac27c6e3432dd9f9a4121bee85  guix-build-298389e3b51e/output/arm64-apple-darwin/SHA256SUMS.part
  b6464187d7984f5645a4d1a9efde1e8f3e2e8293d7d2b1791f22906ef44eb53b  guix-build-298389e3b51e/output/arm64-apple-darwin/bitcoin-298389e3b51e-arm64-apple-darwin-unsigned.dmg
  b5c1ceb74df3cc41550a197135f7315f2c15fd9fc1c67ecfa7ebf87e5272f6c9  guix-build-298389e3b51e/output/arm64-apple-darwin/bitcoin-298389e3b51e-arm64-apple-darwin-unsigned.tar.gz
  b46e4c18421622b824a063901f2a6a96118a8a5fafc81cf47be9f47dba22aeb3  guix-build-298389e3b51e/output/arm64-apple-darwin/bitcoin-298389e3b51e-arm64-apple-darwin.tar.gz
  e632f3667ede2c4b29966da481556957371a75feadd4b991bb63c51cd8f26365  guix-build-298389e3b51e/output/dist-archive/bitcoin-298389e3b51e.tar.gz
  74a46177ee6e04fc8d4bf3d3086ed83ddb60a825d573a38ea1843408a7da4c12  guix-build-298389e3b51e/output/powerpc64-linux-gnu/SHA256SUMS.part
  475b946f9cbb0e97ce0da1b814f44fd50e845c000618c29528b0771263fbe6c6  guix-build-298389e3b51e/output/powerpc64-linux-gnu/bitcoin-298389e3b51e-powerpc64-linux-gnu-debug.tar.gz
  2d3f8246f20d034f6a27b5f1e549c58c4aec5f80cdb54cc95e1c08f9ab7c83d8  guix-build-298389e3b51e/output/powerpc64-linux-gnu/bitcoin-298389e3b51e-powerpc64-linux-gnu.tar.gz
  407565823bc5c2ffd45a19856b69db358c631229a44c7e73404fc6cdc304ae5e  guix-build-298389e3b51e/output/powerpc64le-linux-gnu/SHA256SUMS.part
  376d8767b9b6885f60bffcc1cc4fecec506cd897684538c4c8d6b421346b196d  guix-build-298389e3b51e/output/powerpc64le-linux-gnu/bitcoin-298389e3b51e-powerpc64le-linux-gnu-debug.tar.gz
  e58b35bcb05585b3afd60f528d842b941ef204ec8e260df67984f701e73d33f9  guix-build-298389e3b51e/output/powerpc64le-linux-gnu/bitcoin-298389e3b51e-powerpc64le-linux-gnu.tar.gz
  1b3b7aec9af981f1529d28e52a81f189cf040898f36bb87b8d05cf0005cc6296  guix-build-298389e3b51e/output/riscv64-linux-gnu/SHA256SUMS.part
  93cf1241718e4ee5bad8136f54438a17e6e451407f228f529e826f069afdf2e8  guix-build-298389e3b51e/output/riscv64-linux-gnu/bitcoin-298389e3b51e-riscv64-linux-gnu-debug.tar.gz
  9a3140da9b03155f7074a792bd7596c033b18a05da05c92dfaf27e84773a40a9  guix-build-298389e3b51e/output/riscv64-linux-gnu/bitcoin-298389e3b51e-riscv64-linux-gnu.tar.gz
  8f63eeb1c6b28ce3846b240e5f594bdae03bf586255adc9c7b80c67e66d8c3b5  guix-build-298389e3b51e/output/x86_64-apple-darwin/SHA256SUMS.part
  1fcbe9c97ff2b7d5b3fd4360dde7027949fd457a089491e176f90e406c731abf  guix-build-298389e3b51e/output/x86_64-apple-darwin/bitcoin-298389e3b51e-x86_64-apple-darwin-unsigned.dmg
  cb5203c422c113c3c8c40183353e75618d26fabe59becc7e1414cdca12496fb9  guix-build-298389e3b51e/output/x86_64-apple-darwin/bitcoin-298389e3b51e-x86_64-apple-darwin-unsigned.tar.gz
  7eaf1df97ff30f05f2fbd823a2b8b84e746d284ddaf3ece57a38edd19830c153  guix-build-298389e3b51e/output/x86_64-apple-darwin/bitcoin-298389e3b51e-x86_64-apple-darwin.tar.gz
  f78df19d3ba5f7307d2f083797c4d4c12167ac3a14e1e6e89ce5c89c3fc02a88  guix-build-298389e3b51e/output/x86_64-linux-gnu/SHA256SUMS.part
  87f9446ff4e842f2da064df07dc386e21ca1c8a4697751a983f60a5fc915921e  guix-build-298389e3b51e/output/x86_64-linux-gnu/bitcoin-298389e3b51e-x86_64-linux-gnu-debug.tar.gz
  115f9f815f20a549b37b7b66031d5e2d3f9d5666e526af1e284697b93016f0bc  guix-build-298389e3b51e/output/x86_64-linux-gnu/bitcoin-298389e3b51e-x86_64-linux-gnu.tar.gz
  3d7c0288e2c382e45d7eda37e95524a35a75a40d6e4f0c767acf5fe7e19012fe  guix-build-298389e3b51e/output/x86_64-w64-mingw32/SHA256SUMS.part
  0f6108ccf2602e2c220ba95ce9041d282e2e9e2831932bdcc8138f46cf88f934  guix-build-298389e3b51e/output/x86_64-w64-mingw32/bitcoin-298389e3b51e-win64-debug.zip
  d2400426c56de368e5988fb243a92bb134436936f8fc744a09d376ca74f051af  guix-build-298389e3b51e/output/x86_64-w64-mingw32/bitcoin-298389e3b51e-win64-setup-unsigned.exe
  dc259648446fa94e8d5a187582489a7dd3386a4c9c214f56919a84e64625c733  guix-build-298389e3b51e/output/x86_64-w64-mingw32/bitcoin-298389e3b51e-win64-unsigned.tar.gz
  8920354d22cadc450ca49a0d73e51ca0be6788b9ffab7e4d6159f55db40ef6ef  guix-build-298389e3b51e/output/x86_64-w64-mingw32/bitcoin-298389e3b51e-win64.zip
  ```

Top commit has no ACKs.

Tree-SHA512: 4bc593af1120fb15a46bf950d373e6f188aff39a400e350d5fb0380ca740a7a146ce36a56ba298d2b2d9436020c4bfbf1f7c633362ac3fa703b40a1613532b81
2022-05-12 08:20:41 +01:00
MacroFake
a2a8e919ee
Merge bitcoin/bitcoin#24925: refactor: make GetRand a template, remove GetRandInt
ab1ea29ba1 refactor: make GetRand a template, remove GetRandInt (pasta)

Pull request description:

  makes GetRand a template for which any integral type can be used, where the default behavior is to return a random integral up to the max of the integral unless a max is provided.
  This simplifies a lot of code from GetRand(std::numeric_limits<uint64_t>::max() -> GetRand<uint64_t>()

ACKs for top commit:
  laanwj:
    Code review ACK ab1ea29ba1

Tree-SHA512: db5082a0e21783389f1be898ae73e097b31ab48cab1a2c0e29348a4adeb545d4098193aa72a547c6baa6e8205699aafec38d6a27b3d65522fb3246f91b4daae9
2022-05-12 08:57:22 +02:00
laanwj
51527ec1ec
Merge bitcoin/bitcoin#25051: Bugfix: configure: Define defaults for enable_arm_{crc,shani}
7fd0860d12 Bugfix: configure: Define defaults for enable_arm_{crc,shani} (Luke Dashjr)

Pull request description:

  Fix for #17398 and #24115

  Trivial, mostly for consistency (you'd have to *try* to break this)

ACKs for top commit:
  pk-b2:
    ACK 7fd0860d12
  seejee:
    ACK 7fd0860d12
  vincenzopalazzo:
    ACK 7fd0860d12

Tree-SHA512: 51c389787c369f431ca57071f03392438bff9fd41f128c63ce74ca30d2257213f8be225efcb5c1329ad80b714f44427d721215d4f848cc8e63060fa5bc8f1f2e
2022-05-11 20:24:27 +02:00
MacroFake
9db941d773
Merge bitcoin/bitcoin#25100: Switch scheduler to steady_clock
fa90516422 Switch scheduler to steady_clock (MacroFake)

Pull request description:

  There is already `mockscheduler`, so it seems brittle, confusing and redundant to be able to mock the scheduler by adjusting the system clock.

ACKs for top commit:
  laanwj:
    Code review ACK fa90516422
  w0xlt:
    crACK fa90516422

Tree-SHA512: 60e99065ffb881a9fb25a346d311d99424fbc72a3b636c94b5f5c17ed6373c40f358a9b27825c518d12968c033e6cfd3c62d2b62cacdddc44a0b5b74f6c1a7ae
2022-05-11 17:18:25 +02:00
MacroFake
cca900e382
Merge bitcoin/bitcoin#25104: wallet: Change log interval to use steady_clock
bdc6881e2f wallet: Change log interval to use `steady_clock` (w0xlt)

Pull request description:

  This refactors the log interval variables to use `steady_clock` as it is best suitable for measuring intervals.

ACKs for top commit:
  laanwj:
    This makes sense. Code review ACK bdc6881e2f
  dunxen:
    Code review ACK bdc6881

Tree-SHA512: 738b4aa45cef01df77102320f83096a0a7d0c63d7fcf098a8c0ab16b29453a87dc789c110105590e1e215d03499db1d889a94f336dcb385b6883c8364c9d39b7
2022-05-11 17:09:44 +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
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
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
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
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
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
MacroFake
c367736f85
Merge bitcoin/bitcoin#24840: test: port 'lint-shell.sh' to python
bd6ceb4049 test: port 'lint-shell.sh' to python (whiteh0rse)

Pull request description:

  Converts `test/lint/lint-shell.sh` to Python and updates the docs accordingly. In order for the linter to run, it requires `git` and the `shellcheck` linter to be installed on the system. The script will fail gracefully with a help message if `shellcheck` is not installed.

Top commit has no ACKs.

Tree-SHA512: edc3f1af582b736a0b46f32bd7448e859201dc43f5dd086f16aab49037a1ab936f5376c29fc1006a932b9e98b4f2423d83d98e9666304781a06eb4d2a16f54e3
2022-05-05 17:07:15 +02:00
fanquake
7cc1860b12
Merge bitcoin/bitcoin#24566: build: Drop redundant checks for ranlib and strip tools
a0e2a3133a build: Drop redundant checks for ranlib and strip tools (Hennadii Stepanov)

Pull request description:

  These checks are handled by the `LT_INIT` macro.

  Inspired by bitcoin-core/secp256k1#1088.

  On master (f3e0ace8ec):
  ```
  $ ./configure --with-incompatible-bdb 2>&1 | grep -n -E 'ranlib\.\.\.|strip\.\.\.'
  56:checking for strip... strip
  57:checking for ranlib... ranlib
  102:checking for ranlib... /usr/bin/ranlib
  103:checking for strip... /usr/bin/strip
  380:checking for strip... strip
  381:checking for ranlib... ranlib
  ```
  With this PR:
  ```
  $ ./configure --with-incompatible-bdb 2>&1 | grep -n -E 'ranlib\.\.\.|strip\.\.\.'
  56:checking for strip... strip
  57:checking for ranlib... ranlib
  377:checking for strip... strip
  378:checking for ranlib... ranlib
  $ CONFIG_SITE=$PWD/depends/x86_64-apple-darwin/share/config.site ./configure 2>&1 | grep -n -E 'ranlib\.\.\.|strip\.\.\.'
  8:checking for x86_64-apple-darwin-strip... /home/hebasto/GitHub/bitcoin/depends/x86_64-apple-darwin/native/bin/x86_64-apple-darwin-strip
  61:checking for x86_64-apple-darwin-strip... (cached) /home/hebasto/GitHub/bitcoin/depends/x86_64-apple-darwin/native/bin/x86_64-apple-darwin-strip
  62:checking for x86_64-apple-darwin-ranlib... /home/hebasto/GitHub/bitcoin/depends/x86_64-apple-darwin/native/bin/x86_64-apple-darwin-ranlib
  188:checking whether the linker accepts -Wl,-dead_strip... yes
  367:checking for x86_64-apple-darwin-strip... /home/hebasto/GitHub/bitcoin/depends/x86_64-apple-darwin/native/bin/x86_64-apple-darwin-strip
  411:checking for x86_64-apple-darwin-strip... (cached) /home/hebasto/GitHub/bitcoin/depends/x86_64-apple-darwin/native/bin/x86_64-apple-darwin-strip
  412:checking for x86_64-apple-darwin-ranlib... /home/hebasto/GitHub/bitcoin/depends/x86_64-apple-darwin/native/bin/x86_64-apple-darwin-ranlib
  ```

  #### Guix builds on `x86_64`:
  ```
  ...
  ```

ACKs for top commit:
  real-or-random:
    ACK a0e2a3133a
  fanquake:
    ACK a0e2a3133a

Tree-SHA512: 17e2f54a3fc0447d7a27592d4c803538b6e0dfe02eab9a234084d71f3d9244c2488d56301f6c57050592e0d760c2d48b2b7d365454754af2ce098e77c05d33cc
2022-05-05 15:25:31 +01:00
Adam Jonas
308dd2e93e Sanity assert GetAncestor() != nullptr where appropriate
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: Aurèle Oulès <aurele@oules.com>
Co-Authored-By: danra <danra@users.noreply.github.com>
2022-05-05 15:55:44 +02:00
whiteh0rse
bd6ceb4049
test: port 'lint-shell.sh' to python 2022-05-05 08:44:08 -05:00
Hennadii Stepanov
a0e2a3133a
build: Drop redundant checks for ranlib and strip tools
These checks are handled by the `LT_INIT` macro.
2022-05-05 10:40:54 +02:00
fanquake
1ad5d5088d
Merge bitcoin/bitcoin#24866: build: No longer need to hack the PATH variable in config.site
efa3a807a6 build: No longer need to hack the `PATH` variable in `config.site` (Hennadii Stepanov)
f3af4f7a18 build: Let the depends build system define a path to `dsymutil` tool (Hennadii Stepanov)
b0a8ddabe5 build: Pass missed darwin-specific tools via `config.site` (Hennadii Stepanov)
f87594da14 build: No need to provide defaults for darwin-specific tools (Hennadii Stepanov)
80cd99322f scripted-diff: Rename INSTALLNAMETOOL -> INSTALL_NAME_TOOL (Hennadii Stepanov)
a4fd440741 build: Pass missed `strip` tool via `config.site` (Hennadii Stepanov)

Pull request description:

  This PR adds lacking definitions of absolute paths to some tools in the depends build system.

  This improvement makes possible to keep the `PATH` variable untouched during configuration.

  Also see https://github.com/bitcoin/bitcoin/pull/24566#discussion_r851125442.

  #### Guix builds on `x86_64`:
  ```
  $ find guix-build-$(git rev-parse --short=12 HEAD)/output/ -type f -print0 | env LC_ALL=C sort -z | xargs -r0 sha256sum
  93fa58bf2a1f5c15c5a547c014036ac79761e5c9622bd5099408ce570b39f02f  guix-build-efa3a807a677/output/aarch64-linux-gnu/SHA256SUMS.part
  ef5f53348404ba973dceaf088a4d47dfd0f1fa3d3bf75bdd723b043431de005d  guix-build-efa3a807a677/output/aarch64-linux-gnu/bitcoin-efa3a807a677-aarch64-linux-gnu-debug.tar.gz
  6688b2295d564b32ea676c0540c43cdc5211322eddc87e0967b764284e847368  guix-build-efa3a807a677/output/aarch64-linux-gnu/bitcoin-efa3a807a677-aarch64-linux-gnu.tar.gz
  4abb3428be477aa7360611689fd28950f30dbbac6a95c454095367d8df11ad72  guix-build-efa3a807a677/output/arm-linux-gnueabihf/SHA256SUMS.part
  8dd33389170e83812821d5dd68741db96af1376035ba40af0215a7ae95dcf7fc  guix-build-efa3a807a677/output/arm-linux-gnueabihf/bitcoin-efa3a807a677-arm-linux-gnueabihf-debug.tar.gz
  544e97eb88b2a44c8ceb9660399eb5d49d75e07ff59fc03a701a595bacea0491  guix-build-efa3a807a677/output/arm-linux-gnueabihf/bitcoin-efa3a807a677-arm-linux-gnueabihf.tar.gz
  219faf1131bdcffffd5979eafd2beabc4a300081f8b1df184852b7183dfbc0e8  guix-build-efa3a807a677/output/arm64-apple-darwin/SHA256SUMS.part
  602a417bfa7971fb26d0fe9921d2348fd0d01a5bcf0af93f8a9d50112076e0eb  guix-build-efa3a807a677/output/arm64-apple-darwin/bitcoin-efa3a807a677-arm64-apple-darwin-unsigned.dmg
  0dcb197420844da8da3f528a1d986628f7b63adb1e83353d63e8a84da59abc42  guix-build-efa3a807a677/output/arm64-apple-darwin/bitcoin-efa3a807a677-arm64-apple-darwin-unsigned.tar.gz
  10efdd33418234a8288c27a614f50e9ff45efbd681fa1c0e173142b6d267cdb8  guix-build-efa3a807a677/output/arm64-apple-darwin/bitcoin-efa3a807a677-arm64-apple-darwin.tar.gz
  e5ef02adeb9bcb4675972b0dc233a904006b0940d721049eeb94b14cda34872e  guix-build-efa3a807a677/output/dist-archive/bitcoin-efa3a807a677.tar.gz
  a75d2a49b7a8ab1c849e1badff5049a417519f0154b65335a8717d01b8b6ed62  guix-build-efa3a807a677/output/powerpc64-linux-gnu/SHA256SUMS.part
  aef63d196487dd0bc597fd53633ac889149f1a126c651ea55f3bec11a092c460  guix-build-efa3a807a677/output/powerpc64-linux-gnu/bitcoin-efa3a807a677-powerpc64-linux-gnu-debug.tar.gz
  ddc7913eed26270be271a8712bf351d562d57c746810ea3b7b4101aea8cb6d89  guix-build-efa3a807a677/output/powerpc64-linux-gnu/bitcoin-efa3a807a677-powerpc64-linux-gnu.tar.gz
  83bbf4b1af07a2cf7d6014de7c885f0998dd38afacdb5242f5f56505ee704f17  guix-build-efa3a807a677/output/powerpc64le-linux-gnu/SHA256SUMS.part
  c9d5d95de98ed987b63a78d4f6e082cb36d5ec3ba71d130601e03d3ebfbd208d  guix-build-efa3a807a677/output/powerpc64le-linux-gnu/bitcoin-efa3a807a677-powerpc64le-linux-gnu-debug.tar.gz
  88ed6ec82dd4c1c656fe80b4c49f91a4c15c2ab798dbbe16a3d57393f17d6f3a  guix-build-efa3a807a677/output/powerpc64le-linux-gnu/bitcoin-efa3a807a677-powerpc64le-linux-gnu.tar.gz
  7b8e7b3b1e68a2ea0e37c058b284da11e9721ef4d1bc2761ed003b2061358d5f  guix-build-efa3a807a677/output/riscv64-linux-gnu/SHA256SUMS.part
  a5de4bedf2b4bc5ab25db21b942076897cabe8a40ce9b0637488af6b4d90693a  guix-build-efa3a807a677/output/riscv64-linux-gnu/bitcoin-efa3a807a677-riscv64-linux-gnu-debug.tar.gz
  53023994202887778a001ce00daf7cdc135b9e6c3be034f31645ab4ba5f078c6  guix-build-efa3a807a677/output/riscv64-linux-gnu/bitcoin-efa3a807a677-riscv64-linux-gnu.tar.gz
  c6664a61b81dfa080c466d2252a6db70165acbea6cfad51ada16970e9c08bb6f  guix-build-efa3a807a677/output/x86_64-apple-darwin/SHA256SUMS.part
  a528569ae4bf5e19401311649086a2d8e3fa5251b44550e623722968dfb111ea  guix-build-efa3a807a677/output/x86_64-apple-darwin/bitcoin-efa3a807a677-x86_64-apple-darwin-unsigned.dmg
  9b0384cce7605b546ed581074955f2b9c33cf0817453842036e6224b423b814b  guix-build-efa3a807a677/output/x86_64-apple-darwin/bitcoin-efa3a807a677-x86_64-apple-darwin-unsigned.tar.gz
  ebdbd2f3a6406233f27ee48be0ab014991fedba3c0831f79f4a4873f7abf3d7a  guix-build-efa3a807a677/output/x86_64-apple-darwin/bitcoin-efa3a807a677-x86_64-apple-darwin.tar.gz
  05a8f71fe67f7193e71ea8bbe6f8df2e651b8ac7da3075ba25aacdd3515f7757  guix-build-efa3a807a677/output/x86_64-linux-gnu/SHA256SUMS.part
  30a17a1e3d795ea390cd1e0f3ef74c989b5768ae7415740fcca46befe4cb7206  guix-build-efa3a807a677/output/x86_64-linux-gnu/bitcoin-efa3a807a677-x86_64-linux-gnu-debug.tar.gz
  66db846f3fd739089afa5c339659dbf5efb50572f2d29f8288bf24be9e8f1dd0  guix-build-efa3a807a677/output/x86_64-linux-gnu/bitcoin-efa3a807a677-x86_64-linux-gnu.tar.gz
  bd3c44890823badcf6d296fa674de14275684be7593f4ab21c0316873ddd8652  guix-build-efa3a807a677/output/x86_64-w64-mingw32/SHA256SUMS.part
  6ce3ee21212ff2a95e085073a48194476ade2d5ff94cc1c8ec58a8ae7db8f1fa  guix-build-efa3a807a677/output/x86_64-w64-mingw32/bitcoin-efa3a807a677-win64-debug.zip
  5e697c05537cfb2ce2ed95fef25e261e2cfa83a31fd548a98118580c4bbff2e4  guix-build-efa3a807a677/output/x86_64-w64-mingw32/bitcoin-efa3a807a677-win64-setup-unsigned.exe
  4cc2bcff98845c792c0ed12a2ea407b25fb85b2d4250d88dca94ed68f42e714d  guix-build-efa3a807a677/output/x86_64-w64-mingw32/bitcoin-efa3a807a677-win64-unsigned.tar.gz
  9d5d72271dc6b820e63b30c5c3f9015309777793100b4e2b6ab0c8ea0f7b4aed  guix-build-efa3a807a677/output/x86_64-w64-mingw32/bitcoin-efa3a807a677-win64.zip
  ```

ACKs for top commit:
  laanwj:
    Tested ACK efa3a807a6. I get the same build output as in OP:
  vincenzopalazzo:
    Re ACK efa3a807a6

Tree-SHA512: 6d35c11fc307221d61ad250bbdcdc09dbc49adbe43f7a94acb56190ae9f005d23fc22941ea59e3eb62811f8974e39d3617e0c47071232d4b1b0bc2e2e2782e88
2022-05-05 09:36:26 +01:00
MacroFake
0d080a183b
Merge bitcoin/bitcoin#24141: Rename message_command variables in src/net* and src/rpc/net.cpp
e71c51b27d refactor: rename command -> message type in comments in the src/net* files (Shashwat)
2b09593bdd scripted-diff: Rename message command to message type (Shashwat)

Pull request description:

  This PR is a follow-up to #24078.

  > a message is not a command, but simply a message of some type

  The first commit covers the message_command variable name and comments not addressed in the original PR in `src/net*` files.
  The second commit goes beyond the original `src/net*` limit of #24078 and does similar changes in the `src/rpc/net.cpp` file.

ACKs for top commit:
  MarcoFalke:
    review ACK e71c51b27d 💥

Tree-SHA512: 24015d132c00f15239e5d3dc7aedae904ae3103a90920bb09e984ff57723402763f697d886322f78e42a0cb46808cb6bc9d4905561dc6ddee9961168f8324b05
2022-05-05 08:37:35 +02:00
laanwj
d4475ea7ae
Merge bitcoin/bitcoin#22235: script: add script to generate example bitcoin.conf
b42643c253 doc: update init.cpp -conf help text (josibake)
970b9987ad doc: update devtools, release-process readmes (josibake)
50635d27b4 build: include bitcoin.conf in build outputs (josibake)
6aac946f49 doc: update bitcoin-conf.md (Josiah Baker)
1c7e820ded script: add script to generate example bitcoin.conf (josibake)
b483084d86 doc: replace bitcoin.conf with placeholder file (josibake)

Pull request description:

  create a script for parsing the output from `bitcoind --help` to create an example conf file for new users

  ## problem

  per #10746 , `bitcoin.conf` not being put into the data directory during installation causes some confusion for users when running bitcoin. in the discussion on the issue, one proposed solution was to have an example config file and instruct users to `cp` it into their data directory after startup. in addition to #10746 , there have been other requests for a "skeleton config file" (https://github.com/bitcoin/bitcoin/issues/19641) to help users get started with configuring bitcoind.

  the main issue with an example config file is that it creates a second source of truth regarding what options are available for configuring bitcoind. this means any changes to the options (including the addition or removal of options) would have to be updated for the command line and also updated in the example file.

  this PR addresses this issue by providing a script to generate an example file directly from the `bitcoind --help` on-demand by running `contrib/devtools/gen-bitcoin-conf.sh`. this solution was originally proposed on #10746 and would also solve #19641 . this guarantees any changes made to the command-line options or the command-line options help would also be reflected in the example file after compiling and running the script.

  the main purpose of this script is to generate a config file to be included with releases, same as `gen-manpages.sh`. this ensures every release also includes an up-to-date, full example config file for users to edit. the script is also available for users who compile from source for generating an example config for their compiled binary.

  ## special considerations

  this removes the `bitcoin.conf` example file from the repo as it is now generated by this script. the original example file did contain extra text related to how to use certain options but going forward all option help docs should be moved into `init.cpp`

  this also edits `init.cpp` to have the option help indicate that `-conf` is not usable from the config file. this is similar to how `-includeconf` 's help indicates it cannot be used from the command line

ACKs for top commit:
  laanwj:
    Tested and code review ACK b42643c253

Tree-SHA512: 4546e0cef92aa1398da553294ce4712d02e616dd72dcbe0b921af474e54f24750464ec813661f1283802472d1e8774e634dd1cc26fbf1f13286d3e0406c02c09
2022-05-04 21:12:56 +02:00
laanwj
5e1aacab57
Merge bitcoin/bitcoin#24933: util: Replace non-threadsafe strerror
e3a06a3c6c test: Add `strerror` to locale-dependence linter (laanwj)
f00fb1265a util: Increase buffer size to 1024 in SysErrorString (laanwj)
718da302c7 util: Refactor SysErrorString logic (laanwj)
e7f2f77756 util: Use strerror_s for SysErrorString on Windows (laanwj)
46971c6dbf util: Replace non-threadsafe strerror (laanwj)

Pull request description:

  Some uses of non-threadsafe `strerror` have snuck into the code since they were removed in #4152. Add a wrapper `SysErrorString` for thread-safe strerror alternatives (with code from `NetworkErrorString`) and replace all uses of `strerror` with this.

  Edit: I've also added a commit that refactors the code so that buf[] is never read at all if the function fails, making some fragile-looking code unnecessary.

  Edit2: from the linux manpage:
  ```
  ATTRIBUTES
         For an explanation of the terms used in this section, see attributes(7).

         ┌───────────────────┬───────────────┬─────────────────────────┐
         │Interface          │ Attribute     │ Value                   │
         ├───────────────────┼───────────────┼─────────────────────────┤
         │strerror()         │ Thread safety │ MT-Unsafe race:strerror │
         ├───────────────────┼───────────────┼─────────────────────────┤
  …
         ├───────────────────┼───────────────┼─────────────────────────┤
         │strerror_r(),      │ Thread safety │ MT-Safe                 │
         │strerror_l()       │               │                         │
         └───────────────────┴───────────────┴─────────────────────────┘
  ```
  As the function can be called from any thread at any time, using a non-thread-safe function is unacceptable.

ACKs for top commit:
  jonatack:
    ACK e3a06a3c6c

Tree-SHA512: 20e71ebb9e979d4e1d8cafbb2e32e20c2a63f09115fe72cdde67c8f80ae98c531d286f935fd8a6e92a18b72607d7bd3e846b2d871d9691a6036b0676de8aaf25
2022-05-04 21:08:30 +02:00
Pieter Wuille
81c09ee45c Unroll the ChaCha20 inner loop for performance 2022-05-04 14:53:46 -04:00
josibake
b42643c253
doc: update init.cpp -conf help text
update help to reflect this option cannot be used from the config file
2022-05-04 20:45:50 +02:00
josibake
970b9987ad
doc: update devtools, release-process readmes
include running `gen-bitcoin-conf.sh` as part of the release process.
2022-05-04 20:45:49 +02:00
josibake
50635d27b4
build: include bitcoin.conf in build outputs
copy over bitcoin.conf during the build process.
this means `contrib/devtools/gen-bitcoin-conf.sh` will need
to be run and the generated file committed during the release process.

this is the same process used for generating man pages for each release.
2022-05-04 20:45:14 +02:00