Commit Graph

20611 Commits

Author SHA1 Message Date
MarcoFalke
9e6e1f35e8
Merge #21610: build: remove -Wdeprecated-register from NOWARN flags
1a011b3a8285a21ca9618a35bb841d3f2d48b247 build: remove -Wdeprecated-register from NOWARN flags (fanquake)

Pull request description:

  The `register` keyword was deprecated in C++11, and [removed in C++17](https://en.cppreference.com/w/cpp/keyword/register). Now that we require C++17, we shouldn't have to suppress warnings for a non-existent feature.

ACKs for top commit:
  sipa:
    utACK 1a011b3a8285a21ca9618a35bb841d3f2d48b247
  hebasto:
    ACK 1a011b3a8285a21ca9618a35bb841d3f2d48b247

Tree-SHA512: 7546b3870fe819507deea57d5c3179bc5debd4513df41b3f74d191995116b1507ff2a77cf2081ac32871194d4e5c2a2913c668c56244dff39853a5da18194f9f
2021-09-18 21:41:48 -04:00
MarcoFalke
bce39fe5c6
Merge #20969: test: check that getblockfilter RPC fails without block filter index
233a886b4221190a3e53128162d708266494576e test: check that getblockfilter RPC fails without block filter index (Sebastian Falbesoner)

Pull request description:

  If a node was started without compact block filter index (parameter `--blockfilterindex=0`), the `getblockfilter` RPC call should fail.

ACKs for top commit:
  MarcoFalke:
    review ACK 233a886b4221190a3e53128162d708266494576e

Tree-SHA512: c8824373fad7d1de2dcb43c1d9541d736b478235be243080d2b7479c2588eac0e5722337ec1307394b331e0002fbcabb368e4955c2dc98dd5fce76d8c089e8a1
2021-09-18 21:41:48 -04:00
MarcoFalke
36d2dc7251
Merge bitcoin-core/gui#223: qt: Re-add and rename transaction "Edit Label" action
5440c074579f5588cdcff3d33bd1350cee0b7bff qt: Rename "Edit label" to "Edit address label" (Wladimir J. van der Laan)
22664d6287dda243ebf06df4409b50ab509603e1 Revert "qt: Remove Transactionview Edit Label Action" (Wladimir J. van der Laan)

Pull request description:

  This reverts PR #211.

  I disagree with this change, I use the functionality a lot, it was the primary way I used to organize and edit transactions labels and am sad to see this go.

  > you can edit a sending address in the send tab Address Book

  Using the address book should not be encouraged at all! A while ago it was even proposed to remove it. There's rarely need to scroll through all historical addresses used and unused. The transaction list does just fine for this.

  > While all other actions apply directly to the selected transaction, the Edit Label action applies to the selected transaction's address.

  **In practice** when bitcoin is used in the commonly advised way, generate a new address for each transaction, those are equivalent though.

  I doubt I (and **luke-jr**) will be the only users that will stumblle on this. Further discussion here: https://github.com/bitcoin-core/gui/pull/211#issuecomment-784755998

ACKs for top commit:
  hebasto:
    ACK 5440c074579f5588cdcff3d33bd1350cee0b7bff, verified that 22664d6287dda243ebf06df4409b50ab509603e1 is a clean revert of 8f9644890a167a093d95ecef1f12a20dce1bc581.

Tree-SHA512: 3a86a730279bc454d0bd25d874dbfb6b1c0492480e66c3164e7c60d8658d622d4522de11bf8564876dc3ee056b53db71ecbe8a37281bf25d41a27e6e0d72ad8f
2021-09-18 21:41:48 -04:00
MarcoFalke
e61d959bfc
Merge #21222: log: Clarify log message when file does not exist
faf48f20f196e418b2eea390a0140db3604cfa15 log: Clarify log message when file does not exist (MarcoFalke)

Pull request description:

  Shorter and broader alternative to #21181

  Rendered diff:

  ```diff
  @@ -1,4 +1,4 @@
  -Bitcoin Core version v21.99.0-db656db2ed5a (release build)
  +Bitcoin Core version v21.99.0-faf48f20f196 (release build)
   Qt 5.15.2 (dynamic), plugin=wayland (dynamic)
   No static plugins.
   Style: adwaita / Adwaita::Style
  @@ -24,8 +24,8 @@ scheduler thread start
   Using wallet directory /tmp/test_001/regtest/wallets
   init message: Verifying wallet(s)...
   init message: Loading banlist...
  -ERROR: DeserializeFileDB: Failed to open file /tmp/test_001/regtest/banlist.dat
  -Invalid or missing banlist.dat; recreating
  +Missing or invalid file /tmp/test_001/regtest/banlist.dat
  +Recreating banlist.dat
   SetNetworkActive: true
   Failed to read fee estimates from /tmp/test_001/regtest/fee_estimates.dat. Continue anyway.
   Using /16 prefix for IP bucketing
  @@ -63,9 +63,9 @@ Bound to [::]:18444
   Bound to 0.0.0.0:18444
   Bound to 127.0.0.1:18445
   init message: Loading P2P addresses...
  -ERROR: DeserializeFileDB: Failed to open file /tmp/test_001/regtest/peers.dat
  -Invalid or missing peers.dat; recreating
  -ERROR: DeserializeFileDB: Failed to open file /tmp/test_001/regtest/anchors.dat
  +Missing or invalid file /tmp/test_001/regtest/peers.dat
  +Recreating peers.dat
  +Missing or invalid file /tmp/test_001/regtest/anchors.dat
   0 block-relay-only anchors will be tried for connections.
   init message: Starting network threads...
   net thread start

ACKs for top commit:
  jnewbery:
    utACK faf48f20f196e418b2eea390a0140db3604cfa15
  amitiuttarwar:
    utACK faf48f20f1, 👍 for consistency. also checked where we create / load other `.dat` files, looks good to me.
  practicalswift:
    cr ACK faf48f20f196e418b2eea390a0140db3604cfa15

Tree-SHA512: 697a728ef2b9f203363ac00b03eaf23ddf80bee043ecd3719265a0d884e8cfe88cd39afe946c86ab849edd1c836f05ec51125f052bdc14fe184b84447567756f
2021-09-18 21:41:47 -04:00
MarcoFalke
44a0d7ef1b
Merge bitcoin-core/gui#213: qt: Add Copy Address Action to Payment Requests
e348d7ea2c0b5d2eb8039dab33b0b9a48655885f qt: Add Copy Address Action to Payment Requests (Jarol Rodriguez)

Pull request description:

  Currently, the only way to copy the address of a payment request is to double-click on the payment request and then click on the copy address button. This PR adds a convenient context menu action to copy the address of a payment request.

  | Master        | PR                 |
  | ----------- | ------------ |
  |<img width="169" alt="Screen Shot 2021-02-18 at 8 33 08 PM" src="https://user-images.githubusercontent.com/23396902/108444489-b6703f80-7228-11eb-8684-945fbcd04772.png"> |<img width="169" alt="Screen Shot 2021-02-18 at 8 33 50 PM" src="https://user-images.githubusercontent.com/23396902/108444505-c12ad480-7228-11eb-9eee-473fee877ad7.png">|

ACKs for top commit:
  hebasto:
    re-ACK e348d7ea2c0b5d2eb8039dab33b0b9a48655885f, only suggested changes since my [previous](https://github.com/bitcoin-core/gui/pull/213#pullrequestreview-595520204) review.

Tree-SHA512: 2b75930ca326ef1d695afc1c6f25853ef55d06d20b66c3c3c372188a6cdfa4686c07f9c56824b766e46b660c731f8a9c2e5b935aa26b316fd46f9e396b29b802
2021-09-18 21:41:47 -04:00
MarcoFalke
d3fc1a51e3
Merge bitcoin-core/gui#211: qt: Remove Transactionview Edit Label Action
8f9644890a167a093d95ecef1f12a20dce1bc581 qt: Remove Transactionview Edit Label Action (Jarol Rodriguez)

Pull request description:

  This PR removes the `Edit Label` action from the `transactionview` context menu. Since the `Edit Label` action will no longer be utilized in the `transactionview`, the `Edit Label` function logic is also removed.

  | Master        |        PR        |
  | ----------- | ----------- |
  |<img width="248" alt="Screen Shot 2021-02-17 at 8 34 34 PM" src="https://user-images.githubusercontent.com/23396902/108292189-9b86c800-7161-11eb-9e80-6238523bc27e.png">|<img width="248" alt="Screen Shot 2021-02-17 at 8 35 10 PM" src="https://user-images.githubusercontent.com/23396902/108292204-a17ca900-7161-11eb-8582-7f33d3e2ba8f.png">|

  Among the context menu actions for each transaction in the `transactionview` is the `Edit Label` action.
  While all other actions apply directly to the selected transaction, the `Edit Label` action applies to the selected transaction's address. As documented in issue #209 and [#1168](https://github.com/bitcoin/bitcoin/issues/1168) , this is an "unfortunate" placement for such an action. The current placement creates a confusing UX scenario where the outcome of the action is ambiguous.

  **Example of Ambiguous Behavior:**
  The context menu gives the wrong impression that the `Edit Label` action will edit a `Label` for the specific transaction that has been right-clicked on. This impression can be because all other actions in this menu will relate to the specific transaction and the misconception between `Comment` and `Label`.
  <img width="1062" alt="editlabel-start" src="https://user-images.githubusercontent.com/23396902/108296385-6da48200-7167-11eb-89f0-b21ccc58f6f4.png">

  Let's say I wanted to give the transaction selected in the screenshot above a comment of "2-17[17:43]". Given all the context clues, it will be reasonable to assume that the `Edit Label` function will give a label to this transaction. Instead, it edits the `Label` for the address behind this transaction. Thus, changing the `Label` for all transactions associated with this address.
  <img width="971" alt="editlabel-end" src="https://user-images.githubusercontent.com/23396902/108297179-e35d1d80-7168-11eb-86a9-0d2796c51829.png">

  **Maintaining `Edit Label` Functionality:**
  The action of Editing a Label should instead be reserved for the respective address tables of the `Send` and `Receive` tabs. As documented in this [comment](https://github.com/bitcoin-core/gui/issues/209#issuecomment-780922101), `Edit Label` is currently implemented in the `Send` tab and is missing in the `Receive` tab. A follow-up PR can add the `Edit Label` functionality to the `Receive` tab.

ACKs for top commit:
  MarcoFalke:
    review ACK 8f9644890a167a093d95ecef1f12a20dce1bc581
  Talkless:
    tACK 8f9644890a167a093d95ecef1f12a20dce1bc581, tested on Debian Sid.

Tree-SHA512: 70bbcc8be3364b0d4f476a9760aa14ad1ad1f53b0b130ce0ffe75190d76c386e6e26c530c0a55d1742402fe2b45c68a2af6dbfaf58ee9909ad93b06f0b6559d4
2021-09-18 21:41:46 -04:00
Wladimir J. van der Laan
66d6e52d13
Merge #20741: doc: Update 'Secure string handling'
7117d7503f39f06b74c84777ec4db5d456a8086f Update 'Secure string handling' (Prayank)

Pull request description:

  - Add information about possible path traversal attack
  - [wallet_name](https://bitcoincore.org/en/doc/0.20.0/rpc/wallet/createwallet/) (string): _The name for the new wallet. If this is a 'path', the wallet will be created at the 'path' location._

  Fixes https://github.com/bitcoin/bitcoin/issues/20128 (Not really fixing it but workaround)

  This PR is an alternative to https://github.com/bitcoin/bitcoin/pull/20393

ACKs for top commit:
  michaelfolkson:
    ACK 7117d7503f39f06b74c84777ec4db5d456a8086f
  RiccardoMasutti:
    ACK 7117d7503f
  benthecarman:
    ACK 7117d7503f39f06b74c84777ec4db5d456a8086f

Tree-SHA512: 0d6c4f8db5feba848bbb583e87a99e6c4b655deaa2b566164e2632acc1aabf470d4626d2dc4b82c4997effc30d9b474d860d0e0d3e896648c5cc9bfdb623da6d
2021-09-18 21:41:46 -04:00
MarcoFalke
f01f7603ce
Merge #20781: fuzz: remove no-longer-necessary packages from fuzzbuzz config
0dade9154d2e5d4b1725fbe27720d54396c4db1d fuzz: remove no-longer-necessary packages from fuzzbuzz config (fanquake)

Pull request description:

  I take it this is actively being used, given [comments in #20560](https://github.com/bitcoin/bitcoin/pull/20560#issuecomment-743747317); so remove old dependencies from setup.

ACKs for top commit:
  practicalswift:
    ACK 0dade9154d2e5d4b1725fbe27720d54396c4db1d

Tree-SHA512: 781466776575e6051d0dddf4101bd057e484648f63e8e967240fefbf4b5832cacda6f6543708a0c368214a1efe0d60d371da78d7a920646cb93f1a4752aaf639
2021-09-18 21:41:40 -04:00
UdjinM6
67514120a1
Merge pull request #4410 from PastaPastaPasta/backport-new-wallet-pr2
Backport #11625, #15101
2021-09-19 01:15:05 +03:00
UdjinM6
8491e925d9
Merge pull request #4432 from PastaPastaPasta/backport-trivial-pr18
Backport trivial pr18
2021-09-19 00:33:21 +03:00
UdjinM6
75d176629e
ci: Exclude some less important binaries to reduce the size of the artifacts (#4441) 2021-09-19 00:30:07 +03:00
fanquake
1090f1aab4
Merge #18779: doc: Better explain GNU ld's dislike of ld64's options
cd24f37ea9168bd56b8c518ea6125e242cc4213d doc: Better explain GNU ld's dislike of ld64's options (fanquake)

Pull request description:

  There's also now more than a single option being special cased for
  darwin. If we didn't special case these options they would still end
  up on the link line and the binaries produced would just segfault.

  I'm going to plug #17874 here as well, because adding
  `-fatal-warnings` to our `AX_CHECK_LINK_FLAG` calls would
  mostly prevent this sort of option mangling from happening.

  An example of the warning behaviour:
  ```bash
  echo "int main() {}" | g++ -x c++ -std=c++11 -Wl,-dead_strip -
  /usr/bin/ld: warning: cannot find entry symbol ad_strip; defaulting to 0000000000001040

  nm -C a.out
  0000000000001000 t _init
  0000000000001040 T _start
                   U ad_strip
  ```

ACKs for top commit:
  dongcarl:
    ACK cd24f37ea9168bd56b8c518ea6125e242cc4213d

Tree-SHA512: 8c5ff11b647e7d44dbb3f509a07caf8606a6b481c114403f0de72b3ad65395dbe9a3436e731ae1b46a823431ed23c3c6aacab8942d78629d59cd8c258c5dbf02
2021-09-18 17:15:48 -04:00
Wladimir J. van der Laan
d0b0f08432
Merge #18410: Docs: Improve commenting for coins.cpp|h
21fa0a44abe8c1b5c452e097eab20cf0ae988805 [docs] use consistent naming for possible_overwrite (John Newbery)
2685c214cce4b07695273503e60350e3f05fe3e2 [tests] small whitespace fixup (John Newbery)
e9936966c08bd8a6ac02828131f619ddaa1ced13 scripted-diff: Rename PRUNED to SPENT in coins tests (John Newbery)
c205979031ff4e8e32a5f05bae813405f233fccd [docs] Improve commenting in coins.cpp|h (John Newbery)

Pull request description:

  - Add full commenting for spentness / DIRTYness / FRESHness and which combinations are valid
  - Remove the 'pruned' terminology, which doesn't make sense since per-txout chainstate db was merged (#10195).
  - Rename `potential_overwrite` to `possible_overwrite` to standardize terminology (there were previously examples of both, which made searching the codebase difficult).
  - Make other minor improvements to the comments

ACKs for top commit:
  jonatack:
    Re-ACK 21fa0a4 per `git diff 98bee55 21fa0a4` the only change since my previous review is the following code commenting diff in `src/coins.cpp::L177-179`;  rebuilt/ran unit tests anyway as a sanity check on the unit test changes.

Tree-SHA512: 391e01588ef5edb417250080cec17361f982c4454bc5f8c6d78bbd528c68a2bb94373297760691295c24660ce1022ad3ef7599762f736c8eed772ce096d38c3d
2021-09-18 17:15:47 -04:00
Samuel Dobson
aaf2a17767
Merge #18262: bnb: exit selection when best_waste is 0
9b5950db8683f9b4be03f79ee0aae8a780b01a4b bnb: exit selection when best_waste is 0 (Andrew Chow)

Pull request description:

  If we find a solution which has no waste, just use that. This solution
  is what we would consider to be optimal, and other solutions we find
  would have to also have 0 waste, so they are equivalent to the first
  one with 0 waste. Thus we can optimize by just choosing the first one
  with 0 waste.

  Closes #18257

ACKs for top commit:
  instagibbs:
    utACK 9b5950db86
  meshcollider:
    utACK 9b5950db8683f9b4be03f79ee0aae8a780b01a4b

Tree-SHA512: 59565ff4a3d8281e7bc0ce87065a34c8d8bf8a95f628ba96b4fe89f1274979165aea6312e5f1f21b418c8c484aafc5166d22d9eff9d127a8192498625d58c557
2021-09-18 17:15:47 -04:00
MarcoFalke
590ea9a24a
Merge #18549: qt: Fix Window -> Minimize menu item
56fe839e4e6d837b95b920a524570d11f7c3c5ce qt: Fix Window -> Minimize menu item (Hennadii Stepanov)

Pull request description:

  Now Window -> Minimize menu item is broken on Linux.

  Steps to reproduce:

  1. start `bitcoin-qt`
  2. activate Window -> Minimize menu item with a keyboard (not by a shortcut) or a mouse

  **Expected behavior**

  The main window gets minimized.

  **Actual behavior**

  The main window still unchanged. Even worse: the menu widget becomes a separate window:

  ![Screenshot from 2020-04-07 00-32-02](https://user-images.githubusercontent.com/32963518/78608129-ffb1dd80-7868-11ea-8e73-62ecc140ac1f.png)

  This PR does not touch the macOS specific code as `qApp->focusWindow()` seems work on macOS flawlessly.

ACKs for top commit:
  promag:
    Tested ACK 56fe839e4e6d837b95b920a524570d11f7c3c5ce on bionic with qt 5.9.5.

Tree-SHA512: 3582e44ba181d859f5994b9cddc6ce1b60aa1db520a31dd3a0684336c79d558d7410ce7a1ab5b0860c6431b54d8acc3aa16e399717b4c70839861e6b6c4290c0
2021-09-18 17:15:47 -04:00
fanquake
a71feacf02
Merge #18286: build: Add locale fuzzer to FUZZERS_MISSING_CORPORA (and unbreak Travis! :))
0d0bc3b5c1dad86cd5b2d7d90925d5722f2be6e8 build: Add locale fuzzer to FUZZERS_MISSING_CORPORA (practicalswift)

Pull request description:

  Add `locale` fuzzer to `FUZZERS_MISSING_CORPORA`.

  This is a follow-up to #18126 which broke Travis. Sorry about that :)

ACKs for top commit:
  fanquake:
    ACK 0d0bc3b5c1dad86cd5b2d7d90925d5722f2be6e8

Tree-SHA512: c0968dc798839f87c891d1dfccf5541883ac56b51a29f52244e78c221c9c087d2dea0a959612d907d53b29fca1f486b340227b17653227ecbf6ca5ab0e85b0d3
2021-09-18 17:15:46 -04:00
MarcoFalke
44aef1f053
Merge #18195: test: Add cost_of_change parameter assertions to bnb_search_test
c72a11a1a030036eb1fe4472086a9733731961ce test: Add cost_of_change parameter assertions to bnb_search_test (Yancy Ribbens)

Pull request description:

  If the `cost_of_change` variable is removed from the method body `SelectCoinsBnB`, there are currently no failing unit tests.  This PR adds assertions about the behavior of the `cost_of_change`:  If the cost of creating a change output is greater than what's leftover, then consume the output and create no change, otherwise, don't consume the output (no match found).

ACKs for top commit:
  achow101:
    ACK c72a11a1a030036eb1fe4472086a9733731961ce

Tree-SHA512: 613aa411df5e2911446e0e8bf3309336faaadf2d3c56e7d125b76454e7c6f9e4f5e8f0910dc6222282628e38cd8a4a7c56bb3d36b564a17f396b9b503ecc64c8
2021-09-18 17:15:46 -04:00
MarcoFalke
fae0e0b9aa
Merge #18159: tests: Add --valgrind option to test/fuzz/test_runner.py for running fuzzing test cases under valgrind
1b068c50dd1522990cc33e1aca444741c7e5a747 tests: Add --valgrind option to test/fuzz/test_runner.py for running fuzzing test cases under valgrind (practicalswift)

Pull request description:

  Add `--valgrind` option to `test/fuzz/test_runner.py` for running fuzzing test cases under `valgrind`.

  Test this PR using:

  ```
  $ make distclean
  $ ./autogen.sh
  $ CC=clang CXX=clang++ ./configure --enable-fuzz --with-sanitizers=fuzzer
  $ make
  $ git clone https://github.com/bitcoin-core/qa-assets
  $ test/fuzz/test_runner.py --valgrind -l DEBUG qa-assets/fuzz_seed_corpus/
  ```

ACKs for top commit:
  MarcoFalke:
    ACK 1b068c50dd1522990cc33e1aca444741c7e5a747 🌒

Tree-SHA512: e6eb99af1bceaa6f36f49092a05de415848099ccc1497cc098a62e925954c978cb37a46410b44ed5eef2c6464ca4ecb06397b75b5d35701f5a8525436e47b9fd
2021-09-18 17:15:45 -04:00
Jonas Schnelli
b6a1b67143
Merge #18121: gui: Throttle GUI update pace when -reindex
c9fe61291e9b23f37cf66194c2dad28e4d4a8954 gui: Throttle GUI update pace when -reindex (Hennadii Stepanov)

Pull request description:

  This is grabbed from #17565.

  All **laanwj**'s and **ryanofsky**'s suggestions are implemented.

  With this PR,  the GUI does not freeze when a user runs:
  ```
  $ ./src/qt/bitcoin-qt -reindex
  ```

ACKs for top commit:
  jonasschnelli:
    utACK c9fe61291e9b23f37cf66194c2dad28e4d4a8954

Tree-SHA512: c7be316cb73d3d286bdf8429a960f71777d13a73d059869a64e23ad276499252b561a3a5b9613c4c1ad58cc0de26283c1ec72be745c401f604eaa05f70bf7d64
2021-09-18 17:15:45 -04:00
fanquake
b93a9e2ad2
Merge #18003: build: remove --large-address-aware linker flag
acd644b83d789a6cdfbeda19732119534d10058e build: remove --large-address-aware linker flag (fanquake)

Pull request description:

  This flag was used when building 32-bit Windows executables, which we no-longer
  do, and is not accepted by the linker for any of the hosts we currently build
  for. i.e:

  ```bash
  checking whether the linker accepts -Wl,--large-address-aware... no
  ```

  --large-address-aware
      If given, the appropriate bit in the "Characteristics" field of the COFF
      header is set to indicate that this executable supports virtual addresses
      greater than 2 gigabytes. This should be used in conjunction with the /3GB
      or /USERVA=value megabytes switch in the "[operating systems]" section of
      the BOOT .INI. Otherwise, this bit has no effect. [This option is specific
      to PE targeted ports of the linker]

  You can check that the appropriate bit in the COFF header of our 64-bit
  Windows binaries is still be set using dumpbin. i.e:

  ```powershell
  dumpbin /headers .\bitcoind.exe

  FILE HEADER VALUES
  <snip>
  26 characteristics
       Executable
       Line numbers stripped
       Application can handle large (>2GB) addresses
  ```

ACKs for top commit:
  laanwj:
    ACK acd644b83d789a6cdfbeda19732119534d10058e

Tree-SHA512: 9711e07bc08e843fcefd0517091a59cb7670dd107d03623a146d03fe73054d0e64f78489490b37f4708eab2c4800037f923b9ec92e7f53c3df9a590242f52b55
2021-09-18 17:15:44 -04:00
fanquake
79bdf2c3bd
Merge #17971: refactor: Remove redundant conditional
e80317be5fc6f6a04ea3b35bfe9991b3a5d29f7a refactor: Remove redundant conditional (Bushstar)

Pull request description:

  Conditional check against fMaster is now redundant as it is already checked as true. This originally made sense as the outer conditional was:

  f9cae832e6/src/checkqueue.h (L86)

  Removal of fQuit happened in the commit below.

  30ded3e3d8 (diff-88316c9aa9514c038c9304297e672da5)

ACKs for top commit:
  theStack:
    ACK e80317be5f
  hebasto:
    ACK e80317be5fc6f6a04ea3b35bfe9991b3a5d29f7a, I have reviewed the code, and it looks OK, I agree it can be merged.
  promag:
    ACK e80317be5fc6f6a04ea3b35bfe9991b3a5d29f7a.
  emilengler:
    re-ACK e80317be5fc6f6a04ea3b35bfe9991b3a5d29f7a
  practicalswift:
    ACK e80317be5fc6f6a04ea3b35bfe9991b3a5d29f7a
  Empact:
    ACK e80317be5f

Tree-SHA512: 136ea1d02e3d65100a8758730617ccede7864e08e8404e42e65d45d4bf95a3bfea2ab9895c6e8833abd654557d3efbba02b25297a2a5eefc36a11e97bbe9134f
2021-09-18 17:15:44 -04:00
Jonas Schnelli
4197db6a7e
Merge #15101: gui: Add WalletController
0dd9bdefa gui: Refactor to use WalletController (João Barbosa)
8fa271f08 gui: Add WalletController (João Barbosa)
cefb399e2 gui: Use AutoConnection for WalletModel::unload signal (João Barbosa)

Pull request description:

  This PR is a subset of the work done in the context of #13100. This change consists in extracting from the application class the code that manages the wallet models.

  The role of the `WalletController` instance is to coordinate wallet operations and the window.

Tree-SHA512: 6a824054376730eb7d16c643dd2003f5f60778e8ad3af707b82bc12c48438db179ca4446316b28fb17b206f4b9aba8998419aab8c5dd1f7c32467015732b5094
2021-09-18 17:13:55 -04:00
MarcoFalke
47a03a5346
Merge #11625: Add BitcoinApplication & RPCConsole tests
7e4bd19785 Add BitcoinApplication & RPCConsole tests (Russell Yanofsky)
ca20b65cc0 Move BitcoinApplication to header so it can be tested (Russell Yanofsky)

Pull request description:

  Add test coverage for Qt initialization code & basic RPC console functionality

  Motivation for this change was a bug in #11603 which existing tests failed to catch.

Tree-SHA512: f66546ffc84b8e07679c66a73b265023fbf6a0cb8f24f1606a5fcae2dd3b4dc7b2c6d26c69dedcec53398a26ef17c4d5fb28c055698fa6e45e89aa2995cefe2f
2021-09-18 17:13:54 -04:00
UdjinM6
f54210a4a6
Merge pull request #4256 from kittywhiskers/cxx17support
core: transition to c++17, deboostification
2021-09-18 23:27:46 +03:00
Dzutte
db505dcbb9
Fix Dash build for Arch Linux with GCC 11.1 (#4398)
The SignatureHash() template function is declared in a header but
defined in a .cpp file. That means only its instantiations are available
from outside.

For some reason, GCC 11.1 on Arch Linux doesn't see implicit
instantiations for CTransaction and CMutableTransaction.
Define these explicitly to make the compiler happy.

Signed-off-by: Dzutte <dzutte.tomsk@gmail.com>
2021-09-18 12:00:04 +03:00
Wladimir J. van der Laan
4140379b58
Merge #15792: doc: describe onlynet option in doc/tor.md
140bbeec45f14fd50cce68448bc7fa655cbef951 doc: describe onlynet option in doc/tor.md (Jon Atack)

Pull request description:

  as per http://www.erisian.com.au/bitcoin-core-dev/log-2019-04-11.html#l-102.

  Description adapted from [/src/init.cpp#L429](https://github.com/bitcoin/bitcoin/blob/master/src/init.cpp#L429).

  Please verify if this is the best place to add it in the documentation.

  This commit also fixes a typo in doc/dependencies.md.

  [skip ci]

ACKs for commit 140bbe:
  practicalswift:
    ACK 140bbeec45f14fd50cce68448bc7fa655cbef951
  fanquake:
    utACK 140bbee

Tree-SHA512: 05064cc155de5a855e26f70ac5741a137ee5050573007a19e10dba0b5b2c89148ef30f765b50fc76f73dfad17df082f4e68e174b93e2bf7e169e8bd1f9426673
2021-09-18 00:28:29 -04:00
Wladimir J. van der Laan
0ddc6505b6
Merge #15802: doc: mention creating application support bitcoin folder on OSX
8dfbb5cf236cb70a2a1e65b076ccb7e2901833bd doc: mention creating application support bitcoin folder on OSX (Jack Mallers)

Pull request description:

  When setting up bitcoin core on my new MacBook via the [`macOS Build Instructions and Notes`](https://github.com/bitcoin/bitcoin/blob/master/doc/build-osx.md), running `touch "/Users/${USER}/Library/Application Support/Bitcoin/bitcoin.conf"` resulted in `No such file or directory` because my `/Users/${USER}/Library/Application Support/Bitcoin/` folder had not been created yet.

  This PR adds `mkdir "/Users/${USER}/Library/Application Support/Bitcoin"` to the documentation before creating the configuration file with `touch "/Users/${USER}/Library/Application Support/Bitcoin/bitcoin.conf"`

ACKs for commit 8dfbb5:
  fanquake:
    utACK 8dfbb5cf236cb70a2a1e65b076ccb7e2901833bd

Tree-SHA512: c401dae0a681bed77b31939bd29f79837f66c8537da393871fc3596e8c10629b8817ece9c8d49b1b9de34e74e0fbff742a9116b02ce7a71af93f872b87539337
2021-09-18 00:26:06 -04:00
Wladimir J. van der Laan
4491bfaf9b
Merge #15809: gitignore: plist and dat
17be9e0e3037b60ba7bbf4b9249f2efc5e1ba9b3 gitignore: add *.plist (clang-check) (James O'Beirne)
e7acf44bbfd05233f7753b3c8230892196facde8 gitignore: add *.dat (James O'Beirne)

Pull request description:

  Ignore anything ending in `.dat` and files generated by clang-check.

ACKs for commit 17be9e:
  fanquake:
    utACK 17be9e0

Tree-SHA512: 92854ad6fe1e7fd1180f2c809aeed802a9e95c90bd1faeca884d27dba7cacd34a6ececa2218f681433bb69a194efb932ff43b501ec1ccccb56b7d4e41facafe6
2021-09-18 00:24:05 -04:00
Kittywhiskers Van Gogh
84c25db459 merge bitcoin#18165: Consolidate service flag bit-to-name conversion to a shared serviceFlagToStr function 2021-09-18 09:18:36 +05:30
Kittywhiskers Van Gogh
b2ae73cff4 merge bitcoin#17687: fix Fatal LevelDB error when specifying -blockfilterindex twice 2021-09-18 09:18:30 +05:30
Kittywhiskers Van Gogh
d77b68f34c merge bitcoin#17474: Recognise NETWORK_LIMITED in formatServicesStr 2021-09-18 09:18:27 +05:30
Kittywhiskers Van Gogh
58340cef63 merge bitcoin#16787: Human readable network services 2021-09-18 09:18:22 +05:30
Wladimir J. van der Laan
81f6dd86b7 Merge #20594: Fix getauxval calls in randomenv.cpp
836a3dc02c72f917db5be386b9b4787a59d48610 Avoid weak-linked getauxval support on non-linux platforms (like macOS) (Jonas Schnelli)
41a413b31746cc749f3c64ed8070cea9cc6cfdbe Define correct symbols for getauxval (Jonas Schnelli)

Pull request description:

  PR #20358 made use of the two preprocessor symbols `HAVE_STRONG_GETAUXVAL` as well as `HAVE_WEAK_GETAUXVAL`.

  These symbols have not been defined in configure.ac. They where only passed selective as CRC32 CPPFLAGS in https://github.com/bitcoin/bitcoin/blob/master/src/Makefile.crc32c.include#L16.

  PR #20358 would have broken the macOS build since `getauxval` is not supported on macOS (but weak-linking does pass).

  This PR defines the two symbols correctly and reduces calls to `getauxval` to linux.

ACKs for top commit:
  laanwj:
    Code review ACK 836a3dc02c72f917db5be386b9b4787a59d48610
  jonatack:
    utACK 836a3dc02c72f917db5be386b9b4787a59d48610

Tree-SHA512: 6527f4a617b937f4c368a3cb1c162f1ac38a6f5e6341295554961eaf322906e9b27398a6f7b00819854ceebb5c828d3e6ce0a779edd769adc4053ce8beda3739
2021-09-17 16:01:55 -04:00
Wladimir J. van der Laan
29132a1b16 Merge #19631: test: Wait for 'cmpctblock' in p2p_compactblocks when it is expected
9e165d0de4c3cd168137fc85b8f31b371bd4e851 test: Wait for 'cmpctblock' in p2p_compactblocks when it is expected (Ben Woosley)

Pull request description:

  This is a more narrowly-construed wait which eliminates the possibility of the
  wait being triggered by other messages.

  Note `received_block_announcement` reflect three possible messages:
  edec7f7c25/test/functional/p2p_compactblocks.py (L34-L53)

  Prompted by looking into: #19449

ACKs for top commit:
  laanwj:
    Code review ACK 9e165d0de4c3cd168137fc85b8f31b371bd4e851
  theStack:
    ACK 9e165d0de4

Tree-SHA512: bc4a9c8bf031c8a7efb40d9625feaa3fd1f56f3b75da7034944af71ccea44328a6c708ab0c13fea85fb7cf4fd9043fe90eb94a25e95b2d42be44c2962b4904ce
2021-09-17 16:00:50 -04:00
Wladimir J. van der Laan
1b5ea905a3 Merge #17887: bug-fix macos: give free bytes to F_PREALLOCATE
75163f4729c10c40d2843da28a8c79ab89193f6a bug-fix macos: give free bytes to F_PREALLOCATE (Karl-Johan Alm)

Pull request description:

  The macos manpage for `fcntl` (for `F_PEOFPOSMODE`) states:

  > Allocate from the physical end of file.  In this case, fst_length indicates the number of newly allocated bytes desired.

  This would result in the rev files being essentially pre-allocating 2x their necessary size (this is the case for block files as well, but these are flushed down to their right sizes every time) as they would pre-allocate `pos + length` **free** bytes, rather than allocating `length` bytes after `pos`, as expected.

  Fixes #17827.

ACKs for top commit:
  eriknylund:
    ACK 75163f4729c10c40d2843da28a8c79ab89193f6a built locally. All tests passing. Manual test as per my previous comment above on an older commit, using an APFS unencrypted disk image with 3 GB.
  laanwj:
    code review ACK 75163f4729c10c40d2843da28a8c79ab89193f6a

Tree-SHA512: 105c8d56c20acad8febdf0583f1e5721b63376ace325a7a62c2e4b15a442c7131404ed604c32c0cda716791d7ca5aa9f5b6a774ff86e39838bc7e87ca3c42760
2021-09-17 15:56:39 -04:00
fanquake
81f118f3d3 Merge #17939: gui: Remove warning "unused variable 'wallet_model'"
c279a81e9c7dc3386e929ff8b635e7a0de9c20c5 gui: Remove warning "unused variable 'wallet_model'" (João Barbosa)

Pull request description:

  This was part of the abandoned #15150.

ACKs for top commit:
  theStack:
    utACK c279a81e9c
  fanquake:
    ACK c279a81e9c7dc3386e929ff8b635e7a0de9c20c5 - tested wallet loading/unloading in the qt rpc console.

Tree-SHA512: 8fbd55c7e213599c7be843b52e960a16cf965b3e01489f426ac3ed9d579d78bb4b2ac230bcccd8abe0397a8b1166ee10e0d685738441a77a5dcb5135c15790fa
2021-09-17 15:56:39 -04:00
fanquake
10a4b01361 Merge #17686: build: add -bind_at_load to macOS hardened LDFLAGS
c78b123982d59fe2d633659f23d6893de627f3f6 build: add -bind_at_load to hardened LDFLAGS (fanquake)

Pull request description:

  This performs the same function as `-Wl,-z,now`, except for ld on macOS.

  You can check the binaries using `otool -l`, and looking for the `LC_DYLD_INFO_ONLY` section; `lazy_bind_off` and `lazy_bind_size` should both be 0.

  This seems to be the case with our current release binaries. However we can make the check, and applying the flag explicit in configure.

  man ld:
  ```bash
  -bind_at_load
  Sets a bit in the mach header of the resulting binary which tells dyld
  to bind all symbols when the binary is loaded, rather than lazily.
  ```
  TODO:
  - [ ] Follow up with `MH_BINDATLOAD` flag.

ACKs for top commit:
  theuni:
    ACK c78b123982d59fe2d633659f23d6893de627f3f6.

Tree-SHA512: 12259558b84f7e3d75d6fcde63b517685e42b18fcf8e8cfcf347483c5ba089d3b4b6d330e7b7f61f83a328fe4d141b771e8e52ddee9cac6da87dfc073ab1183d
2021-09-17 15:56:38 -04:00
MarcoFalke
67f1de4312 Merge #17753: util: Don't allow Base32/64-decoding or ParseMoney(…) on strings with embedded NUL characters. Add tests.
137c80d579502e329964d7d1028a9507d4667774 tests: Add tests for decoding/parsing of base32, base64 and money strings containing NUL characters (practicalswift)
a6fc26da55dea3b76bd89fbbca24ded170238674 util: Don't allow DecodeBase32(...) of strings with embedded NUL characters (practicalswift)
93cc18b0f6fa5fa8144079a4f51904d8b3087e94 util: Don't allow DecodeBase64(...) of strings with embedded NUL characters (practicalswift)
ccc53e43c5464058171d6291da861a88184b230e util: Don't allow ParseMoney(...) of strings with embedded NUL characters (practicalswift)

Pull request description:

  Don't allow Base32/64-decoding or `ParseMoney(…)` on strings with embedded `NUL` characters. Add tests.

  Added tests before:

  ```
  $ src/test/test_bitcoin
  Running 385 test cases...
  test/base32_tests.cpp(31): error: in "base32_tests/base32_testvectors":
      check failure == true has failed [false != true]
  test/base64_tests.cpp(31): error: in "base64_tests/base64_testvectors":
      check failure == true has failed [false != true]
  test/util_tests.cpp(1074): error: in "util_tests/util_ParseMoney":
      check !ParseMoney(std::string("\0-1", 3), ret) has failed
  test/util_tests.cpp(1076): error: in "util_tests/util_ParseMoney":
      check !ParseMoney(std::string("1\0", 2), ret) has failed

  *** 4 failures are detected in the test module "Bitcoin Core Test Suite"
  ```

  Added tests after:

  ```
  $ src/test/test_bitcoin
  Running 385 test cases...

  *** No errors detected
  ```

ACKs for top commit:
  laanwj:
    Code review ACK 137c80d579502e329964d7d1028a9507d4667774

Tree-SHA512: 9486a0d32b4cf686bf5a47a0778338ac571fa39c66ad6d6d6cede58ec798e87bb50a2f9b7fd79ecd1fef1ba284e4073c1b430110967073ff87bdbbde7cada447
2021-09-17 15:56:38 -04:00
MarcoFalke
853592e0f5 Merge #17093: tests: Add fuzzing harness for various CTx{In,Out} related functions
d5766f223f627bf2eb731ce8552dfafa2b824378 tests: Add corpora suppression (FUZZERS_MISSING_CORPORA) for fuzzers missing in https://github.com/bitcoin-core/qa-assets/tree/master/fuzz_seed_corpus (practicalswift)
e75ecb91c730115290e1201371492c2cd334e9b4 tests: Add fuzzing harness for various CTxOut related functions (practicalswift)
ce935292c041162e160d95fc6afeda3dceded2cf tests: Add fuzzing harness for various CTxIn related functions (practicalswift)

Pull request description:

  Add fuzzing harness for various `CTx{In,Out}` related functions.

  **Testing this PR**

  Run:

  ```
  $ CC=clang CXX=clang++ ./configure --enable-fuzz --with-sanitizers=address,fuzzer,undefined
  $ make
  $ src/test/fuzz/tx_in
  …
  $ src/test/fuzz/tx_out
  …
  # And to to quickly verify that the relevant code regions are triggered, that the
  # fuzzing throughput seems reasonable, etc.
  $ contrib/devtools/test_fuzzing_harnesses.sh '^tx_'
  ```

  `test_fuzzing_harnesses.sh` can be found in PR #17000.

Top commit has no ACKs.

Tree-SHA512: f1374307a2581ebc3968d012ea2438061bbb84ece068e584fae9750669a6cd003723dde14db88e77c9579281ecd4eaa2a7ff0614f253d8c075e6dd16dd2e68d5
2021-09-17 15:48:14 -04:00
Wladimir J. van der Laan
f12ca55d84 Merge #17680: gitian: fixed SC2001 regex
c966ff14c77870378847b9e6063b9671739ddc1f gitian: fixed SC2001 regex (willyk)

Pull request description:

  Currently the gitian-win-signer.yml produces OUTFILE names without `-unsigned` stripped out
  This is due to regex having an`%` in front of it
  ```
  $ INFILE="bitcoin-0.19.0-win64-setup-unsigned.exe"
  $ echo "${INFILE/%-unsigned}"
  bitcoin-0.19.0-win64-setup-unsigned.exe
  $ echo "${INFILE/-unsigned}"
  bitcoin-0.19.0-win64-setup.exe
  ```

  Fixes #17361

ACKs for top commit:
  laanwj:
    ACK c966ff14c77870378847b9e6063b9671739ddc1f
  hebasto:
    ACK c966ff14c77870378847b9e6063b9671739ddc1f

Tree-SHA512: 954547f9dfa4cab4def5f284d4837c21f0e6fed7454a04e83e6b1b7d3fd3f9661ea657047f0d8162f6591909d32ef2f72e801b2f3a44cbb1131ac344cb913a69
2021-09-17 15:48:14 -04:00
Wladimir J. van der Laan
7bbae1bfd0 Merge #14119: qa: Read reject reasons from debug log, not p2p messages
fac3e22b18cd29053bc17065fd75db7b84ba6f40 qa: Read reject reasons from debug log, not p2p messages (MarcoFalke)

Pull request description:

  For local testing we don't need to rely on p2p messages just to assert a reject reason.

  Replace reading p2p messages with reading from the debug log file.

Tree-SHA512: fa59598ecf5e00cfb420ef1892d90aa415501fd882e1c608894dc577b0d00e93a442326d3a9167fef77d26aafbe345b730b49109982ccad68a5942384564a90b
2021-09-17 14:07:28 -04:00
Wladimir J. van der Laan
b8a87799f0 Merge #14096: Add reference documentation for descriptors language
2b5d6f8df24b381d35b75187c97ae0cc9f7c3ed0 Replace duplcate reference with reference to reference doc (Pieter Wuille)
89709db7a2710456011eac9dcd6a60d5e87b97ae Adjust TODO link (Pieter Wuille)
9254ffcf2d910ecb0f9ecbeef6d40a2008a44870 Add descriptor reference documentation (Pieter Wuille)

Pull request description:

Tree-SHA512: 1ca0d537f9bcbb23266e9a4a02a60013ef8309958fb701f638283887585b5ddea6bc9dab859454ec3a373b1a12a4fd69836e7030417bb2ca43fef26b104c0d65
2021-09-17 14:07:10 -04:00
MarcoFalke
7dc5565c7d
Merge #14411: [wallet] Restore ability to list incoming transactions by label
da427dbd48 Rename ListTransactions filter variable (Russell Yanofsky)
65b740f92b [wallet] Restore ability to list incoming transactions by label (Russell Yanofsky)

Pull request description:

  This change partially reverts #13075 and #14023.

  Fixes #14382

Tree-SHA512: 8c4e56104b3a45784cdc06bae8e5facdfff04fe3545b63a35e0ec2e440a41b79d84833ca4c4e728d8af7ebb8a519303a9eda7bee4bbfb92bd50c58587a33eb30
2021-09-17 02:17:00 +03:00
John Newbery
da164724d2
Merge bitcoin#13825: [wallet] Kill accounts
This commit does the following changes:

- [wallet] Remove 'account' argument from GetLegacyBalance()
  - GetLegacyBalance() is never called with an account argument.
    Remove the argument and helper functions.
- [wallet] Remove CWallet::ListAccountCreditDebit()
  - Function no longer used.
- [wallet] Remove AccountMove()
  - Function no longer used.
- [wallet] Remove AddAccountingEntry()
  - Function no longer used.
- [wallet] Remove GetAccountCreditDebit()
  - Function no longer used.
- [wallet] Don't rewrite accounting entries when reordering wallet transactions.
 - Accounting entries are deprecated. Don't rewrite them to the wallet
   database when re-ordering transactions.
- [wallet] Remove WriteAccountingEntry()
  - Function no longer used.
- [wallet] Don't read acentry key-values from wallet on load.
- [wallet] Remove ListAccountCreditDebit()
  - Function no longer used.
- [wallet] Remove CAccountingEntry class
  - No longer used
- [wallet] Remove GetLabelDestination
  - Function no longer used.
- [wallet] Delete unused account functions
  - ReadAccount
  - WriteAccount
  - EraseAccount
  - DeleteLabel
- [wallet] Remove fromAccount argument from CommitTransaction()
- [wallet] Remove strFromAccount.
  - No longer used.
- [wallet] Remove strSentAccount from GetAmounts().
  - No longer used.
- [wallet] Update zapwallettxes comment to remove accounts.
- [wallet] Remove CAccount
  - No longer used
- [docs] fix typo in release notes for PR 14023
2021-09-17 02:17:00 +03:00
Wladimir J. van der Laan
b00e1b6331
Merge #14023: Remove accounts rpcs
bb08423d5ca866d4a139a3b57ff110d818d08b32 [doc] Add release notes for 'account' API removal (John Newbery)
1f4b865e57b4567270b1586bb1f348ab9106485d [wallet] Re-sort wallet RPC commands (John Newbery)
f0dc850bf698f7377797d7d68365d4fc79b0221c [wallet] Remove wallet account RPCs (John Newbery)
c410f415758913c933ad6c71cf50227cc85aa385 [tests] Remove wallet accounts test (John Newbery)

Pull request description:

  This is the first part of #13825. It simply removes the RPC methods and tests.

  #13825 touches lots of files and will require frequent rebasing.

  Breaking it down for easier reviewing and fewer rebases.

Tree-SHA512: d29af8e7a035e4484e6b9bb56cb86592be0ec112d8ba4ce19c15d15366ff3086e89e99fca26b90c9d66f6d3e06894486d0f29948df0bb7dcb1e2c49c6887a85a
2021-09-17 02:17:00 +03:00
UdjinM6
5afaeb24cb
Revert "Merge #14441: [wallet] Backport(0.17): Restore ability to list incoming transactions by label"
This reverts commit 96d306324f.
2021-09-17 02:16:55 +03:00
PastaPastaPasta
0cb3dd5b87
Merge pull request #4429 from ogabrielides/b_15485_15250_15647
Merge bitcoin #15485, #15250, #15647
2021-09-16 18:56:31 -04:00
PastaPastaPasta
0fc4d55c1c
Merge pull request #4428 from ogabrielides/b_15458
Merge #15458: refactor: Drop redundant wallet reference
2021-09-16 18:55:28 -04:00
PastaPastaPasta
78e04b92f2
Merge pull request #4420 from vijaydasmp/backport_v18_vijay_batch3_1
Merge #15334, #13076, #15266, #13128
2021-09-16 18:29:41 -04:00
Wladimir J. van der Laan
5167cbe911 Merge #15250: Use RdSeed when available, and reduce RdRand load
1435fabc19d2143187efb493cbe23225eaf851ae Use RdSeed when available, and reduce RdRand load (Pieter Wuille)

Pull request description:

  This introduces support for autodetecting and using the RdSeed instruction on x86/x86_64 systems.

  In addition:
  * In SeedFast, only 64 bits of entropy are generated through RdRand (256 was relatively slow).
  * In SeedStartup, 256 bits of entropy are generated, using RdSeed (preferably) or RdRand (otherwise).

Tree-SHA512: fb7d3e22e93e14592f4b07282aa79d7c3cc4e9debdd9978580b8d2562bbad345e289bf3f80de2c50c9b50b8bac2aa9b838f9f272f7f8d43f1efc0913aa8acce3
2021-09-16 13:34:59 +03:00