Commit graph

30107 commits

Author SHA1 Message Date
Andrew Poelstra
b221f4e624 doc: update manpages for 0.21.0
Basically I just ran

for bin in elements-cli elementsd elements-tx elements-wallet
do
    help2man ./src/$bin > ./doc/man/$bin.1
    echo "Done $bin"
done
2021-09-22 19:13:30 +00:00
Anthony Towns
ebf6a248b8 fuzz: cleanups for versionbits fuzzer
Github-Pull: #21489
Rebased-From: aa7f418fe3
(cherry picked from commit b8af67eeef)
2021-09-22 16:34:09 +00:00
Vasil Dimov
e98b981378 test: make sure non-IP peers get discouraged and disconnected
Github-Pull: #21571
Rebased-From: 81747b2171
(cherry picked from commit 79cdb4a198)
2021-09-22 16:34:09 +00:00
Vasil Dimov
3f396ba229 test: also check disconnect in denialofservice_tests/peer_discouragement
Use `CConnmanTest` instead of `CConnman` and add the nodes to it
so that their `fDisconnect` flag is set during disconnection.

Github-Pull: #21571
Rebased-From: 637bb6da36
(cherry picked from commit b765f41164)
2021-09-22 16:34:09 +00:00
Vasil Dimov
79f48d69ef test: use pointers in denialofservice_tests/peer_discouragement
This is a non-functional change that replaces the `CNode` on-stack
variables with `CNode` pointers.

The reason for this is that it would allow us to add those `CNode`s
to `CConnman::vNodes[]` which in turn would allow us to check that they
are disconnected properly - a `CNode` object must be in
`CConnman::vNodes[]` in order for its `fDisconnect` flag to be set.

If we store pointers to the on-stack variables in `CConnman` then it
would crash at the end, trying to `delete` them.

Github-Pull: #21571
Rebased-From: 4d6e246fa4
(cherry picked from commit dfeb6c10bb)
2021-09-22 16:34:09 +00:00
Andrew Chow
00fe59fd43 Rename CoinSelectionParams::effective_fee to m_effective_feerate
It's a feerate, not a fee. Also follow the style guide for member names.

Github-Pull: #21083
Rebased-From: f9cd2bfbcc
(cherry picked from commit d61fb07da7)
2021-09-22 02:05:02 +00:00
Andrew Chow
f897fd9575 wallet: Move discard feerate fetching to CreateTransaction
Instead of fetching the discard feerate for each SelectCoinsMinConf
iteration, fetch and cache it once during CreateTransaction so that it
is shared for each SelectCoinsMinConf through
coin_selection_params.m_discard_feerate.

Does not change behavior.

Github-Pull: #21083
Rebased-From: bdd0c2934b
(cherry picked from commit 5fc381e443)
2021-09-22 02:05:02 +00:00
Andrew Chow
300372f8bf wallet: Move long term feerate setting to CreateTransaction
Instead of setting the long term feerate for each SelectCoinsMinConf
iteration, set it once during CreateTransaction and let it be shared
with each SelectCoinsMinConf through
coin_selection_params.m_long_term_feerate.

Does not change behavior.

Github-Pull: #21083
Rebased-From: 448d04b931
(cherry picked from commit bcd716670b)
2021-09-22 02:05:02 +00:00
Andrew Chow
1f58b91c48 wallet: Replace nFeeRateNeeded with effective_fee
Make sure that all fee calculations use the same feerate.
coin_selection_params.effective_fee is the variable we use for all fee
calculations, so get rid of remaining nFeeRateNeeded usages and just
directly set coin_selection_params.effective_fee.

Does not change behavior.

Github-Pull: #21083
Rebased-From: e2f429e6bb
(cherry picked from commit 34c89f92f3)
2021-09-22 02:05:02 +00:00
Andrew Chow
12a25655e8 wallet: Use existing feerate instead of getting a new one
During each loop of CreateTransaction, instead of constantly getting a
new feerate, use the feerate that we have already fetched for all
fee calculations. Thix fixes a race condition where the feerate required
changes during each iteration of the loop.

This commit changes behavior as the "Fee estimation failed" error will
now take priority over "Signing transaction failed".

Github-Pull: #21083
Rebased-From: 1a6a0b0dfb
(cherry picked from commit 48fc675163)
2021-09-22 02:05:02 +00:00
Andrew Chow
78cd67d4de Test that signrawtx works when a signed CSV and CLTV inputs are present
Github-Pull: #21166
Rebased-From: a97a9298ce
(cherry picked from commit f79189ca54)
2021-09-22 02:05:02 +00:00
Andrew Chow
5f714365cb Introduce DeferringSignatureChecker and inherit with SignatureExtractor
Introduces a DeferringSignatureChecker which simply takes a
BaseSignatureChecker and passes through everything.
SignatureExtractorChecker now subclasses DeferringSignatureChecker. This
allows for all BaseSignatureChecker functions to be implemented for
SignatureExtractorChecker, while allowing for future signature checkers
which opreate similarly to SignatureExtractorChecker.

Github-Pull: #21166
Rebased-From: 6965456c10
(cherry picked from commit 7de019bc61)
2021-09-22 02:05:02 +00:00
fanquake
ad985d5c23 net: add ifaddrs.h include
Github-Pull: #21486
Rebased-From: 4783115fd4
(cherry picked from commit 1a9a2cb7dc)
2021-09-22 02:05:02 +00:00
fanquake
33eaeada30 build: check if -lsocket is required with *ifaddrs
Github-Pull: #21486
Rebased-From: 879215e665
(cherry picked from commit f6896dfde7)
2021-09-22 02:05:02 +00:00
fanquake
f8237b8d50 rand: only try and use freeifaddrs if available
Github-Pull: #21486
Rebased-From: 87deac66aa
(cherry picked from commit e99d6d0c7c)
2021-09-22 02:05:02 +00:00
Hennadii Stepanov
d135a860cf doc: Remove outdated comment
The removed commit is wrong since v0.21.0.

Github-Pull: #21342
Rebased-From: f1f63ac3f8
(cherry picked from commit 5a2d98c640)
2021-09-22 02:05:02 +00:00
MarcoFalke
d92fb9693f fuzz: Bump FuzzedDataProvider.h
Latest version from 0cccccf0d2/compiler-rt/include/fuzzer/FuzzedDataProvider.h

Github-Pull: #21397
Rebased-From: fa7dc7ae95
(cherry picked from commit 8426e3a8a1)
2021-09-22 02:05:02 +00:00
MarcoFalke
9256eacadf 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
(cherry picked from commit 14e3f2a1c9)
2021-09-22 02:05:02 +00:00
practicalswift
07745976c7 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
(cherry picked from commit a48c9d3161)
2021-09-22 02:05:02 +00:00
Jon Atack
cdb30c3787 doc: add signet to doc/bitcoin-conf.md
Github-Pull: #21384
Rebased-From: 4a285107c1
(cherry picked from commit 6746cd078b)
2021-09-22 02:05:02 +00:00
Jon Atack
4940b460c4 doc: add signet to share/examples/bitcoin.conf
Github-Pull: #21384
Rebased-From: 21b6a23373
(cherry picked from commit 58975d5c0a)
2021-09-22 02:05:02 +00:00
Aaron Clauson
969357988d Update vcpkg checkout commit.
Previously vcpkg was relying on https://repo.msys2.org/mingw/i686/mingw-w64-i686-pkg-config-0.29.2-1-any.pkg.tar.xz which is no longer available. The vcpkg source has been updated to use http://repo.msys2.org/mingw/i686/mingw-w64-i686-pkg-config-0.29.2-2-any.pkg.tar.zst. This PR updates the commit ID used to checkout vcpkg for the updated URL.

Github-Pull: #21446
Rebased-From: b9e3f35306
(cherry picked from commit b35711efde)
2021-09-22 02:05:02 +00:00
Andrew Chow
337297d605 GUI: Write PSBTs to file with binary mode
Github-Pull: #bitcoin-core/gui#188
Rebased-From: cc3971c9ff
(cherry picked from commit 3a12672419)
2021-09-22 02:05:02 +00:00
Andrew Chow
c4494ede6b tests: Test that a fully signed tx given to signrawtx is unchanged
Tests that a fully signed transaction given to
signrawtransactionwithwallet is both unchanged and marked as complete.
This tests for a regression in 0.20 where the transaction would not be
marked as complete.

Github-Pull: #20562
Rebased-From: 773c42b265
(cherry picked from commit 36ecf5eb87)
2021-09-22 02:05:02 +00:00
Jon Atack
08298c34d8 test: disallow sendtoaddress/sendmany when private keys disabled
Github-Pull: #21201
Rebased-From: 6bfbc97d71
(cherry picked from commit 4ef1e4bd40)
2021-09-22 02:05:02 +00:00
Andrew Chow
a143b7b87d Disallow sendtoaddress and sendmany when private keys disabled
Github-Pull: #21201
Rebased-From: 0997019e76
(cherry picked from commit d6b5eb5fcc)
2021-09-22 02:05:02 +00:00
MarcoFalke
7233f69fc4 util: Disallow negative mocktime
Signed-off-by: practicalswift <practicalswift@users.noreply.github.com>

Github-Pull: #21043
Rebased-From: 3ddbf22ed1
(cherry picked from commit 08dada8456)
2021-09-22 02:05:02 +00:00
practicalswift
f0dec76142 net: Avoid UBSan warning in ProcessMessage(...)
Github-Pull: #21043
Rebased-From: f5f2f97168
(cherry picked from commit 95218ee95c)
2021-09-22 02:05:02 +00:00
Bruno Garcia
16e2673e24 fix the unreachable code at feature_taproot
Github-Pull: #21081
Rebased-From: 5e0cd25e29
(cherry picked from commit 4607019798)
2021-09-22 02:05:02 +00:00
Hennadii Stepanov
9e6c08d514 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
(cherry picked from commit 6dc58e9945)
2021-09-22 02:05:02 +00:00
randymcmillan
b514a872c3 raise helpMessageDialog
Github-Pull: bitcoin-core/gui#167
Rebased-From: 77114462f2
(cherry picked from commit e2ebc8567a)
2021-09-22 02:05:02 +00:00
Hennadii Stepanov
640b94fe9a Fix MSVC build after gui#176
Github-Pull: #20983
Rebased-From: c5354e4641
(cherry picked from commit a98f211940)
2021-09-22 02:05:02 +00:00
Hennadii Stepanov
ce108b0061 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
(cherry picked from commit bdc64c9030)
2021-09-22 02:05:02 +00:00
Hennadii Stepanov
2ccf3823cf 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
(cherry picked from commit 7bc4498234)
2021-09-22 02:05:02 +00:00
Hennadii Stepanov
5823cc3b43 qt: Add TransactionOverviewWidget class
Github-Pull: bitcoin-core/gui#176
Rebased-From: d439921406
(cherry picked from commit b7086e69ff)
2021-09-22 02:05:02 +00:00
Hennadii Stepanov
c89caab283 qt: Use layout manager for Create Wallet dialog
Github-Pull: bitcoin-core/gui#171
Rebased-From: d4feb6812a
(cherry picked from commit 0dba346a56)
2021-09-22 02:05:02 +00:00
Luke Dashjr
62c12bde50 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
(cherry picked from commit 7bf3ed495b)
2021-09-22 02:05:02 +00:00
Vasil Dimov
de31f16d60 test: add test for banning of non-IP addresses
Co-authored-by: Jon Atack <jon@atack.com>

Github-Pull: #20852
Rebased-From: 39b43298d9
(cherry picked from commit bdce029191)
2021-09-22 02:05:02 +00:00
Vasil Dimov
0682f35ee4 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
(cherry picked from commit c33fbab25c)
2021-09-22 02:05:02 +00:00
Anthony Towns
81ea0ed4a6 tests: Add fuzzing harness for versionbits
Github-Pull: #21380
Rebased-From: 1639c3b76c
(cherry picked from commit e775b0a6dd)
2021-09-22 02:05:02 +00:00
Anthony Towns
b8d678c9c9 tests: check never active versionbits
(cherry picked from commit 0c471a5f30)
2021-09-22 02:05:02 +00:00
Anthony Towns
c3bd45e5dd tests: more helpful errors for failing versionbits tests
Co-authored-by: Sjors Provoost <sjors@sprovoost.nl>
(cherry picked from commit 3ba9283a47)
2021-09-22 02:05:02 +00:00
MarcoFalke
010ba4e6e6 doc: Archive release notes, Add template for minor release
(cherry picked from commit b6d3502993)
2021-09-22 02:05:02 +00:00
Wladimir J. van der Laan
c38b555adc doc: Move 0.21.0 release notes from wiki
(cherry picked from commit 66e6742a27)
2021-09-22 02:05:02 +00:00
Pieter Wuille
554445bc59 Revert "Add patch to make codesign_allocate compatible with Apple's"
This reverts commit a4118c6e20.

Github-Pull: #20855
Rebased-From: a0eb4c551e
(cherry picked from commit 3308718a6b)
2021-09-22 02:05:02 +00:00
Amiti Uttarwar
33d10b1f00 [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
(cherry picked from commit b1c0f97483)
2021-09-22 02:05:02 +00:00
Ben Carman
4bca4c28c2 rpc: Add missing description of vout in getrawtransaction help text
Github-Pull: #20731
Rebased-From: b23349b880
(cherry picked from commit 1fda7db64f)
2021-09-22 02:05:02 +00:00
Hennadii Stepanov
492ed0947f qt: Align layout of checkboxes
Github-Pull: bitcoin-core/gui#155
Rebased-From: e71b656f31
(cherry picked from commit ef7a155cf0)
2021-09-22 02:05:02 +00:00
Pieter Wuille
4b1e64ac2f Add patch to make codesign_allocate compatible with Apple's
Github-Pull: #20644
Rebased-From: a4118c6e20
(cherry picked from commit 35a10e4ebc)
2021-09-22 02:05:02 +00:00
Jon Atack
8db26435a0 doc: update -externalip documentation in tor.md
Github-Pull: #19961
Rebased-From: a34eceb4cc
(cherry picked from commit e70ccb0bc4)
2021-09-22 02:05:02 +00:00