Commit Graph

36096 Commits

Author SHA1 Message Date
Sebastian Falbesoner
c3b1fe59db rpc: doc: add missing option "bech32m" for change_type parameters
Affects the help of the `fundrawtransaction`, `send` and
`walletcratefundedpsbt` RPCs.
2022-11-03 19:05:21 +01:00
Sjors Provoost
10660c0c60
doc: move Guix uninstall instructions to INSTALL.md
Also drop unused links.
2022-11-03 14:20:44 +01:00
MacroFake
28653a596a
Merge bitcoin/bitcoin#26445: .python-version: bump patch version to 3.6.15
29fa38a41a .python-version: bump patch version to 3.6.15 (Sjors Provoost)

Pull request description:

  I'm unable to build Python 3.6.12 using PyEnv on macOS 13.0 as well as Ubuntu 22.10. Bumping the patch version fixes that issue on both systems.

  A workaround is to add `.python-version` to your local git excludes and then do `pyenv local 3.6.15`, but this won't persist when you switch branches. Another workaround is to disable `pyenv`, but then you're potentially not running the test suite against the oldest supported Python version.

ACKs for top commit:
  MarcoFalke:
    concept ACK 29fa38a41a

Tree-SHA512: 60ecf76c957456fe4ece9e92c30866b27aba32d5bdb1696495281c2f7ef7a1fc30226e8992d55bf6f45e430b7588e05fbe49de7138aefab5597dd52bd4f021c0
2022-11-03 13:30:13 +01:00
Sjors Provoost
68fab72a8c
guix: OpenSSL test failure workaround
Co-Authored-By: Stephan Oeste <emzy@emzy.de>
2022-11-03 12:52:13 +01:00
Sjors Provoost
d612dca852
guix: reminder to migrate guix-daemon-original customization 2022-11-03 12:52:12 +01:00
Sjors Provoost
8aa460cd02
guix: add guile-gnutls and guile-json to install list
They are mentioned in the figure above, but having them in the table makes it easier to (apt) install everything required.
2022-11-03 12:52:12 +01:00
Sjors Provoost
9b9991e026
guix: recommend mounting a tmpfs on /tmp
This was already suggested in the troubleshooting section, but recommending it upfront would prevent the issue in the first place and speed up builds.
2022-11-03 12:52:12 +01:00
Hennadii Stepanov
29ef26ae25
build: Drop unneeded linking of contrib/devtools/ scripts
Th build system targets run those scripts from the top source directory.
2022-11-03 11:48:29 +00:00
Hennadii Stepanov
77779c3717
script: Improve test-{security,symbol}-check.py robustness
This change allows to use the `test-{security,symbol}-check.py` scripts
when building out of source tree with no need to link scripts into the
build directory.
2022-11-03 11:26:00 +00:00
fanquake
2a7c9984db
Merge bitcoin/bitcoin#25248: refactor: Add LIFETIMEBOUND / -Wdangling-gsl to Assert()
fa3ea81c3e refactor: Add LIFETIMEBOUND / -Wdangling-gsl to Assert() (MacroFake)

Pull request description:

  Currently compiles clean, but I think it may still be useful.

  Can be tested by adding an `&`:

  ```diff
  diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp
  index 5766fff92d..300c1ec60f 100644
  --- a/src/test/util_tests.cpp
  +++ b/src/test/util_tests.cpp
  @@ -125,7 +125,7 @@ BOOST_AUTO_TEST_CASE(util_check)

       // Check -Wdangling-gsl does not trigger when copying the int. (It would
       // trigger on "const int&")
  -    const int nine{*Assert(std::optional<int>{9})};
  +    const int& nine{*Assert(std::optional<int>{9})};
       BOOST_CHECK_EQUAL(9, nine);
   }

  ```

  Output:
  ```
  test/util_tests.cpp:128:29: warning: object backing the pointer will be destroyed at the end of the full-expression [-Wdangling-gsl]
      const int& nine{*Assert(std::optional<int>{9})};
                              ^~~~~~~~~~~~~~~~~~~~~
  ./util/check.h:75:50: note: expanded from macro 'Assert'
  #define Assert(val) inline_assertion_check<true>(val, __FILE__, __LINE__, __func__, #val)
                                                   ^~~
  1 warning generated.

ACKs for top commit:
  jonatack:
    ACK fa3ea81c3e
  theuni:
    ACK fa3ea81c3e

Tree-SHA512: 17dea4d75f2ee2bf6e1b6a6f6d8f439711c777df0390574e8d8edb6ac9ee807a135341e4439050bd6a15ecc4097a1ba9a7ab15d27541ebf70a4e081fa6871877
2022-11-03 10:29:05 +00:00
Sjors Provoost
29fa38a41a
.python-version: bump patch version to 3.6.15 2022-11-03 09:26:27 +01:00
MacroFake
5274f32437
Merge bitcoin/bitcoin#26417: test: fix intermittent failure in feature_index_prune.py
201b9a02fd test: fix intermittent failure in feature_index_prune.py (Martin Zumsande)

Pull request description:

  I can't reproduce the error from #26630 locally, but from analying the logs I think the problem is the following:

  After calling `sync_blocks`, we didn't check that the indexes have caught up to the tip before performing the manual pruning. This could possibly lead to prune blockers with a lower height than the expected 2489, which do appear in the logs of the failed CI runs, e.g.
   - `2022-10-27T21:14:17.703920Z [C:\Users\ContainerAdministrator\AppData\Local\Temp\cirrus-ci-build\src\validation.cpp:2395] [FlushStateToDisk] [prune] coinstatsindex limited pruning to height 2488` ([Cirrus](https://cirrus-ci.com/task/5443742333665280?logs=functional_tests#L2506))

  So, this should be fixed by a call to `sync_index`.
  Fixes #26330

ACKs for top commit:
  brunoerg:
    crACK 201b9a02fd

Tree-SHA512: fb7023c9eb2ba6d0e69e059a401453cbdf63abc6804543dffcf36ba9f93c9cd13209e57aa5536d94b2e420c9d4cd0b1a7eff1adadd19aa7b3c33f592502e1bc0
2022-11-02 15:00:40 +01:00
MacroFake
39f026b1ec
Merge bitcoin/bitcoin#26396: net: Avoid SetTxRelay for feeler connections
fa24239a1c net: Avoid SetTxRelay for feeler connections (MacroFake)

Pull request description:

  Seems odd to reserve memory for the struct (the heaviest member being `m_tx_inventory_known_filter`) when it is never used.

  This also avoids sending out `msg_sendtxrcncl` before disconnecting. This shouldn't matter, as other messages, such as `msg_wtxidrelay`, `msg_sendaddrv2`, `msg_verack` or `msg_getaddr` are still sent. Though, it allows to test the changes here as a side-effect.

ACKs for top commit:
  naumenkogs:
    ACK fa24239a1c
  vasild:
    ACK fa24239a1c
  jonatack:
    ACK fa24239a1c
  mzumsande:
    ACK fa24239a1c

Tree-SHA512: d7604c7eb4df8f2de811e600bdd312440ee03e508d3a0f09ae79f7f2d3eeec663bfd47a2d079fa50b756d61e35dfa998de068a7b9afaf35378fa0e62a538263d
2022-11-02 08:07:28 +01:00
Sebastian Falbesoner
303fb8ff45 doc: mention BIP86 in doc/bips.md 2022-11-01 20:50:51 +01:00
MacroFake
bf0cb43990
Merge bitcoin/bitcoin#26437: test: remove unused CHANGE_{XPRV,XPUB} constants
f1ee974e8e test: remove unused `CHANGE_{XPRV,XPUB}` constants (Sebastian Falbesoner)

Pull request description:

  These constants exist since the introduction of the functional test wallet_taproot.py (2667366aaa), but they have never been used.

ACKs for top commit:
  instagibbs:
    ACK f1ee974e8e
  brunoerg:
    ACK f1ee974e8e

Tree-SHA512: 2c6f8cd537c35af59c4cbe6abb07386b7fb9e4662c7bed27ad8935e004f9bf452705fb1caef4f5ea1f4ad509745afba966005f95a18cf2b59e00b7739a5df7f8
2022-11-01 16:26:09 +01:00
Sebastian Falbesoner
f1ee974e8e test: remove unused CHANGE_{XPRV,XPUB} constants
These constants exist since the introduction of the functional test
wallet_taproot.py (2667366aaa), but they
have never been used.
2022-11-01 13:57:11 +01:00
fanquake
5668ccec1d
Merge bitcoin/bitcoin#25548: gui: Check for readlink buffer overflow and handle gracefully
e049fd76f0 Bugfix: Check for readlink buffer overflow and handle gracefully (Luke Dashjr)

Pull request description:

  If readlink returns the size of the buffer, an overflow may have (safely) occurred.
  Pass a buffer size of MAX_PATH+1 (the size of the actual buffer) to detect this scenario.

ACKs for top commit:
  hebasto:
    ACK e049fd76f0.

Tree-SHA512: 188bace79cbe556efe7782e46b870c02729b07b104a9316b0f7d50013504972e85baf507403d2d6060bb2bf3e13f40d735bddd18255d97a60810208c3de87691
2022-11-01 11:09:17 +00:00
fanquake
b89530483d
util: move threadinterrupt into util 2022-11-01 10:14:49 +00:00
fanquake
c041d8f2c9
Merge bitcoin/bitcoin#26360: build: remove threadinterrupt from libbitcoinkernel
afbcd227dd build: remove threadinterrupt from libbitcoinkernel (fanquake)

Pull request description:

  Extracted from #26292.

ACKs for top commit:
  hebasto:
    ACK afbcd227dd, tested on Ubuntu 22.04.
  ryanofsky:
    Code review ACK afbcd227dd

Tree-SHA512: 9d355f0e417561be41cdd0674a8f94c9ffe3ecfb4063bb9c90f1032cb9d471be11d4fa26de40993e3a411e015272201551fbbb3d3c2b43e4c17bf49386a2741c
2022-11-01 10:12:43 +00:00
fanquake
27e76afe24
Merge bitcoin/bitcoin#26294: build: move util/url to common/url
3a0b352c63 refactor: move url.h/cpp from lib util to lib common (fanquake)
058eb69ce4 build: add missing event cflags to libbitcoin_util (fanquake)

Pull request description:

  Move `util/url` to `common/url`.

  Also add missing `event_*` flags to `libbitcoin_util`. #26293 + the commit dropping boost cppflags from `libbitcoin_util` shows this issue. i.e:
  ```bash
    CXX      util/libbitcoin_util_a-url.o
  util/url.cpp:7:10: fatal error: 'event2/http.h' file not found
  #include <event2/http.h>
           ^~~~~~~~~~~~~~~
  1 error generated.
  ```

ACKs for top commit:
  hebasto:
    ACK 3a0b352c63
  ryanofsky:
    Code review ACK 3a0b352c63

Tree-SHA512: 600a76fd334267a02d332df9b67891a38d3fd7f5baf8a82b2447879b3bc65eab2552d2c081c0a5f1ec927bf80df7fc1f0cbbdda4cb76994b46dadf260b8e1cb3
2022-11-01 10:05:49 +00:00
fanquake
d08b63baa0
Merge bitcoin/bitcoin#26373: Update minisketch subtree to latest upstream
e9f1d8c272 Squashed 'src/minisketch/' changes from 47f0a2d26f..a571ba20f9 (Hennadii Stepanov)

Pull request description:

  Contains:
  - https://github.com/sipa/minisketch/pull/68
  - https://github.com/sipa/minisketch/pull/69
  - https://github.com/sipa/minisketch/pull/70
  - https://github.com/sipa/minisketch/pull/72

  Fixes bitcoin/bitcoin#26262.

  Required for bitcoin/bitcoin#25797.

  Guix builds on `arm64`:
  ```
  28af3bdd17924bb5279934add1fe34f5664181a1c99f33793725adc35f90d778  guix-build-45a0f4e01448/output/aarch64-linux-gnu/SHA256SUMS.part
  c9cdcb107de5b683221b0e2a3796814548414cdba27be198516a2b401ada90c3  guix-build-45a0f4e01448/output/aarch64-linux-gnu/bitcoin-45a0f4e01448-aarch64-linux-gnu-debug.tar.gz
  ce1e916cc7574f555c04ed5fa9e9a47a1e4d2d9d1cb82a040269e8c32aca9194  guix-build-45a0f4e01448/output/aarch64-linux-gnu/bitcoin-45a0f4e01448-aarch64-linux-gnu.tar.gz
  26404d3479108bcb8ede4ae7f3d37dbb64a335f0cd5bce7ee901d171a1ef2b0b  guix-build-45a0f4e01448/output/arm-linux-gnueabihf/SHA256SUMS.part
  0fe32aee5836baed86ad25cbddb43c5a9d2ecbbe5cc954f3a76670aa52ff3c6f  guix-build-45a0f4e01448/output/arm-linux-gnueabihf/bitcoin-45a0f4e01448-arm-linux-gnueabihf-debug.tar.gz
  41f312cbf26a0e51e6867e644beb3d085ebd4221dc83ea84a97b708e6d230b6d  guix-build-45a0f4e01448/output/arm-linux-gnueabihf/bitcoin-45a0f4e01448-arm-linux-gnueabihf.tar.gz
  c05ba8235e05c171ecdbacba87dfc1db34d1971286b853c26e3de52a6b0ea1cc  guix-build-45a0f4e01448/output/arm64-apple-darwin/SHA256SUMS.part
  9d1dae2b73573d34950684269c41f2504761f2df19f24033513f6664b70b1aad  guix-build-45a0f4e01448/output/arm64-apple-darwin/bitcoin-45a0f4e01448-arm64-apple-darwin-unsigned.dmg
  1ff742346bd04b7edf27e096286f4863fcfec984b99caf265a64fe72b298b36a  guix-build-45a0f4e01448/output/arm64-apple-darwin/bitcoin-45a0f4e01448-arm64-apple-darwin-unsigned.tar.gz
  74a001f16ba382c22acb9979ee5d905af42f4ca3613fc6e8fa66fec994fb0850  guix-build-45a0f4e01448/output/arm64-apple-darwin/bitcoin-45a0f4e01448-arm64-apple-darwin.tar.gz
  ec2f70a0b8a128d3ca69307150714c400620199b506a411b0a4c0a506cc3ed66  guix-build-45a0f4e01448/output/dist-archive/bitcoin-45a0f4e01448.tar.gz
  9a67ea74e1b5ef3d08b6a59217ecf8d193234c76f81157192fabe7a9b679af0c  guix-build-45a0f4e01448/output/powerpc64-linux-gnu/SHA256SUMS.part
  95b458427d73ed81f4a4f85be0dfe81a9a48dc254be65ef158de93d32f07a17a  guix-build-45a0f4e01448/output/powerpc64-linux-gnu/bitcoin-45a0f4e01448-powerpc64-linux-gnu-debug.tar.gz
  2b269c630f069cc42da5f361d13f5b684fbacb49641f44ed6687379a1e9281b0  guix-build-45a0f4e01448/output/powerpc64-linux-gnu/bitcoin-45a0f4e01448-powerpc64-linux-gnu.tar.gz
  33d576b9be022108db6d76c41c1f72c865b5bb38439c6da1cbceac757a1be47f  guix-build-45a0f4e01448/output/powerpc64le-linux-gnu/SHA256SUMS.part
  053dc9cecc978601701459109eec82f3bcce4042d794c520fd4bd8cd4e17eff3  guix-build-45a0f4e01448/output/powerpc64le-linux-gnu/bitcoin-45a0f4e01448-powerpc64le-linux-gnu-debug.tar.gz
  32946d589103c763c2fc67c0d8fa13a38b9194df76cd31755a761a7b9ad856a6  guix-build-45a0f4e01448/output/powerpc64le-linux-gnu/bitcoin-45a0f4e01448-powerpc64le-linux-gnu.tar.gz
  7d1be372c84f9403333462e82d7800dfb1812b14c1ed228dacf605dff9aab75c  guix-build-45a0f4e01448/output/riscv64-linux-gnu/SHA256SUMS.part
  3338bcaf6b8ffd9c155c055a0a18d039e1173212e128561fdea493c263d6ecb9  guix-build-45a0f4e01448/output/riscv64-linux-gnu/bitcoin-45a0f4e01448-riscv64-linux-gnu-debug.tar.gz
  7735eefa84630d16d8d37ea23c734578c6fb6540d4359b78d0d1508887e76042  guix-build-45a0f4e01448/output/riscv64-linux-gnu/bitcoin-45a0f4e01448-riscv64-linux-gnu.tar.gz
  c3a96d6758631b8e8b4f5bb8035e5442e1fc5b831c7a0ddedb26473b025b2503  guix-build-45a0f4e01448/output/x86_64-apple-darwin/SHA256SUMS.part
  b6c87738e6e561bfc4052464e93a6d03a87c51e8f27e4df8ae7458c9828e28cb  guix-build-45a0f4e01448/output/x86_64-apple-darwin/bitcoin-45a0f4e01448-x86_64-apple-darwin-unsigned.dmg
  0c16f9435c3d572970400ff4683705b297eda3dd37a682619371771da8efbb24  guix-build-45a0f4e01448/output/x86_64-apple-darwin/bitcoin-45a0f4e01448-x86_64-apple-darwin-unsigned.tar.gz
  22e06590afe07b992f6f4e46d5568499403937606d16540b121f23e133270560  guix-build-45a0f4e01448/output/x86_64-apple-darwin/bitcoin-45a0f4e01448-x86_64-apple-darwin.tar.gz
  56ddb44760f71fd1c1ea06c7174bf035b8b73c32569d69a1401d130551db43e5  guix-build-45a0f4e01448/output/x86_64-linux-gnu/SHA256SUMS.part
  1c8a27fab5d9d0f3a5449f04ae8a7e693c5f144948f6d0c2dbf397e04ce9ebfa  guix-build-45a0f4e01448/output/x86_64-linux-gnu/bitcoin-45a0f4e01448-x86_64-linux-gnu-debug.tar.gz
  66aca3767407f6c2e77b8b93edc58e71c00bed518a75362e3c2f5009739c666c  guix-build-45a0f4e01448/output/x86_64-linux-gnu/bitcoin-45a0f4e01448-x86_64-linux-gnu.tar.gz
  7ac04c1d5f2dbb6c2c392add9c4e2c5c838c718910b920fe6691a5e9881065b9  guix-build-45a0f4e01448/output/x86_64-w64-mingw32/SHA256SUMS.part
  2c51afbcf5645516d01d5f730e9883d9ed3cb90b9b9baf90792ecdb2b3eb21cf  guix-build-45a0f4e01448/output/x86_64-w64-mingw32/bitcoin-45a0f4e01448-win64-debug.zip
  81738a0690e954d6850f210fa3933ca5de8800078734f8b0810b5e7fe3e63e5d  guix-build-45a0f4e01448/output/x86_64-w64-mingw32/bitcoin-45a0f4e01448-win64-setup-unsigned.exe
  ecade9ee23ad156e057d466afe79943f008de316973738efdf5ae33d2a527631  guix-build-45a0f4e01448/output/x86_64-w64-mingw32/bitcoin-45a0f4e01448-win64-unsigned.tar.gz
  3b17762d01825a3f7d5aecf34cf038938d9ee467e63ea3f34efd1dfa2af5e284  guix-build-45a0f4e01448/output/x86_64-w64-mingw32/bitcoin-45a0f4e01448-win64.zip
  ```

ACKs for top commit:
  fanquake:
    ACK 45a0f4e014

Tree-SHA512: e48d79aa0e3563aeae981ddf1281420fff9b739af43e3d77f13cace158724ff01a7622762aadfd093dcd18822a2c1b76d1c548ae64faf727ba93044887b560fb
2022-11-01 08:29:57 +00:00
fanquake
43e813cab2
Merge bitcoin/bitcoin#26387: p2p: TryLowWorkHeadersSync follow-ups
784b023191 [net processing] Simplify use of IsContinuationOfLowWorkHeadersSync in TryLowWorkHeaderSync (dergoegge)
e891aabf5a [net processing] Fixup TryLowWorkHeadersSync comment (dergoegge)

Pull request description:

  See https://github.com/bitcoin/bitcoin/pull/26355#discussion_r1003561481 and https://github.com/bitcoin/bitcoin/pull/26355#discussion_r1004554187

ACKs for top commit:
  hernanmarino:
    ACK 784b023191
  brunoerg:
    crACK 784b023191
  mzumsande:
    ACK 784b023191

Tree-SHA512: b47ac0d78a09ca3a1806e38c5d2e2fcf1e5f0668f202450b5079c5cb168e168ac6828c0948d23f3610696375134986d75ef3c6098858173023bcb743aec8004c
2022-10-31 15:35:21 +00:00
fanquake
4766cd1981
Merge bitcoin/bitcoin#24051: Bugfix: configure: bitcoin-{cli,tx,util} don't need UPnP, NAT-PMP, or ZMQ
98868633d1 Bugfix: configure: bitcoin-{cli,tx,util} don't need UPnP, NAT-PMP, or ZMQ (Luke Dashjr)

Pull request description:

  As with #23345, these other tools likewise don't use various deps.

ACKs for top commit:
  achow101:
    ACK 98868633d1

Tree-SHA512: 4be056b8e0c9f69834229aa257187457de1bc34214d320b770834e21ecc1f0ca7aa7b9689fba525928947bfabbb461528795f709014fb9618b82f088fe64f271
2022-10-31 11:51:15 +00:00
MacroFake
2856dee808
Merge bitcoin/bitcoin#26402: doc: Fix typos
180eac0f73 Fix: typos (omahs)

Pull request description:

  Fix: typos

ACKs for top commit:
  aureleoules:
    ACK 180eac0f73

Tree-SHA512: 23150f3408a2eb9cb298c6add16d1bcb149da277238786f053c2896c803f896b07555b3dc71e15cd8d390023800c8e006f931f415f887bab69ee5bd4b0420581
2022-10-31 11:46:43 +01:00
fanquake
3a0b352c63
refactor: move url.h/cpp from lib util to lib common 2022-10-31 10:17:04 +00:00
fanquake
058eb69ce4
build: add missing event cflags to libbitcoin_util
The fact that this is missing is currently masked by the inclusion of
BOOST_CPPFLAGS.
2022-10-31 10:10:53 +00:00
MacroFake
c75c0d8e11
Merge bitcoin/bitcoin#26424: doc: correct deriveaddresses RPC name
0f38524c31 doc: correct deriveaddresses RPC name (Bitcoin Hodler)

Pull request description:

  There never was a `deriveaddress` RPC, from what I can tell. It was always called `deriveaddresses` (plural).

ACKs for top commit:
  theStack:
    ACK 0f38524c31
  Zero-1729:
    ACK 0f38524c31

Tree-SHA512: 3f405f5479a0d39cf150fd80b4d854ffe4eef718a358202c619e34a08d98c1252b82fc70d106cdf2215dc5a50c6f6cd5e26fe7ed87156f6b08f8e97d963affb7
2022-10-31 08:42:50 +01:00
Bitcoin Hodler
0f38524c31
doc: correct deriveaddresses RPC name 2022-10-30 18:11:45 +00:00
Douglas Chimento
f86697163e
rpc: Return fee and prevout(s) to getrawtransaction
* Add optional fee response in BTC to getrawtransaction
* Add optional prevout(s) response to getrawtransaction showing utxos being spent
* Add getrawtransaction_verbosity functional test to validate fields
2022-10-30 14:06:15 +02:00
furszy
fa84df1f03
scripted-diff: wallet: rename AvailableCoinsParams members to snake_case
-BEGIN VERIFY SCRIPT-

sed -i 's/nMinimumAmount/min_amount/g' $(git grep -l nMinimumAmount)
sed -i 's/nMaximumAmount/max_amount/g' $(git grep -l nMaximumAmount)
sed -i 's/nMinimumSumAmount/min_sum_amount/g' $(git grep -l nMinimumSumAmount)
sed -i 's/nMaximumCount/max_count/g' $(git grep -l nMaximumCount)

-END VERIFY SCRIPT-
2022-10-29 08:51:34 -03:00
furszy
61c2265629
wallet: group AvailableCoins filtering parameters in a single struct
Plus clean callers that use the params default values
2022-10-29 08:50:38 -03:00
furszy
f0f6a3577b
RPC: listunspent, add "include immature coinbase" flag
so we can return the immature coinbase UTXOs as well.
2022-10-29 08:45:12 -03:00
MacroFake
4f270d2b63
Merge bitcoin/bitcoin#26404: test: fix intermittent failure in rpc_getblockfrompeer.py
8a9f1e4d18 test: fix intermittent failure in rpc_getblockfrompeer.py (Martin Zumsande)

Pull request description:

  Fixes an intermittent failure in `rpc_getblockfrompeer.py` observed in https://cirrus-ci.com/task/6610115527704576 by adding a sync to make sure the node has processed the header we sent it before we query it for the corresponding block.

  Fixes #26412

ACKs for top commit:
  jonatack:
    ACK 8a9f1e4d18

Tree-SHA512: f6188ab3cfd863034e44e9806d0d99a8781462bec94141501aefc71589153481ffb144e126326ab81807c2b2c93de7f4aac5d09dbcf26c4512a176e06fc6e5f8
2022-10-29 11:14:10 +02:00
MacroFake
984a01589b
Merge bitcoin/bitcoin#26408: test: Remove spam from debug log
ef97b89902 Exclude rand from debug log (Jeff Ruane)

Pull request description:

  Currently, `debug.log` is spammed with messages like this from `random.cpp` when functional tests are run.

  ```
  2022-10-25T19:24:34.787663Z [scheduler] [random.cpp:519] [SeedPeriodic] [rand] Feeding 36565 bytes of dynamic environment data into RNG
  ```

  These logs are not useful for debugging and decrease the signal-to-noise ratio of the logs, so they should be suppressed by excluding the `rand` category, as the `libevent` and `leveldb` categories currently are.

ACKs for top commit:
  LarryRuane:
    ACK ef97b89902
  kouloumos:
     ACK ef97b89902, confirmed that this log level is only used in `random.cpp` and indeed it seems that it doesn't add any value to the debug.log during functional tests.
  satsie:
    ACK ef97b89902
  theStack:
    ACK ef97b89902

Tree-SHA512: 5cea384a3197f0ec77efa9efc77822914450ecf5546606568bbd432c3536040c772c57aef58d3bb083a2e5e756f690766fa1fb382ab1973748db238108a58746
2022-10-29 09:59:23 +02:00
Andrew Chow
0de30ed509 tests: Test Taproot PSBT signing with keys in other descriptor
Test that the same keys included in other descriptors will still be able
to sign a PSBT that requires those keys.
2022-10-28 20:03:22 -04:00
Andrew Chow
6efcdf6b7f tests: Use new wallets for each test in wallet_taproot.py
To avoid a wallet potentially being able to sign a transaction using
keys from descriptors imported in previous tests, make new wallets for
each test case rather than sharing them.
2022-10-28 20:03:22 -04:00
Andrew Chow
8781a1b6bb psbt: Include output pubkey in additional pubkeys to sign
In addition to the pubkeys in hd_keypaths and tap_bip32_keypaths, also
see if the descriptor can produce a SigningProvider for the output
pubkey.

Also slightly refactors this area to reduce code duplication.
2022-10-28 20:03:22 -04:00
Andrew Chow
323890d0d7 sign: Fill in taproot pubkey info for all script path sigs
Taproot pubkey info was not being added for multi_a signing. The filling
of this info is moved into the common function CreateTaprootScriptSig so
that any signing of taproot scripts will include the pubkey info.
2022-10-28 20:03:22 -04:00
Andrew Chow
8b050762b1
Merge bitcoin/bitcoin#26409: refactor: Silence GCC Wmissing-field-initializers in ChainstateManagerOpts
fa29ef00ad refactor: Silence GCC Wmissing-field-initializers in ChainstateManagerOpts (MacroFake)

Pull request description:

  The `std::optional` fields in the struct that fall back to chain param defaults if not provided should be initialized to `std::nullopt`. This already happens with the current code.

  However, for consistency with `check_block_index` and to silence a GCC warning, add the "missing" `{}`.

ACKs for top commit:
  achow101:
    ACK fa29ef00ad
  hebasto:
    ACK fa29ef00ad, tested on Ubuntu 22.04 + GCC 11.3.
  jonatack:
    ACK fa29ef00ad

Tree-SHA512: bdec9c56df5d601a5616e107fed48737b13b0a7242b6526092fb682b5016544a4bc08666b60304c668d44c6f7ac69d3788093d921382c1d6c577c1f9fe31fc50
2022-10-28 15:37:17 -04:00
Martin Zumsande
201b9a02fd test: fix intermittent failure in feature_index_prune.py
After syncing the blocks, we didn't check that the
indexes have caught up to the tip before manually pruning.
This could lead to prune blockers lower thatn the expected height.
2022-10-28 15:25:12 -04:00
Martin Zumsande
8a9f1e4d18 test: fix intermittent failure in rpc_getblockfrompeer.py
by adding a sync to make sure the node has received the
header before we query it for the block
2022-10-28 10:17:50 -04:00
kouloumos
0b78110f73 test: Move tx creation to create_self_transfer_multi 2022-10-28 16:19:55 +03:00
MacroFake
1bad29fe02
Merge bitcoin/bitcoin#26377: test: Make system_tests/run_command test locale and platform agnostic
884304e6c6 test: Make `system_tests/run_command` locale agnostic (Hennadii Stepanov)

Pull request description:

  Fixes bitcoin/bitcoin#26368.

ACKs for top commit:
  Sjors:
    tACK 884304e6c6

Tree-SHA512: 76d4941e02b3b119dcf4dacbe60ef45a9dc8cf775bdb31b5291cd8147665285d41caaf1f5688abdfc9a47c393ddb535af7b11af839660d30ef30f1ca0d936133
2022-10-28 11:32:13 +02:00
MacroFake
fa29ef00ad
refactor: Silence GCC Wmissing-field-initializers in ChainstateManagerOpts 2022-10-28 11:08:20 +02:00
omahs
180eac0f73 Fix: typos
Fix: typos

Fix: typos

Fix: typos
2022-10-28 09:39:36 +02:00
Jeff Ruane
ef97b89902
Exclude rand from debug log
Currently, debug.log is spammed with messages from random.cpp
when functional tests are run. These logs are not useful for
debugging, and decrease the signal to noise ratio of the logs.
2022-10-28 01:15:41 -06:00
Andrew Chow
f37bd15d47
Merge bitcoin/bitcoin#25685: wallet: Faster transaction creation by removing pre-set-inputs fetching responsibility from Coin Selection
3fcb545ab2 bench: benchmark transaction creation process (furszy)
a8a75346d7 wallet: SelectCoins, return early if target is covered by preset-inputs (furszy)
f41712a734 wallet: simplify preset inputs selection target check (furszy)
5baedc3351 wallet: remove fetch pre-selected-inputs responsibility from SelectCoins (furszy)
295852f619 wallet: encapsulate pre-selected-inputs lookup into its own function (furszy)
37e7887cb4 wallet: skip manually selected coins from 'AvailableCoins' result (furszy)
94c0766b0c wallet: skip available coins fetch if "other inputs" are disallowed (furszy)

Pull request description:

  #### # Context (Current Flow on Master)

  In the transaction creation process, in order to select which coins the new transaction will spend,
  we first obtain all the available coins known by the wallet, which means walking-through the
  wallet txes map, gathering the ones that fulfill certain spendability requirements in a vector.

  This coins vector is then provided to the Coin Selection process, which first checks if the user
  has manually selected any input (which could be internal, aka known by the wallet, or external),
  and if it does, it fetches them by searching each of them inside the wallet and/or inside the
  Coin Control external tx data.

  Then, after finding the pre-selected-inputs and gathering them in a vector, the Coin Selection
  process walks-through the entire available coins vector once more just to erase coins that are
  in both vectors. So the Coin Selection process doesn’t pick them twice (duplicate inputs inside
  the same transaction).

  #### # Process Workflow Changes

  Now, a new method, `FetchCoins` will be responsible for:
  1) Lookup the user pre-selected-inputs (which can be internal or external).
  2) And, fetch the available coins in the wallet (excluding the already fetched ones).

  Which will occur prior to the Coin Selection process. Which allows us to never include the
  pre-selected-inputs inside the available coins vector in the first place, as well as doing other
  nice improvements (written below).

  So, Coin Selection can perform its main responsibility without mixing it with having to fetch
  internal/external coins nor any slow and unneeded duplicate coins verification.

  #### # Summarizing the Improvements:

  1) If any pre-selected-input lookup fail, the process will return the error right away.
      (before, the wallet was fetching all the wallet available coins, walking through the
      entire txes map, and then failing for an invalid pre-selected-input inside SelectCoins)

  2) The pre-selected-inputs lookup failure causes are properly described on the return error.
      (before, we were returning an "Insufficient Funds" error for everything, even if the failure
      was due a not solvable external input)

  3) **Faster Coin Selection**: no longer need to "remove the pre-set inputs from the available coins
      vector so that Coin Selection doesn't pick them" (which meant to loop-over the entire
      available coins vector at Coin Selection time, erasing duplicate coins that were pre-selected).

      Now, the available coins vector, which is built after the pre-selected-inputs fetching,
      doesn’t include the already selected inputs in the first place.

  4) **Faster transaction creation** for transactions that only use manually selected inputs.

      We now will return early, as soon as we finish fetching the pre-selected-inputs and
      not perform the resources expensive calculation of walking-through the entire wallet
      txes map to obtain the available coins (coins that we will not use).

  ---------------------------

  Added a new bench (f6d0bb2) measuring the transaction creation process, for a wallet with ~250k UTXO, only using the pre-selected-inputs inside coin control. Setting `m_allow_other_inputs=false` to disallow the wallet to include coins automatically.

  #### Result on this PR (tip f6d0bb2d):

  |               ns/op |                op/s |    err% |     total | benchmark
  |--------------------:|--------------------:|--------:|----------:|:----------
  |        1,048,675.00 |              953.58 |    0.3% |      0.06 | `WalletCreateTransaction`

  vs

  #### Result on master (tip 4a4289e2):

  |               ns/op |                op/s |    err% |     total | benchmark
  |--------------------:|--------------------:|--------:|----------:|:----------
  |       96,373,458.20 |               10.38 |    0.2% |      5.30 | `WalletCreateTransaction`

  The benchmark took to run in master: **96.37 milliseconds**, while in this PR: **1 millisecond**  🚀 .

ACKs for top commit:
  S3RK:
    Code Review ACK 3fcb545ab2
  achow101:
    ACK 3fcb545ab2
  aureleoules:
    reACK 3fcb545ab2

Tree-SHA512: 42f833e92f40c348007ca565a4c98039e6f1ff25d8322bc2b27115824744779baf0b0a38452e4e2cdcba45076473f1028079bbd0f670020481ec5d3db42e4731
2022-10-27 17:48:58 -04:00
Andrew Chow
551c8e9526
Merge bitcoin/bitcoin#26349: rpc: make address field optional list{transactions, sinceblock} response
eb679a7896 rpc: make `address` field optional (w0xlt)

Pull request description:

  Close https://github.com/bitcoin/bitcoin/issues/26338.

  This PR makes optional the `address` field in the response of `listtransactions` and `listsinceblock` RPC.
  And adds two tests that fail on master, but not on this branch.

ACKs for top commit:
  achow101:
    ACK eb679a7896
  aureleoules:
    ACK eb679a7896

Tree-SHA512: b267439626e2ec3134ae790c849949a4c40ef0cebd20092e8187be3db0a61941b2da10bbbba92ca880b8369f46c1aaa806d057eaa5159325f65cbec7cb33c52f
2022-10-27 13:17:39 -04:00
MacroFake
bd478890c5
Merge bitcoin/bitcoin#26388: ci: Use macos-ventura-xcode:14.1 image for "macOS native" task
da16893474 ci: Use `macos-ventura-xcode:14.1` image for "macOS native" task (Hennadii Stepanov)
702836530f ci: Make `getopt` path architecture agnostic (Hennadii Stepanov)

Pull request description:

  The "macOS native" CI task always uses the recent OS image.

  This PR updates it up to the recent macOS release.

  Cirrus Labs [stopped](https://github.com/bitcoin/bitcoin/pull/25160#issuecomment-1162829773) updating macOS images for `x86_64`, therefore, an `arm64` image been used.

  Also `make test-security-check` has been dropped as it ["isn't even expected to pass"](https://github.com/bitcoin/bitcoin/issues/26386#issuecomment-1290318628) on `arm64` in CI.

ACKs for top commit:
  Sjors:
    utACK da16893

Tree-SHA512: 36785d33b7f11b3cdbc53bcfbf97d88bf821fad248c825982dd9f8e3413809a4ef11190eaf950e60fdf479b62ff66920c35d9ea42d534723f015742eec7e19b6
2022-10-27 16:15:20 +02:00
MacroFake
fa24239a1c
net: Avoid SetTxRelay for feeler connections 2022-10-27 16:09:33 +02:00