Commit Graph

40325 Commits

Author SHA1 Message Date
Greg Sanders b767e6bd47 test: unit test for ImprovesFeerateDiagram 2024-03-18 10:32:00 -04:00
Greg Sanders 7e89b659e1 Add fuzz test for FeeFrac 2024-03-18 10:32:00 -04:00
Greg Sanders 4d6528a3d6 fuzz: fuzz diagram creation and comparison
Co-authored-by: Suhas Daftuar <sdaftuar@chaincode.com>
Co-authored-by: Pieter Wuille <pieter.wuille@gmail.com>
2024-03-18 10:32:00 -04:00
Greg Sanders e9c5aeb11d test: Add tests for CompareFeerateDiagram and CheckConflictTopology 2024-03-18 10:32:00 -04:00
Greg Sanders 588a98dccc fuzz: Add fuzz target for ImprovesFeerateDiagram
Co-authored-by: Suhas Daftuar <sdaftuar@chaincode.com>
2024-03-18 10:32:00 -04:00
Greg Sanders 2079b80854 Implement ImprovesFeerateDiagram
This new function takes the populated sets of
direct and all conflicts computed in the current
mempool, assuming the replacements are a single
chunk, and computes a diagram check.

The diagram check only works against cluster
sizes of 2 or less, and fails if it encounters
a different topology.

Co-authored-by: Suhas Daftuar <sdaftuar@chaincode.com>
2024-03-18 10:32:00 -04:00
Greg Sanders 66d966dcfa Add FeeFrac unit tests
Co-authored-by: Suhas Daftuar <sdaftuar@chaincode.com>
2024-03-18 10:32:00 -04:00
Greg Sanders ce8e22542e Add FeeFrac utils
Co-authored-by: Suhas Daftuar <sdaftuar@chaincode.com>
Co-authored-by: Pieter Wuille <pieter.wuille@gmail.com>
2024-03-18 10:32:00 -04:00
Ava Chow 02c7fd8df4
Merge bitcoin/bitcoin#29483: test, ci: add --v1transport option, add --v2transport to a CI task
ecc036c5d6 ci: add --v2transport to an existing CI job (Martin Zumsande)
3a25a575f0 test: ignore --v2transport for older versions instead of asserting (Martin Zumsande)
547aacff08 test: add -v1transport option and use it in test_runner (Martin Zumsande)

Pull request description:

  This suggests a strategy to run the functional tests with both v1 and v2 transport in the CI.

  **Status Quo:**
  There is both the global `--v2transport` option for the `test_runner.py` (not enabled by default), plus the possibility to specify `--v2transport` for particular tests, which is used for a handful of tests. Currently, when running `test_runner.py --v2transport`, these tests are run twice with the same `--v2transport` configuration, as has been noted in https://github.com/bitcoin/bitcoin/pull/29358#discussion_r1485626063, which is wasteful.

  **Suggested Change:**
  Fix this by adding a `--v1transport` option and using it in `test_runner.py`, so that irrespective of the global `--v2transport` flag, the  tests that run twice use v1 in one run and v2 in the other.
  Also add `--v2transport` to one CI task (`multiprocess, i686, DEBUG`).
  This means, that for each CI task, the majority of functional tests will run once using the global `--v2transport` option if provided, while a few selected tests will always run two times, once with `v1` and once with `v2`.

  **Rationale:**
  A simpler alternative would have been to remove all test-specific `--v2transport` commands from `test_runner.py` and just enable `--v2transport` option for a few CI tasks. I didn't do that because it would have meant that v2 would never be running in the CI for some platforms, and also be run a lot less locally by users and devs (who would have to actively enable the `--v2transport` option).

ACKs for top commit:
  tdb3:
    ACK for ecc036c5d6.
  achow101:
    ACK ecc036c5d6
  stratospher:
    ACK ecc036c.
  vasild:
    ACK ecc036c5d6

Tree-SHA512: 375b2293d49991f2fbd8e1bb646c0034004a09cee36063bc32996b721323eb19a43d7b2f36b3f9a3fdca846d74f48d8f1387565c03ef5d34b3481d2a0fe1d328
2024-03-11 09:22:12 -04:00
Ava Chow b4a05751b6
Merge bitcoin/bitcoin#29586: wallet: default wallet migration, modify inconvenient backup filename
a951dba3a9 wallet: default wallet migration, modify inconvenient backup filename (furszy)

Pull request description:

  Fixes #29584

  On default legacy wallets, the backup filename starts with an "-" due to the wallet name being empty. This is inconvenient for systems who treat what follows the initial "-" character as flags.

  Note:
  As the user can freely set the wallet name to anything, we could also guard the backup filename against other inconvenient characters in the future (we need to be careful here, because the wallet name could also be a path).

ACKs for top commit:
  achow101:
    ACK a951dba3a9
  brunoerg:
    utACK a951dba3a9
  vasild:
    ACK  a951dba3a9

Tree-SHA512: 6347bb12cfb50526a4baad96e4f1df9d82b493f79f0a0f7e0a1c8335a86a1e8e147c7b7f95cec6ede6f4507506a7eaf7972bd35131a2d5ed4cbbf38d94f0a9ca
2024-03-11 08:59:06 -04:00
Ava Chow 4a903741b0
Merge bitcoin/bitcoin#28120: p2p: make block download logic aware of limited peers threshold
c5b5843d8f test: avoid requesting blocks beyond limited peer threshold (furszy)
2f6a05512f p2p: sync from limited peer, only request blocks below threshold (furszy)
73127722a2 refactor: Make FindNextBlocks friendlier (furszy)

Pull request description:

  Even when the node believes it has IBD completed, need to avoid
  requesting historical blocks from network-limited peers.
  Otherwise, the limited peer will disconnect right away.

  The simplest scenario could be a node that gets synced, drops
  connections, and stays inactive for a while. Then, once it re-connects
  (IBD stays completed), the node tries to fetch all the missing blocks
  from any peer, getting disconnected by the limited ones.

  Note:
  Can verify the behavior by cherry-picking the test commit alone on
  master. It will fail there.

ACKs for top commit:
  achow101:
    ACK c5b5843d8f
  vasild:
    ACK c5b5843d8f
  mzumsande:
    Code Review ACK c5b5843d8f
  pinheadmz:
    ACK c5b5843d8f

Tree-SHA512: 9e550698bc6e63cc587b2b988a87d0ab555a8fa188c91c3f33287f8201d77c28b373331845356ad86f17bb21c15950b6466bc1cafd0ce8139d70364cb71c2ad2
2024-03-11 08:15:42 -04:00
Ava Chow 10d7b6e201
Merge bitcoin/bitcoin#29514: tests: Provide more helpful assert_equal errors
a3badf75f6 tests: Provide more helpful assert_equal errors (Anthony Towns)

Pull request description:

  In the functional tests, we often compare dicts with assert_equal, but the output makes it very hard to tell exactly which entry in the dicts don't match when there are a lot of entries and only minor differences. Change the output to make it clearer.

ACKs for top commit:
  achow101:
    ACK a3badf75f6
  vasild:
    ACK a3badf75f6
  brunoerg:
    utACK a3badf75f6
  josibake:
    ACK a3badf75f6
  BrandonOdiwuor:
    Code Review ACK a3badf75f6

Tree-SHA512: 1d4b4a3b2e2e28ab09f10b41b04b52b37f64e0d8a54e2306f37de0c3eb3299a7ad4ba225b9efa67057a75e90d008a17385c810a32c9b212d240be280c2dcf2e5
2024-03-11 07:52:07 -04:00
Ava Chow 5ebb406357
Merge bitcoin/bitcoin#26564: test: test_bitcoin: allow -testdatadir=<datadir>
d27e2d87b9 test: test_bitcoin: allow -testdatadir=<datadir> (Larry Ruane)

Pull request description:

  This backward-compatible change would help with code review, testing, and debugging. When `test_bitcoin` runs, it creates a working or data directory within `/tmp/test_common_Bitcoin\ Core/`, named as a long random (hex) string.

  This small patch does three things:

  - If the (new) argument `-testdatadir=<datadir>` is given, use `<datadir>/test_temp/<test-name>/datadir` as the working directory
  - When the test starts, remove `<datadir>/test_temp/<test-name>/datadir` if it exists from an earlier run (currently, it's presumed not to exist due to the long random string)
  - Don't delete the working directory at the end of the test if a custom data directory is being used

  Example usage, which will remove, create, use `/somewhere/test_temp/getarg_tests/boolarg`, and leave it afterward:
  ```
  $ test_bitcoin --run_test=getarg_tests/boolarg -- -testdatadir=/somewhere
  Running 1 test case...
  Test directory (will not be deleted): "/somewhere/test_temp/getarg_tests/boolarg/datadir"

  *** No errors detected
  $ ls -l /somewhere/test_temp/getarg_tests/boolarg/datadir
  total 8
  drwxrwxr-x 2 larry larry 4096 Feb 22 10:28 blocks
  -rw-rw-r-- 1 larry larry 1273 Feb 22 10:28 debug.log
  ```
  (A relative pathname also works.)

  This change affects only `test_bitcoin`; it could also be applied to `test_bitcoin-qt` but that's slightly more involved so I'm skipping that for now.

  The rationale for this change is that, when running the test using the debugger, it's often useful to watch `debug.log` as the test runs and inspect some of the other files (I've looked at the generated `blknnnn.dat` files for example). Currently, that requires figuring out where the test's working directory is since it changes on every test run. Tests can be run with `-printtoconsole=1` to show debug logging to the terminal, but it's nice to keep `debug.log` continuously open in an editor, for example.

  Even if not using a debugger, it's sometimes helpful to see `debug.log` and other artifacts after the test completes.

  Similar functionality is already possible with the functional tests using the `--tmpdir=` and `--nocleanup` arguments.

ACKs for top commit:
  davidgumberg:
    ACK d27e2d87b9
  tdb3:
    re-ACK for d27e2d87b9
  achow101:
    ACK d27e2d87b9
  cbergqvist:
    ACK d27e2d87b95b7982c05b4c88e463cc9626ab9f0a! (Already did some testing with `fs::remove()` to make sure it was compatible with the `util::Lock/UnlockDirectory` implementation).
  marcofleon:
    ACK d27e2d87b9. I ran all the tests with my previous open file limit and no errors were detected. Also ran some individual tests with no, relative, and absolute paths and everything looks good.
  furszy:
    ACK d27e2d8

Tree-SHA512: a8f535f34a48b6699cb440f97f5562ec643f3bfba4ea685768980b871fc8b6e1135f70fc05dbe19aa2c8bacb1ddeaff212d63473605a7422ff76332b3a6b1f68
2024-03-11 07:03:02 -04:00
Ava Chow 4cc99df44a
Merge bitcoin/bitcoin#29569: Rename CalculateHeadersWork to CalculateClaimedHeadersWork
eb7cc9fd21 Rename CalculateHeadersWork to CalculateClaimedHeadersWork (Greg Sanders)

Pull request description:

  And clean up some comments. Confusion about what this is doing seems to be a running theme:

  https://github.com/bitcoin/bitcoin/pull/29549#discussion_r1511113344

  https://github.com/bitcoin/bitcoin/pull/27278#discussion_r1141510303

ACKs for top commit:
  achow101:
    ACK eb7cc9fd21
  pablomartin4btc:
    ACK eb7cc9fd21
  0xB10C:
    ACK eb7cc9fd21
  dergoegge:
    ACK eb7cc9fd21
  BrandonOdiwuor:
    ACK eb7cc9fd21

Tree-SHA512: 6ccbc5e417155516487bb220753d189b5341dec05366db88a3fa5b1932eace21fbfaf23408c639bb54b36169a8d0a7536a1ee5e63b4ce5a3b70f2ff8407b6e07
2024-03-08 21:39:07 -05:00
Ava Chow a78ca706f6
Merge bitcoin/bitcoin#29393: i2p: log connection was refused due to arbitrary port
5b358cdd1a i2p: log connection was refused due to arbitrary port (brunoerg)

Pull request description:

  For I2P, we do not try to connect if port is != 0. However, we do not have anything that indicates it or any error when trying to connect with port != 0. This PR adds a log for it. Also, it improves the functional test. With this log we can ensure the reason we won't connect is the port, in the current test, we cannot ensure it.

ACKs for top commit:
  jonatack:
    ACK 5b358cdd1a
  epiccurious:
    re-ACK 5b358cdd1a.
  achow101:
    ACK 5b358cdd1a
  kristapsk:
    re-ACK 5b358cdd1a
  vasild:
    ACK 5b358cdd1a

Tree-SHA512: 027245afa771c9295fff0bfd17c251dca4a9f4c739e5773922de3c030a65ef05d96291edcbdeeaa50ba3add61f75f28d8c00be503e03fc33d3491d1956fc549f
2024-03-08 21:15:24 -05:00
Ava Chow c07935bcf5
Merge bitcoin/bitcoin#28960: kernel: Remove dependency on CScheduler
d5228efb53 kernel: Remove dependency on CScheduler (TheCharlatan)
06069b3913 scripted-diff: Rename MainSignals to ValidationSignals (TheCharlatan)
0d6d2b650d scripted-diff: Rename SingleThreadedSchedulerClient to SerialTaskRunner (TheCharlatan)
4abde2c4e3 [refactor] Make MainSignals RAII styled (TheCharlatan)
84f5c135b8 refactor: De-globalize g_signals (TheCharlatan)
473dd4b97a [refactor] Prepare for g_signals de-globalization (TheCharlatan)
3fba3d5dee [refactor] Make signals optional in mempool and chainman (TheCharlatan)

Pull request description:

  By defining a virtual interface class for the scheduler client, users of the kernel can now define their own event consuming infrastructure, without having to spawn threads or rely on the scheduler design.

  Removing `CScheduler` also allows removing the thread and exception modules from the kernel library.

  To make the `CMainSignals` class easier to use from a kernel library perspective, remove its global instantiation and adopt RAII practices.

  Renames `CMainSignals` to `ValidationSignals`, which more accurately describes its purpose and scope.

  Also make the `ValidationSignals` in the `ChainstateManager` and CTxMemPool` optional. This could be useful in the future for using or testing these classes without having to instantiate any form of signal handling.

  ---

  This PR is part of the [libbitcoinkernel project](https://github.com/bitcoin/bitcoin/issues/27587). It improves the kernel API and removes two modules from the kernel library.

ACKs for top commit:
  maflcko:
    re-ACK d5228efb53 🌄
  ryanofsky:
    Code review ACK d5228efb53. Just comment change since last review.
  vasild:
    ACK d5228efb53
  furszy:
    diff ACK d5228ef

Tree-SHA512: e93a5f10eb6182effb84bb981859a7ce750e466efd8171045d8d9e7fe46e4065631d9f6f533c5967c4d34c9bb7d7a67e9f4593bd4c5b30cd7b3bbad7be7b331b
2024-03-08 20:58:04 -05:00
furszy a951dba3a9
wallet: default wallet migration, modify inconvenient backup filename
On default legacy wallets, the backup filename starts with an "-" due
to the wallet name being empty. This is inconvenient for systems who
treat what follows the initial "-" character as flags.
2024-03-08 19:40:11 -03:00
fanquake 1cd2e29870
Merge bitcoin/bitcoin#29600: build, msvc: Cleanup `bitcoin_config.h.in`
8e17f00a5d build, msvc: Cleanup `bitcoin_config.h.in` (Hennadii Stepanov)

Pull request description:

  This PR mirrors changes from https://github.com/bitcoin/bitcoin/pull/29263 into the MSVC build system.

ACKs for top commit:
  fanquake:
    ACK 8e17f00a5d

Tree-SHA512: b8e5cca015ff112c2969a60436524e97007ff2c559b3c12425d0549af694b16248311cc3e7c33f798bc095a679933641496836bb846eee6a2a377956ef53f56e
2024-03-08 17:24:51 +00:00
Hennadii Stepanov 8e17f00a5d
build, msvc: Cleanup `bitcoin_config.h.in`
This change mirrors changes from https://github.com/bitcoin/bitcoin/pull/29263.
2024-03-08 15:18:27 +00:00
fanquake 54172c688c
Merge bitcoin/bitcoin#29595: doc: Wrap flags with code in developer-notes.md
4f1753deaa doc: Wrap flags with code in developer-notes.md (spicyzboss)

Pull request description:

  Before wrap code block
  <img width="1077" alt="image" src="https://github.com/bitcoin/bitcoin/assets/73651621/93f39960-311d-411d-acaf-dce69ad36ca0">

  After wrap code block
  <img width="1073" alt="image" src="https://github.com/bitcoin/bitcoin/assets/73651621/fe6a5cd2-e981-45b1-a150-5a55fab81ae6">

ACKs for top commit:
  fanquake:
    ACK 4f1753deaa

Tree-SHA512: 15a123f3a13c62d9cfdf62d5df351b8c2b3f9f666fba5a2722325600d802a29da61773ad32fb9f8483a915f59dd42731ba724b81b7874d39cb9627f0266b5713
2024-03-08 10:15:26 +00:00
fanquake c49450dc8f
Merge bitcoin/bitcoin#29583: fuzz: Apply fuzz env (suppressions, etc.) when fetching harness list
738a53720e [fuzz] Apply fuzz env (suppressions, etc.) when fetching harness list (dergoegge)

Pull request description:

  The fuzz test runner does not add the UBSan suppressions when fetching the harness list. We can observe this in CI as lots of UBSan errors prior to the harnesses actually executing: https://api.cirrus-ci.com/v1/task/5678606140047360/logs/ci.log

  ```
  + test/fuzz/test_runner.py -j10 -l DEBUG /ci_container_base/ci/scratch/qa-assets/fuzz_seed_corpus/ --empty_min_time=60
  /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/string_view:578:38: runtime error: unsigned integer overflow: 12 - 23 cannot be represented in type 'size_type' (aka 'unsigned long')
  SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/string_view:578:38 in
  /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/string_view:578:33: runtime error: implicit conversion from type 'size_type' (aka 'unsigned long') of value 18446744073709551605 (64-bit, unsigned) to type 'const difference_type' (aka 'const long') changed the value to -11 (64-bit, signed)
  SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /usr/bin/../lib/gcc/x86_64-linux-gnu/13/../../../../include/c++/13/string_view:578:33 in
  crypto/sha256.cpp:75:57: runtime error: left shift of 1359893119 by 26 places cannot be represented in type 'uint32_t' (aka 'unsigned int')
  SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior crypto/sha256.cpp:75:57 in
  crypto/sha256.cpp:75:79: runtime error: left shift of 1359893119 by 21 places cannot be represented in type 'uint32_t' (aka 'unsigned int')
  SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior crypto/sha256.cpp:75:79 in
  crypto/sha256.cpp:75:101: runtime error: left shift of 1359893119 by 7 places cannot be represented in type 'uint32_t' (aka 'unsigned int')
  SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior crypto/sha256.cpp:75:101 in
  crypto/sha256.cpp:82:47: runtime error: unsigned integer overflow: 2968370640 + 2483695512 cannot be represented in type 'uint32_t' (aka 'unsigned int')
  SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior crypto/sha256.cpp:82:47 in
  crypto/sha256.cpp:74:57: runtime error: left shift of 1779033703 by 30 places cannot be represented in type 'uint32_t' (aka 'unsigned int')
  SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior crypto/sha256.cpp:74:57 in
  crypto/sha256.cpp:74:79: runtime error: left shift of 1779033703 by 19 places cannot be represented in type 'uint32_t' (aka 'unsigned int')
  SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior crypto/sha256.cpp:74:79 in
  crypto/sha256.cpp:74:101: runtime error: left shift of 1779033703 by 10 places cannot be represented in type 'uint32_t' (aka 'unsigned int')
  SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior crypto/sha256.cpp:74:101 in
  crypto/sha256.cpp:83:29: runtime error: unsigned integer overflow: 3458249854 + 980412007 cannot be represented in type 'uint32_t' (aka 'unsigned int')
  SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior crypto/sha256.cpp:83:29 in
  crypto/sha256.cpp:82:21: runtime error: unsigned integer overflow: 528734635 + 4228187651 cannot be represented in type 'uint32_t' (aka 'unsigned int')
  SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior crypto/sha256.cpp:82:21 in
  crypto/sha256.cpp:84:7: runtime error: unsigned integer overflow: 1013904242 + 3720769133 cannot be represented in type 'uint32_t' (aka 'unsigned int')
  SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior crypto/sha256.cpp:84:7 in
  crypto/sha256.cpp:85:12: runtime error: unsigned integer overflow: 3720769133 + 2654153126 cannot be represented in type 'uint32_t' (aka 'unsigned int')
  SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior crypto/sha256.cpp:85:12 in
  crypto/sha256.cpp:82:33: runtime error: unsigned integer overflow: 4165002546 + 1259303586 cannot be represented in type 'uint32_t' (aka 'unsigned int')
  SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior crypto/sha256.cpp:82:33 in
  crypto/sha256.cpp:125:50: runtime error: unsigned integer overflow: 3835390401 + 1367343104 cannot be represented in type 'unsigned int'
  SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior crypto/sha256.cpp:125:50 in
  crypto/sha256.cpp:77:58: runtime error: left shift of 1367343104 by 15 places cannot be represented in type 'uint32_t' (aka 'unsigned int')
  ...
  ```

  To fix this we simply apply the usual fuzz env variables (that apply the suppressions) when fetching the harness list as well.

ACKs for top commit:
  ismaelsadeeq:
    Tested ACK 738a53720e
  fanquake:
    ACK 738a53720e

Tree-SHA512: befebaeb4ee5f2eddca67fc6dc69e997c6a250ea54844e5e6e93d1f6a13be49364a3ace31eaa942b02dcf73612af29ec4ace86c9eb7567b92f6f5dc3ea14dc11
2024-03-08 10:14:26 +00:00
spicyzboss 4f1753deaa
doc: Wrap flags with code in developer-notes.md 2024-03-08 15:55:37 +07:00
Larry Ruane d27e2d87b9 test: test_bitcoin: allow -testdatadir=<datadir>
Specifying this argument overrides the path location for test_bitcoin;
it becomes <datadir>/test_common_Bitcoin Core/<testname>/datadir. Also,
this directory isn't removed after the test completes. This can make it
easier for developers to study the results of a test (see the state of
the data directory after the test runs), and also (for example) have an
editor open on debug.log to monitor it across multiple test runs instead
of having to re-open a different pathname each time.

Example usage (note the "--" is needed):

test_bitcoin --run_test=getarg_tests/boolarg -- \
-testdatadir=/somewhere/mydatadir

This will create (if necessary) and use the data directory:

/somewhere/mydatadir/test_common_Bitcoin Core/getarg_tests/boolarg/datadir

Co-authored-by: furszy <mfurszy@protonmail.com>
2024-03-07 10:11:45 -07:00
fanquake 67fb94ce42
Merge bitcoin/bitcoin#29577: build: ignore deprecated-declarations warnings in objc++ macOS code
8b7630cb1f build: ignore deprecated-declaration warnings in objc++ macOS code (fanquake)
bd8f0354ba build: Add missed definition for `AM_OBJCXXFLAGS` (Hennadii Stepanov)

Pull request description:

  These come from GUI code, and haven't/aren't being fixed, see discussion in https://github.com/bitcoin-core/gui/issues/112. For now, just ignore them entirely. Note that this only applies to ObjCXX code, so will not hide any relevant warnings coming from C or CXX code (and they would be unlikely in any case).

  Alternative to https://github.com/bitcoin/bitcoin/pull/29362 (which disables all compiler warnings, for macOS builds in the CI). This PR includes one commit from that PR.

  Relevant output:
  ```bash
  qt/macnotificationhandler.mm:27:9: warning: 'NSUserNotification' is deprecated: first deprecated in macOS 11.0 - All NSUserNotifications API should be replaced with UserNotifications.frameworks API [-Wdeprecated-declarations]
          NSUserNotification* userNotification = [[NSUserNotification alloc] init];
          ^
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:24:12: note: 'NSUserNotification' has been explicitly marked deprecated here
  @interface NSUserNotification : NSObject <NSCopying> {
             ^
  qt/macnotificationhandler.mm:27:50: warning: 'NSUserNotification' is deprecated: first deprecated in macOS 11.0 - All NSUserNotifications API should be replaced with UserNotifications.frameworks API [-Wdeprecated-declarations]
          NSUserNotification* userNotification = [[NSUserNotification alloc] init];
                                                   ^
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:24:12: note: 'NSUserNotification' has been explicitly marked deprecated here
  @interface NSUserNotification : NSObject <NSCopying> {
             ^
  qt/macnotificationhandler.mm:30:11: warning: 'NSUserNotificationCenter' is deprecated: first deprecated in macOS 11.0 - All NSUserNotifications API should be replaced with UserNotifications.frameworks API [-Wdeprecated-declarations]
          [[NSUserNotificationCenter defaultUserNotificationCenter] deliverNotification: userNotification];
            ^
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:118:12: note: 'NSUserNotificationCenter' has been explicitly marked deprecated here
  @interface NSUserNotificationCenter : NSObject {
             ^
  3 warnings generated.
  ```

ACKs for top commit:
  hebasto:
    re-ACK 8b7630cb1f.

Tree-SHA512: 2f1fec97d9aa46aa23989d9fb283fc574dff9dc8f44847bb273b8fcf942f56f64c6d93dfcd7af8fbb52bf152e0fe76818118ce416d8cec5de852c32b6697a243
2024-03-07 15:13:32 +00:00
fanquake 8b7630cb1f
build: ignore deprecated-declaration warnings in objc++ macOS code
These come from GUI code, and haven't/aren't being fixed, see discussion
in https://github.com/bitcoin-core/gui/issues/112. For now, just ignore
them entirely. Note that this only applies to ObjCXX code, so will not
hide any relevant warnings coming from C or CXX code (and they would be
unlikely in any case).

Alternative to #29362, which disables all compiler warnings, for macOS
builds in the CI.

Relevant output:
```bash
qt/macnotificationhandler.mm:27:9: warning: 'NSUserNotification' is deprecated: first deprecated in macOS 11.0 - All NSUserNotifications API should be replaced with UserNotifications.frameworks API [-Wdeprecated-declarations]
        NSUserNotification* userNotification = [[NSUserNotification alloc] init];
        ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:24:12: note: 'NSUserNotification' has been explicitly marked deprecated here
@interface NSUserNotification : NSObject <NSCopying> {
           ^
qt/macnotificationhandler.mm:27:50: warning: 'NSUserNotification' is deprecated: first deprecated in macOS 11.0 - All NSUserNotifications API should be replaced with UserNotifications.frameworks API [-Wdeprecated-declarations]
        NSUserNotification* userNotification = [[NSUserNotification alloc] init];
                                                 ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:24:12: note: 'NSUserNotification' has been explicitly marked deprecated here
@interface NSUserNotification : NSObject <NSCopying> {
           ^
qt/macnotificationhandler.mm:30:11: warning: 'NSUserNotificationCenter' is deprecated: first deprecated in macOS 11.0 - All NSUserNotifications API should be replaced with UserNotifications.frameworks API [-Wdeprecated-declarations]
        [[NSUserNotificationCenter defaultUserNotificationCenter] deliverNotification: userNotification];
          ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Foundation.framework/Headers/NSUserNotification.h:118:12: note: 'NSUserNotificationCenter' has been explicitly marked deprecated here
@interface NSUserNotificationCenter : NSObject {
           ^
3 warnings generated.
```
2024-03-07 13:07:17 +00:00
Hennadii Stepanov bd8f0354ba
build: Add missed definition for `AM_OBJCXXFLAGS` 2024-03-07 13:06:47 +00:00
Hennadii Stepanov c2c6a7d1dc
Merge bitcoin-core/gui#803: test: Set organization name
0dcbad341b qt, test: Clean settings after tests (Hennadii Stepanov)
49cf63522e qt, test: Set organization name (Hennadii Stepanov)

Pull request description:

  From Qt [docs](https://doc.qt.io/qt-5/qsettings.html#QSettings-4):

  > If [`QCoreApplication::setOrganizationName()`](https://doc.qt.io/qt-5/qcoreapplication.html#organizationName-prop) and [`QCoreApplication::setApplicationName()`](https://doc.qt.io/qt-5/qcoreapplication.html#applicationName-prop) has not been previously called, the `QSettings` object will not be able to read or write any settings, and [`status()`](https://doc.qt.io/qt-5/qsettings.html#status) will return [`AccessError`](https://doc.qt.io/qt-5/qsettings.html#Status-enum).

  Fixes https://github.com/bitcoin-core/gui/issues/799.

ACKs for top commit:
  pablomartin4btc:
    utACK 0dcbad341b

Tree-SHA512: d5ac160f17cc358f0c1b89097193cd5adfd25f5531955c211f3e0994fc084e0a2b8d3aeddebe38f3a8ab5333edef5aa92b18915885c9e58b33f2e5786f31c600
2024-03-07 12:50:18 +00:00
dergoegge 738a53720e [fuzz] Apply fuzz env (suppressions, etc.) when fetching harness list 2024-03-07 10:28:20 +00:00
fanquake 59567d7b9a
Merge bitcoin/bitcoin#29576: Update functional test runner to return error code when no tests are found to run
33268a8558 test: exit with code 1 when no fn tests are found (Max Edwards)

Pull request description:

  As discussed in the following PR comment: https://github.com/bitcoin/bitcoin/pull/29535#issuecomment-1979259786

  Prevents the test_runner from exiting silently with code 0 when no tests were found which has recently happened after a GHA runner update such as in this run: https://github.com/bitcoin/bitcoin/actions/runs/8131828989/job/22239779585#step:27:63

ACKs for top commit:
  TheCharlatan:
    ACK 33268a8558
  theStack:
    lgtm ACK 33268a8558

Tree-SHA512: d389e9f5e4da7ce1627fb2fad9b33baf0b04e75dbdbfc0dbf5f1e3e2b0ae1e79721476c5668476055b0f7de29723ed02c8d7e420081a555030cb784886e240fc
2024-03-07 09:43:03 +00:00
fanquake ab5dfdbec1
Merge bitcoin/bitcoin#29579: build: bump version to 27.99
fd4fe411d3 build: bump version to 27.99 (fanquake)

Pull request description:

  27.x has been branched off.

ACKs for top commit:
  glozow:
    slow ACK fd4fe411d3
  theStack:
    ACK fd4fe411d3
  dergoegge:
    utACK fd4fe411d3

Tree-SHA512: 1550becd190c1a5195d3123a83b6ac790797c485e2dbbfb0f4cb0bc0a611d8331a553b94f2896cf8ac3755040d7532d9ee6e312bf3b8e4ca9a5adce6d00c484e
2024-03-06 14:59:33 +00:00
fanquake fd4fe411d3
build: bump version to 27.99 2024-03-06 14:47:04 +00:00
fanquake 55bd5d8015
Merge bitcoin/bitcoin#29561: Fixed seeds update for 27.0
7ab54397f8 seeds: Update testnet seeds (Ava Chow)
34a233b6d8 seeds: Update mainnet seeds (Ava Chow)
9701bc435f makeseeds: Check i2p seeds too (Ava Chow)
a8ec9eede4 makeseeds: Update PATTERN_AGENT (Ava Chow)

Pull request description:

  The ipv4 and ipv6 seeds are updated from sipa's crawler, as outlined in contrib/seeds/README.md. The onion and i2p seeds are pulled from my node's addrman using `getrawaddrman` and then a connection was made to each node to retrieve the current service flags, block height, and user agent string before filtering through makeseeds.py. The CJDNS nodes were not updated as my node is not connected to that network.

  makeseeds.py is also updated for more recent user agent strings as well as being able to handle i2p addresses.

  Also updated the testnet seeds.

ACKs for top commit:
  fanquake:
    ACK 7ab54397f8

Tree-SHA512: 5edba63d51116e5d9a8ae23561ba5a311f4df88c555c60b2d7a6066e63f8cdfd256be7dac9acea4b370879d0d3c3a4b55328c15de4284b5f0d86e6cac2e5ba9b
2024-03-06 14:43:58 +00:00
Max Edwards 33268a8558 test: exit with code 1 when no fn tests are found
Prevents the test_runner from exiting silently with code 0 when no tests were found.
2024-03-06 12:56:35 +00:00
fanquake 6c77dbfd7e
Merge bitcoin/bitcoin#29529: fuzz: restrict fopencookie usage to Linux & FreeBSD
312f3381a2 fuzz: restrict fopencookie usage to Linux & FreeBSD (fanquake)

Pull request description:

  Should fix the GCC compilation portion of https://github.com/bitcoin/bitcoin/issues/29517#issuecomment-1973573314.

  See also: https://www.gnu.org/software/gnulib/manual/html_node/fopencookie.html.

ACKs for top commit:
  m3dwards:
    ACK 312f3381a2
  TheCharlatan:
    utACK 312f3381a2

Tree-SHA512: aa8ff20c3fa735415d05a93b8855877035c300f4d2dfd82f65fd9ed5b5c96ab619b4d84eef114ed0013dc5ff0800cb628ed3801e1efde0cfb0d426930d1673d5
2024-03-06 12:08:08 +00:00
fanquake 312f3381a2
fuzz: restrict fopencookie usage to Linux & FreeBSD
Should fix the GCC compilation portion of #29517:
https://github.com/bitcoin/bitcoin/issues/29517#issuecomment-1973573314.

See also:
https://www.gnu.org/software/gnulib/manual/html_node/fopencookie.html
but note that FreeBSD has supported this function since 11.x.
2024-03-05 21:18:44 +00:00
fanquake 0fa9f17332
Merge bitcoin/bitcoin#29535: ci: Fix functional tests step for pull requests in Windows GHA job
57e6e2279e ci: Fix functional tests step for pull requests in Windows GHA job (Hennadii Stepanov)

Pull request description:

  This functionality has been broken since the Windows runner image version `20240128.1.0`.

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

ACKs for top commit:
  fanquake:
    I can ACK 57e6e2279e this only based on the fact that in this PR, the native Windows functional tests run: https://github.com/bitcoin/bitcoin/actions/runs/8119259315/job/22194887783#step:27:72, and that the native Windows functional tests are not currently running on master: https://github.com/bitcoin/bitcoin/actions/runs/8131828989/job/22239779585#step:27:63.
  hebasto:
    > I can ACK 57e6e22
  m3dwards:
    ACK 57e6e2279e as a way to get the tests running again quickly.

Tree-SHA512: 03e04fb96292e31ca0a8057e91b57f0812df92589f52f0602844e151ec5ec296badf5e549b1b606bab85607a3f9cd6abdfd328df80bf268501b537a596db0d96
2024-03-05 17:25:35 +00:00
fanquake faff279fdc
Merge bitcoin/bitcoin#29541: test: remove file-wide interpreter.cpp ubsan suppression
217c0ce552 test: remove file-wide interpreter.cpp ubsan suppression (fanquake)

Pull request description:

ACKs for top commit:
  Sjors:
    utACK 217c0ce552
  hebasto:
    ACK 217c0ce552.
  dergoegge:
    ACK 217c0ce552

Tree-SHA512: ae0c2ff4531fdb7b0296709f66b71d4065fe3f32cbd39a44e45934a975b5cf6cf01c2f136f110753efee8e301636f7700278aed1d995b463fc025c07d586a8fa
2024-03-05 16:53:56 +00:00
fanquake 11a1db8780
Merge bitcoin/bitcoin#29547: kernel: chainparams updates for 27.x
d9f30b021a kernel: chainparams updates for 27.x (fanquake)
1611aa1789 kernel: update chainTxData for 27.x (fanquake)
af78d31e71 kernel: update nMinimumChainWork & defaultAssumeValid for 27.x (fanquake)

Pull request description:

  Update chainparams pre `27.x` branch off.

  Note: Remember that some variance is expected in the m_assumed_* sizes.

ACKs for top commit:
  Sjors:
    ACK d9f30b021a
  glozow:
    ACK d9f30b021a (checked mainnet locally, checked testnet/signet on block explorers and sanity checked the numbers)
  instagibbs:
    ACK d9f30b021a

Tree-SHA512: 6ce65b964334b9d15fff4aa1af6d26fb3ef4eab50b8237fc2cda180230ae724a99d13c9f6b3c58105548d3520c0ca0810f354736132d11793d6c91ad3eeac4c7
2024-03-05 16:15:24 +00:00
Greg Sanders eb7cc9fd21 Rename CalculateHeadersWork to CalculateClaimedHeadersWork 2024-03-05 10:01:24 -05:00
fanquake ba1bf5322f
Merge bitcoin/bitcoin#29544: doc: update signet faucet link in offline-signing-tutorial.md
990b348912 doc: update signet faucet link in offline-signing-tutorial.md (Supachai Kheawjuy)

Pull request description:

  https://signet.bc-2.jp is broken and https://signetfaucet.com is the same as before.

  https://signet.bc-2.jp from archive.org
  <img width="1258" alt="image" src="https://github.com/bitcoin/bitcoin/assets/73651621/36817aa6-95ea-427d-8d1d-93e21af86dce">

  https://signetfaucet.com
  <img width="1242" alt="image" src="https://github.com/bitcoin/bitcoin/assets/73651621/e3248fb0-8a6d-45b3-9268-d883d2385c8f">

  reference: https://en.bitcoin.it/wiki/Signet#Faucets

ACKs for top commit:
  fanquake:
    ACK 990b348912

Tree-SHA512: 482c931168a162cc666ecbe610e80d94ae433ebdc6bc52832bcc40c58592f9d9b8c7f1aea6faa2739873e80c6d4ea70c8a4f78d18067d1739e8070effce83062
2024-03-05 14:52:20 +00:00
fanquake 3763f20b29
Merge bitcoin/bitcoin#29567: doc: fix broken reference to CI setup in test/lint/README.md
53ffd5a410 docs: Fix broken reference to CI setup in test/lint/README.md (naiyoma)

Pull request description:

  The current [reference](https://github.com/bitcoin/bitcoin/blob/master/test/ci/lint/04_install.sh
  ) for CI setup in /test/lint#readme returns a 404.

ACKs for top commit:
  fanquake:
    ACK 53ffd5a410

Tree-SHA512: 813c19a145f09e7da11963598b70dc438acba784eb722e509d6af59dc3af8f5da97628c454bed2b03cc919689603e070796de2db8d784d9162ae34e7b85a77d9
2024-03-05 14:51:09 +00:00
naiyoma 53ffd5a410 docs: Fix broken reference to CI setup in test/lint/README.md 2024-03-05 17:00:08 +03:00
fanquake 2b260eadf7
Merge bitcoin/bitcoin#29502: test: modify weight estimate in functional tests
e67ab174c9 test: fix flaky wallet_send functional test (Max Edwards)
3c49e69670 test: fix weight estimates in functional tests (Max Edwards)

Pull request description:

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

  The wallet_send functional test has been flaky due to a slightly overestimated weight calculation. This PR makes the weight calculation more accurate, although occasionally, due to how ECDSA signatures can be different lengths it might slightly over estimate. The assertion in the test can handle this slight variation and so should continue passing.

  Update:

  Because the signature can be shorter that is used in the weight estimation or the final transaction the estimate could be both slightly smaller or slightly larger.

ACKs for top commit:
  achow101:
    ACK e67ab174c9
  S3RK:
    Code review ACK e67ab174c9

Tree-SHA512: 3bf73b355309dce860fa1520afb8461e94268e4bcf0e92a8273c279b41b058c44472cf59daafa15a515529b50bd665b5d498bbe4d934f2315dbe810a05bc73f9
2024-03-05 11:16:59 +00:00
Hennadii Stepanov 0dcbad341b
qt, test: Clean settings after tests
A test suite should not leave any artifacts except for those explicitly
expected.

This change is easy to review with `git diff --ignore-all-space`
command.
2024-03-05 07:39:48 +00:00
Hennadii Stepanov 49cf63522e
qt, test: Set organization name
If `setOrganizationName()` and `setApplicationName()` has not been
previously called, the `QSettings` object will not be able to read or
write any settings.
2024-03-05 07:02:54 +00:00
Ava Chow 7ab54397f8 seeds: Update testnet seeds 2024-03-04 19:53:30 -05:00
Ava Chow 34a233b6d8 seeds: Update mainnet seeds 2024-03-04 19:53:24 -05:00
Ava Chow 9701bc435f makeseeds: Check i2p seeds too 2024-03-04 19:42:11 -05:00
Ava Chow a8ec9eede4 makeseeds: Update PATTERN_AGENT 2024-03-04 11:44:16 -05:00
fanquake 98005b6a17
Merge bitcoin/bitcoin#29548: doc: remove rel note fragments
6e5eda83ad doc: remove rel note fragments (fanquake)

Pull request description:

  These have been added to https://github.com/bitcoin-core/bitcoin-devwiki/wiki/27.0-Release-Notes-Draft, where they can be improved further.

ACKs for top commit:
  stickies-v:
    ACK 6e5eda83ad

Tree-SHA512: 66874fe9a64ac3a99a15a602ac68ae0a9e08f52a0fe732e48136b245c2127ed04e8217f86c44459696b03b01532a926ab8d41101c6e670902c1fc31e583b4dc9
2024-03-04 13:31:39 +00:00