Commit Graph

612 Commits

Author SHA1 Message Date
fanquake
9be4565c2d
ci: re-enable gui tests for s390x
These work for me now. If they still don't work in other setups,
maybe we can better document the issues.

```bash
time FILE_ENV="./ci/test/00_setup_env_s390x.sh" ./ci/test_run_all.sh
...
Running tests: coins_tests from test/coins_tests.cpp
PASS: qt/test/test_bitcoin-qt
Running tests: coinstatsindex_tests from test/coinstatsindex_tests.cpp
...
Stop and remove CI container by ID
+ docker container kill 617bef8accb87530e5fbb03ff07b3b9f0aa9e3030d4da424c9612d153ab98dbf
617bef8accb87530e5fbb03ff07b3b9f0aa9e3030d4da424c9612d153ab98dbf

real	51m37.809s
```
2023-06-30 11:15:57 +01:00
fanquake
c6287faae4
Merge bitcoin/bitcoin#27996: ci: filter all subtrees from tidy output
62633b5046 ci: filter all subtrees from tidy output (fanquake)

Pull request description:

  We are currently dumping output for some. i.e:
  ```bash
  diff --git a/src/minisketch/src/fields/clmul_1byte.cpp b/src/minisketch/src/fields/clmul_1byte.cpp
  index 8826af9..7fd6f2a 100644
  --- a/src/minisketch/src/fields/clmul_1byte.cpp
  +++ b/src/minisketch/src/fields/clmul_1byte.cpp
  @@ -4,21 +4,16 @@
    * file LICENSE or http://www.opensource.org/licenses/mit-license.php.*
    **********************************************************************/

  -/* This file was substantially auto-generated by doc/gen_params.sage. */
  -#include "../fielddefines.h"
  -
  +class Sketch;
   #if defined(ENABLE_FIELD_BYTES_INT_1)
  ```

ACKs for top commit:
  hebasto:
    re-ACK 62633b5046

Tree-SHA512: fd0a17af6b37fc7641547dab329c2d14ec784941c4d100db1e80d232aff39e45ad9c588982810a2cfc54b4fe820bfe0d50638b53209fec6774fd556b9b0ae180
2023-06-29 13:35:47 +01:00
fanquake
3d51f7c9a8
Merge bitcoin/bitcoin#27932: test: Fuzz on macOS
fae7c50d20 test: Run fuzz tests on macOS (MarcoFalke)

Pull request description:

  Any reason not to?

ACKs for top commit:
  jamesob:
    Github ACK fae7c50d20
  dergoegge:
    utACK fae7c50d20

Tree-SHA512: e45122d73fafb17cea312258314b826cb0745e08daadd28465f687ec02d4c127d2f8cbe20179a9fff5712038850c02c968abb4838fa088b7555e28709317d3a3
2023-06-29 13:08:58 +01:00
fanquake
62633b5046
ci: filter all subtrees from tidy output
We are currently dumping output for some. i.e:
```bash
diff --git a/src/minisketch/src/fields/clmul_1byte.cpp b/src/minisketch/src/fields/clmul_1byte.cpp
index 8826af9..7fd6f2a 100644
--- a/src/minisketch/src/fields/clmul_1byte.cpp
+++ b/src/minisketch/src/fields/clmul_1byte.cpp
@@ -4,21 +4,16 @@
  * file LICENSE or http://www.opensource.org/licenses/mit-license.php.*
  **********************************************************************/

-/* This file was substantially auto-generated by doc/gen_params.sage. */
-#include "../fielddefines.h"
-
+class Sketch;
 #if defined(ENABLE_FIELD_BYTES_INT_1)
```
2023-06-29 11:59:31 +01:00
fanquake
248a17addf
ci: remove duplicate python3 from CI configs 2023-06-28 11:10:51 +01:00
fanquake
b50767fdde
ci: remove duplicate bsdmainutils from CI configs 2023-06-28 10:07:51 +01:00
Andrew Chow
caff95a023
Merge bitcoin/bitcoin#27896: Remove the syscall sandbox
32e2ffc393 Remove the syscall sandbox (fanquake)

Pull request description:

  After initially being merged in #20487, it's no-longer clear that an internal syscall sandboxing mechanism is something that Bitcoin Core should have/maintain, especially when compared to better maintained/supported alterantives, i.e [firejail](https://github.com/netblue30/firejail).

  There is more related discussion in #24771.

  Note that given where it's used, the sandbox also gets dragged into the kernel.

  If it's removed, this should not require any sort of deprecation, as this was only ever an opt-in, experimental feature.

  Closes #24771.

ACKs for top commit:
  davidgumberg:
     crACK 32e2ffc393
  achow101:
    ACK 32e2ffc393
  dergoegge:
    ACK 32e2ffc393

Tree-SHA512: 8cf71c5623bb642cb515531d4a2545d806e503b9d57bfc15a996597632b06103d60d985fd7f843a3c1da6528bc38d0298d6b8bcf0be6f851795a8040d71faf16
2023-06-27 18:19:21 -04:00
MarcoFalke
fae7c50d20
test: Run fuzz tests on macOS
Also, fix a few bugs:

* Error: RPC command "enumeratesigners" not found in RPC_COMMANDS_SAFE_FOR_FUZZING or RPC_COMMANDS_NOT_SAFE_FOR_FUZZING. Please update test/fuzz/rpc.cpp.
* in run_once: ...format(" ".join(result.args), ... TypeError: sequence item 2: expected str instance, PosixPath found
2023-06-22 13:54:17 +02:00
fanquake
0c84a0e484
Merge bitcoin/bitcoin#27798: depends: modernize clang flags for Darwin
cbee1d7091 depends: modernize clang flags (Cory Fields)
2a85857ce5 ci: disable false-positive warnings for now (Cory Fields)

Pull request description:

  This is a cleaner and simpler alternative to #25098. Inspired by [this conversation](https://github.com/bitcoin/bitcoin/pull/27737#issuecomment-1562543301). The diff is large but the change itself is quite small.

  Fixes builds with llvm >= 11 in guix by working around the problem. As a bonus, this is much cleaner and more maintainable than what we had before.

  See the updated comment for more info. At a high level: rather than playing tricks and trying to work around clang's default includes, disable them and re-add what we want.

ACKs for top commit:
  fanquake:
    ACK cbee1d7091 - tested Guix and the depends cross-compile. Would like to move this along, to unblock #27676, which itself might be a blocker for #27897. Note that macOS might seem somewhat in flux for the moment, but once we finish the migration to LLVM Clang + LLD, things will be must simpler, and ultimately more maintainable.
  TheCharlatan:
    ACK cbee1d7091

Tree-SHA512: 5a8300be528f550e15ab23d869e77df7a62201c6d40c0384795a9eecee38118a676e0b79b2b76c5e597597181443caada54a01b75a544dbcde76da1deba8e3a4
2023-06-22 09:47:30 +01:00
fanquake
a596bdf3e9
Merge bitcoin/bitcoin#27919: ci: Run fuzz target even if input folder is empty
0000f55293 ci: Run fuzz target even if input folder is empty (MarcoFalke)

Pull request description:

  This should catch trivial integer sanitizer bugs if the author and all reviewers forget to look for them.

ACKs for top commit:
  brunoerg:
    reACK 0000f55293
  dergoegge:
    reACK 0000f55293

Tree-SHA512: f139b9d56f0cf1aae339c2890721c77c88d1fea77b73d492c1386ec99b4f393c5b664029919ff4a22e4e8a2929f085699a148c6acc2cc3e40df8a72fd39ff474
2023-06-21 10:08:53 +01:00
Cory Fields
2a85857ce5 ci: disable false-positive warnings for now
clang <=17 warns on -nostdlibinc, which causes an error on our -Werror builds.

Note that this breaks the "-fPIE" check in configure because it relies on
catching warnings, but that is not a problem for macOS.
2023-06-20 19:55:02 +00:00
MarcoFalke
0000f55293
ci: Run fuzz target even if input folder is empty 2023-06-20 18:19:01 +02:00
fanquake
682274aab0
ci: install llvm-symbolizer in MSAN jobs 2023-06-20 17:16:22 +01:00
fanquake
96527cd51e
ci: use LLVM 16.0.6 in MSAN jobs 2023-06-20 17:14:06 +01:00
fanquake
32e2ffc393
Remove the syscall sandbox
After initially being merged in #20487, it's no-longer clear that an
internal syscall sandboxing mechanism is something that Bitcoin Core
should have/maintain, especially when compared to better
maintained/supported alterantives, i.e firejail.

Note that given where it's used, the sandbox also gets dragged into the
kernel.

There is some related discussion in #24771.

This should not require any sort of deprecation, as this was only ever
an opt-in, experimental feature.

Closes #24771.
2023-06-16 10:38:19 +01:00
fanquake
3b2acfcfec
build: suppress external warnings by default 2023-06-15 14:12:10 +01:00
MarcoFalke
fa70e85e00
ci: Bump macOS cross task to ubuntu:jammy 2023-06-14 10:49:27 +02:00
MarcoFalke
faaa62754e
ci: Use podman stop over podman kill
This should avoid a race where the kill is not done when spinning up the
new container. podman stop waits 10 seconds by default.
2023-06-09 16:58:38 +02:00
MarcoFalke
fac7f4ab5e
ci: Invalidate Cirrus CI docker cache 2023-06-08 10:28:38 +02:00
fanquake
2ebeb421dd
ci: enable AArch64 target in MSAN jobs
Use Native.
2023-06-05 15:39:51 +01:00
fanquake
c93bfc54e8
ci: use LLVM 16.0.5 in MSAN jobs 2023-06-05 11:23:25 +01:00
fanquake
8a972813ba
Merge bitcoin/bitcoin#27737: ci: compile Clang and compiler-rt in msan jobs
5763b232e6 ci: return to using Ubuntu 22.04 in MSAN jobs (fanquake)
d3cbcbf626 ci: compile clang and compiler-rt in MSAN jobs (fanquake)
796bd1d0d1 ci: use LLVM 16.0.4 in MSAN jobs (fanquake)
883bc9f561 ci: remove extra CC & CXX from MSAN jobs (fanquake)
2d4f4b8f29 ci: standardize custom libc++ usage in MSAN jobs (fanquake)

Pull request description:

  This reworks the MSAN CIs, to first compile Clang and compiler-rt (using GCC 12), and then, compile an MSAN instrumented libc++ using the just-built Clang 16. This fixes the `native_fuzz_with_msan` job, working around https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1005341, by not using the Debian provided Clang/LLVM.

  Also included are changes to streamline how we use our "custom libc++", according to upstream: https://releases.llvm.org/16.0.0/projects/libcxx/docs/UsingLibcxx.html#using-a-custom-built-libc, as well as other minor cleanups in the CI configs.

  An example job is currently running in the qa-assets repo: https://github.com/bitcoin-core/qa-assets/pull/129 (https://cirrus-ci.com/task/4632561431871488).

ACKs for top commit:
  dergoegge:
    utACK 5763b232e6

Tree-SHA512: 4f2a6e0b796bb1830b8346dd1e55eaa86a79037b8b4f16a336c1e29f4fc460acca2ecba076635459370bcbb4009333cb79d27ef1521c1fb5db7599cd5bdf558c
2023-06-02 10:42:05 +01:00
fanquake
f08bde7f71
Merge bitcoin/bitcoin#27778: ci: Enable float-divide-by-zero check
fa3ab45203 ci: Enable float-divide-by-zero check (MarcoFalke)

Pull request description:

  Enable it, because

  * It is enabled on OSS-Fuzz, so to be able to catch bugs earlier, enable it here as well.
  * It makes sense to enable, because when a float is divided by zero, it may be a logic bug in our code, so it should be suppressed in the suppressions file.

ACKs for top commit:
  willcl-ark:
    utACK fa3ab45203
  dergoegge:
    ACK fa3ab45203

Tree-SHA512: 2c2c025af4fe3ec267b3cfa38f25495e9da678cf6c529a6438ec923ef09a06ad37fa4503c30cbacc83578ac2856a7f729ef70a24befffd61d10ec075132d1ee0
2023-05-31 14:42:46 +01:00
fanquake
08722f20c2
Merge bitcoin/bitcoin#27777: ci: Prune dangling images on RESTART_CI_DOCKER_BEFORE_RUN
fa123077bc ci: Use podman for persistent workers (MarcoFalke)
fa9c65a74c ci: Prune dangling images on RESTART_CI_DOCKER_BEFORE_RUN (MarcoFalke)

Pull request description:

  This should prevent the persistent workers from running out of disk space. Containers are already removed, but not images. This is required since CI images are built and cached.

ACKs for top commit:
  hebasto:
    ACK fa123077bc

Tree-SHA512: 07c4faec57d659d1762e4e6d776c882ee48d4bac6ce6d438d56d9ab13277be3e39d6aa38816165a5a3e0938ac5d47674ee2921b6e115a4bb54e3e4910b34c4b6
2023-05-31 09:56:31 +01:00
MarcoFalke
fa3ab45203
ci: Enable float-divide-by-zero check 2023-05-30 12:01:38 +02:00
MarcoFalke
fa123077bc
ci: Use podman for persistent workers 2023-05-30 10:27:23 +02:00
MarcoFalke
fa9c65a74c
ci: Prune dangling images on RESTART_CI_DOCKER_BEFORE_RUN 2023-05-30 08:51:53 +02:00
fanquake
5763b232e6
ci: return to using Ubuntu 22.04 in MSAN jobs
We no-longer need to use 23.04, now that we aren't installing clang-16
and friends.
2023-05-29 17:20:50 +01:00
fanquake
d3cbcbf626
ci: compile clang and compiler-rt in MSAN jobs
This works around https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1005341.
2023-05-29 17:20:50 +01:00
fanquake
796bd1d0d1
ci: use LLVM 16.0.4 in MSAN jobs 2023-05-29 17:20:49 +01:00
fanquake
883bc9f561
ci: remove extra CC & CXX from MSAN jobs
This is passed through from depends.
2023-05-29 17:20:47 +01:00
fanquake
2d4f4b8f29
ci: standardize custom libc++ usage in MSAN jobs
Use `-isystem` & `-nostd*` flags, which is the preferred way to use a
custom libc++ (ours is libc++ build with MSAN) with Clang, as opposed to
our current ad-hoc flags.

See: https://releases.llvm.org/16.0.0/projects/libcxx/docs/UsingLibcxx.html#using-a-custom-built-libc
for more info.
2023-05-29 17:19:42 +01:00
fanquake
6cf47a8f44
Merge bitcoin/bitcoin#27507: lint: stop ignoring LIEF imports
015cc5e588 lint: stop ignoring LIEF imports (fanquake)

Pull request description:

  Type stubs are now available as of 0.13.0.
  See https://github.com/lief-project/LIEF/issues/650.

ACKs for top commit:
  TheCharlatan:
    ACK 015cc5e588

Tree-SHA512: ebb754f293c2a61a0ef64c3552f7c700ceb3054b50fd3f1573e4a9e87773ddeba47bd9875f6ab055043012dbc20aeb71e4d76cd3da535c76651dfb1fbfc66e89
2023-05-29 17:11:31 +01:00
fanquake
fb4f047686
Merge bitcoin/bitcoin#27724: build: disable boost multi index safe mode in debug mode
59c8944749 build: disable boost multi index safe mode (willcl-ark)

Pull request description:

  Fixes #27586

  Disable boost multi index safe mode by default when configuring with
  --enable-debug.

  This option can cause transactions to take a long time to be accepted
  into the mempool under certain conditions; iterator destruction takes
  O(n) time vs O(1) as they are stored in a singly linked list. See
  27586 and the [boost docs](https://www.boost.org/doc/libs/1_58_0/boost/multi_index/detail/safe_mode.hpp) for more information.

  Re-enable it on the CI builds which previously had it enabled.

  Re-enable it on the msan fuzz task so that we have fuzz tasks testing
  with it enabled and disabled in this repo.

ACKs for top commit:
  hebasto:
    ~ACK 59c89447499bd9d6202269879555b8bc37373aa2~
  fanquake:
    ACK 59c8944749

Tree-SHA512: ed654f63dbebdd02e4414d1f81147d92a4d490dbb5a2e0376858e3129097645f3a2df45191d6b40c410a76e803b0d28796d1a01c1d2fd995b94e8b7eb3949027
2023-05-29 17:09:47 +01:00
fanquake
dfe658009d
Merge bitcoin/bitcoin#27759: Fix #includes in src/wallet
1f97572b9c Fix `#include`s in `src/wallet` (Hennadii Stepanov)

Pull request description:

  This PR is a minimum required changes to fix https://github.com/bitcoin/bitcoin/pull/27571#discussion_r1195497290.

ACKs for top commit:
  MarcoFalke:
    lgtm ACK 1f97572b9c

Tree-SHA512: de885210076d23f3394c42ca50e6ae2470c0ae6523399a2fa3ebb7c06383bdacef9c26166fa19747200396bed796c8772165e24416eb30ed8edd024e3394b2fe
2023-05-29 16:33:14 +01:00
fanquake
015cc5e588
lint: stop ignoring LIEF imports
Type stubs are now available as of 0.13.0.
See https://github.com/lief-project/LIEF/issues/650.
2023-05-29 10:23:52 +01:00
MarcoFalke
fa12558d21
ci: Avoid leaking HOME var into CI pod
This will lead to a duplicate install, see https://github.com/bitcoin/bitcoin/pull/27739#issuecomment-1564122573
2023-05-29 09:16:43 +02:00
MarcoFalke
aaaa432603
ci: Remove "default" test env
It is unclear what the point is of maintaining a "default", the meaning
of which is unclear.
2023-05-29 09:16:21 +02:00
MarcoFalke
fa7a87bc7c
ci: Add missing set -e to 01_base_install.sh
Also, set -x for easier debugging.

Also, do the same for ci/test/00_setup_env.sh
2023-05-29 09:16:10 +02:00
Hennadii Stepanov
1f97572b9c
Fix #includes in src/wallet 2023-05-25 15:52:08 +01:00
willcl-ark
59c8944749
build: disable boost multi index safe mode
Disable boost multi index safe mode by default when configuring with
--enable-debug.

This option can cause transactions to take a long time to be accepted
into the mempool under certain conditions; iterator destruction takes
O(n) time vs O(1) as they are stored in a singly linked list. See
27586 for more information.

Re-enable it on the CI builds which previously had it enabled.

Re-enable it on the msan fuzz target so that we have fuzz tasks testing
with it enabeld and disabled in this repo.
2023-05-23 13:44:07 +01:00
fanquake
456701420b
Merge bitcoin/bitcoin#27672: fuzz: Print error message when FUZZ is missing
fa1b3abc83 ci: Log qa-assets repo last commit (MarcoFalke)
fa22966f33 fuzz: Print error message when FUZZ is missing (MarcoFalke)

Pull request description:

  Some trivial UX improvements.

  * Change the exit code for `PRINT_ALL_FUZZ_TARGETS_AND_ABORT` and `WRITE_ALL_FUZZ_TARGETS_AND_ABORT` to `EXIT_SUCCESS` instead of `Aborted (core dumped)`.
  * Print readable error message when `FUZZ` is missing instead of `Aborted (core dumped)`.
  * Clarify that a fuzz target needs to be compiled into the executable.

ACKs for top commit:
  dergoegge:
    ACK fa1b3abc83

Tree-SHA512: 065ef8920449c64b3516f89a61cb397b505eccf531318c4f3830895d5ff6cd7ae2525cb857320481e3d0ed0b2f8a522cd8f7835e69f021241b6ec297a6102fc8
2023-05-22 12:55:18 +01:00
fanquake
09351f51d2
Merge bitcoin/bitcoin#27699: random: drop syscall wrapper usage for getrandom()
5228223e1f ci: remove MSAN getrandom syscall workaround (fanquake)
d5e06919db random: switch to using getrandom() directly (fanquake)
c2ba3f5b0c random: add [[maybe_unused]] to GetDevURandom (fanquake)
c13c97dbf8 random: getentropy on macOS does not need unistd.h (fanquake)

Pull request description:

  This requires a linux kernel of `3.17`+, which seems entirely
  reasonable. `3.17` went EOL in 2015, and the last supported `3.x` kernel
  (`3.16`) went EOL > 4 years ago, in 2020. For reference, the current
  oldest maintained kernel is `4.14` (released 2017, going EOL Jan 2024).

  Support for `getrandom()` (and `getentropy()`) was added to
  glibc `2.25` https://sourceware.org/legacy-ml/libc-alpha/2017-02/msg00079.html:
  > * The getentropy and getrandom functions, and the <sys/random.h> header
    file have been added.

  and we already require `2.27` or later.

  All that being said, I don't think you would encounter a current day (+~6 months from now)
  system, running with kernel headers older than 3.17 (released 2014) but also having a
  glibc of 2.27+ (released 2018)?

  Removing this (our only) use of `syscall()` also means we can drop a workaround in our MSAN jobs.
  If this is merged, I'll drop the [same workaround in oss-fuzz](25946a5448/projects/bitcoin-core/build.sh (L49-L56)).

ACKs for top commit:
  josibake:
    ACK 5228223e1f
  hebasto:
    ACK 5228223e1f, I've tested build system changes on Ubuntu 22.04 and macOS Monterey 12.6.6 (x86_64).

Tree-SHA512: cc978e08510c461b875ca8c08ae176b4519fa1108f0efd74dcb7474518945357e0184e54423282c9a496de195e4ddc3e221ee78623bd63e24c50cc86acdf32e2
2023-05-22 11:34:58 +01:00
fanquake
f998eb7662
Merge bitcoin/bitcoin#27683: ci: remove RUN_SECURITY_TESTS
6a936580d1 ci: remove RUN_SECURITY_TESTS (fanquake)

Pull request description:

  We no-longer run any security/symbol checks in the CI, and doubt we will in future (if we do, it'll be via Guix, where this var would be redundant in any case). The CI environment doesn't (exactly) match the release build environment (and is semi-regularly changing), and the binaries produced in the CI don't match how we build release binaries, so there is no point trying to run these checks, especially as we add more involved tests, i.e #26953.

ACKs for top commit:
  josibake:
    code review ACK 6a936580d1
  TheCharlatan:
    ACK 6a936580d1

Tree-SHA512: c0eec61a4b873bac487ba9321b50116a215b4796bd7d416d98ffcd09969dbf635c2cb5aeb225c89d1e6462838fa2a48565048ebe730f48d76d3db46b64855a91
2023-05-22 09:52:27 +01:00
MarcoFalke
fa1b3abc83
ci: Log qa-assets repo last commit
This documents the state in the CI output and may help debugging in case
of failure.
2023-05-22 10:02:40 +02:00
fanquake
5228223e1f
ci: remove MSAN getrandom syscall workaround
The corresponding workaround will also be dropped in oss-fuzz:
25946a5448/projects/bitcoin-core/build.sh (L49).
2023-05-20 17:20:06 +01:00
Hennadii Stepanov
98ea798411
ci, iwyu: Double maximum line length for includes 2023-05-20 13:16:26 +01:00
MarcoFalke
fa953f15bf
build: Bump minimum supported GCC to g++-9
Also, update the code to use constexpr, which does not work in g++-8.

Also, drop the no longer needed build-aux/m4/l_filesystem.m4.
2023-05-18 12:24:40 +02:00
MarcoFalke
fa69955e74
ci: Bump centos:stream8 to centos:stream9
This is required for the next commit. Also, drop CI_RETRY_EXE before
"dnf install", because it requires getopt, which will only be installed
later on via util-linux
2023-05-18 12:24:38 +02:00
MarcoFalke
fa6a755d9f
ci: Document the false positive error for g++-9 2023-05-18 12:24:28 +02:00