Commit Graph

23582 Commits

Author SHA1 Message Date
Andrew Chow
2d48d7dcfb Simplify and fix CWallet::SignTransaction
Backport CWallet::SignTransaction from master which is simpler and not
broken.
2020-08-16 21:37:27 -04:00
Wladimir J. van der Laan
bf0dc356ac Merge #19636: doc: Update 0.20.1 release notes with psbt changes
7c1c15329e doc: Update 0.20.1 release notes with psbt changes (Andrew Chow)

Pull request description:

  #19215 was missing from the list. Also felt it was important to mention this change.

Top commit has no ACKs.

Tree-SHA512: b795cf73954ff493747a793039918a5e19c377d9325e6156a8e23ba8f510af12f48b2d63854f57d482640531a865190f1fe1ece0c78a5e45d6926f9533c6d695
2020-08-01 14:15:21 +02:00
Andrew Chow
7c1c15329e doc: Update 0.20.1 release notes with psbt changes 2020-07-31 18:03:24 -04:00
Wladimir J. van der Laan
7ff64311be build: Bump version to 0.20.1-final
Tree-SHA512: 7edd91cdb03cf55201987775e5d14bfa61e3eff54abd04eaf249889e5216b12ad722188e12bb51eabb81bcd66014fd349484533744dc777e7af68a78fbc7f51b
v0.20.1
2020-07-31 14:02:21 +02:00
MarcoFalke
6acb21e724 Merge #19612: [0.20] lint: fix shellcheck URL in CI install
7ee4769cd4 [0.20] lint: fix shellcheck URL in CI install (fanquake)

Pull request description:

  This is causing the tests to fail for backports i.e #19606. If you look in the Travis logs there, the output is:
  ```bash
  You are downloading ShellCheck from an outdated URL!
  Please update to the new URL:
  https://github.com/koalaman/shellcheck/releases/download/v0.6.0/shellcheck-v0.6.0.linux.x86_64.tar.xz
  For more information, see:
  https://github.com/koalaman/shellcheck/issues/1871
  PS: Sorry for breaking your build. The hosting costs were getting out of hand :(
  ```

ACKs for top commit:
  MarcoFalke:
    review ACK 7ee4769cd4

Tree-SHA512: 62470291e53954ab541a7109e530390410d9b8a4d3ed6f4128ab8807d2225f368b8c984342f92de802a60dd082292cb59557599b4112413a29fc9ad8e8bcd0ee
2020-07-28 14:21:44 +02:00
fanquake
7ee4769cd4 [0.20] lint: fix shellcheck URL in CI install
This is causing the tests to fail for backports etc.
2020-07-28 20:13:06 +08:00
Wladimir J. van der Laan
58feb9ecb6 doc: Add changelog and authors to release notes for 0.20.1
Tree-SHA512: 39bbead4040097dd8aeac13bed57ad5e698aa2453883d8259930399e3c0f51168913a991f303a3407b649cfbf6e223291ca0942119514060e9a164bd05fa91f5
2020-07-23 18:30:00 +02:00
Wladimir J. van der Laan
cac7a9809a qt: Translation update for 0.20.1rc1
Tree-SHA512: b03b180f9ade0e6f74a722c9704725674abc8bdfdaed4579ed3b0569c6b584359a4696821d07c070887284c9876785ae92b1ccdc11fece0d505040e97fe81413
v0.20.1rc1
2020-07-17 15:36:41 +02:00
Wladimir J. van der Laan
5e21c55ef0 doc: Regenerate man pages for 0.20.1rc1
Tree-SHA512: 9707cb25e7020d9db6005066675256ee34c689cf8f04586051501bb3a89f2c4eee222a39cd4c2a648dca8274f0fcf2d6aeee010cd3525ca8edae2ad2ffae9811
2020-07-17 15:33:17 +02:00
Wladimir J. van der Laan
cd34ff5464 build: Bump version to 0.20.1rc1
Tree-SHA512: 643ff61093258641e0d69456cc6fbb8c47801af494aacbf3d3f6401ce9ea8f171d27b0703845fd581dbda8037b97c2b428ed92853909d49f251a4666fe8dae9a
2020-07-17 15:07:25 +02:00
Hennadii Stepanov
8b40937493 qt: Fix QFileDialog for static builds
This change partially reverts 248e22bbc0.

Github-Pull: #19536
Rebased-From: 6457361e90
Tree-SHA512: 3b48c64f59068d70b3aec4514ebe4a091813c77518a52a81bd8a36b44d0854b3f5e187f52c0f8e4527506087cb7e2cafb7c39cb7d28e4b8f620a77980e8a4697
2020-07-17 15:00:23 +02:00
Wladimir J. van der Laan
f61398a978 Merge #19524: [0.20] Backport #19517 - Increment input value sum only once per UTXO in decodepsbt
bad9cf8f40 Increment input value sum only once per UTXO in decodepsbt (Andrew Chow)

Pull request description:

  Github-Pull: #19517
  Rebased-From: 75122780e2

ACKs for top commit:
  jnewbery:
    utACK bad9cf8f40
  laanwj:
    ACK bad9cf8f40

Tree-SHA512: 543bbe58f2dafc772289708007d72fa61592270f3de083afffb9a56274b03f2ffe8d8d509a93790ceea3a708e1c02b1ad941e23281b3db1f48766c01a930dbd6
2020-07-16 20:06:31 +02:00
Andrew Chow
bad9cf8f40 Increment input value sum only once per UTXO in decodepsbt
Github-Pull: #19517
Rebased-From: 75122780e2
2020-07-15 12:06:43 +08:00
fanquake
2f6c7c0f6f Merge #19482: doc: move-only release notes for 0.20.1
fae0e93836 Remove cached directories and associated script blocks from appveyor CI configuration. (Aaron Clauson)
faf5e256c5 appveyor: Remove clcache (MarcoFalke)
888886ed5b doc: move-only release notes for 0.20.1 (MarcoFalke)
fa39988598 doc: Clear release notes for minor release (MarcoFalke)

Pull request description:

  Also fix appveyor

ACKs for top commit:
  fanquake:
    ACK fae0e93836

Tree-SHA512: 93840aaea9163a90bacf58bd1428fd5dda1187daabfa691d5d03e4abf00238d935c10c9d420ae7f9776d78f9fb2c6eb03f4bf1655ebe03483c224ab1fe851b84
2020-07-15 11:37:36 +08:00
Aaron Clauson
fae0e93836 Remove cached directories and associated script blocks from appveyor CI configuration.
Github-Pull: #19444
Rebased-From: 961e667600
2020-07-10 13:57:31 +02:00
MarcoFalke
faf5e256c5 appveyor: Remove clcache
Github-Pull: #18640
Rebased-From: fac0c8db9f
2020-07-10 13:57:22 +02:00
MarcoFalke
888886ed5b doc: move-only release notes for 0.20.1 2020-07-10 13:53:54 +02:00
MarcoFalke
fa39988598 doc: Clear release notes for minor release 2020-07-10 13:53:51 +02:00
fanquake
01c563708f Merge #19224: [0.20] Backports
2b79ac7406 Clean up separated ban/discourage interface (Pieter Wuille)
0477348057 Replace automatic bans with discouragement filter (Pieter Wuille)
e7f06f9b0e test: remove Cirrus CI FreeBSD job (fanquake)
eb6b82a558 qa: Test concurrent wallet loading (João Barbosa)
c9b49d2856 wallet: Handle concurrent wallet loading (João Barbosa)
cf0b5a933d tests: Check that segwit inputs in psbt have both UTXO types (Andrew Chow)
3228b59b17 psbt: always put a non_witness_utxo and don't remove it (Andrew Chow)
ed5ec30804 psbt: Allow both non_witness_utxo and witness_utxo (Andrew Chow)
68e0e6f852 rpc: show both UTXOs in decodepsbt (Andrew Chow)
27786d072d trivial: Suggested cleanups to surrounding code (Russell Yanofsky)
654420d6df wallet: Minimal fix to restore conflicted transaction notifications (Russell Yanofsky)
febebc4ea6 Fix WSL file locking by using flock instead of fcntl (Samuel Dobson)
5c7151a604 gui: update Qt base translations for macOS release (fanquake)
c219d21634 build: improved output of configure for build OS (sachinkm77)
0596a6eeb5 util: Don't reference errno when pthread fails. (MIZUTA Takeshi)

Pull request description:

  Currently backports the following to the 0.20 branch:
  * #18700 - Fix locking on WSL using flock instead of fcntl
  * #18982 - wallet: Minimal fix to restore conflicted transaction notifications
  * #19059 - gui: update Qt base translations for macOS release
  * #19152 - build: improve build OS configure output
  * #19194 -  util: Don't reference errno when pthread fails.
  * #19215 - psbt: Include and allow both non_witness_utxo and witness_utxo for segwit inputs
  * #19219 - Replace automatic bans with discouragement filter
  * #19300 - wallet: Handle concurrent wallet loading

ACKs for top commit:
  amitiuttarwar:
    ACK 0477348057 2b79ac7406 by comparing to original changes, double checking the diff
  sipa:
    utACK 2b79ac7406
  laanwj:
    ACK 2b79ac7406

Tree-SHA512: e5eb31d08288fa4a6e8aba08e60b16ce1988f14f249238b1cfd18ab2c8f6fcd9f07e3c0c491d32d2361fca26e3037fb0374f37464bddcabecea29069d6737539
2020-07-10 12:45:47 +08:00
Pieter Wuille
2b79ac7406 Clean up separated ban/discourage interface
Github-Pull: #19219
Rebased-From: 2ad58381ff
2020-07-08 09:10:52 +08:00
Pieter Wuille
0477348057 Replace automatic bans with discouragement filter
This patch improves performance and resource usage around IP
addresses that are banned for misbehavior. They're already not
actually banned, as connections from them are still allowed,
but they are preferred for eviction if the inbound connection
slots are full.

Stop treating these like manually banned IP ranges, and instead
just keep them in a rolling Bloom filter of misbehaving nodes,
which isn't persisted to disk or exposed through the ban
framework. The effect remains the same: preferred for eviction,
avoided for outgoing connections, and not relayed to other peers.

Also change the name of this mechanism to better reflect reality;
they're not banned, just discouraged.

Contains release notes and several interface improvements by
John Newbery.

Github-Pull: #19219
Rebased-From: b691f2df5f
2020-07-08 09:09:46 +08:00
fanquake
e7f06f9b0e test: remove Cirrus CI FreeBSD job
This has been removed from the master branch, and always seems to fail
at the installing packages phase. i.e:
```bash
pkg install -y autoconf automake boost-libs git gmake libevent libtool pkgconf python3 ccache
Updating FreeBSD repository catalogue...
Fetching meta.txz: . done
pkg: repository meta /var/db/pkg/FreeBSD.meta has wrong version 2
repository FreeBSD has no meta file, using default settings
Fetching packagesite.txz: .......... done
pkg: repository meta /var/db/pkg/FreeBSD.meta has wrong version 2
pkg: Repository FreeBSD load error: meta cannot be loaded No error: 0
Unable to open created repository FreeBSD
Unable to update repository FreeBSD
Error updating repositories!

Exit status: 3
```
2020-07-03 09:59:33 +08:00
João Barbosa
eb6b82a558 qa: Test concurrent wallet loading
Github-Pull: #19300
Rebased-From: 9b009fae6e
2020-07-03 09:58:17 +08:00
João Barbosa
c9b49d2856 wallet: Handle concurrent wallet loading
Github-Pull: #19300
Rebased-From: b9971ae585
2020-07-03 09:51:24 +08:00
Andrew Chow
cf0b5a933d tests: Check that segwit inputs in psbt have both UTXO types
Github-Pull: #19215
Rebased-From: 84d295e513
2020-07-03 09:22:21 +08:00
Andrew Chow
3228b59b17 psbt: always put a non_witness_utxo and don't remove it
Offline signers will always need a non_witness_utxo so make sure it is
there.

Github-Pull: #19215
Rebased-From: 4600479058
2020-07-03 09:21:42 +08:00
Andrew Chow
ed5ec30804 psbt: Allow both non_witness_utxo and witness_utxo
Github-Pull: #19215
Rebased-From: 5279d8bc07
2020-07-03 09:18:54 +08:00
Andrew Chow
68e0e6f852 rpc: show both UTXOs in decodepsbt
Github-Pull: #19215
Rebased-From: 72f6bec1da
2020-07-03 09:15:42 +08:00
Russell Yanofsky
27786d072d trivial: Suggested cleanups to surrounding code
https://github.com/bitcoin/bitcoin/pull/18982#pullrequestreview-416974841

Github-Pull: #18982
Rebased-From: 7eaf86d3bf
2020-06-09 21:55:27 +08:00
Russell Yanofsky
654420d6df wallet: Minimal fix to restore conflicted transaction notifications
This fix is a based on the fix by Antoine Riard <ariard@student.42.fr> in
https://github.com/bitcoin/bitcoin/pull/18600.

Unlike that PR, which implements some new behavior, this just restores previous
wallet notification and status behavior for transactions removed from the
mempool because they conflict with transactions in a block. The behavior was
accidentally changed in two `CWallet::BlockConnected` updates:
a31be09bfd and
7e89994133 from
https://github.com/bitcoin/bitcoin/pull/16624, causing issue
https://github.com/bitcoin/bitcoin/issues/18325.

The change here could be improved and replaced with a more comprehensive
cleanup, so it includes a detailed comment explaining future considerations.

Fixes #18325

Co-authored-by: Antoine Riard <ariard@student.42.fr>

Github-Pull: #18982
Rebased-From: b604c5c8b5
2020-06-09 21:12:38 +08:00
Samuel Dobson
febebc4ea6 Fix WSL file locking by using flock instead of fcntl
Co-authored-by: sipa <pieter@wuille.net>

Github-Pull: #18700
Rebased-From: e8fa0a3d20
2020-06-09 21:09:22 +08:00
fanquake
5c7151a604 gui: update Qt base translations for macOS release
These haven't been updated since their addition, so this updates the list that
controls which qt base translations are bundled with the macOS binary, to all the
languages that are available with qt 5.9.8.

This could probably be improved in some way, however qt updates are infrequent,
and I didn't want to spend any more time looking at this. Also given that no-one
seems to have noticed and/or reported this it wouldn't seem high-priority.

Could be backported to 0.20.1.

Github-Pull: #19059
Rebased-From: 69bfcac27a
2020-06-09 21:08:32 +08:00
sachinkm77
c219d21634 build: improved output of configure for build OS
Github-Pull: #19152
Rebased-From: 0fef60c63d
2020-06-09 21:07:45 +08:00
MIZUTA Takeshi
0596a6eeb5 util: Don't reference errno when pthread fails.
Pthread library does not set errno.
Pthread library's errno is returned by return value.

Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>

Github-Pull: #19194
Rebased-From: cb38b069b0
2020-06-09 21:06:15 +08:00
MarcoFalke
cd32134bda Merge #19170: [0.20] Add missing QPainterPath include
384d3f991c Add missing QPainterPath include (Andrew Chow)

Pull request description:

  This is needed to compile with Qt 5.15.

  Github-Pull: #19097
  Rebased-From: 79b0a69e09

Top commit has no ACKs.

Tree-SHA512: 23c4604cddb0bf5955afa6dfb6be87989df591e5f5ca5b85257c72e916f29337012b24c9ab5374a3289700ab7518ddb48f21195a2173ea1f935d69bd2ad13b8b
2020-06-04 18:21:28 -04:00
Andrew Chow
384d3f991c Add missing QPainterPath include
This is needed to compile with Qt 5.15.

Github-Pull: #19097
Rebased-From: 79b0a69e09
2020-06-04 21:56:05 +00:00
MarcoFalke
e42c959c1d Merge #19019: [0.20] Fix GBT: Restore "!segwit" and "csv" to "rules" key
412d5fe879 QA: feature_segwit: Check that template "rules" includes "!segwit" as appropriate (Luke Dashjr)
2abe8cc3b7 Bugfix: Include "csv","!segwit" in "rules" (Luke Dashjr)

Pull request description:

  Original branch merges cleanly (no rebase needed)

  See also #17946

ACKs for top commit:
  jnewbery:
    utACK 412d5fe879

Tree-SHA512: 8b269f7782c10f02dc245cc377d91f594474eade6a32184a49fa2ed3928d91917e4b83eefee6947bfb5ffff54eca2781f8cf2169c1f0ad3fefca1d4b3cf304dd
2020-06-02 17:55:19 -04:00
Wladimir J. van der Laan
a62f0ed64f doc: Manpages update pre-final
Tree-SHA512: 00d03cb9913a7fe3fe90b12a866e88e08c79fdfdb05fcf043d77623b2d30cadd56557db1f225b428fd03d4b4bc4f24f66205d8330d025ed015d3a12dffd5222e
v0.20.0
2020-06-02 09:43:04 +02:00
Wladimir J. van der Laan
808c8d15fe build: Set rc to 0 for -final
Tree-SHA512: 07ec7c9f9f32aeb6249a406b4d1738a7f8c988d157ecd84a4eb13f3d86b9a6c6407d4c14669cc4cad5483e9b2f393693833adc8e9fbd3cc75311257ed6894652
2020-06-02 09:39:22 +02:00
fanquake
60e8e74d10 Merge #19138: doc: Merge 0.20.0 release notes from wiki
1dfad42595 doc: Merge 0.20.0 release notes from wiki (Wladimir J. van der Laan)

Pull request description:

  Need to do this before -final.

ACKs for top commit:
  fanquake:
    ACK 1dfad42595

Tree-SHA512: 5db5a9ed8860b78941ebf0e1d966564ac0e2914fd18fc0c2f4e7a32d78306c1bb1aa2fd416e1fb01d427ff69c698a019498fc94a6e580c5d84a53c0716e675f1
2020-06-02 14:14:17 +08:00
Wladimir J. van der Laan
1dfad42595 doc: Merge 0.20.0 release notes from wiki 2020-06-02 06:48:32 +02:00
Wladimir J. van der Laan
6f7f94a276 build: Bump RC to rc2
Tree-SHA512: c1bb2b3fb772704ab0266a30011869cb326608b731b1c7feaea107e1cbd0e67f7cf500ca4be36c705d8a3e6d7fcf324c52c062164d6ba315fbf0b99eed362b76
v0.20.0rc2
2020-05-15 14:19:14 +02:00
Wladimir J. van der Laan
0793eca3a6 qt: Pre-rc2 translations update
Tree-SHA512: 50d0605712273d661f22d0ded2f8010d69fd8baa94537419d3d0ff82bf5f407e6d7bce0e8cf8ff32a2d8e40feb224124f30e22c52b0f132c3a56128335a2593a
2020-05-15 14:13:03 +02:00
MarcoFalke
17bdf2afae Merge #18973: [0.20] Final backports for rc2
245c862cfd test: disable script fuzz tests (fanquake)
9a8fb4cf4b fuzz: Remove enumeration of expected deserialization exceptions in ProcessMessage(...) fuzzer (practicalswift)
6161c94a61 [net processing] Only send a getheaders for one block in an INV (John Newbery)
cf2a6e2a39 test: Remove const to work around compiler error on xenial (Wladimir J. van der Laan)
cc7d34465b miner: Avoid stack-use-after-return in validationinterface (MarcoFalke)
37a620748b test: Add unregister_validation_interface_race test (MarcoFalke)
ff4dc20750 gui: Fix manual coin control with multiple wallets loaded (João Barbosa)
ed0afe8c1f test: Add test for conflicted wallet tx notifications (Russell Yanofsky)
251e321ad7 rpc: Relock wallet only if most recent callback (João Barbosa)
ca4dac48c5 rpc: Add mutex to guard deadlineTimers (João Barbosa)
a3fe458a1e [docs] Improve commenting in ProcessGetData() (John Newbery)
011532e380 [test] test that an invalid GETDATA doesn't prevent processing of future messages (Amiti Uttarwar)
1e73d7248a [net processing] ignore unknown INV types in GETDATA messages (Amiti Uttarwar)
fb821731eb [net processing] ignore tx GETDATA from blocks-only peers (Amiti Uttarwar)
315ae14f3f gui: Fix itemWalletAddress leak when not tree mode (João Barbosa)

Pull request description:

  Backports the following PRs to the 0.20 branch:

  * https://github.com/bitcoin/bitcoin/pull/18578: gui: Fix leak in CoinControlDialog::updateView
  * https://github.com/bitcoin/bitcoin/pull/18808: [net processing] Drop unknown types in getdata
  * https://github.com/bitcoin/bitcoin/pull/18814: rpc: Relock wallet only if most recent callback
  * https://github.com/bitcoin/bitcoin/pull/18878: test: Add test for conflicted wallet tx notifications
  * https://github.com/bitcoin/bitcoin/pull/18894: gui: Fix manual coin control with multiple wallets loaded
  * https://github.com/bitcoin/bitcoin/pull/18742: miner: Avoid stack-use-after-return in validationinterface
  * https://github.com/bitcoin/bitcoin/pull/18962: net processing: Only send a getheaders for one block in an INV
  * https://github.com/bitcoin/bitcoin/pull/18975: test: Remove const to work around compiler error on xenial

ACKs for top commit:
  promag:
    Tested ACK 245c862cfd coin control with multiple wallets.
  laanwj:
    ACK 245c862cfd
  MarcoFalke:
    ACK 245c862cfd solved the conflicts myself as a sanity check. Did not re-review 🍷

Tree-SHA512: 285e5a5fad5bbeba6032742c65dc68836e8eccfcceda9e69fec4ddd162a3f61679a96f9bbe3d434267835af67c21ac4c05accf6f63e827c2eb47203c6daafe31
2020-05-15 07:54:36 -04:00
fanquake
245c862cfd test: disable script fuzz tests
Given that #18413 has not been backported.
2020-05-15 15:50:32 +08:00
practicalswift
9a8fb4cf4b fuzz: Remove enumeration of expected deserialization exceptions in ProcessMessage(...) fuzzer
Github-Pull: #18757
Rebased-From: fdceb63283
2020-05-15 12:03:50 +08:00
John Newbery
6161c94a61 [net processing] Only send a getheaders for one block in an INV
Headers-first is the primary method of announcement on the network. If a
node fell back sending blocks by inv, it's probably for a re-org. The
final block hash provided should be the highest, so send a getheaders
and then fetch the blocks we need to catch up.

Github-Pull: #18962
Rebased-From: 746736639e
2020-05-15 08:10:05 +08:00
Wladimir J. van der Laan
cf2a6e2a39 test: Remove const to work around compiler error on xenial
Fix the following error in travis:

    test/validationinterface_tests.cpp:26:36: error: default initialization of an object of const type 'const BlockValidationState' without a user-provided default constructor

    const BlockValidationState state_dummy;

Github-Pull: #18975
Rebased-From: 050e2ee6f2
2020-05-15 08:08:15 +08:00
MarcoFalke
cc7d34465b miner: Avoid stack-use-after-return in validationinterface
This is achieved by switching to a shared_ptr.

Also, switch the validationinterfaces in the tests to use shared_ptrs
for the same reason.

Github-Pull: #18742
Rebased-From: 7777f2a4bb
2020-05-15 07:42:08 +08:00
MarcoFalke
37a620748b test: Add unregister_validation_interface_race test
This commit is (intentionally) adding a broken test. The test is broken
because it registering a subscriber object that can go out of scope
while events are still being sent.

To run the broken test and reproduce the bug:
  - Remove comment /** and */
  - ./configure --with-sanitizers=address
  - export ASAN_OPTIONS=detect_leaks=0
  - make
  - while ./src/test/test_bitcoin -t validationinterface_tests/unregister_validation_interface_race --catch_system_errors=no  ; do true; done

Github-Pull: #18742
Rebased-From: fab6d060ce
2020-05-15 07:42:08 +08:00