Commit Graph

17242 Commits

Author SHA1 Message Date
Pieter Wuille
593e206627 Use Bech32m encoding for v1+ segwit addresses
This also includes updates to the Python test framework implementation,
test vectors, and release notes.

Github-Pull: #20861
Rebased-From: fe5e495c31
2021-03-27 12:09:44 -07:00
Pieter Wuille
8944aaa6d6 Add Bech32m test vectors
Github-Pull: #20861
Rebased-From: 25b1c6e13d
2021-03-27 12:09:13 -07:00
Pieter Wuille
1485533092 Implement Bech32m encoding/decoding
Github-Pull: #20861
Rebased-From: da2bb6976d
2021-03-27 12:09:13 -07:00
fanquake
a30fd40735 Merge #20901: [0.21.1]: rc1 Backports
5a2d98c640 doc: Remove outdated comment (Hennadii Stepanov)
8426e3a8a1 fuzz: Bump FuzzedDataProvider.h (MarcoFalke)
14e3f2a1c9 fuzz: Bump FuzzedDataProvider.h (MarcoFalke)
a48c9d3161 fuzz: Update FuzzedDataProvider.h from upstream (LLVM) (practicalswift)
6746cd078b doc: add signet to doc/bitcoin-conf.md (Jon Atack)
58975d5c0a doc: add signet to share/examples/bitcoin.conf (Jon Atack)
b35711efde Update vcpkg checkout commit. (Aaron Clauson)
3a12672419 GUI: Write PSBTs to file with binary mode (Andrew Chow)
36ecf5eb87 tests: Test that a fully signed tx given to signrawtx is unchanged (Andrew Chow)
4ef1e4bd40 test: disallow sendtoaddress/sendmany when private keys disabled (Jon Atack)
d6b5eb5fcc Disallow sendtoaddress and sendmany when private keys disabled (Andrew Chow)
08dada8456 util: Disallow negative mocktime (MarcoFalke)
95218ee95c net: Avoid UBSan warning in ProcessMessage(...) (practicalswift)
4607019798 fix the unreachable code at feature_taproot (Bruno Garcia)
6dc58e9945 qt: Use "fusion" style on macOS Big Sur with old Qt (Hennadii Stepanov)
e2ebc8567a raise helpMessageDialog (randymcmillan)
a98f211940 Fix MSVC build after gui#176 (Hennadii Stepanov)
bdc64c9030 qt: Stop the effect of hidden widgets on the size of QStackedWidget (Hennadii Stepanov)
7bc4498234 qt: Fix TxViewDelegate layout (Hennadii Stepanov)
b7086e69ff qt: Add TransactionOverviewWidget class (Hennadii Stepanov)
0dba346a56 qt: Use layout manager for Create Wallet dialog (Hennadii Stepanov)
7bf3ed495b Bugfix: GUI: Restore SendConfirmationDialog button default to "Yes" (Luke Dashjr)
bdce029191 test: add test for banning of non-IP addresses (Vasil Dimov)
c33fbab25c net: allow CSubNet of non-IP networks (Vasil Dimov)

Pull request description:

  Current backports for *0.21.1*.

  One conflict was in the test case.

ACKs for top commit:
  ajtowns:
    ACK 5a2d98c640 -- checked 'rebased-from' patches are in master, and rebased patches are clean rebases (except for the first one which changes `""s` to `std::string("")` to avoid c++17 dependency). commits seem fine, but haven't reviewed in detail.
  fanquake:
    ACK 5a2d98c640 - branched off `0.21` and redid the backports. Minor conflict in c33fbab25c. The diff between my branch and #20901 was just in release notes, `_CLIENT_VERSION_RC` (#20901 branched before 95ea54ba08) and #21490 which has already been merged into `0.21`.

Tree-SHA512: 75d16d3cf9066a45759758b8185dc3b9dad6a6102c2ac9921f758a310e48d5d3122f0dafa515df42475235fc66a42cc04dd156ee1e61c86a1238bd11707642ea
2021-03-24 11:54:06 +08:00
MarcoFalke
1bad33f952 Merge #21490: [0.21] Backport versionbits tests
e775b0a6dd tests: Add fuzzing harness for versionbits (Anthony Towns)
0c471a5f30 tests: check never active versionbits (Anthony Towns)
3ba9283a47 tests: more helpful errors for failing versionbits tests (Anthony Towns)

Pull request description:

  Backport of unit test (#21334) and fuzz test (#21380) changes for versionbits.

Top commit has no ACKs.

Tree-SHA512: b68b570e48e0076bb2ade3b91c59612029235d2c9e39048d548aa141fa0906343fa492e9a981065fbdbbebecbbb3dcbaf39ec69228c7581178fcca567e8201b8
2021-03-21 09:55:21 +01:00
MarcoFalke
8426e3a8a1 fuzz: Bump FuzzedDataProvider.h
Latest version from 0cccccf0d2/compiler-rt/include/fuzzer/FuzzedDataProvider.h

Github-Pull: #21397
Rebased-From: fa7dc7ae95
2021-03-21 09:35:15 +01:00
MarcoFalke
14e3f2a1c9 fuzz: Bump FuzzedDataProvider.h
Latest version from https://raw.githubusercontent.com/llvm/llvm-project/70de7e0d9a95b7fcd7c105b06bd90fdf4e01f563/compiler-rt/include/fuzzer/FuzzedDataProvider.h

Github-Pull: #20812
Rebased-From: fafce49336
2021-03-21 09:34:29 +01:00
practicalswift
a48c9d3161 fuzz: Update FuzzedDataProvider.h from upstream (LLVM)
Upstream revision: 6d0488f75b/compiler-rt/include/fuzzer/FuzzedDataProvider.h

Changes:
* [compiler-rt] FuzzedDataProvider: add ConsumeData and method.
* [compiler-rt] Fix a typo in a comment in FuzzedDataProvider.h.
* [compiler-rt] Add ConsumeRandomLengthString() version without arguments.
* [compiler-rt] Refactor FuzzedDataProvider for better readability.
* [compiler-rt] FuzzedDataProvider: make linter happy.
* [compiler-rt] Mark FDP non-template methods inline to avoid ODR violations.

Github-Pull: #20740
Rebased-From: e3d2ba7c70
2021-03-21 09:33:42 +01:00
Anthony Towns
e775b0a6dd tests: Add fuzzing harness for versionbits
Github-Pull: #21380
Rebased-From: 1639c3b76c
2021-03-21 14:24:41 +10:00
Andrew Chow
3a12672419 GUI: Write PSBTs to file with binary mode
Github-Pull: #bitcoin-core/gui#188
Rebased-From: cc3971c9ff
2021-03-11 21:15:09 +01:00
Anthony Towns
0c471a5f30 tests: check never active versionbits 2021-03-03 14:14:40 +01:00
Anthony Towns
3ba9283a47 tests: more helpful errors for failing versionbits tests
Co-authored-by: Sjors Provoost <sjors@sprovoost.nl>
2021-03-03 14:12:16 +01:00
Andrew Chow
d6b5eb5fcc Disallow sendtoaddress and sendmany when private keys disabled
Github-Pull: #21201
Rebased-From: 0997019e76
2021-02-19 12:47:40 +01:00
MarcoFalke
08dada8456 util: Disallow negative mocktime
Signed-off-by: practicalswift <practicalswift@users.noreply.github.com>

Github-Pull: #21043
Rebased-From: 3ddbf22ed1
2021-02-11 12:42:40 +01:00
practicalswift
95218ee95c net: Avoid UBSan warning in ProcessMessage(...)
Github-Pull: #21043
Rebased-From: f5f2f97168
2021-02-11 12:42:31 +01:00
Hennadii Stepanov
6dc58e9945 qt: Use "fusion" style on macOS Big Sur with old Qt
The "macintosh" style is broken on macOS Big Sur at least for Qt 5.9.8.

Github-Pull: #bitcoin-core/gui#177
Rebased-From: 4e1154dfd1
2021-01-28 10:15:59 +01:00
randymcmillan
e2ebc8567a raise helpMessageDialog
Github-Pull: bitcoin-core/gui#167
Rebased-From: 77114462f2
2021-01-26 09:51:56 +01:00
Hennadii Stepanov
bdc64c9030 qt: Stop the effect of hidden widgets on the size of QStackedWidget
Layouts of the hidden widgets, those are children of QStackedWidget,
could prevent to adjust the size of the parent widget in the
WalletFrame widget.

Github-Pull: bitcoin-core/gui#176
Rebased-From: af58f5b12c
2021-01-21 18:58:49 +01:00
Hennadii Stepanov
7bc4498234 qt: Fix TxViewDelegate layout
This change (1) prevents overlapping date and amount strings,
and (2) guaranties that "eye" sign at the end of the watch-only
address/label is always visible.

Github-Pull: bitcoin-core/gui#176
Rebased-From: f0d04795e2
2021-01-21 18:58:45 +01:00
Hennadii Stepanov
b7086e69ff qt: Add TransactionOverviewWidget class
Github-Pull: bitcoin-core/gui#176
Rebased-From: d439921406
2021-01-21 18:58:42 +01:00
Hennadii Stepanov
0dba346a56 qt: Use layout manager for Create Wallet dialog
Github-Pull: bitcoin-core/gui#171
Rebased-From: d4feb6812a
2021-01-21 18:57:10 +01:00
Luke Dashjr
7bf3ed495b Bugfix: GUI: Restore SendConfirmationDialog button default to "Yes"
The SendConfirmationDialog is used for bumping the fee, where "Send" doesn't really make sense

Github-Pull: #bitcoin-core/gui#148
Rebased-From: 8775691383
2021-01-13 17:56:34 +01:00
Vasil Dimov
c33fbab25c net: allow CSubNet of non-IP networks
Allow creation of valid `CSubNet` objects of non-IP networks and only
match the single address they were created from (like /32 for IPv4 or
/128 for IPv6).

This fixes a deficiency in `CConnman::DisconnectNode(const CNetAddr& addr)`
and in `BanMan` which assume that creating a subnet from any address
using the `CSubNet(CNetAddr)` constructor would later match that address
only. Before this change a non-IP subnet would be invalid and would not
match any address.

Github-Pull: #20852
Rebased-From: 94d335da7f
2021-01-11 11:55:17 +01:00
Wladimir J. van der Laan
15877d160c qt: Pre-rc5 translations update
Tree-SHA512: f6986d00a9565ee7fbf8dd2766dca9c90af931e2dc2fdc0faf5734a2e9be1a0e0774031a20207aa2afa645f1d6229aac9751c84ada324a8dcb463497fb9f237f
2021-01-05 16:46:14 +01:00
Wladimir J. van der Laan
93ce429f0e qt: Pre-rc4 translations update
Tree-SHA512: 14259d2f469ea588f364f64fdd89b90cbcde8f66ddc011d96d656a06920584c0577e64fa15a41a1dc1c8c8a98a1f955748c61def6807b1bb71b0113bb28268f2
2021-01-03 13:12:39 +01:00
Amiti Uttarwar
b1c0f97483 [doc] Add permissions to the getpeerinfo help.
This field was already being returned, but the RPCHelpMan did not indicate
this. So, this PR updates the help text to match.

Github-Pull: #20756
Rebased-From: 667d203687
2020-12-26 21:28:15 +01:00
Ben Carman
1fda7db64f rpc: Add missing description of vout in getrawtransaction help text
Github-Pull: #20731
Rebased-From: b23349b880
2020-12-21 20:01:02 +01:00
Hennadii Stepanov
ef7a155cf0 qt: Align layout of checkboxes
Github-Pull: bitcoin-core/gui#155
Rebased-From: e71b656f31
2020-12-18 08:56:36 +01:00
Adam Jonas
84e8d5467f doc: warn that incoming conns are unlikely when not using default ports
Github-Pull: #20668
Rebased-From: 010eed3ce0
2020-12-17 12:28:37 +01:00
Sjors Provoost
8273ea3b8d Move signet onion seed from v2 to v3
Github-Pull: #20660
Rebased-From: 3e6657a14d
2020-12-16 07:36:44 +01:00
Wladimir J. van der Laan
e6d0fa3ef6 gui: pre-rc3 translations update
Tree-SHA512: 2aba5a743ecc1f9e336b8db036640182eb3e85449d9ab4c883c97e6ac75466760939b29c18560205d25489d58091212f7f1dcf651388deb675f824703c943cbf
2020-12-10 19:28:24 +01:00
Pieter Wuille
1caa32e3f2 Improve heuristic hex transaction decoding
Whenever both encodings are permitted, try both, and if only one succeeds,
return that one. Otherwise prefer the one for which the heuristic sanity
check passes. If that is the case for neither or for both, return the
extended-permitting deserialization.

Github-Pull: #20595
Rebased-From: 39c42c4420
2020-12-10 11:37:53 +01:00
Jon Atack
06c84232b3 wallet, bugfix: allow send to take string fee rate values
Github-Pull: #20573
Rebased-From: ce207d6b93
2020-12-10 11:37:36 +01:00
Pieter Wuille
bead935470 Send and require SENDADDRV2 before VERACK
See the corresponding BIP change: https://github.com/bitcoin/bips/pull/1043

Github-Pull: #20564
Rebased-From: 1583498fb6
2020-12-10 11:37:22 +01:00
Pieter Wuille
9e806887a8 Don't send 'sendaddrv2' to pre-70016 software
Github-Pull: #20564
Rebased-From: c5a8919660
2020-12-10 11:37:18 +01:00
MarcoFalke
aa4b8ebfec Merge #20510: [backport] wallet: allow zero-fee fundrawtransaction/walletcreatefundedpsbt and other fixes
6313362553 Use the correct incremental fee constant in bumpfee help (Jon Atack)
6e4969f76f Update feeRate (BTC/kvB) to fee_rate (sat/vB) in wallet_bumpfee (Jon Atack)
54e1edcc2b Allow zero-fee fundrawtxn and walletcreatefundedpsbt calls (Jon Atack)

Pull request description:

  Github-Pull: #20426
  Rebased-From: 1b3d700928

  Github-Pull: #20426
  Rebased-From: 3f1e10b2b1

  Github-Pull: #20426
  Rebased-From: 9f08780dd7

Top commit has no ACKs.

Tree-SHA512: 89556f69ca4a36d86d6ab5df740b6d5de809f13d45b03450fb526362b1eabd3d2d5285f97c552dc0bcb07e17ac2e6c557ff46335962e6bcf366d36ad412f257c
2020-12-04 18:14:15 +01:00
Jon Atack
6313362553 Use the correct incremental fee constant in bumpfee help
and remove redundant units ("Must be at least 1.000 sat/vB sat/vB" -> "1.00 sat vB")

Github-Pull: #20426
Rebased-From: 9f08780dd7
2020-11-26 19:32:30 +01:00
Jon Atack
54e1edcc2b Allow zero-fee fundrawtxn and walletcreatefundedpsbt calls
A check to raise an error on zero-fee txns was mistakenly extended in commit
a0d4957 from the bumpfee and send{toaddress, many} RPCs to also include
fundrawtransaction and walletcreatefundedpsbt.

This commit overrides zero fee rate checking for these two RPCs, not only for
the feeRate (BTC/kvB) arg to return to previous behavior, but also for the new
fee_rate (sat/vB) arg.

Github-Pull: #20426
Rebased-From: 1b3d700928
2020-11-26 19:31:26 +01:00
Niklas Gögge
01b647b1a2 build: Avoid secp256k1.h include from system
GitHub-Pull: #20469
Rebase-From: e95aaefe25
2020-11-26 09:38:44 +01:00
MarcoFalke
9facca3ce0 Merge #20490: [backport] wallet: upgradewallet fixes, improvements, test coverage
ca8cd893bb wallet: fix and improve upgradewallet error responses (Jon Atack)
99d56e3571 wallet: fix and improve upgradewallet result responses (Jon Atack)
2498b04ce8 Don't upgrade to HD split if it is already supported (Andrew Chow)
c46c18b788 wallet: refactor GetClosestWalletFeature() (Jon Atack)

Pull request description:

  Github-Pull: #20403
  Rebased-From: c46c18b788

  Github-Pull: #20403
  Rebased-From: 2498b04ce8

  Github-Pull: #20403
  Rebased-From: 99d56e3571

  Github-Pull: #20403
  Rebased-From: ca8cd893bb

Top commit has no ACKs.

Tree-SHA512: b18a1d015c963298740c585385eaa056988464112c88a519fe619be22dc78a8f6a102365cf799c50b781a77a09bec82b58ce411ab007b48f8b5de876e9c75060
2020-11-25 18:03:53 +01:00
MarcoFalke
d47d16025e Merge #20485: [backport] wallet: Do not treat default constructed types as None-type
fa69c2c784 wallet: Do not treat default constructed types as None-type (MarcoFalke)
fac4e136fa refactor: Change pointer to reference because it can not be null (MarcoFalke)

Pull request description:

  Github-Pull: #20410
  Rebased-From: fac4e136fa

  Github-Pull: #20410
  Rebased-From: fa69c2c784

Top commit has no ACKs.

Tree-SHA512: 05c3fe29677710b57dcc482fd529b0ab79475519f60f9cfde19f956c4e2212d09b042af458ec4f1272c581360ce841b735dca4df144e0798b3ccf16547de9cd0
2020-11-25 11:27:42 +01:00
Wladimir J. van der Laan
7264bcd20f qt: Pre-rc2 translations update
Tree-SHA512: 465a7b586f3eff476bd9648ff70e37e11f51e67f048dc1265ffcc1132c4e063515495ec6cbdf6ebb4abd5f5b08615595ce12273ce9abebc8ffef9c7b8375ac20
2020-11-25 08:57:45 +01:00
Luke Dashjr
b1f59d55d9 RPC/Wallet: unloadwallet: Clarify docs/error when both the RPC endpoint and wallet_name parameter specify a wallet 2020-11-24 05:31:58 +00:00
Jon Atack
ca8cd893bb wallet: fix and improve upgradewallet error responses 2020-11-19 20:00:53 +01:00
Jon Atack
99d56e3571 wallet: fix and improve upgradewallet result responses 2020-11-19 20:00:50 +01:00
MarcoFalke
fa69c2c784 wallet: Do not treat default constructed types as None-type 2020-11-19 13:48:38 +01:00
Andrew Chow
2498b04ce8 Don't upgrade to HD split if it is already supported
It is unnecessary to upgrade to FEATURE_HD_SPLIT if this feature is
already supported by the wallet. Because upgrading to FEATURE_HD_SPLIT
actually requires upgrading to FEATURE_PRE_SPLIT_KEYPOOL, users would
accidentally be upgraded to FEATURE_PRE_SPLIT_KEYPOOL instead of nothing
being done.

Fixes the issue described at
https://github.com/bitcoin/bitcoin/pull/20403#discussion_r526063920
2020-11-19 08:04:05 +01:00
Jon Atack
c46c18b788 wallet: refactor GetClosestWalletFeature() 2020-11-18 16:11:47 +01:00
MarcoFalke
fac4e136fa refactor: Change pointer to reference because it can not be null 2020-11-18 08:33:26 +01:00
fanquake
831675c8dc Merge #20401: qt: Pre-splitoff translations update
bb6441b7a4 qt: Pre-splitoff translations update (Wladimir J. van der Laan)

Pull request description:

  0.21 split-off should be near now. Let's do one final translations update just before the split-off.
  (Hopefully it won't take too long, but might want to keep this open to be the last thing merged)

ACKs for top commit:
  hebasto:
    ACK bb6441b7a4
  MarcoFalke:
    ACK bb6441b7a4 (checked that only changes are translation changes in `src/qt`)

Tree-SHA512: 3273246923d3020e1f7ae46cbb59f1ed45a35acb5e1582b55486c5723f5aa1e5809fe2fd87b1ac34d308eef2902e621d0ace97181a044262b2c8f002bf50daac
2020-11-17 20:57:36 +08:00