Commit Graph

29460 Commits

Author SHA1 Message Date
Jon Atack
7c2284eda2
test: add tests for inbound eviction protection of I2P peers 2021-06-14 14:01:44 +02:00
Jon Atack
ce02dd1ef1
p2p: extend inbound eviction protection by network to I2P peers
This commit extends our inbound eviction protection to I2P peers to
favorise the diversity of peer connections, as peers connected
through the I2P network are otherwise disadvantaged by our eviction
criteria for their higher latency (higher min ping times) relative
to IPv4 and IPv6 peers, as well as relative to Tor onion peers.

The `networks` array is order-dependent in the case of a tie in
candidate counts between networks (earlier array members receive
priority in the case of a tie).

Therefore, we place I2P candidates before localhost and onion ones
in terms of opportunity to recover unused remaining protected slots
from the previous iteration, guesstimating that most nodes allowing
both onion and I2P inbounds will have more onion peers, followed by
localhost, then I2P, as I2P support is only being added in the
upcoming v22.0 release.
2021-06-14 14:01:35 +02:00
Jon Atack
70bbc62711
test: add combined onion/localhost eviction protection coverage 2021-06-14 14:00:12 +02:00
Jon Atack
045cb40192
p2p: remove unused m_is_onion member from NodeEvictionCandidate struct 2021-06-14 13:58:05 +02:00
Jon Atack
310fab4928
p2p: remove unused CompareLocalHostTimeConnected() 2021-06-14 13:58:03 +02:00
Jon Atack
9e889e8a5c
p2p: remove unused CompareOnionTimeConnected() 2021-06-14 13:58:01 +02:00
Jon Atack
787d46bb2a
p2p: update ProtectEvictionCandidatesByRatio() doxygen docs 2021-06-14 13:57:59 +02:00
Jon Atack
1e15acf478
p2p: make ProtectEvictionCandidatesByRatio() fully ratio-based
with a more abstract framework to allow easily extending inbound
eviction protection to peers connected through new higher-latency
networks that are disadvantaged by our inbound eviction criteria,
such as I2P and perhaps other BIP155 networks in the future like
CJDNS.  This is a change in behavior.

The algorithm is a basically a multi-pass knapsack:

- Count the number of eviction candidates in each of the disadvantaged
  privacy networks.

- Sort the networks from lower to higher candidate counts, so that
  a network with fewer candidates will have the first opportunity
  for any unused slots remaining from the previous iteration.  In
  the case of a tie in candidate counts, priority is given by array
  member order from first to last, guesstimated to favor more unusual
  networks.

- Iterate through the networks in this order.  On each iteration,
  allocate each network an equal number of protected slots targeting
  a total number of candidates to protect, provided any slots remain
  in the knapsack.

- Protect the candidates in that network having the longest uptime,
  if any in that network are present.

- Continue iterating as long as we have non-allocated slots
  remaining and candidates available to protect.

Localhost peers are treated as a network like Tor or I2P by aliasing
them to an unused Network enumerator: Network::NET_MAX.

The goal is to favorise diversity of our inbound connections.

Credit to Vasil Dimov for improving the algorithm from single-pass
to multi-pass to better allocate unused protection slots.

Co-authored-by: Vasil Dimov <vd@FreeBSD.org>
2021-06-14 13:57:49 +02:00
Jon Atack
3f8105c4d2
test: remove combined onion/localhost eviction protection tests
as we are about the change the behavior sufficiently that when we
have multiple disadvantaged networks and a small number of peers
under test, the number of protected peers per network can be different.
2021-06-13 20:15:51 +02:00
Jon Atack
38a81a8e20
p2p: add CompareNodeNetworkTime() comparator struct
to compare and sort peer eviction candidates by the
passed-in is_local (localhost status) and network
arguments, and by longest uptime.
2021-06-13 20:15:49 +02:00
Jon Atack
4ee7aec47e
p2p: add m_network to NodeEvictionCandidate struct 2021-06-13 20:15:47 +02:00
Jon Atack
7321e6f2fe
p2p, refactor: rename vEvictionCandidates to eviction_candidates
in ProtectEvictionCandidatesByRatio()
per current style guide in doc/developer-notes.md
2021-06-13 20:15:45 +02:00
Jon Atack
ec590f1d91
p2p, refactor: improve constness in ProtectEvictionCandidatesByRatio() 2021-06-13 20:15:43 +02:00
Jon Atack
4a19f501ab
test: add ALL_NETWORKS to test utilities 2021-06-13 20:15:41 +02:00
Jon Atack
519e76bb64
test: speed up and simplify peer_eviction_test
This speeds up the test significantly, which helps when
running it repeatedly.

Suggest reviewing the diff with:

colorMoved = dimmed-zebra
colorMovedWs = allow-indentation-change
2021-06-13 20:14:40 +02:00
Jon Atack
1cde800523
p2p, refactor: rm redundant erase_size calculation in SelectNodeToEvict()
as EraseLastKElements() called in the next line performs the same operation.
Thanks to Martin Zumsande (lightlike) for seeing this while reviewing.

Co-authored-by: Martin Zumsande <mzumsande@gmail.com>
2021-06-11 12:26:59 +02:00
MarcoFalke
f66eceaecf
Merge bitcoin/bitcoin#22216: refactor: Make SetupServerArgs callable without NodeContext
493fb47c57 Make SetupServerArgs callable without NodeContext (Russell Yanofsky)

Pull request description:

  `bitcoin-gui` code needs to call `SetupServerArgs` but will not have a `NodeContext` object if it is communicating with an external `bitcoin-node` process, so this just passes `ArgsManager` directly.

  ---

  This PR is part of the [process separation project](https://github.com/bitcoin/bitcoin/projects/10). The commit was first part of larger PR #10102.

ACKs for top commit:
  MarcoFalke:
    review ACK 493fb47c57

Tree-SHA512: 94cda4350113237976e32f1935e3602d1e6ea90c29c4434db2094be70dddf4b63702c3094385258bdf1c3e5b52c7d23bbc1f0282bdd4965557eedd5aef9a0fd4
2021-06-11 09:18:34 +02:00
MarcoFalke
6985038046
Merge bitcoin/bitcoin#22118: test: check anchors.dat when node starts for the first time
ef99d03c2b test: check anchors.dat when node starts for the first time (bruno)

Pull request description:

  See https://github.com/bitcoin/bitcoin/pull/21338#discussion_r598406712, https://github.com/bitcoin/bitcoin/pull/21338#discussion_r598406187, https://github.com/bitcoin/bitcoin/pull/21338#discussion_r598405613.

ACKs for top commit:
  laanwj:
    Code review ACK ef99d03c2b

Tree-SHA512: 505f1f34fbc0c72a92968883be0f1c5f169a4ba3aa8a56e1ce8bc5e514f49e3a17ce51fd40be0073dc4bc06eaeda36dfe90ace843c181170e34643226afd78ef
2021-06-11 08:23:02 +02:00
fanquake
ce8276b531
Merge bitcoin/bitcoin#22190: Use latest signapple commit
683d197970 Use latest signapple commit (Andrew Chow)

Pull request description:

  Update gitian and guix to use the same latest signapple commit.

  Also changed guix to use the actual repo. The changes from the fork were incorporated upstream.

ACKs for top commit:
  fanquake:
    ACK 683d197970 - sanity checked that the updated package is built:

Tree-SHA512: a4981f8bbe33e6c5654632bc9b9f6f2f1e675741a19ac7296205e370f1e64a747101ecb632e0cc82a0134e4c2e9ce47b3f7b4d8c8f75f0f06dd069c078303759
2021-06-11 09:09:26 +08:00
fanquake
551933f9ec
Merge bitcoin/bitcoin#22203: test: Use ConnmanTestMsg from test lib in denialofservice_tests
fa72fce7c9 test: Use ConnmanTestMsg from test lib in denialofservice_tests (MarcoFalke)

Pull request description:

  This allows to remove code.

  Also, required for https://github.com/bitcoin/bitcoin/pull/18470

ACKs for top commit:
  mjdietzx:
    crACK fa72fce7c9 👍👍
  fanquake:
    ACK fa72fce7c9

Tree-SHA512: 12aa68cde697c0f7c25d60bb0c02783e5462eb3ba39947b0d94a7798bc278e7d5f092f3ab2a3d0547947c3502cde7c4a599419055a57f78ef1f70f9f637e14c7
2021-06-11 09:07:44 +08:00
Russell Yanofsky
493fb47c57 Make SetupServerArgs callable without NodeContext
bitcoin-gui code needs to call SetupServerArgs but will not have a
NodeContext object if it is communicating with an external bitcoin-node
process.
2021-06-10 09:58:45 -05:00
W. J. van der Laan
1704bbf226
Merge bitcoin/bitcoin#22141: net processing: Remove hash and fValidatedHeaders from QueuedBlock
2f4ad6b7ef scripted-diff: rename MarkBlockAs functions (John Newbery)
2c45f832e8 [net processing] Tidy up MarkBlockAsReceived() (John Newbery)
6299350733 [net processing] Add IsBlockRequested() function (John Newbery)
4e90d2dd0e [net processing] Remove QueuedBlock.hash (John Newbery)
156a19ee6a scripted-diff: rename nPeersWithValidatedDownloads (John Newbery)
b03de9c753 [net processing] Remove CNodeState.nBlocksInFlightValidHeaders (John Newbery)
b4e29f2436 [net processing] Remove QueuedBlock.fValidatedHeaders (John Newbery)
85e058b191 [net processing] Remove unnecessary hash arg from MarkBlockAsInFlight() (John Newbery)

Pull request description:

  The QueuedBlock struct contains a `fValidatedHeaders` field that indicates whether we have already validated a header for the requested block. Since headers-first syncing, we only request blocks where the header is already validated, so `fValidatedHeaders` is always true. Remove it and clean up the logic that uses that field.

  Likewise, QueuedBlock contains a `hash` field that is set to the block hash. Since headers-first syncing, we always have a CBlockIndex, which contains the block hash, so remove the redundant `hash` field.

  Tidy up the logic and rename functions to better indicate what they're doing.

ACKs for top commit:
  mjdietzx:
    crACK 2f4ad6b7ef
  sipa:
    utACK 2f4ad6b7ef
  MarcoFalke:
    review ACK 2f4ad6b7ef 📊

Tree-SHA512: 3d31d2bcb4d35d0fdb7c1da624c2878203218026445e8f76c4a2df68cc7183ce0e7d0c47c7c0a3242e55efaca7c9f5532b683cf6ec7c03d23fa83764fdb82fd2
2021-06-10 16:58:45 +02:00
fanquake
ef8f2966ac
Merge bitcoin/bitcoin#22084: package testmempoolaccept followups
ee862d6efb MOVEONLY: context-free package policies (glozow)
5cac95cd15 disallow_mempool_conflicts -> allow_bip125_replacement and check earlier (glozow)
e8ecc621be [refactor] comment/naming improvements (glozow)
7d91442461 [rpc] reserve space in txns (glozow)
6c5f19d9c4 [package] static_assert max package size >= max tx size (glozow)

Pull request description:

  various followups from #20833

ACKs for top commit:
  jnewbery:
    utACK ee862d6efb
  ariard:
    Code Review ACK ee862d6

Tree-SHA512: 96ecb41f7bbced84d4253070f5274b7267607bfe4033e2bb0d2f55ec778cc41e811130b6321131e0418b5835894e510a4be8a0f822bc9d68d9224418359ac837
2021-06-10 19:09:54 +08:00
MarcoFalke
e87fbee402
Merge bitcoin/bitcoin#22208: doc: Update REVIEWERS
3636d9be8f Update REVIEWERS: I've found that I keep track of PRs in need of review without the need for DrahtBot's automated notification :) (practicalswift)

Pull request description:

  Update `REVIEWERS`: I've found that I keep track of PRs in need of review without the need for DrahtBot's automated notification :)

ACKs for top commit:
  MarcoFalke:
    ACK 3636d9be8f

Tree-SHA512: 8602bb7ab10bd04ab8e65b63708a2bb33fecb1b7494ebc59030976fd3eb53ec2d57a3ed96fd9170e2de7771e630d9571e73f7d3b939452cf6bf9e75c3bfaa282
2021-06-10 11:25:33 +02:00
practicalswift
3636d9be8f Update REVIEWERS: I've found that I keep track of PRs in need of review without the need for DrahtBot's automated notification :) 2021-06-10 09:00:05 +00:00
MarcoFalke
356f421fb0
Merge bitcoin/bitcoin#22204: doc: remove obsolete okSafeMode RPC guideline from developer notes
6780a095d8 doc: remove obsolete `okSafeMode` RPC guideline from developer notes (Sebastian Falbesoner)

Pull request description:

  Since the flag has been removed from the RPC command table in commit ec6902d0ea (PR #11179), this guideline is not relevant anymore and can be removed.

ACKs for top commit:
  MarcoFalke:
    ACK 6780a095d8. Also, safe mode was removed completely in commit 2ae705d841

Tree-SHA512: 2a6b002ae302e979ce403171b79a892e32f5083792c3b0b8204edb5eb08c6b24ab77bbeeae0e3bb6d6564a6f1678cfce00eb7b5b82063b7741f89a96b0c0aef3
2021-06-10 07:38:20 +02:00
fanquake
92584d29ce
Merge bitcoin/bitcoin#22186: build, qt: Fix compiling qt package in depends with GCC 11
d1d1cc9831 build, qt: Fix compiling qt package in depends with GCC 11 (Hennadii Stepanov)

Pull request description:

  The `qt` package in depends fails to compile with GCC 11 due to the missed `<limits>` headers.

  See: https://bugreports.qt.io/browse/QTBUG-90395

  Affected systems:
  - Ubuntu 21.04 + GCC 11.1.0
  - Fedora 34 + GCC 11.1.1

  Ubuntu 21.04 build log excerpt:
  ```
  Configuring qt...
  Creating qmake...
  gmake[1]: Entering directory '/home/hebasto/bitcoin/depends/work/build/x86_64-pc-linux-gnu/qt/5.12.11-1ff5c6c1f55/qtbase/qmake'
  In file included from /home/hebasto/bitcoin/depends/work/build/x86_64-pc-linux-gnu/qt/5.12.11-1ff5c6c1f55/qtbase/include/QtCore/qendian.h:1,
                   from /home/hebasto/bitcoin/depends/work/build/x86_64-pc-linux-gnu/qt/5.12.11-1ff5c6c1f55/qtbase/src/corelib/codecs/qutfcodec.cpp:43:
  /home/hebasto/bitcoin/depends/work/build/x86_64-pc-linux-gnu/qt/5.12.11-1ff5c6c1f55/qtbase/include/QtCore/../../src/corelib/global/qendian.h: In static member function ‘static constexpr QSpecialInteger<S> QSpecialInteger<S>::max()’:
  /home/hebasto/bitcoin/depends/work/build/x86_64-pc-linux-gnu/qt/5.12.11-1ff5c6c1f55/qtbase/include/QtCore/../../src/corelib/global/qendian.h:331:35: error: ‘numeric_limits’ is not a member of ‘std’
    331 |     { return QSpecialInteger(std::numeric_limits<T>::max()); }
        |                                   ^~~~~~~~~~~~~~
  /home/hebasto/bitcoin/depends/work/build/x86_64-pc-linux-gnu/qt/5.12.11-1ff5c6c1f55/qtbase/include/QtCore/../../src/corelib/global/qendian.h:331:54: error: ‘::max’ has not been declared; did you mean ‘std::max’?
    331 |     { return QSpecialInteger(std::numeric_limits<T>::max()); }
        |                                                      ^~~
        |                                                      std::max
  ```

ACKs for top commit:
  fanquake:
    ACK d1d1cc9831

Tree-SHA512: 2dd643efc0aefc492f9565c0900ba0f1657c016bc4a44792f85478b9fc6e0e4ecad78847114ef6ec702d2de4cdbc3f657e9b96634ea58f42b6cc98dfb5e09eab
2021-06-10 09:45:05 +08:00
Sebastian Falbesoner
6780a095d8 doc: remove obsolete okSafeMode RPC guideline from developer notes
Since the flag has been removed from the RPC command table in commit
ec6902d0ea (PR #11179), this guideline
is not relevant anymore and can be removed.
2021-06-10 02:02:29 +02:00
MarcoFalke
46424e943c
Merge bitcoin/bitcoin#22202: test: Add temporary coinstats suppressions
faca40ec68 test: Add temporary coinstats suppressions (MarcoFalke)

Pull request description:

  Needed for my fuzzer to continue to run

ACKs for top commit:
  practicalswift:
    cr ACK faca40ec68: suppression looks necessary (temporarily)

Tree-SHA512: 5bdff9a24a60546cfe31e775fa2aa5e238aefda2ed2604bef18c82b1b80c51ca3cbe058d6c7988fa75305258b70076036a3e430b9b7de13a111309fa7a66745b
2021-06-09 22:14:54 +02:00
MarcoFalke
fa72fce7c9
test: Use ConnmanTestMsg from test lib in denialofservice_tests 2021-06-09 21:00:48 +02:00
MarcoFalke
faca40ec68
test: Add temporary coinstats suppressions 2021-06-09 19:48:45 +02:00
MarcoFalke
ca424e242a
Merge bitcoin/bitcoin#22200: zmq: use std::string in zmqError()
3f05a9e681 zmq: use msg: prefix over errno= in zmqError (fanquake)
9a7cb57bbc zmq: use std::string in zmqError() (fanquake)

Pull request description:

  This is two minor changes. The first is to change `zmqError` to take a `const std::string&` instead of a `const char*`. The second is to change the second portion of `zmqError` to print `msg: message` rather than `errno=message`, given that `zmq_strerror` returns a message. To me, this seems more readable / useful than output like: `Error: Unable to initialize context errno=No such file or directory`.

ACKs for top commit:
  practicalswift:
    cr ACK 3f05a9e681
  instagibbs:
    utACK 3f05a9e681
  theStack:
    Code-Review ACK 3f05a9e681

Tree-SHA512: 197cf381e8b3ced271d0e575e0c6d8e5e9ed93c4b284338b17873c5232eaabe64d6c4b66e1aeb5e76befc89e316abae2b28b7fd760f178481d7b9f4e3f85da67
2021-06-09 19:32:34 +02:00
fanquake
3f05a9e681
zmq: use msg: prefix over errno= in zmqError
zmq_strerror() converts the passed errno into a description, meaning
currently you have output like: "errno=No such file or directory".

Using msg: would seem to make more sense here.
2021-06-09 19:25:13 +08:00
fanquake
9a7cb57bbc
zmq: use std::string in zmqError() 2021-06-09 19:25:07 +08:00
Samuel Dobson
93e38d5c06
Merge bitcoin/bitcoin#22173: wallet: Do not load external signers wallets when unsupported
e60cd26ad4 Do not load external signers wallets when unsupported (Andrew Chow)

Pull request description:

  When external signer support is not compiled, do not load external signer wallets.

  Alternative to #22168.

ACKs for top commit:
  promag:
    Tested ACK e60cd26ad4.
  meshcollider:
    Code review ACK e60cd26ad4

Tree-SHA512: aed2d0038f448c2f89c6b48f412b106e63c9ed20e748e69aae21fb58c33fc7e4fa73375a52372c73788669eb2b968a8da6b022c65658fa4484f5bbcf205b1b15
2021-06-09 23:12:40 +12:00
Samuel Dobson
69577a27ab
Merge bitcoin/bitcoin#21944: wallet: Fix issues when walletdir is root directory
d44a261acf Fix issues when `walletdir` is root directory (unknown)

Pull request description:

  + Remove one character less from wallet path

  + After testing lot of random strings with special chars in `wallet_name`, I found that the issue was not related to special characters in the name. Reviewing PR https://github.com/bitcoin/bitcoin/pull/21907 helped me resolve the issue.

  **Real issue**: If the path mentioned in `walletdir` is a root directory, first character of the wallet name or path is removed

  **Solution**: `if` statement to check `walletdir` is a root directory

  Fixes: https://github.com/bitcoin/bitcoin/issues/21510 https://github.com/bitcoin/bitcoin/issues/21501
  Related PR: https://github.com/bitcoin/bitcoin/pull/20080

  Consider the wallet directories `w1` and `w2` saved in `D:\`. Run `bitcoind.exe -walletdir=D:\`, Results for `bitcoin-cli.exe listwalletdir`:

  Before this PR:

  ```

  {
    "wallets": [
      {
        "name": "1"
      },
      {
        "name": "2"
      }
    ]
  }

  ```

  After this PR:
  ```
    "wallets": [
      {
        "name": "w1"
      },
      {
        "name": "w2"
      }
    ]
  }

  ```

ACKs for top commit:
  ryanofsky:
    Code review ACK d44a261acf
  meshcollider:
    utACK d44a261acf

Tree-SHA512: b09b00f727407e3771c8694861dae1bfd29d97a0d51ddcb5d9c0111dc618b3fff2f75829cbb4361c54457ee564e94fcefd9e2928262a1c918a2b6bbad724eb55
2021-06-09 22:53:36 +12:00
Samuel Dobson
58f8b156ed
Merge bitcoin/bitcoin#22008: wallet: Cleanup and refactor CreateTransactionInternal
96c2c9520e scripted-diff: Rename SelectCoinsMinConf to AttemptSelection (Andrew Chow)
b583f73354 Move vin filling to before final fee setting (Andrew Chow)
d39cac0547 Set m_subtract_fee_outputs during recipients vector loop (Andrew Chow)
364e0698a5 Move variable initializations to where they are used (Andrew Chow)
32ab430651 Move recipients vector checks to beginning of CreateTransaction (Andrew Chow)
cd1d6d3324 Rename nSubtractFeeFromAmount in CreateTransaction (Andrew Chow)
dac21c793f Rename nValue and nValueToSelect (Andrew Chow)
d2aee3bbc7 Remove extraneous scope in CreateTransactionInternal (Andrew Chow)
b2995963b5 Move cs_wallet lock in CreateTransactionInternal to top of function (Andrew Chow)

Pull request description:

  #17331 did some refactors and cleanup of `CreateTransactionInternal` to make it easier to understand, however it is still a bit convoluted even though it doesn't have to be. This PR does additional cleanup and refactoring to `CreateTransactionInternal` so that it is easier to understand. Some unnecessary code was removed, some variables moved around to where they matter, and several indents removed.

ACKs for top commit:
  glozow:
    reACK 96c2c95
  ryanofsky:
    Code review ACK 96c2c9520e also acked previously (was reverted).
  meshcollider:
    re-utACK 96c2c9520e

Tree-SHA512: 3dba67ed436968a07bfd82d435d566ad74e116c6e50ac9baed7144a46ad5c0f630b1ba59d91e8e8972ac2af559d7c0576f0560f09684d2ab20fad6689902866f
2021-06-09 22:37:34 +12:00
fanquake
fe511454e1
Merge bitcoin/bitcoin#22174: build, qt: Fix libraries linking order for Linux hosts
a8bd5ea017 build, qt: Fix libraries linking order for Linux hosts (Hennadii Stepanov)

Pull request description:

  `-lxcb-shm` should follow `-lxcb` when linking libraries for Linux hosts.

  Fixes #22105.

ACKs for top commit:
  prayank23:
    ACK a8bd5ea017
  fanquake:
    ACK a8bd5ea017

Tree-SHA512: 6ea2a1ba5440dd01e64428e5c3aa3e7a6e1380b723071ad38a0516b23b56dc252cb2a6544e014b13a0b2f89b3fe45c04a82e498669b5cc74a5f9b70d9c270926
2021-06-09 15:35:43 +08:00
Samuel Dobson
68a89d7a46
Merge bitcoin-core/gui#4: UI external signer support (e.g. hardware wallet)
1c4b456e1a gui: send using external signer (Sjors Provoost)
24815c6309 gui: wallet creation detects external signer (Sjors Provoost)
3f845ea299 node: add externalSigners to interface (Sjors Provoost)
62ac119f91 gui: display address on external signer (Sjors Provoost)
450cb40a34 wallet: add displayAddress to interface (Sjors Provoost)
eef8d64529 gui: create wallet with external signer (Sjors Provoost)
6cdbc83e93 gui: add external signer path to options dialog (Sjors Provoost)

Pull request description:

  Big picture overview in [this gist](https://gist.github.com/Sjors/29d06728c685e6182828c1ce9b74483d).

  This PR adds GUI support for external signers, based on the since merged bitcoin/bitcoin#16546 (RPC).

  The UX isn't amazing - especially the blocking calls - but it works.

  First we adds a GUI setting for the signer script (e.g. path to HWI):

  <img width="625" alt="Schermafbeelding 2019-08-05 om 19 32 59" src="https://user-images.githubusercontent.com/10217/62483415-e1ff1680-b7b7-11e9-97ca-8d2ce54ca1cb.png">

  Then we add an external signer checkbox to the wallet creation dialog:

  <img width="374" alt="Schermafbeelding 2019-11-07 om 19 17 23" src="https://user-images.githubusercontent.com/10217/68416387-b57ee000-0194-11ea-9730-127d60273008.png">

  It's checked by default if HWI detects a device. It also grabs the name. It then creates a fresh wallet and imports the keys.

  You can verify an address on the device (blocking...):
  <img width="673" alt="Schermafbeelding 2019-08-05 om 19 29 22" src="https://user-images.githubusercontent.com/10217/62483560-43bf8080-b7b8-11e9-9902-8a036116dc4b.png">

  Sending, including coin selection, Just Works(tm) as long the device is present.

  ~External signer support is enabled by default when the GUI is configured and Boost::Process is present.~

  External signer support remains disabled by default, see https://github.com/bitcoin/bitcoin/pull/21935.

ACKs for top commit:
  achow101:
    Code Review ACK 1c4b456e1a
  hebasto:
    ACK 1c4b456e1a, tested on Linux Mint 20.1 (Qt 5.12.8) with HWW `2.0.2-rc.1`.
  promag:
    Tested ACK 1c4b456e1a but rebased with e033ca1379, with HWI 2.0.2, with Nano S and Nano X.
  meshcollider:
    re-code-review ACK 1c4b456e1a

Tree-SHA512: 3503113c5c69d40adb6ce364d8e7cae23ce82d032a00474ba9aeb6202eb70f496ef4a6bf2e623e5171e524ad31ade7941a4e0e89539c64518aaec74f4562d86b
2021-06-09 18:59:59 +12:00
fanquake
7cac26246a
Merge bitcoin/bitcoin#22075: guix: Misc leftover usability improvements
108a6be92a guix: Check for disk space availability before building (Carl Dong)
d7dec89091 guix: Remove dest if OUTDIR mv fails (Carl Dong)

Pull request description:

  There seems to be some corner cases that can be hit when guix scripts unexpectedly fail in the middle of operation, see: https://gnusha.org/bitcoin-builds/2021-05-24.log

  - Perform an early disk space check for `guix-build`
  - Overwrite existing output directory after a successful build (the existing one might be malformed), and cleanup output directory if the `mv` somehow fails

ACKs for top commit:
  laanwj:
    Tested ACK 108a6be92a
  achow101:
    ACK 108a6be92a

Tree-SHA512: cf6438317da40bf55714cd2d8cce859b3d435cc66cabefe8d4a53552d7880966acfe84ffe8fadf1c80e368ae6b037992258a6d409df85ffc6ce8bf780e98e2e5
2021-06-09 09:09:38 +08:00
Andrew Chow
683d197970 Use latest signapple commit
Update gitian and guix to use the same latest signapple commit
2021-06-08 16:46:56 -04:00
MarcoFalke
82bc7faec8
Merge bitcoin/bitcoin#21946: Document and test lack of inherited signaling in RBF policy
2eb0eeda39 validation: document lack of inherited signaling in RBF policy (Antoine Riard)
906b6d9da6 test: Extend feature_rbf.py with no inherited signaling (Antoine Riard)

Pull request description:

  Contrary to BIP125 or other full-node implementation (e.g btcd), Bitcoin Core's mempool policy doesn't implement inherited signaling.

  This PR documents our mempool behavior on this and add a test demonstrating the case.

ACKs for top commit:
  jonatack:
    ACK 2eb0eeda39
  benthecarman:
    ACK 2eb0eeda39

Tree-SHA512: d41453d3b49bae3c1eb532a968f43bc047084913bd285929d4d9cba142777ff2be38163d912e28dfc635f4ecf446de68effad799c6e71be52f81e83410c712fb
2021-06-08 17:00:28 +02:00
MarcoFalke
45a8b01fad
Merge bitcoin/bitcoin#22187: test: Add sync_blocks in wallet_orphanedreward.py
7a681d61b0 Add sync_blocks in wallet_orphanedreward.py. (Daniel Kraft)

Pull request description:

  Add an explicit `sync_blocks` call in `wallet_orphanedreward.py`, which was missing and could lead to intermittent failures of the test due to race conditions.

  This will presumably fix #22181.

ACKs for top commit:
  MarcoFalke:
    review ACK 7a681d61b0

Tree-SHA512: bb226c31bf3f2e7c52beb829d7b67496e5b38781245db5f9184e3f28c93ac3aa4d21fcf5bf3055e79d384cfd0ed916e79dccb3d77486e86fe1fedb5e35f894ad
2021-06-08 10:39:15 +02:00
Daniel Kraft
7a681d61b0 Add sync_blocks in wallet_orphanedreward.py.
Add an explicit sync_blocks call in wallet_orphanedreward.py, which was
missing and could lead to intermittent failures of the test due to
race conditions.

This will presumably fix https://github.com/bitcoin/bitcoin/issues/22181.
2021-06-08 09:52:10 +02:00
MarcoFalke
76d4018aa5
Merge bitcoin/bitcoin#22180: fuzz: Increase branch coverage of the float fuzz target
fa13f34bf3 fuzz: Increase branch coverage of the float fuzz target (MarcoFalke)
fad0c58c3e fuzz: Remove confusing return keyword from CallOneOf (MarcoFalke)

Pull request description:

  Currently the branch coverage for the float fuzz target is only 50% : https://marcofalke.github.io/btc_cov/fuzz.coverage/src/test/fuzz/float.cpp.gcov.html

  This is caused by the Fuzzed Data Provider only picking "nice" floats.

ACKs for top commit:
  practicalswift:
    cr ACK fa13f34bf3: patch looks correct

Tree-SHA512: 326822515e9a1c77647d41eab9a96185a3b320914d9264730fa72ffb76c2bf3dc5bf72cf6cd9beef14f4f032358d76a976860bf3e2418ae61943cf926c0ea086
2021-06-08 09:19:16 +02:00
Hennadii Stepanov
d1d1cc9831
build, qt: Fix compiling qt package in depends with GCC 11 2021-06-08 04:16:36 +03:00
Hennadii Stepanov
e638acf697
Merge bitcoin-core/gui#164: Handle peer addition/removal in a right way
ecbd911538 qt: Handle peer addition/removal in a right way (Hennadii Stepanov)
1b66f6e556 qt: Drop PeerTablePriv class (Hennadii Stepanov)
efb7e5aa96 qt, refactor: Use default arguments for overridden functions (Hennadii Stepanov)

Pull request description:

  This PR makes `PeerTableModel` handle a peer addition/removal in a right way. See:
  - https://doc.qt.io/qt-5/model-view-programming.html#inserting-and-removing-rows
  - https://doc.qt.io/qt-5/model-view-programming.html#resizable-models

  Fixes #160.

  Fixes #191.

ACKs for top commit:
  jarolrod:
    re-ACK ecbd911
  promag:
    reACK ecbd911538 just improvements to the comment since last review.

Tree-SHA512: 074935d67f78561724218e8b33822e2de16749f873c29054926b720ffcd642f08249a222b563983cf65a9b716290aa14e2372c47fc04e5f401f759db25ca710f
2021-06-07 22:13:05 +03:00
W. J. van der Laan
359f72105b
Merge bitcoin/bitcoin#21573: Update libsecp256k1 subtree to latest master
5c7ee1b2da libsecp256k1 no longer has --with-bignum= configure option (Pieter Wuille)
bdca9bcb6c Squashed 'src/secp256k1/' changes from 3967d96bf1..efad3506a8 (Pieter Wuille)
cabb566123 Disable certain false positive warnings for libsecp256k1 msvc build (Pieter Wuille)

Pull request description:

  This updates our src/secp256k1 subtree to the latest upstream master. The changes include:

  * The introduction of safegcd-based modular inverses, reducing ECDSA signing time by 25%-30% and ECDSA verification time by 15%-17%.
    * [Original paper](https://gcd.cr.yp.to/papers.html) by Daniel J. Bernstein and Bo-Yin Yang
    * [Implementation](https://github.com/bitcoin-core/secp256k1/pull/767) by Peter Dettman; [final](https://github.com/bitcoin-core/secp256k1/pull/831) version
    * [Explanation](https://github.com/bitcoin-core/secp256k1/blob/master/doc/safegcd_implementation.md) of the algorithm using Python snippets
    * [Analysis](https://github.com/sipa/safegcd-bounds) of the maximum number of iterations the algorithm needs
    * [Formal proof in Coq](https://medium.com/blockstream/a-formal-proof-of-safegcd-bounds-695e1735a348) by Russell O'Connor, for a high-level equivalent algorithm
  * Removal of libgmp as an (optional) dependency (which wasn't used in the Bitcoin Core build)
  * CI changes (Travis -> Cirrus)
  * Build system improvements

ACKs for top commit:
  laanwj:
    Tested ACK 5c7ee1b2da

Tree-SHA512: ad8ac3746264d279556a4aa7efdde3733e114fdba8856dd53218588521f04d83950366f5c1ea8fd56329b4c7fe08eedf8e206f8f26dbe3f0f81852e138655431
2021-06-07 17:05:11 +02:00
Hennadii Stepanov
ecbd911538
qt: Handle peer addition/removal in a right way
This change fixes a bug when a multiple rows selection gets inconsistent
after a peer addition/removal.
2021-06-07 17:37:40 +03:00
W. J. van der Laan
3c393ef9e1
Merge bitcoin/bitcoin#22149: test: Add temporary logging to debug #20975
faa94961d6 test: Add temporary logging to debug #20975 (MarcoFalke)

Pull request description:

  to be reverted after a fix

ACKs for top commit:
  laanwj:
    Code review ACK faa94961d6

Tree-SHA512: 1f3103fcf4cad0af54e26c4d257bd824b128b5f2d2b81c302e861a829fd55d6a099fa476b79b30a71fe98975ae604b9e3ff31fd48a51d442389a9bd515e60ba0
2021-06-07 16:03:45 +02:00