Commit Graph

45487 Commits

Author SHA1 Message Date
Ava Chow
764016eb22 wallet: Retrieve TXO directly in FetchSelectedInputs
Instead of searching mapWallet for the preselected inputs, search
m_txos.

wallet_fundrawtransaction.py spends external inputs and needs the change
output to also belong to the test wallet for the oversized tx test.
2025-06-25 14:08:49 -07:00
Ava Chow
c1801b78f1 wallet: Use wallet's TXO set in AvailableCoins
Instead of iterating every transaction and every output stored in wallet
when trying to figure out what outputs can be spent, iterate the TXO set
which should be a lot smaller.
2025-06-25 14:08:49 -07:00
Ava Chow
dde7cbe105 wallet: Change balance calculation to use m_txos
Since we track the outputs owned by the wallet with m_txos, we can now
calculate the balance of the wallet by iterating m_txos and summing up
the amounts of the unspent txos.

As ISMINE_USED is not an actual isminetype that we attach to outputs and
was just passed into `CachedTxGetAvailableCredit` for convenience, we
pull the same determining logic from that function into `GetBalances` in
order to preserve existing behavior.
2025-06-25 14:08:49 -07:00
Ava Chow
96e7a89c5e wallet: Recalculate the wallet's txos after any imports 2025-06-25 14:08:49 -07:00
Ava Chow
ae888c38d0 wallet: Exit IsTrustedTx early if wtx is already in trusted_parents 2025-06-25 14:08:49 -07:00
Ava Chow
ae0876ec42 wallet: Keep track of transaction outputs owned by the wallet
When loading transactions to the wallet, check the outputs, and keep
track of the ones that are IsMine.
2025-06-25 14:08:49 -07:00
Ava Chow
0f269bc48c walletdb: Load Txs last
Need to load txs last so that IsMine works.
2025-06-25 14:08:49 -07:00
Ava Chow
5cc32ee2a7 test: Test for balance update due to untracked output becoming spendable 2025-06-25 14:08:27 -07:00
Ava Chow
8222341d4f wallet: MarkDirty after AddWalletDescriptor
After adding a wallet descriptor (typically by import), mark all balance
caches dirty. This allows transactions that the wallet already knows
about that have outputs that are now ISMINE_SPENDABLE after the import
to actually be shown in balance calculations. Legacy wallet imports
would do this, but importdescriptors did not.
2025-06-25 14:08:27 -07:00
Ava Chow
e02f2d331c bench: Have AvailableCoins benchmark include a lot of unrelated utxos
One of the main issues with AvailableCoins is its performance when txs
have unrelated outputs, so update the benchmark to check the performance
of that.
2025-06-25 14:08:27 -07:00
merge-script
f27898c8bf Merge bitcoin/bitcoin#32721: wallet, rpc: Remove deprecated balances from getwalletinfo and getunconfirmedbalance
c3fe85e2d6 wallet, rpc, test: Remove deprecated getunconfirmedbalance (Ava Chow)
0ec255139b wallet, rpc: Remove deprecated balances from getwalletinfo (Ava Chow)

Pull request description:

  `getwalletinfo` result fields `balance`, `immature_balance`, and `unconfirmed_balance`, and the `getunconfirmedbalance` RPC have all been deprecated since 0.19.0. It's been long enough that they should either be removed or undeprecated. The functionality provided by these RPCs is provided by `getbalances`.

ACKs for top commit:
  davidgumberg:
    ACK c3fe85e2d6
  rkrux:
    ACK c3fe85e2d6
  BrandonOdiwuor:
    ACK c3fe85e2d6 removing the deprecated `balance, unconfirmed_balance, immature_balance` fields from `getwalletinfo` and `getunconfirmedbalance` RPCs, as this infomation can be found on the `getbalances` RPC
  w0xlt:
    reACK c3fe85e2d6

Tree-SHA512: c7c4acfd9cabc7517ba813b95281a6c6a717a417312afd9346298669b4f7bd37724ad977148ce42db7fd47fc3d1f5a8482d8ff2e7b9cb74756b171a5b8b91ef2
2025-06-25 16:43:09 -04:00
merge-script
8578fabb95 Merge bitcoin/bitcoin#32597: wallet: Always set descriptor cache upgraded flag for new wallets
47237cd193 wallet, rpc: Output wallet flags in getwalletinfo (Ava Chow)
bc2a26b296 wallet: Add GetWalletFlags (Ava Chow)
69f588a99a wallet: Set upgraded descriptor cache flag for newly created wallets (Ava Chow)

Pull request description:

  Newly created wallets will always have an upgraded descriptor cache, so set those.

  Also, to verify this behavior, add a new `flags` field to `getwalletinfo` and check that in the functional tests.

  Split from #32489

ACKs for top commit:
  Sjors:
    ACK 47237cd193
  w0xlt:
    ACK 47237cd193
  rkrux:
    ACK 47237cd193

Tree-SHA512: 97c7f85b858efe5ced9b8aafb6cd7c1a547de6f8013b82bfc75bc567cf73c9db5e168e3980355756541305520022fd776b8d4d240d3fb34ed86c27d2acaf4863
2025-06-25 16:14:01 -04:00
Max Edwards
941b8f54c0 ci: run get_previous_releases as part of test cross win job
This should enable wallet_migration functional test to run on Windows
2025-06-25 21:06:10 +01:00
Max Edwards
5e2182140b test: increment mocked time for migrating wallet backups
The wallet backups performed before migration use the time as part of
their filename. As the time is mocked, increment it between migration
attempts to prevent file name conflicts which is a problem on Windows.
2025-06-25 21:06:10 +01:00
Max Edwards
5174565802 ci: disable feature_unsupported_utxo_db functional test
This test required v0.14.3 which doesn't support special characters like
emojis in the datapath on windows. Functional test runner includes a few
emojis in it's default data directory.
2025-06-25 21:06:10 +01:00
Max Edwards
3dc90d69a6 test: remove mempool.dat before copying
Renaming mempool.dat from old node to new node fails on windows as the
file already exists.
2025-06-25 21:06:10 +01:00
Max Edwards
67a6b20d50 test: add windows support to get previous releases script
Needed to allow the wallet migration functional test to run under native
windows. Platform variable renamed to not clash with platform package.
2025-06-25 21:06:08 +01:00
merge-script
01f9081955 Merge bitcoin/bitcoin#32768: wallet: Remove CWalletTx::fTimeReceivedIsTxTime
9eb2c82e7c walletdb: Remove unused upgraded_txs (Ava Chow)
c668033709 wallet: Remove unused fTimeReceivedIsTxTime (Ava Chow)

Pull request description:

  `CWalletTx::fTimeReceivedIsTxTime` is no longer used and can be removed. This additionally allows the removal of the `upgraded_txs` loop in `LoadWallet`.

ACKs for top commit:
  maflcko:
    lgtm ACK 9eb2c82e7c
  Eunovo:
    ACK 9eb2c82e7c
  davidgumberg:
    ACK 9eb2c82e7c
  PeterWrighten:
    ACK 9eb2c82e7c
  rkrux:
    ACK 9eb2c82e7c
  w0xlt:
    ACK 9eb2c82e7c

Tree-SHA512: 05cf3a50f0d8ab6ef423ad1113c5ce6f45bfdc90e2c0dcf61c2dceced2465502e574b4b5b0091fcbb4bdd2182f8d69224f1e5516c7c505de07102b84a5f40e9c
2025-06-25 16:04:54 -04:00
merge-script
c1d8a542b4 Merge bitcoin/bitcoin#32727: doc: add release notes for #32425
b9a2e8ee96 doc: add release notes for https://github.com/bitcoin/bitcoin/pull/32425 (Vasil Dimov)

Pull request description:

  Add release notes for https://github.com/bitcoin/bitcoin/pull/32425.

ACKs for top commit:
  pablomartin4btc:
    re-ACK b9a2e8ee96
  janb84:
    reACK b9a2e8ee96
  glozow:
    ACK b9a2e8ee96, thanks for taking suggestions!

Tree-SHA512: 617612504977007909fde921e7e40286bcf81310f9cf3996783d6148219906784e9749d67f7a9a13305d7788208143e5f6ecceafbc6790f52dd08ffd9f91944c
2025-06-25 15:58:30 -04:00
Max Edwards
1a1b478ca3 scripted-diff: rename tarball to archive
Windows zip files are added in the next commit which are not tarballs so
renaming tarball to the more generic term archive which can cover both.

-BEGIN VERIFY SCRIPT-
sed -i 's/tarball/archive/g' test/get_previous_releases.py
-END VERIFY SCRIPT-
2025-06-25 20:56:28 +01:00
Max Edwards
4f06dc8484 test: remove building from source from get prev releases script
Using the get_previous_releases.py script to build from source only works for
releases prior to v29 due to removal of Autotools (in favor of CMake). It also
does not support building on Windows, and we are adding support for downloading
Windows release binaries in later commits of this PR.

As there were no complaints during review, it is assumed nobody uses this
functionality.
2025-06-25 20:56:22 +01:00
will
45b1d39757 doc: Add fetching single PRs from upstream
Current recommendation is to add a new remote fetching all PRs, but this
is resource-intensive.

Document a better way to fetch a single PR, and to update a PR which has
been force-pushed.
2025-06-25 20:27:04 +01:00
Hennadii Stepanov
8800b5acc1 cmake: Explicitly specify Boost_ROOT for Homebrew's package
On macOS, this change ensures that the Boost package is located at its
real path rather than via the symlink in the default prefix.
2025-06-25 18:45:43 +01:00
Vasil Dimov
b9a2e8ee96 doc: add release notes for https://github.com/bitcoin/bitcoin/pull/32425
Co-authored-by: Jan B <608446+janb84@users.noreply.github.com>
2025-06-25 18:23:31 +02:00
Cory Fields
6c2538d5bf depends: Bump boost to 1.88.0 and use new CMake buildsystem
This has a few advantages over the old method of simply copying headers:
- Installs proper cmake files which can be picked up by our buildsystem
- Only installs necessary headers, not all of boost

Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
2025-06-25 13:37:50 +01:00
merge-script
7d5a6d1739 Merge bitcoin/bitcoin#32798: build: add root dir to CMAKE_PREFIX_PATH in toolchain
e27a94596f build: add root dir to CMAKE_PREFIX_PATH (will)

Pull request description:

  Fixes: #32428

  Nix patches `cmake` to remove the root directory `/` from `CMAKE_PREFIX_PATH`:
  428b49b28e/pkgs/by-name/cm/cmake/001-search-path.diff (L10)

  Without this, and when using the toolchain for depends builds, cmake's `find_path()` and `find_package()` do not know where to find dependencies, causing issues like as seen in #32428

  Adding this path back is harmless on other systems, and fixes the toolchain for Nix users.

  As described in https://github.com/bitcoin/bitcoin/issues/32428#issuecomment-2991258328 I think this can be taken as a temporary fix whilst a longer-term solution is worked on.

ACKs for top commit:
  josibake:
    reACK e27a94596f
  hebasto:
    ACK e27a94596f, I have reviewed the code and it looks OK.
  janb84:
    reACK e27a94596f

Tree-SHA512: f299f2bab2620179518da866cbb7992d41d142ad42e79c14496e72f725a1dc60698b3e4b1daf45d28f71f32a23f0c8d7b4f6c6cf33aeedf322b7ef565b70b4af
2025-06-25 11:37:37 +01:00
Pieter Wuille
a34fb9ad6c miniscript: Make operator""_mst consteval 2025-06-25 11:33:18 +01:00
Hennadii Stepanov
14052162b1 Revert "miniscript: make operator_mst consteval"
This reverts commit 63317103c9.

operator""_mst has been manually adjusted according to commit
faf2162565
2025-06-25 11:32:57 +01:00
Hennadii Stepanov
ead4468748 cmake: Use HINTS instead of PATHS in find_* commands
According to the CMake documentation, `HINTS` "should be paths computed
by system introspection, such as a hint provided by the location of
another item already found", which is precisely the case in the
`FindQRencode` module.

Entries in `HINTS` are searched before those in `PATHS`. On macOS,
Homebrew’s `libqrencode` will therefore be located at its real path
rather than via the symlink in the default prefix.
2025-06-24 20:49:27 +01:00
merge-script
ad654a4807 Merge bitcoin/bitcoin#32767: ci: Allow running CI in worktrees
fa68dcb207 ci: Add missing errexit to lint CI install (MarcoFalke)
fa535a6de7 ci: Allow running CI in worktrees (MarcoFalke)
faf6a04597 ci: Clean UID/GID mismatch (MarcoFalke)

Pull request description:

  Fixes #30028 (modulo lint and tidy CI).

  The error on current master in a worktree is:

  ```
  $ git worktree add ./main origin/master && cd ./main
  $ MAKEJOBS="-j$(nproc)" FILE_ENV="./ci/test/00_setup_env_mac_cross.sh" ./ci/test_run_all.sh
  ...
  + git config --global ci.base-install-done true
  fatal: not a git repository: /root/b-c-ci/.git/worktrees/main
  ```

  So just use a plain file, instead of git. Also, enable pipefail while touching this bash script.

ACKs for top commit:
  willcl-ark:
    tACK fa68dcb207

Tree-SHA512: 0ce360a80883b4aa655fe8a99c38eb54a465b17c7cdb0a69a2d886ff78da32d6af996412ffc5b0db0322acafa9650619838573484de8243dc41594a04a6e17ec
2025-06-24 14:18:20 +01:00
merge-script
67e6746dc8 Merge bitcoin/bitcoin#32780: lsan: add more Qt suppressions
5be31b20e5 lsan: add more Qt suppressions (fanquake)

Pull request description:

  Using Clang clang version 20.1.6 (Fedora 20.1.6-9.fc43) and:
  ```bash
  export CC=clang
  export CXX=clang++
  cmake -B build -DBUILD_GUI=ON -DSANITIZERS=address
  cmake --build build
  export LSAN_OPTIONS="suppressions=/root/bitcoin/test/sanitizer_suppressions/lsan"
  ctest --test-dir build
  ```

  ```bash
  Totals: 3 passed, 0 failed, 0 skipped, 0 blacklisted, 1589ms
  ********* Finished testing of AddressBookTests *********

  =================================================================
  ==21869==ERROR: LeakSanitizer: detected memory leaks

  Direct leak of 88 byte(s) in 1 object(s) allocated from:
      #0 0xaaaab5d5af40 in operator new(unsigned long) (/root/bitcoin/build/bin/test_bitcoin-qt+0x39af40) (BuildId: c0e038f1c507ea6860d1cfd499ac54ad83359872)
      #1 0xffff8c8f56cc in QLayoutPrivate::createWidgetItem(QLayout const*, QWidget*) (/lib64/libQt6Widgets.so.6+0x1a56cc) (BuildId: 8b7b9e470f4d4cd920282a4f963abb01225814fa)
      #2 0xffff8c8d2f90 in QBoxLayout::insertWidget(int, QWidget*, int, QFlags<Qt::AlignmentFlag>) (/lib64/libQt6Widgets.so.6+0x182f90) (BuildId: 8b7b9e470f4d4cd920282a4f963abb01225814fa)
      #3 0xaaaab5fc7188 in SendCoinsDialog::addEntry() /root/bitcoin/build/src/qt/./qt/sendcoinsdialog.cpp:596:18
      #4 0xaaaab5fc4eec in SendCoinsDialog::SendCoinsDialog(PlatformStyle const*, QWidget*) /root/bitcoin/build/src/qt/./qt/sendcoinsdialog.cpp:84:5
      #5 0xaaaab5da67ac in (anonymous namespace)::MiniGUI::MiniGUI(interfaces::Node&, PlatformStyle const*) /root/bitcoin/build/src/qt/test/./qt/test/wallettests.cpp:235:75
      #6 0xaaaab5da2000 in (anonymous namespace)::TestGUI(interfaces::Node&, std::shared_ptr<wallet::CWallet> const&) /root/bitcoin/build/src/qt/test/./qt/test/wallettests.cpp:270:13
      #7 0xaaaab5d9ebc8 in (anonymous namespace)::TestGUI(interfaces::Node&) /root/bitcoin/build/src/qt/test/./qt/test/wallettests.cpp:453:5
      #8 0xaaaab5d9ebc8 in WalletTests::walletTests() /root/bitcoin/build/src/qt/test/./qt/test/wallettests.cpp:475:5
      #9 0xffff8b1c5314 in QMetaMethodInvoker::invokeImpl(QMetaMethod, void*, Qt::ConnectionType, long long, void const* const*, char const* const*, QtPrivate::QMetaTypeInterface const* const*) (/lib64/libQt6Core.so.6+0x195314) (BuildId: eacb2d1228362560e5df1a1ce496c99ad61960e7)
      #10 0xffff8b1c5dc8 in QMetaMethod::invokeImpl(QMetaMethod, void*, Qt::ConnectionType, long long, void const* const*, char const* const*, QtPrivate::QMetaTypeInterface const* const*) (/lib64/libQt6Core.so.6+0x195dc8) (BuildId: eacb2d1228362560e5df1a1ce496c99ad61960e7)
      #11 0xffff8cf57c54  (/lib64/libQt6Test.so.6+0x27c54) (BuildId: 96bb1cdeead53af0ced36d7970cf9cd79c4c4ccd)
      #12 0xffff8cf5fa18  (/lib64/libQt6Test.so.6+0x2fa18) (BuildId: 96bb1cdeead53af0ced36d7970cf9cd79c4c4ccd)
      #13 0xffff8cf6067c  (/lib64/libQt6Test.so.6+0x3067c) (BuildId: 96bb1cdeead53af0ced36d7970cf9cd79c4c4ccd)
      #14 0xffff8cf610a4  (/lib64/libQt6Test.so.6+0x310a4) (BuildId: 96bb1cdeead53af0ced36d7970cf9cd79c4c4ccd)
      #15 0xffff8cf61aa4 in QTest::qRun() (/lib64/libQt6Test.so.6+0x31aa4) (BuildId: 96bb1cdeead53af0ced36d7970cf9cd79c4c4ccd)
      #16 0xffff8cf61eb4 in QTest::qExec(QObject*, int, char**) (/lib64/libQt6Test.so.6+0x31eb4) (BuildId: 96bb1cdeead53af0ced36d7970cf9cd79c4c4ccd)
      #17 0xaaaab5d7d77c in main /root/bitcoin/build/src/qt/test/./qt/test/test_main.cpp:95:30
      #18 0xffff8aad6398 in __libc_start_call_main (/lib64/libc.so.6+0x26398) (BuildId: 627f878dd454ee3cc1dfdbd347bb565f1ffb53e7)
      #19 0xffff8aad6478 in __libc_start_main@GLIBC_2.17 (/lib64/libc.so.6+0x26478) (BuildId: 627f878dd454ee3cc1dfdbd347bb565f1ffb53e7)
      #20 0xaaaab5c74cac in _start (/root/bitcoin/build/bin/test_bitcoin-qt+0x2b4cac) (BuildId: c0e038f1c507ea6860d1cfd499ac54ad83359872)
  ```

  This happens when building using depends:
  ```bash
  Indirect leak of 24 byte(s) in 1 object(s) allocated from:
      #0 0xaaaabdbe86f8 in malloc (/root/bitcoin/build/bin/test_bitcoin-qt+0x4386f8) (BuildId: dd54811dc11325890f7bac3e3a49d38f5a7ffef5)
      #1 0xfbff97f8c164  (<unknown module>)
      #2 0xaaaabf0cfaa4 in QDBusConnectionPrivate::QDBusConnectionPrivate() (/root/bitcoin/build/bin/test_bitcoin-qt+0x191faa4) (BuildId: dd54811dc11325890f7bac3e3a49d38f5a7ffef5)
      #3 0xaaaabf0c9e30 in QDBusConnectionManager::doConnectToStandardBus(QDBusConnection::BusType, QString const&, bool) (/root/bitcoin/build/bin/test_bitcoin-qt+0x1919e30) (BuildId: dd54811dc11325890f7bac3e3a49d38f5a7ffef5)
      #4 0xaaaabf0cb0e4 in QtPrivate::QCallableObject<QDBusConnectionPrivate* (QDBusConnectionManager::*)(QDBusConnection::BusType, QString const&, bool), QtPrivate::List<QDBusConnection::BusType&, QString const&, bool&>, QDBusConnectionPrivate*>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (/root/bitcoin/build/bin/test_bitcoin-qt+0x191b0e4) (BuildId: dd54811dc11325890f7bac3e3a49d38f5a7ffef5)
      #5 0xaaaabf5cbaf0 in QObject::event(QEvent*) (/root/bitcoin/build/bin/test_bitcoin-qt+0x1e1baf0) (BuildId: dd54811dc11325890f7bac3e3a49d38f5a7ffef5)
      #6 0xaaaabf5a4ce0 in QCoreApplicationPrivate::notify_helper(QObject*, QEvent*) (/root/bitcoin/build/bin/test_bitcoin-qt+0x1df4ce0) (BuildId: dd54811dc11325890f7bac3e3a49d38f5a7ffef5)
      #7 0xaaaabf5a486c in QCoreApplication::notifyInternal2(QObject*, QEvent*) (/root/bitcoin/build/bin/test_bitcoin-qt+0x1df486c) (BuildId: dd54811dc11325890f7bac3e3a49d38f5a7ffef5)
      #8 0xaaaabf5a575c in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) (/root/bitcoin/build/bin/test_bitcoin-qt+0x1df575c) (BuildId: dd54811dc11325890f7bac3e3a49d38f5a7ffef5)
      #9 0xaaaabf66b858 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (/root/bitcoin/build/bin/test_bitcoin-qt+0x1ebb858) (BuildId: dd54811dc11325890f7bac3e3a49d38f5a7ffef5)
      #10 0xaaaabf5a9e3c in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (/root/bitcoin/build/bin/test_bitcoin-qt+0x1df9e3c) (BuildId: dd54811dc11325890f7bac3e3a49d38f5a7ffef5)
      #11 0xaaaabf632a44 in QThread::exec() (/root/bitcoin/build/bin/test_bitcoin-qt+0x1e82a44) (BuildId: dd54811dc11325890f7bac3e3a49d38f5a7ffef5)
      #12 0xaaaabf0c9bd0 in QDBusConnectionManager::run() (/root/bitcoin/build/bin/test_bitcoin-qt+0x1919bd0) (BuildId: dd54811dc11325890f7bac3e3a49d38f5a7ffef5)
      #13 0xaaaabf669c30 in QThreadPrivate::start(void*) (/root/bitcoin/build/bin/test_bitcoin-qt+0x1eb9c30) (BuildId: dd54811dc11325890f7bac3e3a49d38f5a7ffef5)
      #14 0xaaaabdbe5f2c in asan_thread_start(void*) asan_interceptors.cpp.o
      #15 0xffff99538608 in thread_start (/lib64/libc.so.6+0xf8608) (BuildId: 627f878dd454ee3cc1dfdbd347bb565f1ffb53e7)

  SUMMARY: AddressSanitizer: 3592 byte(s) leaked in 37 allocation(s).
  ```

ACKs for top commit:
  maflcko:
    lgtm ACK 5be31b20e5

Tree-SHA512: 0c33661c7ec83ea9b874c1ee4ee2de513131690287363e216a88560dfb31a59ef563a50af756c86a991583aa64a600a74e20fd5d6a104cf4c0a27532de8d2211
2025-06-24 14:07:59 +01:00
will
e27a94596f build: add root dir to CMAKE_PREFIX_PATH
Nix patches cmake to remove the root directory `/` from
`CMAKE_SYSTEM_PREFIX_PATH`:
428b49b28e/pkgs/by-name/cm/cmake/001-search-path.diff (L10)

Without this, and when using the toolchain for depends builds, cmake's
`find_path()` and `find_package()` do not know where to find
dependencies, causing issues like:
https://github.com/bitcoin/bitcoin/issues/32428

Adding this path back via CMAKE_PREFIX_PATH is harmless on other
systems, and fixes the toolchain for Nix users.

We append the `/` dir a maximum of once, as the toolchain may be called
repeatedly during builds.

Co-authored-by: Russell Yanofsky <russ@yanofsky.org>
Co-authored-by: josibake <josibake@protonmail.com>
2025-06-24 14:02:02 +01:00
Hennadii Stepanov
173394d951 depends: Build qt package for FreeBSD hosts 2025-06-24 12:23:02 +01:00
Sebastian Falbesoner
922adf66ac mempool: use FeeFrac for calculating regular score 2025-06-24 02:49:31 +02:00
Sebastian Falbesoner
3322b3a059 mempool: use FeeFrac for calculating ancestor score 2025-06-24 02:34:29 +02:00
Sebastian Falbesoner
ac9c113bd2 mempool: use FeeFrac for calculating descendant score 2025-06-24 02:23:09 +02:00
merge-script
e95bfc1d53 Merge bitcoin/bitcoin#32797: doc: archive 28.2 release notes
907842363c doc: archive 28.2 release notes (fanquake)

Pull request description:

  v28.2 is now tagged: https://github.com/bitcoin/bitcoin/releases/tag/v28.2.

ACKs for top commit:
  glozow:
    ACK  907842363c

Tree-SHA512: 49cde7ac9bbf08510c1914e5c9e0b80e31333a554318e29c9b61a9975d6d6308dabf5c3d8c736eba7aedee815de95d013f39456716c60cef76f0bc712dd74d6c
2025-06-23 17:50:21 -04:00
Martin Zumsande
666016e56b ci: use --usecli in one of the CI jobs
This helps avoid regressions (changes to functional tests
that are not compatible with -usecli).
2025-06-23 17:42:56 -04:00
Martin Zumsande
7ea248a020 test: Disable several (sub)tests with cli
Reason for each test:
rpc_whitelist.py: Relies on direct RPC calls
wallet_encryption.py: Null characters cannot be passed to suprocess.Popen
wallet_fundrawtransaction.py: multiple checks for wrong types, which have different error messages with cli
wallet_send.py: multiple checks for wrong types
2025-06-23 17:42:56 -04:00
Martin Zumsande
f420b6356b test: skip subtests that check for wrong types with cli
The error messages returned for wrong type differ betwen
using rpc or cli - skip these subtests where they happen.
2025-06-23 17:42:56 -04:00
Martin Zumsande
6530d0015b test: add function to convert to json for height_or_hash params
This is necessary for bitcoin-cli because a string without quotes
is not a valid json.
2025-06-23 17:42:56 -04:00
Martin Zumsande
54d28722ba test: Don't send empty named args with cli
If python passed None for an optional (i.e. 'null' is
sent), this will lead to the arg being interpreted as not
provided by bitcoind - except for string args, for which the arg is
interpreted as as 'null' string. Bypass this by not sending
named args to bitcoin-cli - so that the default value will
actually be used.

Also drops an unnecessary str() conversion, kwargs keys
are always strings.
2025-06-23 17:42:56 -04:00
Martin Zumsande
cca422060e test: convert tuple to json for cli
This makes it possible to run rpc_createmultisig.py with --usecli.
2025-06-23 17:42:56 -04:00
Martin Zumsande
af34e98086 test: make rpc_psbt.py usable with --usecli
The psbt string would include a "=" sign, which would
make the cli interpret this as a named argument.
Fix this by making it an actual named arg with the
correct name.
2025-06-23 17:42:56 -04:00
Martin Zumsande
8f8ce9e174 test: rename .rpc to ._rpc and remove unnecessary uses
It is usually not necessary, and makes it impossible to use --usecli
2025-06-23 17:42:55 -04:00
Martin Zumsande
5b08885986 test: enable functional tests with large rpc args for cli
Also, the following tests (for which self.supports_cli = False was not
set) will now work with --usecli:

feature_fastprune.py
feature_fee_estimation.py
feature_reindex_readonly.py
feature_taproot.py
mempool_package_rbf.py
p2p_net_deadlock.py
p2p_tx_download.py
rpc_packages.py
2025-06-23 17:42:55 -04:00
Martin Zumsande
7d5352ac73 test: use -stdin for large rpc commands
Because of the MAX_ARG_STRLEN limit (128kb on most systems)
for args, these would usually fail. As a workaround, use
-stdin for these large calls. Idea by 0xB10C.

Co-authored-by: Ryan Ofsky <ryan@ofsky.org>
2025-06-23 17:42:55 -04:00
Martin Zumsande
6c364e0c10 test: Enable various tests for usage with cli
These tests run successfully on current master without any changes.
2025-06-23 17:42:55 -04:00
fanquake
907842363c doc: archive 28.2 release notes 2025-06-23 10:15:14 +01:00
merge-script
c5849663ba Merge bitcoin/bitcoin#32771: contrib: tracing: Fix read of pmsg_type in p2p_monitor.py
3473986fe1 contrib: tracing: Correctly read msg type in p2p_monitor.py (David Gumberg)

Pull request description:

  This fixes a bug in the contrib tracing script `p2p_monitor.py`. currently the script fails to read the `msg_type` of inbound and outbound messages, which is useful in the per-peer message view.

  <details>
  <summary>Screenshot of p2p_monitor.py on master</summary>

  ![Screenshot From 2025-06-18 11-37-43](https://github.com/user-attachments/assets/56612088-54d7-465c-b0b6-1b425b919785)
  </details>

  <details>
  <summary>Screenshot of p2p_monitor.py on this branch</summary>

  ![Screenshot From 2025-06-18 11-41-38](https://github.com/user-attachments/assets/4438a483-938c-450b-a12e-6d6909b2c37e)

  </details>

ACKs for top commit:
  yuvicc:
    ACK 3473986fe1
  janb84:
    ut ACK 3473986fe1
  0xB10C:
    ACK 3473986fe1

Tree-SHA512: 94da0dc35072933a20ef693024855b3c382fc6f5ae0a3108d092d7aa5a4004df478f5de07b80f675be13e00f3f4596b0f34c49ec1d8d2c38a15797dcf86c2a56
2025-06-23 09:53:36 +01:00