Commit graph

33241 commits

Author SHA1 Message Date
glozow
9bebf35e26 [validation] don't package validate if not policy or missing inputs
Package validation policy only differs from individual policy in its
evaluation of feerate. Minimize DoS surface; don't validate all over
again if we know the result will be the same.
2022-04-05 18:51:37 -04:00
glozow
51edcffa0e [unit test] package feerate and package cpfp 2022-04-05 18:51:37 -04:00
glozow
1b93748c93 [validation] try individual validation before package validation
This avoids "parents pay for children" and "siblings pay for siblings"
behavior, since package feerate is calculated with totals and is
topology-unaware.

It also ensures that package validation never causes us to reject a
transaction that we would have otherwise accepted in single-tx
validation.
2022-04-05 18:51:37 -04:00
glozow
17a8ffd802 [packages/policy] use package feerate in package validation
This allows CPFP within a package prior to submission to mempool.
2022-04-05 18:51:37 -04:00
glozow
09f32cffa6 [docs] package feerate 2022-04-01 14:14:57 -04:00
fanquake
a7f0c37c2b
Merge bitcoin/bitcoin#24722: build: patch around qt duplicate symbol issue
a24ef27cfe build: patch around qt duplicate symbol issue (fanquake)

Pull request description:

  This is currently causing the same failure in two different PRs:

  #24391: build: stop overriding user autoconf flags
  ```bash
  duplicate symbol 'lcQpaFonts()' in:
      /tmp/cirrus-ci-build/depends/x86_64-apple-darwin/lib/libQt5ThemeSupport.a(qgenericunixthemes.o)
      /tmp/cirrus-ci-build/depends/x86_64-apple-darwin/lib/libQt5FontDatabaseSupport.a(qfontengine_coretext.o)
  ld: 1 duplicate symbol for architecture x86_64
  ```

  #21778: build: LLVM 14 & LLD based macOS toolchain
  ```bash
  x86_64-apple-darwin-ld: error: duplicate symbol: __Z10lcQpaFontsv
  >>> defined in /tmp/cirrus-ci-build/depends/x86_64-apple-darwin/lib/libQt5ThemeSupport.a(qgenericunixthemes.o)
  >>> defined in /tmp/cirrus-ci-build/depends/x86_64-apple-darwin/lib/libQt5FontDatabaseSupport.a(qfontengine_coretext.o)
  ```

  Guix Build (x86_64):
  ```bash
  82dd305045fa908d3a5909c8f7827e4ab607281b84706e0722d32e4c1c507cef  guix-build-a24ef27cfe6e/output/aarch64-linux-gnu/SHA256SUMS.part
  dadef04a291a1e371cac7eef0056948180fcad86ba77f9fc7b844b389461bbe1  guix-build-a24ef27cfe6e/output/aarch64-linux-gnu/bitcoin-a24ef27cfe6e-aarch64-linux-gnu-debug.tar.gz
  67842aef90a56be203388a6838b95d6f472d018fdbf399b12b9e0b577e101651  guix-build-a24ef27cfe6e/output/aarch64-linux-gnu/bitcoin-a24ef27cfe6e-aarch64-linux-gnu.tar.gz
  bef26de8cdd47853c1bca34e2cf002a9734394a7a3e027aba1b713738b4a3794  guix-build-a24ef27cfe6e/output/arm-linux-gnueabihf/SHA256SUMS.part
  5198227d1b7801032f358da348bc577a4d99273b0ecca50b83ad1b3d5d2f9d92  guix-build-a24ef27cfe6e/output/arm-linux-gnueabihf/bitcoin-a24ef27cfe6e-arm-linux-gnueabihf-debug.tar.gz
  97656b94a4b8bedd87a8a2d11e032d01f6cb22fa22f26e047deab9fc70886733  guix-build-a24ef27cfe6e/output/arm-linux-gnueabihf/bitcoin-a24ef27cfe6e-arm-linux-gnueabihf.tar.gz
  ea0b7fa4458d36c349d7b56813c75a1957bb904945265bd26f970a5b6f8a1817  guix-build-a24ef27cfe6e/output/arm64-apple-darwin/SHA256SUMS.part
  f7741dc1baf0e59713f42fef8b53e613fef62abbeef9ca5c8187b04b7a81054f  guix-build-a24ef27cfe6e/output/arm64-apple-darwin/bitcoin-a24ef27cfe6e-arm64-apple-darwin-unsigned.dmg
  7d27ebc99af2a35ee21736dc13adf76c5e646a3b5c00cf6a4bf56077b1ce0db4  guix-build-a24ef27cfe6e/output/arm64-apple-darwin/bitcoin-a24ef27cfe6e-arm64-apple-darwin-unsigned.tar.gz
  ae47461a03cff74d8e9e575c52148d1378ed883f41557cdf57f626532adfd60e  guix-build-a24ef27cfe6e/output/arm64-apple-darwin/bitcoin-a24ef27cfe6e-arm64-apple-darwin.tar.gz
  14f55113414fa633e4499cd83ebed9f1f4d9a36e0ab2ec550cbba159d00d1de8  guix-build-a24ef27cfe6e/output/dist-archive/bitcoin-a24ef27cfe6e.tar.gz
  a2834efc9b7ac1545e442f5b527b1a739713b399c3591cfa4ac07d30a858017f  guix-build-a24ef27cfe6e/output/powerpc64-linux-gnu/SHA256SUMS.part
  720120e641fe527dbe1f6979e3ed0222238f79a0cfac067838bc91739aa3f2d9  guix-build-a24ef27cfe6e/output/powerpc64-linux-gnu/bitcoin-a24ef27cfe6e-powerpc64-linux-gnu-debug.tar.gz
  e150946434a4f0b59b7dfdec65d02a2db4290b3e7f5eade1141905ef56b7587b  guix-build-a24ef27cfe6e/output/powerpc64-linux-gnu/bitcoin-a24ef27cfe6e-powerpc64-linux-gnu.tar.gz
  1255c0e22087042f2262acc3f7d043659a9a2cbd0767b65ba355f89bc4589915  guix-build-a24ef27cfe6e/output/powerpc64le-linux-gnu/SHA256SUMS.part
  43152dcfcff13d60c5f6fbfaed328643e6a18d43f1f0935742732080e142e40d  guix-build-a24ef27cfe6e/output/powerpc64le-linux-gnu/bitcoin-a24ef27cfe6e-powerpc64le-linux-gnu-debug.tar.gz
  41ec8e457921ecf4241209015441bcf6ced53e1430f5637aef0ed837de175dfb  guix-build-a24ef27cfe6e/output/powerpc64le-linux-gnu/bitcoin-a24ef27cfe6e-powerpc64le-linux-gnu.tar.gz
  5edeefb9479d14ff8b2f6c40390ae6a8995d42238be56c1edd2c462d065fb1e7  guix-build-a24ef27cfe6e/output/riscv64-linux-gnu/SHA256SUMS.part
  f037d4cc378da0c00b10f2960cb853377b2c0710aba4ed17c8f10ff9e8ab2cd8  guix-build-a24ef27cfe6e/output/riscv64-linux-gnu/bitcoin-a24ef27cfe6e-riscv64-linux-gnu-debug.tar.gz
  793d0f8710e300adb6aff2e289370fb71c60d5d844970161898c359f3dea0f2f  guix-build-a24ef27cfe6e/output/riscv64-linux-gnu/bitcoin-a24ef27cfe6e-riscv64-linux-gnu.tar.gz
  caeed20b8b301abdd32cb82c290ef77b283eb7b9f341254cdcf846f6d85365a9  guix-build-a24ef27cfe6e/output/x86_64-apple-darwin/SHA256SUMS.part
  5f02de0e7149b70b6fe612cc382e27c3e8691a2c8d05730604ea92410843d62c  guix-build-a24ef27cfe6e/output/x86_64-apple-darwin/bitcoin-a24ef27cfe6e-x86_64-apple-darwin-unsigned.dmg
  0f5a5041a12061e4e9f5fcfc803cd2a98636d964845a76713d83575caef5a4f6  guix-build-a24ef27cfe6e/output/x86_64-apple-darwin/bitcoin-a24ef27cfe6e-x86_64-apple-darwin-unsigned.tar.gz
  adc74b896eba9eb6b6ef5da0d909f2d3c529a23b55fff4c8af4465b277b46217  guix-build-a24ef27cfe6e/output/x86_64-apple-darwin/bitcoin-a24ef27cfe6e-x86_64-apple-darwin.tar.gz
  57a56059e4054e5becdbc36a6765f3b209535a78d4fa3f8a932d65e6b12d9c05  guix-build-a24ef27cfe6e/output/x86_64-linux-gnu/SHA256SUMS.part
  5c163f6c9936307b139fcc91e9a129e144c7961b44e11b245b0c9402b6b919a8  guix-build-a24ef27cfe6e/output/x86_64-linux-gnu/bitcoin-a24ef27cfe6e-x86_64-linux-gnu-debug.tar.gz
  7c1f9370fe8e26e3363198f3cd3f1d817662bc944f873138bcff997cda2d3c25  guix-build-a24ef27cfe6e/output/x86_64-linux-gnu/bitcoin-a24ef27cfe6e-x86_64-linux-gnu.tar.gz
  0708072d2c81ed5e7d54bfec350d8737931e13bd9291bdb72925c096be33f186  guix-build-a24ef27cfe6e/output/x86_64-w64-mingw32/SHA256SUMS.part
  0b9b931fb4902a2779a193ca96fee01d1790644a004cd8898e24f008799d1a24  guix-build-a24ef27cfe6e/output/x86_64-w64-mingw32/bitcoin-a24ef27cfe6e-win64-debug.zip
  d19c8cbb2b3359ebf0b66dada69f3a88eb41c0945c0e2b847bc2684f1c3d1985  guix-build-a24ef27cfe6e/output/x86_64-w64-mingw32/bitcoin-a24ef27cfe6e-win64-setup-unsigned.exe
  5797bb51c61b2857c0912e205bc886a29bc537076da00bba4c3e27c479d23c9c  guix-build-a24ef27cfe6e/output/x86_64-w64-mingw32/bitcoin-a24ef27cfe6e-win64-unsigned.tar.gz
  131d9aff0d9c72f1d27cac728b7fdd42f6e961214eec330fc38e1d644869b6f8  guix-build-a24ef27cfe6e/output/x86_64-w64-mingw32/bitcoin-a24ef27cfe6e-win64.zip
  ```

  Guix Build (arm64):
  ```bash
  fef112513bde9d33b071efd0e1c3965b10103c7f8c2c66838b6e2f0556bb62b2  guix-build-a24ef27cfe6e/output/arm-linux-gnueabihf/SHA256SUMS.part
  71b8117e6558fc455235a172b65f882b1d2ee8bcebc456f97ceafaa109c683ee  guix-build-a24ef27cfe6e/output/arm-linux-gnueabihf/bitcoin-a24ef27cfe6e-arm-linux-gnueabihf-debug.tar.gz
  25df44270fc5495967509dd36455ad70179f30b9d2819f6a86a72bbabb7a0396  guix-build-a24ef27cfe6e/output/arm-linux-gnueabihf/bitcoin-a24ef27cfe6e-arm-linux-gnueabihf.tar.gz
  918ce9c69609f4cf07fdb2de699c54db4ad39dc0e79eeb9ea1b7ef7333bc7d5c  guix-build-a24ef27cfe6e/output/arm64-apple-darwin/SHA256SUMS.part
  63a6082ed74497c957309d72e517905ac1071c45527241c8d5d08327af00e3b4  guix-build-a24ef27cfe6e/output/arm64-apple-darwin/bitcoin-a24ef27cfe6e-arm64-apple-darwin-unsigned.dmg
  dce37e97b56c9612f7fed92c58a0f9ba58a7829db2dabcd6fea56935fa4aa7dd  guix-build-a24ef27cfe6e/output/arm64-apple-darwin/bitcoin-a24ef27cfe6e-arm64-apple-darwin-unsigned.tar.gz
  056aaa181c8d6f6ae6cf9e8c1d3d9344c31ed4b73fd41d7fe2b89761d2a8ca7e  guix-build-a24ef27cfe6e/output/arm64-apple-darwin/bitcoin-a24ef27cfe6e-arm64-apple-darwin.tar.gz
  14f55113414fa633e4499cd83ebed9f1f4d9a36e0ab2ec550cbba159d00d1de8  guix-build-a24ef27cfe6e/output/dist-archive/bitcoin-a24ef27cfe6e.tar.gz
  e16e0f4fedf8761f220098c1986c0d53f4f051362ba4ff44d89a350a62f3fd3a  guix-build-a24ef27cfe6e/output/powerpc64-linux-gnu/SHA256SUMS.part
  ae804d7a23bda9dc196200cd9d4caf0bd5d0611597a3e40da1dc2b27dee0effd  guix-build-a24ef27cfe6e/output/powerpc64-linux-gnu/bitcoin-a24ef27cfe6e-powerpc64-linux-gnu-debug.tar.gz
  82b274e6bbca6f5c2b70809b9aee7831dcefe6553011aabef804ca0a531c54d8  guix-build-a24ef27cfe6e/output/powerpc64-linux-gnu/bitcoin-a24ef27cfe6e-powerpc64-linux-gnu.tar.gz
  15031a61fbb3cc9495f274a85241aa4708aef3564a66faaaccfd35fcb51e5f3c  guix-build-a24ef27cfe6e/output/powerpc64le-linux-gnu/SHA256SUMS.part
  302041c21942edb8c0de8aa4af6105338c82ffead5ad57947c0fdd99f1f66ce7  guix-build-a24ef27cfe6e/output/powerpc64le-linux-gnu/bitcoin-a24ef27cfe6e-powerpc64le-linux-gnu-debug.tar.gz
  0f6b18d72109efd249abdae611d57b94a725863a4e8ab91b07b9199d9e5e3e86  guix-build-a24ef27cfe6e/output/powerpc64le-linux-gnu/bitcoin-a24ef27cfe6e-powerpc64le-linux-gnu.tar.gz
  d3e84416a8dd90427d028390357cb9fbf98aabc1e97210afdcb26ff7b7656b93  guix-build-a24ef27cfe6e/output/riscv64-linux-gnu/SHA256SUMS.part
  564e353892b5952889e62f946fe6045f4b348fa66712f7cb06262aca8bd7fbc8  guix-build-a24ef27cfe6e/output/riscv64-linux-gnu/bitcoin-a24ef27cfe6e-riscv64-linux-gnu-debug.tar.gz
  29fc019a6c96be6a6f9190e2661be9b4c4d2da7b530ee8815be145cdfa11902a  guix-build-a24ef27cfe6e/output/riscv64-linux-gnu/bitcoin-a24ef27cfe6e-riscv64-linux-gnu.tar.gz
  3a9e1d03eb6691138f193da68e355638d4db4646b3f674ea1645358cf55a49f2  guix-build-a24ef27cfe6e/output/x86_64-apple-darwin/SHA256SUMS.part
  5f02de0e7149b70b6fe612cc382e27c3e8691a2c8d05730604ea92410843d62c  guix-build-a24ef27cfe6e/output/x86_64-apple-darwin/bitcoin-a24ef27cfe6e-x86_64-apple-darwin-unsigned.dmg
  8923d5f2b08b64fd53796db4ef90a631b8b1c15908971ae334d7ba35437e0f19  guix-build-a24ef27cfe6e/output/x86_64-apple-darwin/bitcoin-a24ef27cfe6e-x86_64-apple-darwin-unsigned.tar.gz
  adc74b896eba9eb6b6ef5da0d909f2d3c529a23b55fff4c8af4465b277b46217  guix-build-a24ef27cfe6e/output/x86_64-apple-darwin/bitcoin-a24ef27cfe6e-x86_64-apple-darwin.tar.gz
  faff9251c2d7cdd4336ab23baa34b9c52083018d5302eb3e7aa807926ef6b2b8  guix-build-a24ef27cfe6e/output/x86_64-linux-gnu/SHA256SUMS.part
  92c72070e2c95aad4ad16434b7eadef7ebdbbaa1de262ad968d4fa8396e801c4  guix-build-a24ef27cfe6e/output/x86_64-linux-gnu/bitcoin-a24ef27cfe6e-x86_64-linux-gnu-debug.tar.gz
  259f6213e0ecb0f4d01d2c106142602e7772c1b09a15ff6cf395d2f9be571787  guix-build-a24ef27cfe6e/output/x86_64-linux-gnu/bitcoin-a24ef27cfe6e-x86_64-linux-gnu.tar.gz
  22cf628aad35d18206a87514a9833acc0af79572ecba847aa59c2b2dec1be799  guix-build-a24ef27cfe6e/output/x86_64-w64-mingw32/SHA256SUMS.part
  29cbe82b770d6db0ab295ff0ac2614584de5fc5cc79dc4f8f8d9918f359795dc  guix-build-a24ef27cfe6e/output/x86_64-w64-mingw32/bitcoin-a24ef27cfe6e-win64-debug.zip
  d19c8cbb2b3359ebf0b66dada69f3a88eb41c0945c0e2b847bc2684f1c3d1985  guix-build-a24ef27cfe6e/output/x86_64-w64-mingw32/bitcoin-a24ef27cfe6e-win64-setup-unsigned.exe
  5797bb51c61b2857c0912e205bc886a29bc537076da00bba4c3e27c479d23c9c  guix-build-a24ef27cfe6e/output/x86_64-w64-mingw32/bitcoin-a24ef27cfe6e-win64-unsigned.tar.gz
  56ac734a7007d5565bee6147bc4219e0750210dae8188b602f12d4243a437fac  guix-build-a24ef27cfe6e/output/x86_64-w64-mingw32/bitcoin-a24ef27cfe6e-win64.zip
  ```

ACKs for top commit:
  hebasto:
    ACK a24ef27cfe

Tree-SHA512: d835d3f2f8fc6ed2b855717068c88574b3d6d01d7db04214e554fe101280f8196708f8e792e62e8713ff4774a4a91399ca2cf4c27f3ea3c7605e9224f5722086
2022-04-01 14:40:05 +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
fanquake
a24ef27cfe
build: patch around qt duplicate symbol issue
This is currently causing the same failure in two different PRs:
```bash
duplicate symbol 'lcQpaFonts()' in:
    /tmp/cirrus-ci-build/depends/x86_64-apple-darwin/lib/libQt5ThemeSupport.a(qgenericunixthemes.o)
    /tmp/cirrus-ci-build/depends/x86_64-apple-darwin/lib/libQt5FontDatabaseSupport.a(qfontengine_coretext.o)
ld: 1 duplicate symbol for architecture x86_64
```

```bash
x86_64-apple-darwin-ld: error: duplicate symbol: __Z10lcQpaFontsv
>>> defined in /tmp/cirrus-ci-build/depends/x86_64-apple-darwin/lib/libQt5ThemeSupport.a(qgenericunixthemes.o)
>>> defined in /tmp/cirrus-ci-build/depends/x86_64-apple-darwin/lib/libQt5FontDatabaseSupport.a(qfontengine_coretext.o)
```

Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
2022-03-31 21:23:38 +01: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