Commit graph

33235 commits

Author SHA1 Message Date
fanquake
3d70c05868
build: remove faketime unsetting and comments from configure.ac 2022-04-01 11:52:27 +01:00
laanwj
afac75f140
Merge bitcoin/bitcoin#24733: build: Fix "ERR: Unsigned tarballs do not exist"
7762c5683f build: Fix "ERR: Unsigned tarballs do not exist" (Hennadii Stepanov)

Pull request description:

  This was missed in 53dd6165b8 (bitcoin/bitcoin#24549).

ACKs for top commit:
  laanwj:
    ACK 7762c5683f
  fanquake:
    ACK 7762c5683f - this should have been a part of #24549.

Tree-SHA512: 526e4e6ee1463003059b9703030c5b0537445783c45a205024c9c9e3493da967733153a1dc80594fed15a336805c1cf14c8d13cd106186a7544f51d0d542f335
2022-04-01 11:36:24 +02:00
Hennadii Stepanov
7762c5683f
build: Fix "ERR: Unsigned tarballs do not exist" 2022-04-01 10:28:10 +02:00
MarcoFalke
7ab9fc32d6
Merge bitcoin/bitcoin#24724: test: fix incorrect named args in txpackage tests
bf77fea3c1 test: fix incorrect named args in txpackage tests (fanquake)

Pull request description:

  Final non-scripted-diff commit split from #24661.

  Could be tested with: `./autogen.sh && ./configure CC=clang-12 CXX=clang++-12 && make clean && bear make -j9 && ( cd ./src/ && run-clang-tidy-12 -j9 )`.

  Motivation:
  > Incorrect named args are source of bugs, like https://github.com/bitcoin/bitcoin/pull/22979.

  > To allow them being checked by clang-tidy, use a format it can understand.

ACKs for top commit:
  ajtowns:
    ACK bf77fea3c1

Tree-SHA512: a13bfb5fc70424b13fbeec7f164d7a0d3b72b27ebec11dfd4115b7782a0037f26e9349e06eef8a6b17b8f529e0c7f43ae37a9c252bde65706dd164704d207d5f
2022-04-01 08:44:14 +02:00
Andrew Chow
1021e4cc68
Merge bitcoin/bitcoin#24602: fuzz: add target for coinselection algorithms
21520b9551 fuzz: add target for coinselection (Martin Zumsande)

Pull request description:

  This adds a fuzz target for the coinselection algorithms by creating random `OutputGroup`s and running all three coin selection algorithms for them.
  It does not fuzz higher-level wallet logic for selecting eligible coins (as in `SelectCoins()`), thought it probably would make sense to have a fuzz target for that too.

ACKs for top commit:
  achow101:
    ACK 21520b9551
  vasild:
    ACK 21520b9551

Tree-SHA512: c763003cf5ff5317f929d3d0b2f06fa739ae41dd642042d9a5c5c96e6cb9b349a6c7aeabc77bc2b846d12c8bcb60e07ee20a9f38539429c65723ab76aeee6b2e
2022-03-31 13:09:17 -04:00
Andrew Chow
b7d78e6244
Merge bitcoin/bitcoin#24711: wallet: Postpone wallet loading notification for encrypted wallets
0c12f0116c wallet: Postpone NotifyWalletLoaded() for encrypted wallets (Hennadii Stepanov)
aeee419c6a wallet, refactor: Add wallet::NotifyWalletLoaded() function (Hennadii Stepanov)

Pull request description:

  Fixes bitcoin-core/gui#571.

  `CWallet::Create()` notifies about wallet loading too early, that results the notification goes before `DescriptorScriptPubKeyMan`s were created and added to an encrypted wallet.

  And `interfaces::Wallet::taprootEnabled()` in ecf692b466/src/qt/receivecoinsdialog.cpp (L100-L102) erroneously returns `false` for just created encrypted descriptor wallets.

ACKs for top commit:
  Sjors:
    utACK 0c12f0116c
  achow101:
    ACK 0c12f0116c

Tree-SHA512: 2694bacd12748cd5f6c95d9d3bf8bcf4502ee67fecd8d057f33236b72069c61401b08f49deb013fc71c3f1e51ae16bdfd827ddcbc2a083d7044589be7a78982e
2022-03-31 12:43:14 -04:00
fanquake
bf77fea3c1
test: fix incorrect named args in txpackage tests 2022-03-31 16:34:33 +01:00
MarcoFalke
243197ba9c
Merge bitcoin/bitcoin#24721: doc: Use DecodeTxDoc helper
fa58427aae doc: Use DecodeTxDoc helper (MarcoFalke)

Pull request description:

ACKs for top commit:
  fanquake:
    ACK fa58427aae
  shaavan:
    ACK fa58427aae

Tree-SHA512: 58652f15f858822e4fceeba6967866a4866d2455f1547f4814dd4113409da16117616c5b62eb58a6bead5433a4d28c598809a0ff79b6f377d138cad3b2edb2d7
2022-03-31 15:56:05 +02:00
MarcoFalke
fa58427aae
doc: Use DecodeTxDoc helper
Can be reviewed with
--color-moved=dimmed-zebra --color-moved-ws=ignore-all-space
2022-03-31 11:46:20 +02:00
MarcoFalke
1a54c060b3
Merge bitcoin/bitcoin#24716: rpc: Fix documentation assertion for getrawtransaction
71038a151e rpc: Fix documentation assertion for `getrawtransaction` (laanwj)

Pull request description:

  When `getrawtransaction` is successfully used on a coinbase transaction, there is an assertion error. This is very unlikely but happens in the `interface_usdt_utxocache.py` test in #24358.

  This does the following:

  - Add missing "coinbase" documentation.

  - Synchronize documentation between `getrawtransaction` and  `decoderawtransaction`, the two users of `TxToUniv` that have detailed   documentation. `decodepsbt` and `getblock` also uses it but fortunately elides this block.

  - Change "vout[].amount" to `STR_AMOUNT` for consistency.

  - Add maintainer comment to keep the two places synchronized. It might  be possible to get smarter with deduplication, but there are some  extra fields that prevent the obvious way.

ACKs for top commit:
  jonatack:
    ACK 71038a151e

Tree-SHA512: 962236130455d805190ff9a5c971e4e25c17db35614a90ce340264ec953b0ad7fb814eb33ae430b5073955a8a350f72bdd67ba93e35f9c70e5175b836a767a35
2022-03-31 11:19:31 +02:00
MarcoFalke
c8ac7e6a65
Merge bitcoin/bitcoin#24698: test: -peerblockfilters without -blockfilterindex raises an error
d6bc2322ed test: -peerblockfilters without -blockfilterindex raises an error (brunoerg)

Pull request description:

  This PR adds test coverage for the following init error:
  2a3e8fb359/src/init.cpp (L850)

  Setting -peerblockfilters without -blockfilterindex should raise an error when initializing.

ACKs for top commit:
  ccdle12:
    Tested ACK d6bc2322ed

Tree-SHA512: e740c2ccde6bb1bb8381bb676a6d01bd5746cf9ce0c8dadd62067a6b9b380027bfe8b8cdeae9846a0ab18385f3dc5dff607fe5274cb55107d47470db00015fb2
2022-03-31 08:37:30 +02:00
MarcoFalke
e1e6a3386f
Merge bitcoin/bitcoin#24707: doc: Speed up functional test runs using ramdisk
17648493df doc: Speed up functional test runs using ramdisk (willcl-ark)

Pull request description:

  Using a ramdisk for the functional tests can give noticable speedups for developers and reviewers.

  Local testing with an 8GB ramdisk saw a full test run using `test/functional/test_runner.py --jobs=100 --cachedir=/mnt/tmp/cache --tmpdir=/mnt/tmp` reduced from ~280 seconds to ~99 seconds.

  Possible bikeshedding opportunity to be had over whether this might best fit into `doc/productivity.md`, but IMO more people will likely see it (and it will therefore be more useful) if it is here.

  It seems best to select `tmpfs` over `ramfs` as `ramfs` can grow dynamically (good) but cannot be limited in size and might cause the system to hang if you run out of ram (bad), whereas `tmpfs` is size-limited and will overflow into swap.

ACKs for top commit:
  josibake:
    ACK 17648493df
  jamesob:
    ACK 17648493df

Tree-SHA512: b8e0846d4558a7a33fbb7cd190e30c36182db36095e1c1feae8c10a12042cff9d97739964bd9211d8564231dc99b4be5eed806d12a1d11dfa908157d7f26cc67
2022-03-31 08:34:58 +02:00
MarcoFalke
a2e1590f67
Merge bitcoin/bitcoin#24673: refactor: followup of remove -deprecatedrpc=addresses flag
9563a645c2 refactor: add stdd:: includes to core_write (fanquake)
8b9efebb0a refactor: use named args when ScriptToUniv or TxToUniv are invoked (Michael Dietz)
22f25a6116 refactor: prefer snake case, TxToUniv arg hashBlock renamed block_hash (Michael Dietz)
828a094ecf refactor: merge ScriptPubKeyToUniv & ScriptToUniv into one function (Michael Dietz)

Pull request description:

  I've cherry-picked some of the commits out of #22924, and made minor changes (like fixing named args).

ACKs for top commit:
  MarcoFalke:
    re-ACK 9563a645c2 🕓

Tree-SHA512: 4f0e5b45c14cbf68b9e389bbe1211c125d95cbd3da5205b1cff6a4c44f15b15039ba2a5b25cd7e2580d9169404f1b7ff620d8a7e01f6112e3cb153ecfaef8916
2022-03-31 08:31:16 +02:00
MarcoFalke
d2b4355c58
Merge bitcoin/bitcoin#24715: build, test: Fix test logfile name
8b517fae7e build, refactor: Replace tabs with spaces (Hennadii Stepanov)
dc0774cbdf build, test: Fix test logfile name (Hennadii Stepanov)

Pull request description:

  Recently merged bitcoin/bitcoin#19385 was flawed as it tries to `cat` a non-existed logfile:
  - https://github.com/bitcoin/bitcoin/pull/19385#discussion_r835300701
  - https://github.com/bitcoin/bitcoin/pull/19385#issuecomment-1082748549

  Closes bitcoin/bitcoin#17224.

ACKs for top commit:
  luke-jr:
    utACK 8b517fae7e

Tree-SHA512: 6c6dab6d7d38b5e949f1159ddff8e431f26d7254157f8308d63383c0642154271107e384c77722b7cf77f0be204bd21d69f3a9e93a8d19cf48954ac673df6c7a
2022-03-31 08:27:15 +02:00
MarcoFalke
87dc1dc55f
Merge bitcoin/bitcoin#24714: util/check: Don't use a lambda for Assert/Assume
2ef47ba6c5 util/check: stop using lambda for Assert/Assume (Anthony Towns)
7c9fe25c16 wallet: move Assert() check into constructor (Anthony Towns)

Pull request description:

  Using a lambda creates a couple of odd namespacing issues, in particular making clang's thread safety analysis less helpful, and confusing gcc when calling member functions. Fix this by not using a lambda.

  Fixes #21596
  Fixes #24654

ACKs for top commit:
  MarcoFalke:
    ACK 2ef47ba6c5 🚢
  jonatack:
    Tested re-ACK 2ef47ba6c5

Tree-SHA512: 4bdbf3215f3d14472df0552362c5eebe8b7eea2d0928a8a41109edd4e0c5f95de6f8220eb2fee8506874e352c003907faf5ef344174795939306a618157b1bae
2022-03-31 08:18:30 +02:00
Hennadii Stepanov
0c12f0116c
wallet: Postpone NotifyWalletLoaded() for encrypted wallets
Too early NotifyWalletLoaded() call in CWallet::Create() results the
notification goes before DescriptorScriptPubKeyMans were created and
added to an encrypted wallet.

Co-authored-by: Andrew Chow <achow101-github@achow101.com>
2022-03-30 21:28:53 +02:00
fanquake
9563a645c2
refactor: add stdd:: includes to core_write 2022-03-30 20:11:15 +01:00
Michael Dietz
8b9efebb0a
refactor: use named args when ScriptToUniv or TxToUniv are invoked 2022-03-30 20:00:27 +01:00
Michael Dietz
22f25a6116
refactor: prefer snake case, TxToUniv arg hashBlock renamed block_hash 2022-03-30 20:00:27 +01:00
Michael Dietz
828a094ecf
refactor: merge ScriptPubKeyToUniv & ScriptToUniv into one function 2022-03-30 20:00:23 +01:00
fanquake
74b011bbfa
Merge bitcoin/bitcoin#23008: ci: Use clang-12 and libcxx-12 for msan
fa73f8a469 ci: Use clang-12 and libcxx-12 for msan (MarcoFalke)

Pull request description:

  Run the latest sanitizers to get the most implemented features

ACKs for top commit:
  fanquake:
    ACK fa73f8a469 - `--disable-hardening` matches what was just added to oss-fuzz.

Tree-SHA512: 2e533bb9273c97600176be2e41069a03f425aa586f9f32b8ed5f0c9844215a3a41e95a8edd58d044386e350807d6a1df09008a7da35428abd185a509ca71bd82
2022-03-30 19:41:16 +01:00
Martin Zumsande
21520b9551 fuzz: add target for coinselection
This creates random OutputGroups and runs the
existing coinselection algorithms for them.
2022-03-30 17:17:37 +02:00
laanwj
71038a151e rpc: Fix documentation assertion for getrawtransaction
When `getrawtransaction` is successfully used on a coinbase transaction,
there is an assertion error. This is very unlikely but happens in the
test in #24358.

This does the following:

- Add missing "coinbase" documentation.

- Synchronize documentation between `getrawtransaction` and
  `decoderawtransaction`, the two users of `TxToUniv` that have detailed
  documentation. `decodepsbt` also uses it but fortunately elides this block.

- Change "vout[].amount" to `STR_AMOUNT` for consistency.

- Add maintainer comment to keep the two places synchronized. It might
  be possible to get smarter with deduplication, but there are some
  extra fields that prevent the obvious way.
2022-03-30 17:01:07 +02:00
Anthony Towns
2ef47ba6c5 util/check: stop using lambda for Assert/Assume 2022-03-30 23:09:13 +10:00
MarcoFalke
f4e5d704f2
Merge bitcoin/bitcoin#24118: Add 'sendall' RPC née sweep
bb84b7145b add tests for no recipient and using send_max while inputs are specified (ishaanam)
49090ec402 Add sendall RPC née sweep (Murch)
902793c777 Extract FinishTransaction from send() (Murch)
6d2208a3f6 Extract interpretation of fee estimation arguments (Murch)
a31d75e5fb Elaborate error messages for outdated options (Murch)
35ed094e4b Extract prevention of outdated option names (Murch)

Pull request description:

  Add sendall RPC née sweep

  _Motivation_
  Currently, the wallet uses a fSubtractFeeAmount (SFFO) flag on the
  recipients objects for all forms of sending calls. According to the
  commit discussion, this flag was chiefly introduced to permit sweeping
  without manually calculating the fees of transactions. However, the flag
  leads to unintuitive behavior and makes it more complicated to test
  many wallet RPCs exhaustively. We proposed to introduce a dedicated
  `sendall` RPC with the intention to cover this functionality.

  Since the proposal, it was discovered in further discussion that our
  proposed `sendall` rpc and SFFO have subtly different scopes of
  operation.
  • sendall:
    Use _given UTXOs_ to pay a destination the remainder after fees.
  • SFFO:
    Use a _given budget_ to pay an address the remainder after fees.

  While `sendall` will simplify cases of spending a given set of
  UTXOs such as paying the value from one or more specific UTXOs, emptying
  a wallet, or burning dust, we realized that there are some cases in
  which SFFO is used to pay other parties from a limited budget,
  which can often lead to the creation of change outputs. This cannot be
  easily replicated using `sendall` as it would require manual
  computation of the appropriate change amount.

  As such, sendall cannot replace all uses of SFFO, but it still has a
  different use case and will aid in simplifying some wallet calls and
  numerous wallet tests.

  _Sendall call details_
  The proposed sendall call builds a transaction from a specific
  subset of the wallet's UTXO pool (by default all of them) and assigns
  the funds to one or more receivers. Receivers can either be specified
  with a given amount or receive an equal share of the remaining
  unassigned funds. At least one recipient must be provided without
  assigned amount to collect the remainder. The `sendall` call will
  never create change. The call has a `send_max` option that changes the
  default behavior of spending all UTXOs ("no UTXO left behind"), to
  maximizing the output amount of the transaction by skipping uneconomic
  UTXOs. The `send_max` option is incompatible with providing a specific
  set of inputs.

  ---
  Edit: Replaced OP with latest commit message to reflect my updated motivation of the proposal.

ACKs for top commit:
  achow101:
    re-ACK bb84b7145b

Tree-SHA512: 20aaf75d268cb4b144f5d6437d33ec7b5f989256b3daeeb768ae1e7f39dc6b962af8223c5cb42ecc72dc38cecd921c53c077bc0ec300b994e902412213dd2cc3
2022-03-30 15:02:49 +02:00
laanwj
171f6f2699
Merge bitcoin/bitcoin#24374: contrib: refactor: simplify linearize scripts
254a63e097 contrib: refactor: replace `hex_switchEndian` in linearize scripts (Sebastian Falbesoner)
3f863cfff1 contrib: refactor: simplify block header string routine in linearize-data.py (Sebastian Falbesoner)

Pull request description:

  This PR simplifies the linearization scripts `linearize-data.py` and `linearize-hashes.py` by replacing overly complicated cruft (block header hash string calculation, hex string reverse) with means of the Python3 standard library.

ACKs for top commit:
  laanwj:
    Code review ACK 254a63e097

Tree-SHA512: 4a0e20e63bd11f23a190480b22dbc2f2a3070e2a4f3a01b8797f99bb5fc830185e91e6712c8ae97562f9a24a98aa4f19d52f02a3f5fcbe4c578ee88a41382d1d
2022-03-30 13:43:58 +02:00
laanwj
50c806f001
Merge bitcoin/bitcoin#24693: builder-keys: Add dunxen
f93c5d2ac1 builder-keys: Add dunxen (Duncan Dean)

Pull request description:

  https://keys.openpgp.org/search?q=948444FCE03B05BA5AB0591EC37B1C1D44C786EE

  This adds my master key.

ACKs for top commit:
  laanwj:
    ACK f93c5d2ac1
  hebasto:
    ACK f93c5d2ac1
  jonatack:
    ACK f93c5d2ac1

Tree-SHA512: f1d8bff9f0e3ade825272732e5a5ec749fb6893c5b296b87ac859120f4631b10a3dcc29765a141ff44392f7b38377733dda6d3671c2392f8923cee07118b2297
2022-03-30 13:18:21 +02:00
Hennadii Stepanov
8b517fae7e
build, refactor: Replace tabs with spaces 2022-03-30 12:16:05 +02:00
Hennadii Stepanov
dc0774cbdf
build, test: Fix test logfile name
Co-authored-by: Luke Dashjr <luke-jr+git@utopios.org>
2022-03-30 12:15:53 +02:00
MarcoFalke
fa73f8a469
ci: Use clang-12 and libcxx-12 for msan 2022-03-30 11:56:06 +02:00
fanquake
f9aedbc300
Merge bitcoin/bitcoin#24690: util: Add inotify_rm_watch to syscall sandbox (AllowFileSystem)
f05a4cdf5a util: Add inotify_rm_watch to syscall sandbox (AllowFileSystem) (Hennadii Stepanov)

Pull request description:

  This PR fixes the current master (3297f5c11c) when running `bitcoin-qt` on Ubuntu 22.04 and quitting:
  ```
  $ ./src/qt/bitcoin-qt -signet -sandbox=log-and-abort
  Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
  ERROR: The syscall "inotify_rm_watch" (syscall number 255) is not allowed by the syscall sandbox in thread "main". Please report.
  terminate called without an active exception
  Aborted (core dumped)
  ```

  Also see https://github.com/bitcoin/bitcoin/pull/24659#discussion_r835747166

ACKs for top commit:
  fanquake:
    ACK f05a4cdf5a - checked that qt is using this in it's filesystem watcher code.

Tree-SHA512: 9c7920a25422cd3a040bc1cbc487c12c3dc2b91358c3757f1030d6a1ff12c18c688a8e5b7466f683da88a5e4f5f15d442975660022d706e47021253c24c58f4a
2022-03-30 10:19:25 +01:00
laanwj
bdbabc50ba
Merge bitcoin/bitcoin#24561: guix: use LIEF 0.12.0
3c3bd90220 test: remove lief install from multiprocess job (fanquake)
983e0a2058 contrib: use LIEF 0.12.0 for symbol and security checks (fanquake)

Pull request description:

  [LIEF](https://github.com/lief-project/LIEF) `0.12.0` is [now available](https://github.com/lief-project/LIEF/releases/tag/0.12.0), and includes minor changes we have upstreamed to improve support for RISC-V binaries:
  * https://github.com/lief-project/LIEF/pull/562
  * https://github.com/lief-project/LIEF/pull/640

  Closes: #23655.

  Guix Build (x86_64):
  ```bash
  2fc504baf4f550092f05115f8c7c9046ec2988f097b55b33c4c963e02f11cfc3  guix-build-3c3bd9022026/output/aarch64-linux-gnu/SHA256SUMS.part
  15b1a8a33f4b750cf8d3e2753e6fe3ca7560aeefa88c1acbaf0be412cbd81cc4  guix-build-3c3bd9022026/output/aarch64-linux-gnu/bitcoin-3c3bd9022026-aarch64-linux-gnu-debug.tar.gz
  77a446792dba101afd565f0b4441c5dfe8e08bf9e4c9ea6e862a0df118a55327  guix-build-3c3bd9022026/output/aarch64-linux-gnu/bitcoin-3c3bd9022026-aarch64-linux-gnu.tar.gz
  dc63f742a3d396ab2b2115f7cea4e90c127267a0c9fc2f1e9af9e052a670cd41  guix-build-3c3bd9022026/output/arm-linux-gnueabihf/SHA256SUMS.part
  5214a5c3e532ddfec218354b6512cc4eedd6411a199cc2d4eed7d0ad77873a0e  guix-build-3c3bd9022026/output/arm-linux-gnueabihf/bitcoin-3c3bd9022026-arm-linux-gnueabihf-debug.tar.gz
  fea7b00ca6d8b7bc72c2e4e2c9e9aa94c76f9f463af82cf0bd5a6fc8951a7fe7  guix-build-3c3bd9022026/output/arm-linux-gnueabihf/bitcoin-3c3bd9022026-arm-linux-gnueabihf.tar.gz
  200bf59ecaebdcb2a1302160dd47288135b8cead99e202d1a8b7da8d54a872c3  guix-build-3c3bd9022026/output/arm64-apple-darwin/SHA256SUMS.part
  51c079c29966a1f76f690f28ed99d767413327422636bbbe9ca499e97954cfd4  guix-build-3c3bd9022026/output/arm64-apple-darwin/bitcoin-3c3bd9022026-arm64-apple-darwin-unsigned.dmg
  2e85d002b7e993a90b23363bb01d8dca644fbabd9debb336012834abeddce024  guix-build-3c3bd9022026/output/arm64-apple-darwin/bitcoin-3c3bd9022026-arm64-apple-darwin-unsigned.tar.gz
  257e272f6ed867f7634d1bba5860da855e35793646581b37518e25d1fdab48db  guix-build-3c3bd9022026/output/arm64-apple-darwin/bitcoin-3c3bd9022026-arm64-apple-darwin.tar.gz
  a0c755bb31763995e1d2050d5448bb98194c238fdd6b9eff901e429c9fdfa0f6  guix-build-3c3bd9022026/output/dist-archive/bitcoin-3c3bd9022026.tar.gz
  cf07cfefe010a1cc58ceab5dd5361ca39d770038d73682bd60b52410708c5f35  guix-build-3c3bd9022026/output/powerpc64-linux-gnu/SHA256SUMS.part
  aa93521bfbf7cf693fe56500faa6ac460bb297e5af2d8cf4e857f7ea0e92eb34  guix-build-3c3bd9022026/output/powerpc64-linux-gnu/bitcoin-3c3bd9022026-powerpc64-linux-gnu-debug.tar.gz
  883c2e5fe0d8215dcc0a252cd62c8fd95fc13b31e1bd72d340dfb2e4adadfe01  guix-build-3c3bd9022026/output/powerpc64-linux-gnu/bitcoin-3c3bd9022026-powerpc64-linux-gnu.tar.gz
  903666488f620a5710bc1709f52feb60d530aaba6e7e0b200692fa2945e569b8  guix-build-3c3bd9022026/output/powerpc64le-linux-gnu/SHA256SUMS.part
  2dd8a3fa924111e839097da8ee12675a265e64aeeae270f1f3e86f9c9b7bd28a  guix-build-3c3bd9022026/output/powerpc64le-linux-gnu/bitcoin-3c3bd9022026-powerpc64le-linux-gnu-debug.tar.gz
  d93a4347ea376e02760c52bb836317fd3f9c8e78ff004d9c141ebce185f3d364  guix-build-3c3bd9022026/output/powerpc64le-linux-gnu/bitcoin-3c3bd9022026-powerpc64le-linux-gnu.tar.gz
  7ee00ec4a2cd83f27d619c6983e93baa198d78167a860e8d9f4c4aa670120ab2  guix-build-3c3bd9022026/output/riscv64-linux-gnu/SHA256SUMS.part
  9ad79a47c59a67f881ba2ef7a669ffb667b6e0bd13407730574dc7af542fd935  guix-build-3c3bd9022026/output/riscv64-linux-gnu/bitcoin-3c3bd9022026-riscv64-linux-gnu-debug.tar.gz
  35462865447683571b006d426e532090c19ef18b9f399b84ebf37795fb3c4eaa  guix-build-3c3bd9022026/output/riscv64-linux-gnu/bitcoin-3c3bd9022026-riscv64-linux-gnu.tar.gz
  a5a3bb0527ded1eea3956208d1dc7289e39786594ac4cbee17f4c28573b7e4fb  guix-build-3c3bd9022026/output/x86_64-apple-darwin/SHA256SUMS.part
  e75435885e97dec09f3d9c51c0bd5987329a485ef26027d6e7b4cafcec20a9ab  guix-build-3c3bd9022026/output/x86_64-apple-darwin/bitcoin-3c3bd9022026-x86_64-apple-darwin-unsigned.dmg
  438b027186095eed1615898a403b0bdd0a686d95f0617b4065db469c8c4e732c  guix-build-3c3bd9022026/output/x86_64-apple-darwin/bitcoin-3c3bd9022026-x86_64-apple-darwin-unsigned.tar.gz
  1d33e0661041f00b4f224f231bbb71bda534ad8ad76a7d2b041084911cdd0814  guix-build-3c3bd9022026/output/x86_64-apple-darwin/bitcoin-3c3bd9022026-x86_64-apple-darwin.tar.gz
  fc9a88c1cdf10570bc2c453c1a643a04b525155f0b98a18c90b8d5fd64fcf630  guix-build-3c3bd9022026/output/x86_64-linux-gnu/SHA256SUMS.part
  435896b6a85f46a2f3f0b5f278936e84d0212ef7102787b70f139648373344d3  guix-build-3c3bd9022026/output/x86_64-linux-gnu/bitcoin-3c3bd9022026-x86_64-linux-gnu-debug.tar.gz
  02c84c4c74846740b5336e8889194909bb6d638cf731851ddd8af7bbffd1ae9b  guix-build-3c3bd9022026/output/x86_64-linux-gnu/bitcoin-3c3bd9022026-x86_64-linux-gnu.tar.gz
  d4176cc40eaa0769410717b28637d507ddef182c73c60801f333ddd7a56b41f7  guix-build-3c3bd9022026/output/x86_64-w64-mingw32/SHA256SUMS.part
  7623a149798beba635c21639975d5cbf2a417c7e8a1bf3583abe1bb20cfa1673  guix-build-3c3bd9022026/output/x86_64-w64-mingw32/bitcoin-3c3bd9022026-win64-debug.zip
  a1de00c9d4315928e3ce93890009fe2ea8f3f1fa7ca63004d952192012131d20  guix-build-3c3bd9022026/output/x86_64-w64-mingw32/bitcoin-3c3bd9022026-win64-setup-unsigned.exe
  82dc001a7f6d2b405b89bd343276db59954f25461d828ddf2e3c42f5ba4fe164  guix-build-3c3bd9022026/output/x86_64-w64-mingw32/bitcoin-3c3bd9022026-win64-unsigned.tar.gz
  6fc6f6101672a4cee2696a1517def03b6872435d968d74a47efbb4f8c5198c03  guix-build-3c3bd9022026/output/x86_64-w64-mingw32/bitcoin-3c3bd9022026-win64.zip
  ```

  Guix Build (arm64):
  ```bash
  d803406d4a90f9813bff58f01fde109d77dbf5b37b1af68e7a58fb4c3041a390  guix-build-3c3bd9022026/output/arm-linux-gnueabihf/SHA256SUMS.part
  25a234f4c0eb0ed280d7c24b65e2bae75d44f4fade1895d9d6d2a3880ed29557  guix-build-3c3bd9022026/output/arm-linux-gnueabihf/bitcoin-3c3bd9022026-arm-linux-gnueabihf-debug.tar.gz
  0b6044ea0441536e7b2853cce5a354fff33625db8c18c70023c78a9de5364376  guix-build-3c3bd9022026/output/arm-linux-gnueabihf/bitcoin-3c3bd9022026-arm-linux-gnueabihf.tar.gz
  c44810505ee8f7800488c0442edc71550a1f989598c702e9a31709b9880ef8ba  guix-build-3c3bd9022026/output/arm64-apple-darwin/SHA256SUMS.part
  ce9a74deac4a20a2ca4d7f8dfc242aea367c2aa55cb3b9de4e11c691ce0755bd  guix-build-3c3bd9022026/output/arm64-apple-darwin/bitcoin-3c3bd9022026-arm64-apple-darwin-unsigned.dmg
  341efb7b536ad6f75456dd51134e1afa4773708be2103733c48c8fb7a85df8b0  guix-build-3c3bd9022026/output/arm64-apple-darwin/bitcoin-3c3bd9022026-arm64-apple-darwin-unsigned.tar.gz
  607151e3423f712ea1bb0e24b7f625290e2decfe4586adf193e3218f62e87f71  guix-build-3c3bd9022026/output/arm64-apple-darwin/bitcoin-3c3bd9022026-arm64-apple-darwin.tar.gz
  a0c755bb31763995e1d2050d5448bb98194c238fdd6b9eff901e429c9fdfa0f6  guix-build-3c3bd9022026/output/dist-archive/bitcoin-3c3bd9022026.tar.gz
  16f1f669f9f7a658ad25d72e628c68fefdc3469857efd06149b0ae063ad07cf2  guix-build-3c3bd9022026/output/powerpc64-linux-gnu/SHA256SUMS.part
  8c36e24b12d0f3c200b51c813a6c8e85b826c994af4891a4eed16bb2447f6ae9  guix-build-3c3bd9022026/output/powerpc64-linux-gnu/bitcoin-3c3bd9022026-powerpc64-linux-gnu-debug.tar.gz
  89777d8c44ec0ce3e59e74461fb7ed39b544ff1d40ed8399e3a26733fcd938af  guix-build-3c3bd9022026/output/powerpc64-linux-gnu/bitcoin-3c3bd9022026-powerpc64-linux-gnu.tar.gz
  f51279dc699a1b8625f8fd3e13ec1555e81be7696dc0fd88621177fb4c3353d7  guix-build-3c3bd9022026/output/powerpc64le-linux-gnu/SHA256SUMS.part
  15c1aad2b67838fbf004cfd4a0926cb2e2f2d0fcee639e5cf17fec9c659be7ad  guix-build-3c3bd9022026/output/powerpc64le-linux-gnu/bitcoin-3c3bd9022026-powerpc64le-linux-gnu-debug.tar.gz
  102ae28c667fee645fb1541395531742b89886e153ed979639532c8cab50d24b  guix-build-3c3bd9022026/output/powerpc64le-linux-gnu/bitcoin-3c3bd9022026-powerpc64le-linux-gnu.tar.gz
  ccff48fd8b5a26d32d2743f430d812a449ad00ee502fc1f02538598ff7def9db  guix-build-3c3bd9022026/output/riscv64-linux-gnu/SHA256SUMS.part
  d038064cfb33dee85833a58ee5a7c40c94041aa0574da9fa14837b0da7a92b3a  guix-build-3c3bd9022026/output/riscv64-linux-gnu/bitcoin-3c3bd9022026-riscv64-linux-gnu-debug.tar.gz
  763a0c5c7492d11370a0208f3110fc73f6bac3526b401d1df3eca5cff1037a36  guix-build-3c3bd9022026/output/riscv64-linux-gnu/bitcoin-3c3bd9022026-riscv64-linux-gnu.tar.gz
  14aad526acfed07e5781efa8febe37f002c5772090aad0cd98cf7f4cf0cc3177  guix-build-3c3bd9022026/output/x86_64-apple-darwin/SHA256SUMS.part
  e75435885e97dec09f3d9c51c0bd5987329a485ef26027d6e7b4cafcec20a9ab  guix-build-3c3bd9022026/output/x86_64-apple-darwin/bitcoin-3c3bd9022026-x86_64-apple-darwin-unsigned.dmg
  742cacbb471968c396da97bbed0332220b721c552b663e931b9bfeb0e4b2f4de  guix-build-3c3bd9022026/output/x86_64-apple-darwin/bitcoin-3c3bd9022026-x86_64-apple-darwin-unsigned.tar.gz
  1d33e0661041f00b4f224f231bbb71bda534ad8ad76a7d2b041084911cdd0814  guix-build-3c3bd9022026/output/x86_64-apple-darwin/bitcoin-3c3bd9022026-x86_64-apple-darwin.tar.gz
  b8fdd26c3aef78d13161f6119d755a853470ced695cb40dcc8ff9f0463a533e1  guix-build-3c3bd9022026/output/x86_64-linux-gnu/SHA256SUMS.part
  48846704f00e92e1cb6898a13e077da5a314314d6aa694b022d0f2aa68b7128b  guix-build-3c3bd9022026/output/x86_64-linux-gnu/bitcoin-3c3bd9022026-x86_64-linux-gnu-debug.tar.gz
  52968c1aea392d19989613b4faf0075702c9aa834f74cd3e7a09883e201ae3e4  guix-build-3c3bd9022026/output/x86_64-linux-gnu/bitcoin-3c3bd9022026-x86_64-linux-gnu.tar.gz
  a4df21e146042c6d78b0724ace37fdb05ce3a4ce8c1ed8274727b031cf53805e  guix-build-3c3bd9022026/output/x86_64-w64-mingw32/SHA256SUMS.part
  68f05fc5cc5e157805280bcb36fdbc6873db9e7b3afb4ddd992786db722530fc  guix-build-3c3bd9022026/output/x86_64-w64-mingw32/bitcoin-3c3bd9022026-win64-debug.zip
  a1de00c9d4315928e3ce93890009fe2ea8f3f1fa7ca63004d952192012131d20  guix-build-3c3bd9022026/output/x86_64-w64-mingw32/bitcoin-3c3bd9022026-win64-setup-unsigned.exe
  82dc001a7f6d2b405b89bd343276db59954f25461d828ddf2e3c42f5ba4fe164  guix-build-3c3bd9022026/output/x86_64-w64-mingw32/bitcoin-3c3bd9022026-win64-unsigned.tar.gz
  b644760f08a6147bccae8761e33fa13dc7f0cf391240521a81e57b437e272baa  guix-build-3c3bd9022026/output/x86_64-w64-mingw32/bitcoin-3c3bd9022026-win64.zip
  ```

ACKs for top commit:
  laanwj:
    Code review ACK 3c3bd90220
  hebasto:
    ACK 3c3bd90220, tested that bitcoin/bitcoin#23655 has been resolved.

Tree-SHA512: abc95ab68d3973c89d421ee7a5b795f6fa802dc665db47529d5f9aee5b92b8a7b55f9a45c634b9be6e917038e67e785f1809cc189c84be13f089f4e7fa1029f9
2022-03-30 11:10:25 +02:00
fanquake
896beca831
Merge bitcoin/bitcoin#24708: ci: Avoid boost test warnings
fa76b2fbe3 ci: Avoid boost test warnings (MarcoFalke)

Pull request description:

  This removes boost test warnings from the CI log.

  For example https://cirrus-ci.com/task/6029158399606784?logs=ci#L4060:

  ```
  Boost.Test WARNING: token "/tmp/cirrus-build/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/test/test_bitcoin-addrman_tests.o" does not correspond to the Boost.Test argument
                      and should be placed after all Boost.Test arguments and the -- separator.
                      For example: test_bitcoin --random -- /tmp/cirrus-build/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/test/test_bitcoin-addrman_tests.o
  Boost.Test WARNING: token "/tmp/cirrus-build/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/test/test_bitcoin-allocator_tests.o" does not correspond to the Boost.Test argument
                      and should be placed after all Boost.Test arguments and the -- separator.
                      For example: test_bitcoin --random -- /tmp/cirrus-build/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/test/test_bitcoin-allocator_tests.o
  Boost.Test WARNING: token "/tmp/cirrus-build/ci/scratch/build/bitcoin-x86_64-pc-linux-gnu/src/test/test_bitcoin-amount_tests.o" does not correspond to the Boost.Test argument
                      and should be placed after all Boost.Test arguments and the -- separator.
  ...

ACKs for top commit:
  fanquake:
    ACK fa76b2fbe3 - checked that tests are also still being run in other jobs.

Tree-SHA512: c00fe1242ee6b9ef92d511f1e86305c1731d8894bb89ec8fcdf30069959831483933a93a6bfd33d9f2d15706bdeedbba29e82c409eed266abfc57aabfdaf4841
2022-03-30 08:54:26 +01:00
Anthony Towns
7c9fe25c16 wallet: move Assert() check into constructor
This puts it in a function body, so that __func__ is available
for reporting any assertion failure.
2022-03-30 17:07:28 +10:00
MarcoFalke
f4fba57829
Merge bitcoin/bitcoin#24704: compat: remove strnlen back-compat code
d4ba2b2cbc compat: remove strnlen back-compat code (fanquake)

Pull request description:

  This was needed for mingw (not mingw-w64), and some older versions of
  macOS, which we no-longer support.

ACKs for top commit:
  hebasto:
    ACK d4ba2b2cbc

Tree-SHA512: d1beb9df58464feea3076091361d7d46e4a8901e347644a5fa6f24e052ca24ee0c7c0dd3f2a3d682b0204bf50430fa89eac62121691ea08af6dcf6b907bdec87
2022-03-30 08:19:09 +02:00
fanquake
f089a0802c
Merge bitcoin/bitcoin#24692: refactoring: [Net Processing] Follow-ups to #21160
a40978dcbd [fuzz] Assert that Peer.m_tx_relay.m_relay_txs has been set correctly (John Newbery)
0bca5f2b46 [net processing] PushNodeVersion() takes a const Peer& (John Newbery)
21154ff927 net_processing: move CNode data access out of lock (John Newbery)

Pull request description:

  #21160 ([net/net processing]: Move tx inventory into net_processing) had some unaddressed review comments when it was merged. This branch addresses those comments.

ACKs for top commit:
  MarcoFalke:
    review ACK a40978dcbd
  dergoegge:
    ACK a40978dcbd
  ajtowns:
    ACK a40978dcbd

Tree-SHA512: 46624e275f918c5f32d0adab0766e9b3ef8ebdbc74a3c8886d8a2e2ff1079029dcc371b40ef0d787609e9c05219b7456f3e2dfe4fb0cb7bf23ef966769aef1a1
2022-03-30 07:13:52 +01:00
willcl-ark
17648493df
doc: Speed up functional test runs using ramdisk
Using a ramdisk for the functional tests can give worthwhile speed-ups
for developers and reviewers.

Add notes to test/README.md on how to setup, use and erase a ramdisk on
Linux.
2022-03-29 22:40:32 +01:00
ishaanam
bb84b7145b
add tests for no recipient and using send_max while inputs are specified 2022-03-29 16:37:49 -04:00
Murch
49090ec402
Add sendall RPC née sweep
_Motivation_
Currently, the wallet uses a fSubtractFeeAmount (SFFO) flag on the
recipients objects for all forms of sending calls. According to the
commit discussion, this flag was chiefly introduced to permit sweeping
without manually calculating the fees of transactions. However, the flag
leads to unintuitive behavior and makes it more complicated to test
many wallet RPCs exhaustively. We proposed to introduce a dedicated
`sendall` RPC with the intention to cover this functionality.

Since the proposal, it was discovered in further discussion that our
proposed `sendall` rpc and SFFO have subtly different scopes of
operation.
• sendall:
  Use _specific UTXOs_ to pay a destination the remainder after fees.
• SFFO:
  Use a _specific budget_ to pay an address the remainder after fees.

While `sendall` will simplify cases of spending from specific UTXOs,
emptying a wallet, or burning dust, we realized that there are some
cases in which SFFO is used to pay other parties from a limited budget,
which can often lead to the creation of change outputs. This cannot be
easily replicated using `sendall` as it would require manual computation
of the appropriate change amount.

As such, sendall cannot replace all uses of SFFO, but it still has a
different use case and will aid in simplifying some wallet calls and
numerous wallet tests.

_Sendall call details_
The proposed sendall call builds a transaction from a specific subset of
the wallet's UTXO pool (by default all of them) and assigns the funds to
one or more receivers. Receivers can either be specified with a specific
amount or receive an equal share of the remaining unassigned funds. At
least one recipient must be provided without assigned amount to collect
the remainder. The `sendall` call will never create change. The call has
a `send_max` option that changes the default behavior of spending all
UTXOs ("no UTXO left behind"), to maximizing the output amount of the
transaction by skipping uneconomic UTXOs. The `send_max` option is
incompatible with providing a specific set of inputs.
2022-03-29 16:37:47 -04:00
Hennadii Stepanov
aeee419c6a
wallet, refactor: Add wallet::NotifyWalletLoaded() function
This change is a prerequisite for the following bugfix.
2022-03-29 22:33:58 +02:00
MarcoFalke
ecf692b466
Merge bitcoin/bitcoin#24540: ci: Integrate ccache into MSVC build
3a53927f03 ci: Integrate ccache into MSVC build (Hennadii Stepanov)

Pull request description:

  [ccache 4.6](https://ccache.dev/releasenotes.html#_ccache_4_6):
  > Added support for caching calls to Microsoft Visual C++ (MSVC)

  Integrated into our native Windows CI task.

  [On master](url) (c109e7d51c):
  ![Screenshot from 2022-03-12 10-17-58](https://user-images.githubusercontent.com/32963518/158012098-7ac9d441-2eb0-481e-bcc5-3700c1ce2b15.png)

  [This PR](https://cirrus-ci.com/task/6572984340054016):
  ![Screenshot from 2022-03-12 10-25-33](https://user-images.githubusercontent.com/32963518/158012361-d6bf88bc-f98d-4771-8b4f-31bf5673d085.png)

  ```
  Summary:
    Hits:             222 /  222 (100.0 %)
      Direct:         222 /  222 (100.0 %)
      Preprocessed:     0 /    0
    Misses:             0
      Direct:           0
      Preprocessed:     0
    Errors:             7
    Uncacheable:        9
  Primary storage:
    Hits:             444 /  444 (100.0 %)
    Misses:             0
    Cache size (GB): 0.04 / 5.00 (0.86 %)

  Use the -v/--verbose option for more details.
  ```

Top commit has no ACKs.

Tree-SHA512: d8cf91d8e75a5187cf456960bdf759f857fb9a9b0c4087e5e46ccbe2202aca5f1b9b38a47ec54d98e885c0f5d78de93a3188fb966fa5b346e81907c211ba1e79
2022-03-29 20:22:48 +02:00
John Newbery
a40978dcbd [fuzz] Assert that Peer.m_tx_relay.m_relay_txs has been set correctly 2022-03-29 15:54:22 +01:00
John Newbery
0bca5f2b46 [net processing] PushNodeVersion() takes a const Peer&
The peer object is not mutated by PushNodeVersion, so pass a const reference
2022-03-29 15:54:16 +01:00
MarcoFalke
fa76b2fbe3
ci: Avoid boost test warnings 2022-03-29 16:05:39 +02:00
laanwj
9e32adbb5c
Merge bitcoin/bitcoin#24523: build: Fix Boost.Process test for Boost 1.78
532c64a726 build: Fix Boost.Process test for Boost 1.78 (Hennadii Stepanov)

Pull request description:

  Rebased #24415 with Luke's suggestion.

  Fixes #24413.

ACKs for top commit:
  hebasto:
    ACK 532c64a726, tested on Mac mini (M1, 2020) + macOS Monterey 12.3 (21E230).

Tree-SHA512: 74f779695f6bbc45a2b7341a1402f747cc0d433d74825c7196cb9f156db0c0299895365f01665bd0bff12a8ebb5ea33a29b9a52f5eac0007ec35d1dca6544705
2022-03-29 13:36:45 +02:00
MarcoFalke
565aac2e6f
Merge bitcoin/bitcoin#24705: ci: note why bdb is disabled in msan jobs
527eeaf580 ci: note why BDB is disabled for MSAN jobs (fanquake)
d6c71b0ccf ci: remove explicit --enable-wallet from msan job (fanquake)

Pull request description:

  Closes #24703.

Top commit has no ACKs.

Tree-SHA512: 231a52a0a1f55ecabf5b4f816dbc9ff4bc349bf3a247939fc75fee95454aff9fde04c9723b620a24e5a7993bd9bad7de5de1b0fd3c6cacc6297b7a64606e3a29
2022-03-29 13:27:40 +02:00
fanquake
527eeaf580
ci: note why BDB is disabled for MSAN jobs 2022-03-29 10:59:43 +01:00
fanquake
d6c71b0ccf
ci: remove explicit --enable-wallet from msan job
This isn't required to enable sqlite wallets, as support is
automatically detected when sqlite is available.
2022-03-29 10:33:57 +01:00
fanquake
d4ba2b2cbc
compat: remove strnlen back-compat code
This was needed for mingw (not mingw-w64), and some older versions of
macOS, which we no-longer support.
2022-03-29 10:15:33 +01:00
fanquake
7c72eabb57
Merge bitcoin/bitcoin#24633: Bugfix: configure: Quote SUPPRESS_WARNINGS sufficiently to preserve brackets
5a157eb370 Bugfix: configure: Only avoid -isystem for exact /usr/include path (Luke Dashjr)
556ee6f2fa Bugfix: configure: Quote SUPPRESS_WARNINGS sufficiently to preserve brackets (Luke Dashjr)

Pull request description:

  The regex includes `[/ ]` which is supposed to match either a forward slash or a space, but m4 treats the brackets as special characters and effectively strips them out, leading to -isystem /usr/include paths except for in the typical scenario where it is the final parameter in the flag string.

ACKs for top commit:
  hebasto:
    ACK 5a157eb370, tested on Ubuntu 22.04 with clang 14.0.
  vasild:
    ACK 5a157eb370

Tree-SHA512: 5c8c282b647b7853b8fad1b5b473703c4a0635073d2685a8ac984151046e2c6a859e6972465419d27356dd29a47f21a2a3a6ad402ec434fe1f9882e5a35f0749
2022-03-29 10:03:53 +01:00