Commit graph

34747 commits

Author SHA1 Message Date
Sebastian Falbesoner
7c0dfec2dd refactor: move from_binary helper from signet miner to test framework
Can be easily reviewed with `--color-moved=dimmed-zebra`.
2022-07-19 15:40:51 +02:00
Sebastian Falbesoner
597a4b35f6 scripted-diff: rename FromBinary helper to from_binary (signet miner)
-BEGIN VERIFY SCRIPT-
sed -i s/FromBinary/from_binary/g ./contrib/signet/miner
-END VERIFY SCRIPT-
2022-07-19 15:40:51 +02:00
MacroFake
948f5ba636
Merge bitcoin/bitcoin#25641: Fix -Wparentheses gcc warning
d68ca4ef64 Fix `-Wparentheses` gcc warning (Hennadii Stepanov)

Pull request description:

  This PR fixes `-Wparentheses` gcc warning which has been introduced in bitcoin/bitcoin#25624.

  On the master branch (6d8707b21d):
  ```
  $ gcc --version
  gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0
  Copyright (C) 2021 Free Software Foundation, Inc.
  This is free software; see the source for copying conditions.  There is NO
  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

  $ make > /dev/null
  In file included from ./net.h:29,
                   from ./net_processing.h:9,
                   from test/fuzz/txorphan.cpp:7:
  test/fuzz/txorphan.cpp: In lambda function:
  test/fuzz/txorphan.cpp:116:70: warning: suggest parentheses around comparison in operand of ‘==’ [-Wparentheses]
    116 |                         Assert(!have_tx == GetTransactionWeight(*tx) > MAX_STANDARD_TX_WEIGHT);
        |                                            ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
  ./util/check.h:74:50: note: in definition of macro ‘Assert’
     74 | #define Assert(val) inline_assertion_check<true>(val, __FILE__, __LINE__, __func__, #val)
        |                                                  ^~~
  ```

ACKs for top commit:
  MarcoFalke:
    ACK d68ca4ef64

Tree-SHA512: 5c98df4d6a6124d048b16eb3caf29bb396223d3394c1f48efc0fe0c8fd334d67dbf64d0b2e40faf9eda6f6a537885abcff05c61e410cfb317737e3dc361791ee
2022-07-19 13:29:05 +02:00
fanquake
47dad42833
Merge bitcoin/bitcoin#25629: univalue: Return more detailed type check error messages
fae5ce8795 univalue: Return more detailed type check error messages (MacroFake)
fafab147e7 move-only: Move UniValue::getInt definition to keep class with definitions only (MacroFake)

Pull request description:

  Print the current type and the expected type

ACKs for top commit:
  aureleoules:
    ACK fae5ce8795.

Tree-SHA512: 4ae720a012ff8245baf5cd7f844f93b946c58feebe62de6dfd84ebc5c8afb988295a94de7c01aef98aaf4c6228f7184ed622f37079c738924617e0f336ac5b6e
2022-07-19 11:24:53 +01:00
Hennadii Stepanov
d68ca4ef64
Fix -Wparentheses gcc warning 2022-07-19 10:46:10 +01:00
Hennadii Stepanov
6d8707b21d
Merge bitcoin-core/gui#631: Disallow encryption of watchonly wallets
4c495413e1 Disallow encryption of watchonly wallets (Andrew Chow)

Pull request description:

  Watchonly wallets do not have any private keys to encrypt. It does not make sense to encrypt such wallets, so disable the option to encrypt them.

  This avoids an assertion that can be hit when encrypting watchonly descriptor wallets.

  As our current behavior allows for encrypting watchonly wallets (no crash with legacy, crash, but still encrypted with descriptors), the new `NoKeys` status is only returned for unencrypted watchonly wallets. This allows any watchonly wallets that were previously encrypted to show the correct encryption status (they have encryption keys, and so should be indicated as being encrypted).

ACKs for top commit:
  w0xlt:
    tACK 4c495413e1
  hebasto:
    ACK 4c495413e1, tested on Ubuntu 22.04.

Tree-SHA512: 054dba0a8c1343a0df17689508cd628a974555828955a3c8820bf020868b95a3df98c47253b0ffe2252765b020160bb76ea21647d76d59ba748b3b41c481f2ae
2022-07-19 10:18:46 +01:00
MacroFake
1b285b7807
Merge bitcoin/bitcoin#25590: wallet: Precompute Txdata after setting PSBT inputs' UTXOs
d2ed97656b wallet: Precompute Txdata after setting PSBT inputs' UTXOs (Andrew Chow)

Pull request description:

  If we are given a PSBT that is missing one or more input UTXOs, our
  PrecomputedTransactionData will be incorrect and missing information
  that it should otherwise have, and therefore we may not produce a
  signature when we should. To avoid this problem, we can do the
  precomputation after we have set the UTXOs the wallet is able to set for
  the PSBT.

  Also adds a test for this behavior.

ACKs for top commit:
  instagibbs:
    reACK d2ed97656b
  Sjors:
    ACK d2ed97656b
  aureleoules:
    ACK d2ed97656b.

Tree-SHA512: 71beb6c7946096e82cfca83f36277302aa9e69d27b4f6d73d7d8f2f9f0ea1c0d653e846fa6aebee5e4763f56f950b4481240e953f6a2412caa84908d519171e1
2022-07-19 10:58:25 +02:00
fanquake
8c9ea8a556
Merge bitcoin/bitcoin#25612: depends: default to using GCC tool wrappers for LTO (with GCC)
658685af93 depends: default to using GCC tool wrappers (with GCC) (fanquake)
6fdc13c61f build: Fix autoconf variable names for tools found by `AC_PATH_TOOL` (Hennadii Stepanov)

Pull request description:

  This improves support for LTO by using gcc wrappers for `ar`, `nm`, `ranlib`,
  that correctly setup plugin arguments for LTO, when using GCC.

  Other HOSTS are using clang.

  Portion of #25391.

  Guix Build (x86_64):
  ```bash
  ```

  Guix Build (arm64):
  ```bash
  ```

ACKs for top commit:
  dongcarl:
    Code Review ACK 658685af93
  hebasto:
    ACK 658685af93
  jarolrod:
    ACK 658685af93

Tree-SHA512: 28d6127c118f74336c97e2523117f8a0d11b32cd565124cd4052baeb7cc53e71909d3037cb080d996ae4e3ce600326fced37ee36adcc53d839ba7dd7974ebcd2
2022-07-19 08:40:04 +01:00
MacroFake
47c86a023d
Merge bitcoin/bitcoin#25466: ci: add unused-using-decls to clang-tidy
a02f3f19f5 tidy: use misc-unused-using-decls (fanquake)
d6787bc19b refactor: remove unused using directives (fanquake)
3617634324 validation: remove unused using directives (eugene)

Pull request description:

  Adds https://clang.llvm.org/extra/clang-tidy/checks/misc/unused-using-decls.html to our clang-tidy.
  PR'd after the discussion in #25433 (which it includes).

ACKs for top commit:
  jamesob:
    Github ACK a02f3f19f5

Tree-SHA512: 2bb937c1cc90006e69054458d845fb54f287567f4309c773a3fc859f260558c32ff51fc1c2ce9b43207426f3547e7ce226c87186103d741d5efcca19cd355253
2022-07-19 09:16:01 +02:00
MacroFake
2bdce7f7ad
Merge bitcoin/bitcoin#25514: net processing: Move CNode::nServices and CNode::nLocalServices to Peer
8d8eeb422e [net processing] Remove CNode::nLocalServices (John Newbery)
5961f8eea1 [net] Return CService from GetLocalAddrForPeer and GetLocalAddress (dergoegge)
d9079fe18d [net processing] Remove CNode::nServices (John Newbery)
7d1c036934 [net processing] Replace fHaveWitness with CanServeWitnesses() (John Newbery)
f65e83d51b [net processing] Remove fClient and m_limited_node (John Newbery)
fc5eb528f7 [tests] Connect peer in outbound_slow_chain_eviction by sending p2p messages (John Newbery)
1f52c47d5c [net processing] Add m_our_services and m_their_services to Peer (John Newbery)

Pull request description:

  Another step in #19398. Which services we offer to a peer and which services they offer to us is application layer data and should not be stored on `CNode`.

  This is also a prerequisite for adding `PeerManager` unit tests (See #25515).

ACKs for top commit:
  MarcoFalke:
    ACK 8d8eeb422e 🔑
  jnewbery:
    utACK 8d8eeb422e
  mzumsande:
    Code Review ACK 8d8eeb422e

Tree-SHA512: e772eb2a0a85db346dd7b453a41011a12756fc7cbfda6a9ef6daa9633b9a47b9770ab3dc02377690f9d02127301c3905ff22905977f758bf90b17a9a35b37523
2022-07-19 08:32:37 +02:00
Andrew Chow
8d4a058ac4
Merge bitcoin/bitcoin#23997: wallet: avoid rescans under assumed-valid blocks
817326a828 wallet: avoid rescans if under the snapshot (James O'Beirne)

Pull request description:

  This is part of the [assumeutxo project](https://github.com/bitcoin/bitcoin/projects/11) (parent PR: #15606)

  ---

  Refuse to load a wallet if it requires a rescan lower than the height of assumed-valid blocks.

  Of course in live code right now, `BLOCK_ASSUMED_VALID` block index entries don't exist since they're a unique flag introduced by the use of UTXO snapshots, so this is prophylactic code exercised only by unittests.

ACKs for top commit:
  achow101:
    ACK 817326a828
  ryanofsky:
    Code review ACK 817326a828. This seems like the simplest change we can make to avoid wallet problems when an assumeutxo snapshot is loaded.

Tree-SHA512: cfa44b2eb33d1818d30df45210d0dde1e9b78cc9b7c88cb985054dc28427bba9e0905debe4196065d1d3a5ce7bca7e605e629d5ce5f0225b25395746e6d3d596
2022-07-18 14:39:55 -04:00
Andrew Chow
4aaa3b5200
Merge bitcoin/bitcoin#25351: rpc, wallet: Scan mempool after import* - Second attempt
1be7964189 test, wallet: Add mempool rescan test for import RPCs (Fabian Jahr)
833ce76df7 rpc, wallet: Document mempool rescan after importdescriptor, importwallet (Fabian Jahr)
0e396d1ba7 rpc, wallet: Document mempool scan after importmulti (Fabian Jahr)
e6d3ef8586 rpc, wallet: Document mempool scan after importpubkey (Fabian Jahr)
6d3db52e66 rpc, wallet: Document and test mempool scan after importprivkey (João Barbosa)
3abdbbb90a rpc, wallet: Document and test mempool scan after importaddress (João Barbosa)
236239bd40 wallet: Rescan mempool for transactions as well (Fabian Jahr)

Pull request description:

  This PR picks up the work from #18964 and closes #18954.

  It should incorporate all the unaddressed feedback from the PR:
  - Mempool rescan now expanded to all relevant import* RPCs
  - Added documentation in the help of each RPC
  - More tests

ACKs for top commit:
  Sjors:
    re-utACK 1be7964189 (only a test change)
  achow101:
    ACK 1be7964189
  w0xlt:
    reACK 1be7964189

Tree-SHA512: b62fed5f97c6c242b2af417b41c9696a1f18878483d9e1c9429791f9c05257f57a00540a9a84df23c49faf6a61c3109c22972de81540083f38b506217804fcc5
2022-07-18 14:26:21 -04:00
fanquake
a02f3f19f5
tidy: use misc-unused-using-decls
https://clang.llvm.org/extra/clang-tidy/checks/misc/unused-using-decls.html
2022-07-18 17:25:07 +01:00
fanquake
d6787bc19b
refactor: remove unused using directives 2022-07-18 17:25:03 +01:00
eugene
3617634324
validation: remove unused using directives
The following were unused from the node namespace:
- BLOCKFILE_CHUNK_SIZE
- nPruneTarget
- OpenBlockFile
- UNDOFILE_CHUNK_SIZE
2022-07-18 17:16:33 +01:00
fanquake
658685af93
depends: default to using GCC tool wrappers (with GCC)
This improves support for LTO by using gcc wrappers for ar, nm, ranlib,
that correctly setup plugin arguments for LTO.

Other HOSTS are using clang.
2022-07-18 17:13:55 +01:00
Hennadii Stepanov
6fdc13c61f
build: Fix autoconf variable names for tools found by AC_PATH_TOOL
See the `AC_PATH_TOOL` macro implementation.
2022-07-18 17:13:50 +01:00
fanquake
f002f8a0e7
Merge bitcoin/bitcoin#25599: build: Check for std::atomic::exchange rather than std::atomic_exchange
4de4221ab4 build: Check for std::atomic::exchange rather than std::atomic_exchange (Andrew Chow)

Pull request description:

  Our usage of std::atomic is with it's own exchange function, not std::atomic_exchange. So we should be looking specifically for that function.

  This removes the need for -latomic for riscv builds, which resolves a guix cross architecture reproducibility issue.

ACKs for top commit:
  hebasto:
    ACK 4de4221ab4
  fanquake:
    ACK 4de4221ab4

Tree-SHA512: dd8225fc9c6a335601f611700003d0249b9ef941efa502db39306129677929d013048e9221be1d6d7f0ea2d90313d4b87de239f441be21b25bea40a6c19a031e
2022-07-18 16:32:03 +01:00
glozow
821f5c824f
Merge bitcoin/bitcoin#25487: [kernel 3b/n] Decouple {Dump,Load}Mempool from ArgsManager
cb3e9a1e3f Move {Load,Dump}Mempool to kernel namespace (Carl Dong)
aa30676541 Move DEFAULT_PERSIST_MEMPOOL out of libbitcoinkernel (Carl Dong)
06b88ffb8a LoadMempool: Pass in load_path, stop using gArgs (Carl Dong)
b857ac60d9 test/fuzz: Invoke LoadMempool via CChainState (Carl Dong)
b3267258b0 Move FopenFn to fsbridge namespace (Carl Dong)
ae1e8e3756 mempool: Use NodeClock+friends for LoadMempool (Carl Dong)
f9e8e5719f mempool: Improve comments for [GS]etLoadTried (Carl Dong)
813962da0b scripted-diff: Rename m_is_loaded -> m_load_tried (Carl Dong)
413f4bb52b DumpMempool: Pass in dump_path, stop using gArgs (Carl Dong)
bd4407817e DumpMempool: Use std::chrono instead of weird int64_t arthmetics (Carl Dong)
c84390b741 test/mempool_persist: Test manual savemempool when -persistmempool=0 (Carl Dong)

Pull request description:

  This is part of the `libbitcoinkernel` project: #24303, https://github.com/bitcoin/bitcoin/projects/18

  -----

  This PR moves `{Dump,Load}Mempool` into its own `kernel/mempool_persist` module and introduces `ArgsManager` `node::` helpers in `node/mempool_persist_args`to remove the scattered calls to `GetBoolArg("-persistmempool", DEFAULT_PERSIST_MEMPOOL)`.

  More context can be gleaned from the commit messages.

  -----

  One thing I was reflecting on as I wrote this was that in the long run, I think we should probably invert the validation <-> mempool relationship. Instead of mempool not depending on validation, it might make more sense to have validation not depend on mempool. Not super urgent since `libbitcoinkernel` will include both validation and mempool, but perhaps something for the future.

ACKs for top commit:
  glozow:
    re ACK cb3e9a1e3f via `git range-diff 7ae032e...cb3e9a1`
  MarcoFalke:
    ACK cb3e9a1e3f 🔒
  ryanofsky:
    Code review ACK cb3e9a1e3f

Tree-SHA512: 979d7237c3abb5a1dd9b5ad3dbf3b954f906a6d8320ed7b923557f41a4472deccae3e8a6bca0018c8e7a3c4a93afecc502acd1e26756f2054f157f1c0edd939d
2022-07-18 16:09:27 +01:00
Andrew Chow
4de4221ab4 build: Check for std::atomic::exchange rather than std::atomic_exchange
Our usage of std::atomic is with it's own exchange function, not
std::atomic_exchange. So we should be looking specifically for that
function.

Additionally, -pthread and -lpthread have an effect on whether -latomic
will be needed, so the atomics check needs to use these flags as well.
This will make the flags in use better match what is actually used when
linking.

This removes the need for -latomic for riscv builds, which resolves a
guix cross architecture reproducibility issue.
2022-07-18 10:47:19 -04:00
MacroFake
c395c8d6bb
Merge bitcoin/bitcoin#25624: fuzz: Fix assert bug in txorphan target
2315830491 fuzz: Fix assert bug in txorphan target (chinggg)

Pull request description:

  Fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=48914.

  It is possible to construct big tx that got rejected in `AddTx`, so we cannot assume tx will be added successfully. We can only guarantee tx will not be added if orphanage already has it.

ACKs for top commit:
  MarcoFalke:
    lgtm ACK 2315830491

Tree-SHA512: e173bc1a932639746de1192ed238e2e2318899f55371febb598facd0e811d8c54997f074f5e761757e1ffd3ae76d8edf9d673f020b2d97d5762ac656f632be81
2022-07-18 15:05:39 +02:00
fanquake
d806407173
Merge bitcoin/bitcoin#25542: build: Use Link Time Optimization for Qt code on Linux
3442865360 build: Use Link Time Optimization for Qt code on Linux (Hennadii Stepanov)
ebce66e532 build: pass -fno-lto when building expat (fanquake)

Pull request description:

  See: https://www.qt.io/blog/2019/01/02/qt-applications-lto

  `bitcon-qt` unstripped size:
  | host | master (31c6309cc6) | this PR, depends built with `LTO=1` |
  |---|:-:|:-:|
  | x86_64-pc-linux-gnu | 42 MB | 35 MB |
  | arm-linux-gnueabihf | 31 MB | 26 MB |
  | aarch64-linux-gnu | 41 MB | 32 MB |
  | powerpc64-linux-gnu | 51 MB | 41 MB |
  | powerpc64le-linux-gnu | 48 MB | 39 MB |
  | riscv64-linux-gnu | 35 MB | 29 MB |

  Based on the first commit from bitcoin/bitcoin#25391.

  Using LTO for macOS and Windows hosts has some issues which could be addressed in follow ups.

  x86_64 build:
  ![image](https://user-images.githubusercontent.com/32963518/179326902-f91853ca-23c1-4c04-9a6d-161b695f27b5.png)

ACKs for top commit:
  fanquake:
    ACK 3442865360

Tree-SHA512: 03eef2568358df9336e24d6c4e12f28b89d649076fb74e7e5303d61e52865c2360c5345a4fb2b1e4bdfdae194f273fc27a5f67e6cf797ed01a154f3da9117247
2022-07-18 10:39:24 +01:00
fanquake
c5fa7ed409
Merge bitcoin/bitcoin#25544: wallet: don't iter twice when getting the cached debit/credit amount
757216e31c wallet: don't iter twice when getting the cached debit/credit amount (Antoine Poinsot)

Pull request description:

  A small optimization i stumbled upon while looking at something else. Figured it could be worth a PR.

  Instead of calling GetCachableAmount twice, which will result in
  iterating through all the transaction txins/txouts and calling
  GetDebit/GetCredit (which lock cs_wallet), just merge the filters and do
  it once.

ACKs for top commit:
  achow101:
    ACK 757216e31c
  aureleoules:
    ACK 757216e31c.

Tree-SHA512: 0dbbdd24231380196e929dce572752e6be1d69457252a7215e279e71d6199483b516f64019ae999a91dbce7fdd86f8bf0336b6e151cca93cbcf51bc854e838a2
2022-07-18 10:37:45 +01:00
MacroFake
fae5ce8795
univalue: Return more detailed type check error messages 2022-07-18 11:31:36 +02:00
MacroFake
fafab147e7
move-only: Move UniValue::getInt definition to keep class with definitions only
Can be reviewed with the git options

--color-moved=dimmed-zebra --color-moved-ws=ignore-all-space
2022-07-18 10:37:00 +02:00
MacroFake
4e2929e987
Merge bitcoin/bitcoin#25617: refactor: univalue test cleanups
1f0c83f430 refactor: remove BOOST_*_TEST_ macros (fanquake)
70d807c355 refactor: integrate no_nul into univalue unitester (fanquake)
98a0ae6b24 doc: remove references to downstream (fanquake)

Pull request description:

  Remove references to "downstream" from makefiles, as they are now redundant.
  Remove `BOOST_TEST` macros in favour of just using functions.
  Add missing call to `univalue_push_throw` tests.

ACKs for top commit:
  MarcoFalke:
    ACK 1f0c83f430 🍎

Tree-SHA512: e0e1ec159a82ece9b364c656b3b49d98f72a04f2614eeb2a386825c3e37bb5a10416446a8ea22d9048227d96aca3e5c1a3dbf3264a290443add382ded073575c
2022-07-18 10:29:40 +02:00
fanquake
1f0c83f430
refactor: remove BOOST_*_TEST_ macros 2022-07-18 09:15:18 +01:00
fanquake
70d807c355
refactor: integrate no_nul into univalue unitester 2022-07-18 09:15:18 +01:00
fanquake
98a0ae6b24
doc: remove references to downstream
Having references to downstream no-longer make sense now that we've
unsubtree'd.
2022-07-18 09:15:18 +01:00
fanquake
82ab22af3a
Merge bitcoin/bitcoin#25605: depends: update urls for dmg tools
718d29af23 depends: update urls for dmg tools (fanquake)

Pull request description:

  These repos have migrated from https://github.com/al45tair/ to
  https://github.com/dmgbuild/, so update our URLs to point to the new
  location. Note that GitHub is also already performing the redirect
  automatically.

  Guix Build (x86_64):
  ```bash
  d77fedbd1781e7106e567a43d6830f5ccecab9f234546871cb4928b1f98be989  guix-build-718d29af2339/output/arm64-apple-darwin/SHA256SUMS.part
  c96dac549214f2d5bcc496d321767b6440367677149d254242da47dcc860a121  guix-build-718d29af2339/output/arm64-apple-darwin/bitcoin-718d29af2339-arm64-apple-darwin-unsigned.dmg
  0d3cd6b6a1c3ca4d35fd7301cd02ca7bced8ffc587b653dcd0a3c67116ae8ac6  guix-build-718d29af2339/output/arm64-apple-darwin/bitcoin-718d29af2339-arm64-apple-darwin-unsigned.tar.gz
  f86eb599d21687ddaca35bdf5400a58ec03a48823357d0182110c3c507c09c58  guix-build-718d29af2339/output/arm64-apple-darwin/bitcoin-718d29af2339-arm64-apple-darwin.tar.gz
  6bbd4bdf2d90ab20ae4d6aa4e9a9cfef6e14f3784d0eda67fdbd0006f03a2feb  guix-build-718d29af2339/output/dist-archive/bitcoin-718d29af2339.tar.gz
  6c8a22474864fefbcd3ad676f46f7c10696a2801f2315367b64975f55877702d  guix-build-718d29af2339/output/x86_64-apple-darwin/SHA256SUMS.part
  d9caf693e70876d30cef2a38a0e5a62f808903f51bd3c845107f6dfc4dcf7b80  guix-build-718d29af2339/output/x86_64-apple-darwin/bitcoin-718d29af2339-x86_64-apple-darwin-unsigned.dmg
  1510f55407f61d6f1df2711b744bae6ba43ba926ff67b1eaafcb90415d8ce748  guix-build-718d29af2339/output/x86_64-apple-darwin/bitcoin-718d29af2339-x86_64-apple-darwin-unsigned.tar.gz
  3cf52eb02345dfc14039a7f37f49f0c0ea2c067a86b245981b767a2491e160c6  guix-build-718d29af2339/output/x86_64-apple-darwin/bitcoin-718d29af2339-x86_64-apple-darwin.tar.gz
  ```

  Guix Build (arm64):
  ```bash
  3451e31b7a3bb6c44c1cca70a954e82033894770396c625f2936b36cfdde3104  guix-build-718d29af2339/output/arm64-apple-darwin/SHA256SUMS.part
  757095bb54b407c76c03d4bc1e4ddba9247c521c815293e33273212a1255f2d7  guix-build-718d29af2339/output/arm64-apple-darwin/bitcoin-718d29af2339-arm64-apple-darwin-unsigned.dmg
  9f5c68f3310076eb1cfa15e8325f4ff81cb7c3929efe69d1ee3e4b40f65865fc  guix-build-718d29af2339/output/arm64-apple-darwin/bitcoin-718d29af2339-arm64-apple-darwin-unsigned.tar.gz
  d8ce004001d349be6b0ea20a6d59780ebdec4e8cca445f63da72c569d558ce4e  guix-build-718d29af2339/output/arm64-apple-darwin/bitcoin-718d29af2339-arm64-apple-darwin.tar.gz
  6bbd4bdf2d90ab20ae4d6aa4e9a9cfef6e14f3784d0eda67fdbd0006f03a2feb  guix-build-718d29af2339/output/dist-archive/bitcoin-718d29af2339.tar.gz
  6c8a22474864fefbcd3ad676f46f7c10696a2801f2315367b64975f55877702d  guix-build-718d29af2339/output/x86_64-apple-darwin/SHA256SUMS.part
  d9caf693e70876d30cef2a38a0e5a62f808903f51bd3c845107f6dfc4dcf7b80  guix-build-718d29af2339/output/x86_64-apple-darwin/bitcoin-718d29af2339-x86_64-apple-darwin-unsigned.dmg
  1510f55407f61d6f1df2711b744bae6ba43ba926ff67b1eaafcb90415d8ce748  guix-build-718d29af2339/output/x86_64-apple-darwin/bitcoin-718d29af2339-x86_64-apple-darwin-unsigned.tar.gz
  3cf52eb02345dfc14039a7f37f49f0c0ea2c067a86b245981b767a2491e160c6  guix-build-718d29af2339/output/x86_64-apple-darwin/bitcoin-718d29af2339-x86_64-apple-darwin.tar.gz
  ```

ACKs for top commit:
  hebasto:
    ACK 718d29af23, I've manually downloaded archives from new links, and verified their hashes.
  jarolrod:
    ACK 718d29af23

Tree-SHA512: 9dc69293775481abf5be4967cb42446707fa56a3bdba5e36125b02c0d73092871b6fb5d3467ebbeb5120c5df7a321e4dc7fbcf3600bfc8631f86bb781c4523c1
2022-07-17 10:28:52 +01:00
MacroFake
55b76ac1c0
Merge bitcoin/bitcoin#25615: rpc: add missing description in gettxout help text
743a84a5f6 fix gettxout help text (Marnix)

Pull request description:

  replaces #25578

  Add help text to asm & hex (like everywhere else).
  I've also changed two `RPCResult::Type::STR` to `RPCResult::Type::STR_HEX`

Top commit has no ACKs.

Tree-SHA512: 4109d6abddf71b24899f3252545248bb0c7cc366eb994d30927eb300d0b939a14b8140bac4a4c2bd45098a406666dbe1feb10da8dec923777bb8ed26784dfd54
2022-07-17 08:52:53 +02:00
chinggg
2315830491 fuzz: Fix assert bug in txorphan target 2022-07-17 08:04:24 +08:00
Hennadii Stepanov
3442865360
build: Use Link Time Optimization for Qt code on Linux
See: https://www.qt.io/blog/2019/01/02/qt-applications-lto
2022-07-15 23:58:45 +01:00
fanquake
ebce66e532
build: pass -fno-lto when building expat
Otherwise it's autoconf endianess check will fail to determine what the
endianess is..
2022-07-15 23:57:49 +01:00
Andrew Chow
826fae6a0f
Merge bitcoin/bitcoin#25618: Release notes for Miniscript support in P2WSH descriptors
d751beb7ac Release notes for Miniscript support in P2WSH descriptors (Antoine Poinsot)

Pull request description:

  Changelog for #24148.

ACKs for top commit:
  Sjors:
    ACK d751beb7ac
  achow101:
    ACK d751beb7ac
  w0xlt:
    ACK d751beb7ac

Tree-SHA512: 5ecdc8501fdacca35b33f7425dbc192860e3e061bc9287b682c55d6da210cc5c0ff7154629e453a9a8d528bad518c35c49de31d114acab77bf27449940e9ca04
2022-07-15 18:25:32 -04:00
Hennadii Stepanov
6decdedaf9
Merge bitcoin-core/gui#469: Load Base64 PSBT string from file
2c3ee4c347 gui: Load Base64 PSBT string from file (Andrew Chow)

Pull request description:

  Some .psbt files may have the PSBT as a base64 string instead of in binary. We should be able to load those files.

ACKs for top commit:
  jarolrod:
    tACK 2c3ee4c347
  shaavan:
    ACK 2c3ee4c347

Tree-SHA512: 352b0611693c8989ea7d1b8d494ea58c69dc15cf81b8d62271541832e74b0a0399cb6ed4e686ab7c741cb4e5374527e054a9ecfe7355bc6f77d8fdd13569ab76
2022-07-15 21:18:58 +01:00
Carl Dong
cb3e9a1e3f Move {Load,Dump}Mempool to kernel namespace
Also:
1. Add the newly introduced kernel/mempool_persist.cpp to IWYU CI script
2. Add chrono mapping for iwyu
2022-07-15 12:26:20 -04:00
Carl Dong
aa30676541 Move DEFAULT_PERSIST_MEMPOOL out of libbitcoinkernel
It is no longer used by anything inside libbitcoinkernel, move it to
node/mempool_persist_args.h where it belongs.
2022-07-15 12:26:20 -04:00
Carl Dong
06b88ffb8a LoadMempool: Pass in load_path, stop using gArgs
Also:
1. Have CChainState::LoadMempool and ::ThreadImport take in paths and
   pass it through untouched to LoadMempool.
2. Make LoadMempool exit early if the load_path is empty.
3. Adjust the call to ::ThreadImport in ::AppInitMain to correctly pass
   in an empty path if mempool persistence is disabled.
2022-07-15 12:26:20 -04:00
Carl Dong
b857ac60d9 test/fuzz: Invoke LoadMempool via CChainState
Not only does this increase coverage, it is also more correct in that
when ::LoadMempool is called with a mempool and chainstate, it calls
AcceptToMemoryPool with just the chainstate.

AcceptToMemoryPool will then act on the chainstate's mempool via
CChainState::GetMempool, which may be different from the mempool
originally passed to ::LoadMempool. (In this fuzz test's case, it
definitely is different)

Also, move DummyChainstate to its own file since it's now used by the
validation_load_mempool fuzz test to replace CChainState's m_mempool.
2022-07-15 12:26:00 -04:00
Carl Dong
b3267258b0 Move FopenFn to fsbridge namespace
[META] In a future commit in this patchset, it will be used by more than
       just validation, and it needs to align with fopen anyway.
2022-07-15 12:25:51 -04:00
Andrew Chow
4c495413e1 Disallow encryption of watchonly wallets
Watchonly wallets do not have any private keys to encrypt. It does not
make sense to encrypt such wallets, so disable the option to encrypt
them.

This avoids an assertion that can be hit when encrypting watchonly descriptor
wallets.
2022-07-15 11:41:43 -04:00
Carl Dong
ae1e8e3756 mempool: Use NodeClock+friends for LoadMempool 2022-07-15 11:35:13 -04:00
Carl Dong
f9e8e5719f mempool: Improve comments for [GS]etLoadTried
Also change the param name for SetLoadTried to load_tried.
2022-07-15 11:35:13 -04:00
Carl Dong
813962da0b scripted-diff: Rename m_is_loaded -> m_load_tried
m_is_loaded/IsLoaded() doesn't actually indicate whether or not the
mempool was successfully, loaded, but rather if a load has been
attempted and did not result in a catastrophic ShutdownRequested.

-BEGIN VERIFY SCRIPT-
find_regex="\bm_is_loaded\b" \
    && git grep -l -E "$find_regex" \
        | xargs sed -i -E "s@$find_regex@m_load_tried@g"

find_regex="\bIsLoaded\b" \
    && git grep -l -E "$find_regex" \
        | xargs sed -i -E "s@$find_regex@GetLoadTried@g"

find_regex="\bSetIsLoaded\b" \
    && git grep -l -E "$find_regex" \
        | xargs sed -i -E "s@$find_regex@SetLoadTried@g"
-END VERIFY SCRIPT-
2022-07-15 11:35:13 -04:00
fanquake
a969b2fcd3
Merge bitcoin/bitcoin#25551: refactor: Throw exception on invalid Univalue pushes over silent ignore
fa277cd55d univalue: Throw exception on invalid pushes over silent ignore (MacroFake)
ccccc17b91 refactor: Default options in walletcreatefundedpsbt to VOBJ instead of VNULL (MacroFake)

Pull request description:

  The return value of the `push*` helpers is never used, but important to determine if the operation was successful. One way to fix this would be to add the "nodiscard" attribute. However, this would make the code (and this diff) overly verbose for no reason.

  So fix it by removing the never used return value. Also, fail verbosely in case of a programming mistake.

ACKs for top commit:
  furszy:
    code ACK fa277cd5

Tree-SHA512: ef212a5bf5ae6bbad20acc4dafa3715521e81544185988d1eab724f440e4864a27e686aff51d5bc51b3017892c2eb8e577bcb8f37e8ddbaa0d8833bb622f2f9c
2022-07-15 16:33:55 +01:00
Carl Dong
413f4bb52b DumpMempool: Pass in dump_path, stop using gArgs
Also introduce node::{ShouldPersistMempool,MempoolPath} helper functions
in node/mempool_persist_args.{h,cpp} which are used by non-kernel
DumpMempool callers to determine whether or not to automatically dump
the mempool and where to dump it to.
2022-07-15 11:30:50 -04:00
Carl Dong
bd4407817e DumpMempool: Use std::chrono instead of weird int64_t arthmetics
This makes it so that DumpMempool doesn't depend on MICRO anymore
2022-07-15 11:30:47 -04:00
Antoine Poinsot
d751beb7ac
Release notes for Miniscript support in P2WSH descriptors 2022-07-15 14:20:26 +02:00
Andrew Chow
85b601e043
Merge bitcoin/bitcoin#24148: Miniscript support in Output Descriptors
ffc79b8e49 qa: functional test Miniscript watchonly support (Antoine Poinsot)
bfb036756a Miniscript support in output descriptors (Antoine Poinsot)
4a082887be qa: better error reporting on descriptor parsing error (Antoine Poinsot)
d25d58bf5f miniscript: add a helper to find the first insane sub with no child (Antoine Poinsot)
c38c7c5817 miniscript: don't check for top level validity at parsing time (Antoine Poinsot)

Pull request description:

  This adds Miniscript support for Output Descriptors without any signing logic (yet). See the OP of #24147 for a description of Miniscript and a rationale of having it in Bitcoin Core.
  On its own, this PR adds "watchonly" support for Miniscript descriptors in the descriptor wallet. A follow-up adds signing support.

  A minified corpus of Miniscript Descriptors for the `descriptor_parse` fuzz target is available at https://github.com/bitcoin-core/qa-assets/pull/92.
  The Miniscript descriptors used in the unit tests here and in #24149 were cross-tested against the Rust implementation at https://github.com/rust-bitcoin/rust-miniscript.

  This PR contains code and insights from Pieter Wuille.

ACKs for top commit:
  Sjors:
    re-utACK ffc79b8e49
  achow101:
    ACK ffc79b8e49
  w0xlt:
    reACK ffc79b8e49

Tree-SHA512: 02d919d38bb626d3c557eca3680ce71117739fa161b7a92cfdb6c9c432ed88870b1ed127ba24248574c40c7428217d7e9bdd986fd8cd7c51fae8c776e1271fb9
2022-07-14 14:54:19 -04:00