Commit graph

30847 commits

Author SHA1 Message Date
fanquake
d09071da5b
[MOVEONLY] consensus: move amount.h into consensus
Move amount.h to consensus/amount.h.
Renames, adds missing and removes uneeded includes.
2021-09-30 07:41:57 +08:00
MarcoFalke
419afa9341
Merge bitcoin/bitcoin#23064: fuzz: Fix memory leak in system fuzz target
aaaa37abba fuzz: Fix memory leak in system fuzz target (MarcoFalke)

Pull request description:

  Might fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=36906

  To test:

  ```
  $ FUZZ=system valgrind --tool=massif ./src/test/fuzz/fuzz ../btc_qa_assets/fuzz_seed_corpus/system/
  ^C
  $ massif-visualizer ./massif.out.952024
  ```

ACKs for top commit:
  practicalswift:
    cr ACK aaaa37abba

Tree-SHA512: 6aa47ea12ec76133ae326ed41c31414d7a418abe1f28b05f698e9bb5439bbe26b814c4827999b15b77b47608dbc71c9b35789d0b84e25f56928381d06d6460e5
2021-09-29 17:58:50 +02:00
Hennadii Stepanov
8d83f9c1d1
Merge bitcoin-core/gui#436: Include vout when copying transaction ID from coin selection
10c6929d55 Include vout when copying transaction ID from coin selection (Samuel Dobson)

Pull request description:

  Fixes #432

  I think it makes sense to just add the vout to the existing function because I can't imagine a situation where a user in the coin selection dialog would want just the transaction ID rather than the specific outpoint, and they can just delete it from the end anyway.

ACKs for top commit:
  kristapsk:
    ACK 10c6929d55
  hebasto:
    ACK 10c6929d55, tested on Linux Mint 20.2 (Qt 5.12.8).
  shaavan:
    ACK 10c6929

Tree-SHA512: df4d132b6c2fd0b590594e91cf54f82c6c0f77ee9ca06296fb726bc3c52b9ae459ca3b50c48b2bf303ccafe832b6b4dba692a812f439991ca6d807ea0d8df934
2021-09-29 17:27:02 +03:00
MarcoFalke
829c441af2
Merge bitcoin/bitcoin#23115: bloom: use Span instead of std::vector for insert and contains
a11da75411 bloom: cleanup includes (fanquake)
f1ed1d3194 bloom: use constexpr where appropriate (fanquake)
2ba4ddf31d bloom: use Span instead of std::vector for `insert` and `contains` (William Casarin)

Pull request description:

  This is #18985 rebased, with the most recent comments addressed.

  > We can avoid many unnecessary std::vector allocations by changing
  CBloomFilter to take Spans instead of std::vector's for the `insert`
  and `contains` operations.

  > CBloomFilter currently converts types such as CDataStream and uint256
  to std::vector on `insert` and `contains`. This is unnecessary because
  CDataStreams and uint256 are already std::vectors internally. We just
  need a way to point to the right data within those types. Span gives
  us this ability.

ACKs for top commit:
  sipa:
    Code review ACK a11da75411
  laanwj:
    Code review ACK a11da75411

Tree-SHA512: ee9ba02c9588daa1ff51782d1953fd060839dd15aa85861b2633b6ff2398320188ddd00f01d0c99442224485364ede9f8322366de4239fc7831ebfa06bd34659
2021-09-29 15:19:07 +02:00
MarcoFalke
d648bbb0a7
Merge bitcoin/bitcoin#23124: Fix feature_segwit.py failure due to witness
b207971465 Fix feature_segwit failure due to witness (Samuel Dobson)

Pull request description:

  Fixes #23116

  The failure is due to sometimes spending segwit outputs, which add an additional 1 sigop in the witness, added to the 2 (*4) in the outputs.

ACKs for top commit:
  brunoerg:
    tACK b207971465

Tree-SHA512: 7e3c09d162e6941a3028514e95ae3aab2a3f858e2f056229c5faff5e37ece897dc63e3f8c0e07fad9fc4621b74a6dee5ff777e910b2b009a41bb6e72a09217bd
2021-09-29 13:36:19 +02:00
MarcoFalke
aaaa37abba
fuzz: Fix memory leak in system fuzz target 2021-09-29 13:24:14 +02:00
Hennadii Stepanov
ba1a82e608
Merge bitcoin-core/gui#430: Improvements to the open up transaction in third-party link action
2ccde2f932 qt: hyphenate usage of third-party modifier (Jarol Rodriguez)
8177578b29 qt: ensure seperator when adding third-party transaction links (Jarol Rodriguez)
a70a98075a qt: improve text for open third-party tx url action (Jarol Rodriguez)
9980f4aa5e qt, refactor: simplify third-party tx url action through overload (Jarol Rodriguez)

Pull request description:

  [#4092](https://github.com/bitcoin/bitcoin/pull/4092) introduced the ability to open up a transaction in a block explorer. This improves the related code by simplifying the addition and connection of the action through an [overloaded](https://doc.qt.io/archives/qt-5.9/qmenu.html#addAction-5) `addAction` function and prepends action description text to the host, "Show in". The reason to add this text is to make it clear what the action does. It also creates a clearer mental correlation between a user doing the work to add the 3rd-party tx link and this new menu action popping up.

  This updates the setting text so that "third-party" is hyphenated. It should be hyphenated because it is being used as a modifier of both "URL" and "transaction URLs".

  Additionally, this fixes #431 by ensuring that the seperator will be added before creating action.

  Screenshots of visual changes:

  **Context menu actions**
  |   master   |   pr   |
  |--------------|--------|
  | <img width="248" alt="3pt-master" src="https://user-images.githubusercontent.com/23396902/134618354-00278ac6-5094-44ee-8ba7-fe648fdcb7d2.png"> | <img width="248" alt="3pt-pr" src="https://user-images.githubusercontent.com/23396902/134618364-ddb64269-e5ee-40af-a2a6-1922001b6f4e.png"> |

  **Setting text**
  (tooltip text containing usage of "third-party" is also properly hyphenated)
  |   master   |   pr   |
  |--------------|--------|
  | ![unnamed](https://user-images.githubusercontent.com/23396902/134854070-fb299ba5-3491-487f-b37f-c0cd96514353.png) | ![pr-hyphenate](https://user-images.githubusercontent.com/23396902/134854127-88630cc2-a178-4376-a569-f413f66eba0d.png) |

ACKs for top commit:
  stratospher:
    tested ACK 2ccde2f.
  promag:
    Code view ACK 2ccde2f932.
  hebasto:
    ACK 2ccde2f932

Tree-SHA512: 8dfcd539a1d41c8abf3c8208d150d1480d4ef81a008de826299e8bad1dfa6e3c49dc76d041c5946fafcf0b033eebb9b9fbd3d49ba6d8af93dd388c488e92f143
2021-09-29 13:18:26 +03:00
Hennadii Stepanov
ad47fb8b64
Merge bitcoin-core/gui#416: Add RPC setting
bd5c826a96 gui: add RPC setting (Sjors Provoost)

Pull request description:

  RPC access is disabled by default for the GUI.

  With the proliferation of third party desktop applications that use the Bitcoin Core RPC (e.g. Specter Desktop, Sparrow and Wasabi), this PR makes them slight easier to configure. It's no longer required to find and edit `bitcoin.conf` to add `server=1` to it.

  <img width="447" alt="Schermafbeelding 2021-09-02 om 14 25 58" src="https://user-images.githubusercontent.com/10217/131844201-be3b49a8-ae88-47e6-8992-e95ee6b70f69.png">

ACKs for top commit:
  hebasto:
    ACK bd5c826a96, tested on Linux Mint 20.2 (Qt 5.12.8):
  shaavan:
    reACK bd5c826a96
  promag:
    Code review ACK bd5c826a96. Just minor fixes to the .ui form since last review.

Tree-SHA512: ab377e2358826096b499013bc3a864b7b63dff9859e96041e93ff0897d2319a35e8b3adcfb8df5f83274466c83d040d4ea18c546699421425c835e6f42562ae0
2021-09-29 12:19:18 +03:00
Hennadii Stepanov
ccc4b9125a
Merge bitcoin-core/gui#345: Connection Type Translator Comments
4832737c7d qt: connection type translator comments (Jarol Rodriguez)

Pull request description:

  This PR introduces Qt translator comments for `Connection Type` strings in `guiutil.cpp` as well as `rpcconsole.cpp`.

  This is an alternate implementation of the idea presented in the last three commits of #289. It is especially inspired by commit 842f4e834dfe5fd2786a5092f78ea28da1b36e4f.

  Per [Qt Dev Notes](https://github.com/bitcoin-core/bitcoin-devwiki/wiki/Developer-Notes-for-Qt-Code), it is better to not break up strings when not necessary. This way we preserve the full context for translators.

ACKs for top commit:
  jonatack:
    Code review re-ACK 4832737c7d per `git diff 371e2b9 4832737`, changes are translator comment edits since my review yesterday (thank you for updating)
  hebasto:
    ACK 4832737c7d

Tree-SHA512: 67e1741e10a2e30cde6d50d3293eec89f0b7641b34463865dc6909d2926cdcf33a7d8c1dc8055d2f85906ad2002cdaa594d37b184d16e2f06614b6c5ad00c982
2021-09-29 11:58:15 +03:00
MarcoFalke
33e31f8df9
Merge bitcoin/bitcoin#23079: test: use MiniWallet for p2p_filter.py
cfdb6baa22 test: use MiniWallet for p2p_filter.py (Sebastian Falbesoner)
6fc2cd3f09 test: introduce helper to create random P2WPKH scriptPubKeys (Sebastian Falbesoner)
aa26797f69 test: MiniWallet: add `send_to` method to create arbitrary txouts (Sebastian Falbesoner)

Pull request description:

  This PR enables one more of the non-wallet functional tests (p2p_filter.py) to be run even with the Bitcoin Core wallet disabled by using the MiniWallet instead, as proposed in #20078.
  For this purpose, a MiniWallet method `send_to` is introduced first, which allows to create arbitrary outputs (scriptPubKey/amount). Note that the implementation for this is already present in feature_rbf.py (recently added in PR #22998), i.e. it is simply moved to the MiniWallet interface.

ACKs for top commit:
  laanwj:
    Code review ACK cfdb6baa22

Tree-SHA512: 13b063631f0d7af065b7757cfe8b47c9be6cb9850ac5db2968a2bba4f5a18cdc9f89173a9b03971545356225082042f5fdbe49d3036027d18e8b7eb042d04f5e
2021-09-29 09:13:07 +02:00
MarcoFalke
8daecf4d1d
Merge bitcoin/bitcoin#23108: ci: Enable extended tests on native Windows
fa87230ec5 ci: Enable extended tests on native Windows (MarcoFalke)

Pull request description:

ACKs for top commit:
  hebasto:
    ACK fa87230ec5

Tree-SHA512: d1b15a572021462b52e900d91b89b6a9cb3451fc7d1aebf4272f856b78fa1382a170ef9b7fb54702ebe0b2e123e3b618375bcf99a390e57c2039cbab61fa9114
2021-09-29 08:26:20 +02:00
MarcoFalke
7d4ea7c7ef
Merge bitcoin/bitcoin#23120: test: Remove unused and confusing main parameter from script_util
fa54efda9b test: pep-8 touched test (MarcoFalke)
fa46768059 test: Remove unused and confusing main parameter from script_util (MarcoFalke)

Pull request description:

ACKs for top commit:
  fanquake:
    ACK fa54efda9b

Tree-SHA512: 124e888e16c92bb24ab4d6f68a768d295500a48f8c6c0b4f069493effcd761f80be78dd93b31edbb529ebe4c8aaca764aaff48d1e3b23659dde722981dc787a5
2021-09-29 08:08:25 +02:00
Samuel Dobson
b207971465 Fix feature_segwit failure due to witness 2021-09-29 17:41:35 +13:00
fanquake
a11da75411
bloom: cleanup includes 2021-09-29 09:48:36 +08:00
fanquake
f1ed1d3194
bloom: use constexpr where appropriate 2021-09-29 09:43:37 +08:00
William Casarin
2ba4ddf31d
bloom: use Span instead of std::vector for insert and contains
We can avoid many unnecessary std::vector allocations by changing
CBloomFilter to take Spans instead of std::vector's for the `insert`
and `contains` operations.

CBloomFilter currently converts types such as CDataStream and uint256
to std::vector on `insert` and `contains`. This is unnecessary because
CDataStreams and uint256 are already std::vectors internally. We just
need a way to point to the right data within those types. Span gives
us this ability.

Signed-off-by: William Casarin <jb55@jb55.com>
2021-09-29 09:40:10 +08:00
fanquake
3c776fdcec
Merge bitcoin/bitcoin#23122: doc: Remove un-actionable TODO from chainparams.cpp
fa189621cc doc: Remove un-actionable TODO from chainparams.cpp (MarcoFalke)

Pull request description:

  This can't be fixed by writing code, see discussion in https://github.com/bitcoin/bitcoin/pull/23021/files#r717426632

ACKs for top commit:
  jarolrod:
    ACK fa189621cc
  prayank23:
    ACK fa189621cc

Tree-SHA512: 3c5c0a0f45d057c9a617797007220837d7dcb29ae5996441e41b3698a67dc3d898f465adc0a958ecef430068cd9c564540bb534bbb3b230a53130ea001629f3e
2021-09-29 09:20:56 +08:00
Samuel Dobson
6a5381a06b
Merge bitcoin/bitcoin#20591: wallet, bugfix: fix ComputeTimeSmart function during rescanning process.
240ea294d5 doc: update doxygen documention of ComputeTimeSmart() and AddToWalletIfInvolvingMe() regarding rescanning_old_block parameter (BitcoinTsunami)
d6eb39af21 test: add functional test to check transaction time determination during block rescanning (BitcoinTsunami)
07b44f16e7 wallet: fix ComputeTimeSmart algorithm to use blocktime during old block rescanning (BitcoinTsunami)

Pull request description:

  The function ComputeTimeSmart in wallet.cpp assume that transaction are discovered in the right order.
  Moreover the 'smarttime' determination algorithm is coded with realtime scenario in mind and not rescanning of old block.

  The functional test demonstrate that if the user import a wallet, then rescan only recent history, and then rescan the entire history, the older transaction discovered would have an incorrect time determination.
  In the context of rescanning old block, the only time value that as a meaning is the blocktime.

  That's why I've fixed the problem with a simple separation between rescanning of old block and realtime time determination. The fix is written to have no impact on every realtime scenario and only impact the behaviour during a rescanning process.
  This PR Fixes #20181.

  To be fair, I don't think that this bug could be triggered with the wallet GUI, because it always proceed with a proper rescan.
  But RPC API provide the possibility to trigger it. I've discovered it, because Specter desktop v0.10.0 was impacted. (https://github.com/cryptoadvance/specter-desktop/issues/680).

ACKs for top commit:
  jonatack:
    ACK 240ea294d5 per `git diff b92d552 240ea29`, re-verified rebase to latest master + debug build clean + new test passes on the branch and fails on master, only change since my review a few hours ago is incorporation of latest review suggestions
  meshcollider:
    re-utACK 240ea294d5

Tree-SHA512: 514b02e41d011ddfa325f5e8080b93800e1ea4ed5853fa420670a6ac700e8b463000dbea65f8ced8565cfb950c7f51b69154034dcb111e67aca3b964a0061494
2021-09-29 11:18:23 +13:00
Samuel Dobson
10c6929d55 Include vout when copying transaction ID from coin selection 2021-09-29 11:16:59 +13:00
Samuel Dobson
b55232a337
Merge bitcoin/bitcoin#22722: rpc: update estimatesmartfee to return max of CBlockPolicyEstimator::estimateSmartFee, mempoolMinFee and minRelayTxFee
ea31caf6b4 update estimatesmartfee rpc to return max of estimateSmartFee, mempoolMinFee and minRelayTxFee. (pranabp-bit)

Pull request description:

  This PR is in response to the issue [#19699](https://github.com/bitcoin/bitcoin/issues/19699).

  Based on the discussion in the comments of PR [#22673](https://github.com/bitcoin/bitcoin/pull/22673) changes have been made in the `estimatesmartfee` itself such that it takes into account `mempoolMinFee` and `relayMinFee` . Hence it provides a fee estimate that is most likely to be paid by the user in an actual transaction, preventing issues such as [#16072](https://github.com/bitcoin/bitcoin/issues/16072).

  The test file test/functional/feature_fee_estimation.py has also been updated to check this functionality.

ACKs for top commit:
  meshcollider:
    re-utACK ea31caf6b4

Tree-SHA512: 8f36153a07cbd552c5c13d11d9c6e987a7a555ea4cc83f2573c0c92dd97c706d90c30a7248671437c2f3a836d3272f8fad53d15a5fa6efaa0409ae8009b0a18d
2021-09-29 10:55:29 +13:00
Samuel Dobson
d6492d4ed0
Merge bitcoin/bitcoin#22650: Remove -deprecatedrpc=addresses flag and corresponding code/logic
43cd6b8af9 doc: add release notes for removal of the -deprecatedrpc=addresses flag (Michael Dietz)
2b1fdc2c6c refactor: minor styling, prefer snake case and same line if (Michael Dietz)
d64deac7b8 refactor: share logic between ScriptPubKeyToUniv and ScriptToUniv (Michael Dietz)
8721638daa rpc: remove deprecated addresses and reqSigs from rpc outputs (Michael Dietz)

Pull request description:

  Resolves #21797 now that we've branched-off to v23 ("addresses" and "reqSigs" deprecated) "ExtractDestinations" should be removed.

   `-deprecatedrpc=addresses` was initially added in this PR #20286 (which resolved the original issue #20102).

  Some chunks of code and logic are no longer used/necessary with the removal of this, and therefore some minor refactoring is done in this PR as well (separated commits)

ACKs for top commit:
  MarcoFalke:
    re-ACK 43cd6b8af9 🐉
  meshcollider:
    Code review ACK 43cd6b8af9
  jonatack:
    ACK 43cd6b8af9 per `git range-diff a9d0cec 92dc5e9 43cd6b8`, also rebased to latest master, debug built + quick re-review of each commit to bring back context, and ran tests locally at the final commit

Tree-SHA512: fba83495e396d3c06f0dcf49292f14f4aa6b68fa758f0503941fade1a6e7271cda8378e2734af1faea550d1b43c85a36c52ebcc9dec0732936f9233b4b97901c
2021-09-29 10:41:30 +13:00
Hennadii Stepanov
f000cdcf0a
Merge bitcoin-core/gui#434: Keep InitExecutor in main gui thread
03a5fe06bd qt: Keep InitExecutor in main gui thread (João Barbosa)

Pull request description:

  The `InitExecutor` constructor moves the instance to a dedicated thread. This PR changes that by using `GUIUtil::ObjectInvoke` to run the relevant code in that thread.

  A possible follow-up is to ditch the dedicated thread and use `QThreadPool` or even `QtConcurrent::run` (if we want to enable that).

ACKs for top commit:
  hebasto:
    ACK 03a5fe06bd, tested on Linux Mint 20.2 (Qt 5.12.8).
  jarolrod:
    ACK 03a5fe06bd

Tree-SHA512: 8b40300371d4c04efb9913600a06ba4899af0b5f50fdb26ea23ec751df6d3bd52f8bd693a5e8f6a94ebf3790583dc96c6070e6878d247dece62347aa9bd99031
2021-09-28 23:26:29 +03:00
BitcoinTsunami
240ea294d5 doc: update doxygen documention of ComputeTimeSmart() and AddToWalletIfInvolvingMe() regarding rescanning_old_block parameter 2021-09-28 21:49:35 +02:00
BitcoinTsunami
d6eb39af21 test: add functional test to check transaction time determination during block rescanning 2021-09-28 21:49:22 +02:00
BitcoinTsunami
07b44f16e7 wallet: fix ComputeTimeSmart algorithm to use blocktime during old block rescanning 2021-09-28 20:56:52 +02:00
MarcoFalke
fa189621cc
doc: Remove un-actionable TODO from chainparams.cpp 2021-09-28 20:18:20 +02:00
MarcoFalke
fa87230ec5
ci: Enable extended tests on native Windows 2021-09-28 20:12:36 +02:00
MarcoFalke
fa54efda9b
test: pep-8 touched test
Can be reviewed with "--word-diff-regex=.".
2021-09-28 15:48:55 +02:00
MarcoFalke
fa46768059
test: Remove unused and confusing main parameter from script_util
Bitcoin script opcodes are equal on all chains (main and test) anyway.

Can be reviewed with "--word-diff-regex=.".
2021-09-28 15:46:57 +02:00
W. J. van der Laan
efa227f5df
Merge bitcoin/bitcoin#23097: Run specified functional tests with all matching flags
b8909b0746 Run functional tests with all possible flags (Samuel Dobson)

Pull request description:

  Functional tests which use flags like `--descriptors` or `--legacy-wallet` won't run if only the base script is given to `test_runner.py` because it doesn't match any script in the list exactly. It would be easier if it would just run both options.

  For example, instead of:
  ```
  test_runner.py 'wallet_basic.py --legacy-wallet' 'wallet_basic.py --descriptors'
  ```

  We can now just run:
  ```
  test_runner.py wallet_basic
  ```

  Also useful for `--usecli`, the IPv4/IPv6/nonloopback `rpc_bind.py` variations, etc.

ACKs for top commit:
  laanwj:
    Code review ACK b8909b0746
  MarcoFalke:
    review ACK b8909b0746

Tree-SHA512: d367037cb170e705551726d47fe4569ebc3ceadece280dd3edbb3ecb41e19f3263d6d272b407316ed6011164e850df4321fb340b1b183b34497c9f7cc439f4d8
2021-09-28 15:32:23 +02:00
pranabp-bit
ea31caf6b4 update estimatesmartfee rpc to return max of estimateSmartFee, mempoolMinFee and minRelayTxFee.
This will provide better estimates which would be closer to fee paid in actual
transactions.
The test has also been changed such that when the node is restarted with a
high mempoolMinFee, the estimatesmartfee still returns a feeRate greater
than or equal to the mempoolMinFee, minRelayTxFee.(just like the feeRate of actual transactions)
2021-09-28 18:36:38 +05:30
fanquake
dccf3d25f9
Merge bitcoin/bitcoin#23117: test: Use assert_equal over assert for easier debugging
fa8f3ba131 test: pep-8 (MarcoFalke)
fac5708afc test: Use assert_equal over assert for easier debugging (MarcoFalke)

Pull request description:

  See #23116

ACKs for top commit:
  jonatack:
    Light code review ACK fa8f3ba131
  hebasto:
    ACK fa8f3ba131, I have reviewed the code and it looks OK, I agree it can be merged.
  theStack:
    Code-review ACK fa8f3ba131

Tree-SHA512: bfdb91fd72144f05c38ed9aa8e40e17f59dcb90ac164b8bd01e241296a6c91a01f79a95a5eb97cc8445fdabe8605ef5b8062219a683613627c776feb7433a460
2021-09-28 20:16:06 +08:00
MarcoFalke
fa8f3ba131
test: pep-8 2021-09-28 10:52:33 +02:00
MarcoFalke
fac5708afc
test: Use assert_equal over assert for easier debugging 2021-09-28 10:48:51 +02:00
MarcoFalke
a9d0cec499
Merge bitcoin/bitcoin#23106: Ensure wallet is unlocked before signing PSBT with walletprocesspsbt and GUI
7e3ee4cdd0 GUI: Ask user to unlock wallet before signing psbt (Samuel Dobson)
0f3acecf33 Add test that walletprocesspsbt requires unlocked wallet when signing (Samuel Dobson)
0e895212bb Ensure wallet is unlocked before signing in walletprocesspsbt (Samuel Dobson)

Pull request description:

  If signing a PSBT, we need to ensure the wallet is unlocked.

  Fixes #22874, fixes bitcoin-core/gui#312

ACKs for top commit:
  achow101:
    ACK 7e3ee4cdd0
  lsilva01:
    Code Review ACK 7e3ee4cdd0
  benthecarman:
    ACK 7e3ee4cdd0

Tree-SHA512: 6726a873582747900ab454ea21153a92be86808a4c1517dc2856b389876a2da9e8df1ffa9b567b6bd017038342c3544ecf5ca3c97744e7debe0a5ee65563687d
2021-09-28 09:49:44 +02:00
Samuel Dobson
a8bbd4cc81
Merge bitcoin/bitcoin#22938: test: Add remaining scenarios of 0 waste, in wallet waste_test
efcaefc7b5 test: Add remaining scenarios of 0 waste (rajarshimaitra)

Pull request description:

  As per the [review club](https://bitcoincore.reviews/22009) discussion on #22009 , it was observed that there were other two fee scenarios in which selection waste could be zero.

  These are:
   - (LTF - Fee) == Change Cost
   - (LTF - Fee) == Excess

  Even though these are obvious by the definition of waste metric, adding tests for them can be helpful in explaining its behavior
  to new readers of the code base, along with pinning the behavior for future.

  This PR adds those two cases to waste calculation unit test.

  Also let me know if I am missing more scenarios.

ACKs for top commit:
  jonatack:
    Tested re-ACK efcaefc7b5
  achow101:
    ACK efcaefc7b5
  meshcollider:
    ACK efcaefc7b5

Tree-SHA512: 13fe3e2c0ea7bb58d34e16c32908b84705130dec16382ff941e5e60ca5b379f9c5811b33f36c4c72d7a98cfbb6af2f196d0a69e96989afa4b9e49893eaadd7cb
2021-09-28 20:20:06 +13:00
MarcoFalke
27836f296d
Merge bitcoin/bitcoin#22942: fuzz: Cleanup muhash fuzz target
0000dca6f0 fuzz: Cleanup muhash fuzz target (MarcoFalke)

Pull request description:

ACKs for top commit:
  fjahr:
    ACK 0000dca6f0

Tree-SHA512: 9893ad5cea0faf94a18a778ae9d62d4a37850b445b6f22fdbe57c882c956c8bca6d03dd040aa4512ce3fba350b186c3d5ed80295b6310bea60197783b50b01b6
2021-09-28 08:38:09 +02:00
fanquake
67eae69f3f
Merge bitcoin/bitcoin#23060: release: increase minimum compiler and lib(std)c++ requirements
182de7ba10 ci: update minimum compiler requirements for std::filesystem (fanquake)
04f5bafb7b doc: update minimum compiler requirements for std::filesystem (fanquake)

Pull request description:

  This increases the minimum required compiler versions to Clang 7 and GCC 8.1. This has been split out of #20744 (migration to `std::filesystem`), as it's also a requirement for some other changes, such as #20452 or #20457 which want to make use of `std::from_chars`. As well as #20435, which is also `std::filesystem` related. Given that the `std::filesystem` changes are moving ahead, splitting out this change to let other PRs take advantage of the new requirements seems worthwhile.

  Clang 7 has been available in Debian since [Stretch (oldoldstable)](https://packages.debian.org/stretch/clang-7) and in Ubuntu since [Bionic (18.04)](https://packages.ubuntu.com/bionic-updates/clang-7). GCC 8 has been available in Debian since [Buster (oldstable)](https://packages.debian.org/buster/gcc) and in Ubuntu since [Bionic (18.04)](https://packages.ubuntu.com/bionic/gcc-8). CentOS 8 also packages GCC 8.

  The CI changes here give us one build with GCC 8, and another using Clang 7 on top of libc++.

  Note that the minimum required libc++ in dependencies.md is unchanged as, at least for `<filesystem>`, and the `*_chars` use cases, libc++ 7 [should be sufficient](https://en.cppreference.com/w/cpp/compiler_support/17).

  I've tested that building `<filesystem>` code using Clang 7 & libc++ works. i.e `clang++-7 -std=c++17 fs.cpp -stdlib=libc++ -lc++fs`. Also that building `<filesystem>` code with Clang 7 and libstdc++ 8 works. i.e `clang++-7 -std=c++17  fs.cpp -lstdc++fs`.

ACKs for top commit:
  MarcoFalke:
    review ACK 182de7ba10

Tree-SHA512: 5bc151c4be58005711eed6bd8a091f3417f75a0218c11c08cffff9d749edadd965726bb7856a8e693e96e69ed0596989cda1aac4b29fb6d30705b1687a5b3363
2021-09-28 14:03:14 +08:00
Samuel Dobson
7e3ee4cdd0 GUI: Ask user to unlock wallet before signing psbt 2021-09-28 13:27:07 +13:00
Samuel Dobson
0f3acecf33 Add test that walletprocesspsbt requires unlocked wallet when signing 2021-09-28 13:27:07 +13:00
merge-script
f036c35e51
Merge bitcoin/bitcoin#23103: ci: Enable feature_asmap.py test on native Windows
4befc8f1c0 ci: Enable feature_asmap.py test on native Windows (Hennadii Stepanov)

Pull request description:

  This PR is a [follow up](https://github.com/bitcoin/bitcoin/pull/23084#issuecomment-927077970) of #23084. It enables the `feature_asmap.py` functional test which is fixed in #23084.

ACKs for top commit:
  MarcoFalke:
    cr ACK 4befc8f1c0

Tree-SHA512: bdd813f0a360b7acc4be764bb402de91be519282c107ad1952f5dccd1171e39cca0e4ce11b6257de1135ddde8deb8465d1dccf29450a1cd16f6894ed86c67cb8
2021-09-27 18:01:56 +02:00
merge-script
825f4a64e6
Merge bitcoin/bitcoin#22976: scripted-diff: Rename overloaded int GetArg to GetIntArg
93b9800fec scripted-diff: Rename overloaded int GetArg to GetIntArg (Russell Yanofsky)

Pull request description:

  This is meant to improve readability of code and remove guesswork needed to determine argument types and migrate to [typed arguments (#22978)](https://github.com/bitcoin/bitcoin/issues/22978) by having distinctly named `GetArg` `GetArgs` `GetBoolArg` and `GetIntArg` methods.

  ---

  This commit was originally part of #22766 and had some review discussion there. But it was [wisely suggested](https://github.com/bitcoin/bitcoin/pull/22766#issuecomment-910001542) to be split off  to make that PR smaller.

ACKs for top commit:
  hebasto:
    ACK 93b9800fec.
  MarcoFalke:
    re-ACK 93b9800fec 📨

Tree-SHA512: e034bd938b2c8fbadd90bcd52213a61161965dfddf18c2cb0d68816ecf2438cde8afee6fb7e3418f5c6b35c208338da9deb99e4e418dbf68ca34552e0916a625
2021-09-27 15:13:09 +02:00
Hennadii Stepanov
4befc8f1c0
ci: Enable feature_asmap.py test on native Windows 2021-09-27 15:48:58 +03:00
W. J. van der Laan
68bbfcc250
Merge bitcoin/bitcoin#23021: net: switch to signet DNS seed
dc10ca346b net: switch to signet DNS seed (Sjors Provoost)

Pull request description:

  I spun up a DNS seed for Signet, source: https://github.com/sipa/bitcoin-seeder/pull/94

  If anyone else spins up a DNS seed, let me know in the comment and I'll add it.

  Because one DNS seed is not very diverse, this PR leaves two hardcoded nodes just in case (). The one dropped node no longer exists.

  Replaces #23000.

ACKs for top commit:
  kallewoof:
    utACK dc10ca346b
  laanwj:
    Concept and code review ACK dc10ca346b
  jarolrod:
    ACK dc10ca346b
  shaavan:
    ACK dc10ca346b

Tree-SHA512: 534d189becd51974042fddc3efe3df230484f05cd945e756eaf6a4a8a580e2161b3a959eb3d44dea526269eea6f87a033f7cbfe86586782c6ca4ee7c7c4097a9
2021-09-27 14:48:33 +02:00
W. J. van der Laan
16a5997336
Merge bitcoin/bitcoin#22579: doc: Add references for the generator/constant used in Bech32(m)
b8cd2a4292 Add references for the generator/constant used in Bech32(m) (Pieter Wuille)

Pull request description:

  I often find myself recreating this, or looking up references for this construction. So instead, this seems like as good a place as any to place a summary.

ACKs for top commit:
  Zero-1729:
    crACK b8cd2a4292

Tree-SHA512: 9d2001c5016485cea441c28fda093d67a7d4274e4c1e4dd3d357353ce6a52987e38d684d8462bad2d72ba0b6b1db2f809948e228fb02371e64b12146aace89bd
2021-09-27 14:34:04 +02:00
Samuel Dobson
0e895212bb Ensure wallet is unlocked before signing in walletprocesspsbt 2021-09-28 01:25:42 +13:00
W. J. van der Laan
07e743edd0
Merge bitcoin/bitcoin#22892: doc: Clarify that change_cost cannot be negative in GetSelectionWaste
d2eccacd18 doc: Clarify that change_cost cannot be negative in GetSelectionWaste (benthecarman)

Pull request description:

  We assert that the `change_cost` must be positive so we should document it in the function's docs

  4f5ad43b1e/src/wallet/coinselection.cpp (L361)

ACKs for top commit:
  jonatack:
    ACK d2eccacd18
  jarolrod:
    ACK d2eccacd18
  shaavan:
    ACK d2eccacd18

Tree-SHA512: 089bc41d7e212b811455527ce2ac83301eae0edc03933dcbd5229b22078827395c8e3bcfda0ba029b7c60705db3119b4f80e372842a6bd8dae195dbaa0b52833
2021-09-27 14:24:06 +02:00
W. J. van der Laan
eabc2c482a
Merge bitcoin/bitcoin#23102: test: Add missing re.escape() to feature_addrman test
fa01f22e6e test: Add missing re.escape() to feature_addrman test (MarcoFalke)

Pull request description:

  Needed to run the test on windows

ACKs for top commit:
  laanwj:
    Code review ACK fa01f22e6e
  hebasto:
    ACK fa01f22e6e, passed 2 consequential runs in my [personal CI](https://cirrus-ci.com/task/6522304080379904).

Tree-SHA512: d7ca4fb882cc6693989ddf6fc092db3259a0619cb8f87293c588484b9c62e6755e9fb1bb2c1ab85fcc8f0349d9bc155ba515e16674c0f6f56236e7fbb14655a8
2021-09-27 14:12:16 +02:00
João Barbosa
03a5fe06bd qt: Keep InitExecutor in main gui thread 2021-09-27 13:05:40 +01:00
Sebastian Falbesoner
cfdb6baa22 test: use MiniWallet for p2p_filter.py
This test can now be run even with the Bitcoin Core wallet disabled.
2021-09-27 13:55:25 +02:00