Commit graph

13210 commits

Author SHA1 Message Date
Wladimir J. van der Laan c89611ebd3 net: Log to net category for exceptions in ProcessMessages
Remove the forest of special exceptions, and simply log a short
message to the NET logging category when an exception happens during
packet processing. It is not good to panick end users with errors
that any peer can generate (let alone writing to stderr).

Github-Pull: #17762
Rebased-From: 4d88c3dcb6
2020-01-22 11:54:37 -05:00
fanquake 9a0ebb7f02
scripts: fix check-symbols & check-security argument passing
The first argument in bin_PROGRAMS (bitcoind) was being silently
dropped and never passed into the check-security.py or check-symbols.py scripts.

This has been the case since the scripts were added to the makefile in
f3d3eaf78e.

Example of the behavior:

```python
# touch a, touch b, touch c
# python3 args.py < a b c

import sys
if __name__ == '__main__':
    print(sys.argv)
    # ['args.py', 'b', 'c']

    # if you add some lines to "a",
    # you'll see them here..
    for line in sys.stdin:
        print(line)
```

Github-Pull: #17857
Rebased-From: 71af793512
2020-01-06 15:55:35 +08:00
Wladimir J. van der Laan 0b18ea6f57
util: Filter control characters out of log messages
Belts and suspenders: make sure outgoing log messages don't contain
potentially suspicious characters, such as terminal control codes.

This escapes control characters except newline ('\n') in C syntax.
It escapes instead of removes them to still allow for troubleshooting
issues where they accidentally end up in strings.

Github-Pull: #17095
Rebased-From: d7820a1250
2019-10-19 14:58:27 -04:00
Wladimir J. van der Laan ac30fc4f59
build: Factor out qt translations from build system
Move qt translations to a separate make include file.
This makes it easier to auto-generate this list from tooling
(see bitcoin-core/bitcoin-maintainer-tools#36).

Github-Pull: #16982
Rebased-From: 4320bfc0c0
2019-10-01 11:29:36 +08:00
Andrew Chow eb07d22b2d
Shuffle inputs and outputs after joining psbts
Github-Pull: #16512
Rebased-From: 6f405a1d3b
2019-09-24 07:53:29 +08:00
practicalswift 1175410be5
addrdb: Remove temporary files created in SerializeFileDB. Fixes non-determinism in unit tests.
Github-Pull: #16212
Rebased-From: d9753383b9
2019-09-24 07:53:29 +08:00
Luca Venturini c52dd120fd
Handle the result of posix_fallocate system call
Github-Pull: #15650
Rebased-From: 5d35ae3326
2019-09-24 07:53:29 +08:00
Luke Dashjr f792b25d14
torcontrol: Use the default/standard network port for Tor hidden services, even if the internal port is set differently
Currently, the hidden service is published on the same port as the public listening port.
But if a non-standard port is configured, this can be used to guess (pretty reliably) that the public IP and the hidden service are the same node.

Github-Pull: #15651
Rebased-From: 8a2656702b
2019-09-24 07:53:29 +08:00
Josu Goñi 1d12e52db0
Add vertical spacer
Github-Pull: #16090
Rebased-From: 36b0a2f2a6
2019-09-24 07:53:29 +08:00
Andrew Chow 56815e9e12
Give QApplication dummy arguments
QApplication takes the command line arguments and parses them itself
for some built in command line arguments that it has. We don't want
any of those built in arguments, so instead give it dummy arguments.

Github-Pull: #16578
Rebased-From: a2714a5c69
2019-09-24 07:53:28 +08:00
MarcoFalke 9d389d09ed
util: No translation of Bitcoin Core in the copyright
Github-Pull: #16291
Rebased-From: fa64b947bb
2019-09-24 07:53:28 +08:00
MarcoFalke 87908e9c98
scripted-diff: Avoid passing PACKAGE_NAME for translation
-BEGIN VERIFY SCRIPT-
sed -i --regexp-extended -e 's/\<\w+(::\w+)?\(PACKAGE_NAME\)/PACKAGE_NAME/g' $(git grep -l --extended-regexp '\<\w+(::\w+)?\(PACKAGE_NAME\)' src)
-END VERIFY SCRIPT-

Github-Pull: #16291
Rebased-From: fabe87d2c9
2019-09-24 07:53:28 +08:00
MarcoFalke a44e18f20b
build: Stop translating PACKAGE_NAME
Github-Pull: #16291
Rebased-From: fa5e9f157e
2019-09-24 07:53:28 +08:00
Emil Engler 7bd8f4e432
rpc: Fix getblocktemplate CLI example (#16594)
Github-Pull: #16596
Rebased-From: 14f7eec3bd
2019-09-24 07:53:28 +08:00
João Barbosa a11dbaa547 0.18: wallet: Fix -maxtxfee check by moving it to CWallet::CreateTransaction
Github-Pull: #16322
Rebased-From: 5c1b9714cb
2019-08-25 02:51:07 +01:00
Sjors Provoost 8f354ced6e 0.18: [wallet] abort when attempting to fund a transaction above maxtxfee
FundTransaction calls GetMinimumFee which, when the fee rate is absurdly high, quietly reduced the fee to -maxtxfee. Becaue an absurdly high fee rate is usually the result of a fat finger, aborting seems safer behavior.

Github-Pull: #16257
Rebased-From: 806b0052c3
2019-08-25 02:48:30 +01:00
Sjors Provoost 0942a60c06
[doc] rpc: remove "fallback to" from RBF default help 2019-08-17 12:52:50 +02:00
Sjors Provoost ee950ec465
[rpc] walletcreatefundedpsbt: use wallet default RBF 2019-08-17 12:52:50 +02:00
Wladimir J. van der Laan 641b2ffb45
qt: pre-rc1 translations update
Tree-SHA512: b97fd91b7ab1eb2297007a9821def31c065a2a33f12cf51fd5e5be5dff1e8afb4f5b001d220c3873d72ca5b06484ad2d1e2c8df5300770145de0dfebe56db303
2019-07-19 19:19:47 +02:00
tecnovert 063c8ce7a0
net: Make poll in InterruptibleRecv only filter for POLLIN events.
poll should block until there is data to be read or the timeout expires.

Filtering for the POLLOUT event causes poll to return immediately which leads to high CPU usage when trying to connect to non-responding peers through tor.

Removing POLLOUT matches how select is used when USE_POLL isn't defined.

Github-Pull: #16412
Rebased-From: a52818cc56
Tree-SHA512: eaf466630ba9d2a2a7443c9679c83c2cb13e779a5948f409cddb4c48cf32126ac68f3de48e394f9302e99858efa17cdb14650751a1b55c3b79e8a7507cab352d
2019-07-19 17:59:01 +02:00
João Barbosa b2711b98bd fix: tor: Call event_base_loopbreak from the event's callback
Github-Pull: #16405
Rebased-From: a981e749e6
2019-07-17 16:22:11 +01:00
João Barbosa df695db323 qt: Assert QMetaObject::invokeMethod result
Github-Pull: #16348
Rebased-From: 64fee48944
2019-07-09 14:16:23 +01:00
João Barbosa e2f7677bde gui: Fix missing qRegisterMetaType(WalletModel*)
Github-Pull: #16348
Rebased-From: f27bd96b5f
2019-07-09 14:15:27 +01:00
Anthony Towns 1dc357dabb signrawtransactionwithkey: report error when missing redeemScript/witnessScript param
Github-Pull: #16250
Rebased-From: 01174596e6
2019-07-05 14:45:04 +10:00
fanquake 629c7b029c
Merge #16035: 0.18.1: Backports
bcb27d7b0 .python-version: Bump to 3.5.6 (MarcoFalke)
af25a757e Add comments to Python ECDSA implementation (John Newbery)
715da91e9 Set AA_EnableHighDpiScaling attribute early (Hennadii Stepanov)
2800b3d5c gui: Fix open wallet menu initialization order (João Barbosa)
e78007fc1 Make and get the multisig redeemscript and destination in one function instead of two (Andrew Chow)
d9fc969e7 Pure python EC (Pieter Wuille)
23ba460c1 test: Add test that addmultisigaddress fails for watchonly addresses (MarcoFalke)
13b3bb564 test: Fixup creatmultisig documentation and whitespace (MarcoFalke)
79745d175 Replace remaining fprintf with tfm::format manually (MarcoFalke)
beb09f09b scripted-diff: Replace fprintf with tfm::format (MarcoFalke)
e29aa6e72 Exceptions should be caught by reference, not by value. (Kristaps Kaupe)
f88959ba7 tinyformat: Add doc to Bitcoin Core specific strprintf (MarcoFalke)
0023c9789 rpc: bugfix: Properly use iswitness in converttopsbt (MarcoFalke)
832eb4ff5 Bugfix: test/functional/rpc_psbt: Correct test description comment (Luke Dashjr)
966d8d084 Bugfix: test/functional/rpc_psbt: Remove check for specific error message that depends on uncertain assumptions (Luke Dashjr)
bb36ac82e rpc: Switch touched RPCs to IsValidNumArgs (MarcoFalke)
d24d0ec05 Add example 2nd arg to signrawtransactionwithkey (Chris Moore)
592016ba1 fixup: Fix prunning test (João Barbosa)
c80a498ae Fix RPC/pruneblockchain returned prune height (Jonas Schnelli)
b2398240f gui: Enable open wallet menu on setWalletController (João Barbosa)
d1f261150 Add test for GCC bug 90348 (Pieter Wuille)
d80c558e0 gui: Set progressDialog to nullptr (João Barbosa)
7ed1a6019 gui: Enable console line edit on setClientModel (João Barbosa)
b55cbe82d qt: fix opening bitcoin.conf via Preferences on macOS; see #15409 (shannon1916)
b6c1f9478 Disallow extended encoding for non-witness transactions (take 3) (MarcoFalke)
86031083c Add test for superfluous witness record in deserialization (Gregory Sanders)
5a58ddb6d Fix missing input template by making minimal tx (Gregory Sanders)
206f5ee87 Disallow extended encoding for non-witness transactions (Pieter Wuille)
3dbc7def0 Show loaded wallets as disabled in open menu instead of nothing (MeshCollider)
a635377b6 Install bitcoin-wallet manpage. (Daniel Kraft)
eb85ee62b Doc: remove text about txes always relayed from -whitelist (David A. Harding)
890a92eba doc: Mention blocksonly in reduce-traffic.md, unhide option (MarcoFalke)
3460555f4 test: Add test for p2p_blocksonly (MarcoFalke)
8f215c7a2 test: Format predicate source as multiline on error (MarcoFalke)
9c1a607a0 net: Rename ::fRelayTxes to ::g_relay_txes (MarcoFalke)
5935f0126 build with -fstack-reuse=none (MarcoFalke)

Pull request description:

Tree-SHA512: 5cd73a4319cb69c92b528239cf97c0ed5fcf2b9e8c7fe154e4679eeec95db433a0223d8dc574e4cdc96c1913cfdf160b10c42dcdbcb5bbc8fb743c07930ef9da
2019-07-04 10:18:47 +08:00
Hennadii Stepanov 715da91e91 Set AA_EnableHighDpiScaling attribute early
Qt docs: This attribute must be set before QGuiApplication is
constructed.

Github-Pull: #16254
Rebased-From: 099e4b9ad3
2019-06-24 09:02:05 -04:00
João Barbosa 2800b3d5c1 gui: Fix open wallet menu initialization order
The menu must be created before connecting to aboutToShow signal.

Github-Pull: #16231
Rebased-From: 5224be5a33
2019-06-23 12:00:46 -04:00
Andrew Chow e78007fc1a Make and get the multisig redeemscript and destination in one function instead of two
Instead of creating a redeemScript with CreateMultisigRedeemscript and
then getting the destination with AddAndGetDestinationForScript, do
both in the same function.

CreateMultisigRedeemscript is changed to AddAndGetMultisigDestination.
It creates the redeemScript and returns it via an output parameter. Then
it calls AddAndGetDestinationForScript to add the destination to the
keystore and get the proper destination.

This allows us to inspect the public keys in the redeemScript before creating
the destination so that the correct destination is used when uncompressed
pubkeys are in the multisig.

Github-Pull: #16026
Rebased-From: a49503402b
2019-06-21 08:51:41 -04:00
MarcoFalke 79745d1752 Replace remaining fprintf with tfm::format manually
Github-Pull: #16205
Rebased-From: fa8f195195
2019-06-18 15:50:40 -04:00
MarcoFalke beb09f09b3 scripted-diff: Replace fprintf with tfm::format
-BEGIN VERIFY SCRIPT-
sed -i --regexp-extended -e 's/fprintf\(std(err|out), /tfm::format(std::c\1, /g' $(git grep -l 'fprintf(' -- ':(exclude)src/crypto' ':(exclude)src/leveldb' ':(exclude)src/univalue' ':(exclude)src/secp256k1')
-END VERIFY SCRIPT-

fixup! scripted-diff: Replace fprintf with tfm::format

Github-Pull: #16205
Rebased-From: fac03ec43a
2019-06-18 15:50:02 -04:00
Kristaps Kaupe e29aa6e72e Exceptions should be caught by reference, not by value.
Github-Pull: #16095
Rebased-From: ae7faf20d5
2019-06-18 15:49:58 -04:00
MarcoFalke f88959ba7c tinyformat: Add doc to Bitcoin Core specific strprintf
Github-Pull: #16205
Rebased-From: fa72a64b90
2019-06-18 15:48:16 -04:00
MarcoFalke 0023c97890 rpc: bugfix: Properly use iswitness in converttopsbt
Also explain the param in all RPCs

Github-Pull: #15899
Rebased-From: fa499b5f02
2019-06-18 09:34:10 -04:00
MarcoFalke bb36ac82ef rpc: Switch touched RPCs to IsValidNumArgs
Github-Pull: #15899
Rebased-From: fa5c5cd141
2019-06-18 09:32:17 -04:00
Chris Moore d24d0ec056 Add example 2nd arg to signrawtransactionwithkey
The RPC examples for signrawtransactionwithkey are missing the 2nd parameter.

Github-Pull: #16210
Rebased-From: 71fd628ada
2019-06-17 13:06:19 -04:00
Jonas Schnelli c80a498ae5 Fix RPC/pruneblockchain returned prune height
Github-Pull: #15991
Rebased-From: 97f517dd85
2019-06-14 16:01:37 -04:00
João Barbosa b2398240ff gui: Enable open wallet menu on setWalletController
Github-Pull: #16118
Rebased-From: 75485ef096
2019-06-13 06:46:19 -04:00
Luke Dashjr 106471d0d7 Bugfix: dummywallet: Add -ignorepartialspends to list of ignored wallet options
Github-Pull: #15913
Rebased-From: 765d5890be
2019-06-11 11:58:21 -04:00
MarcoFalke 206c30f6d7 dummywallet: Reformat ignored wallet options list 2019-06-11 11:58:02 -04:00
Pieter Wuille d1f261150b Add test for GCC bug 90348
Github-Pull: #15985
Rebased-From: 58e291cfad
2019-06-07 11:12:22 +02:00
João Barbosa d80c558e02 gui: Set progressDialog to nullptr
Github-Pull: #16135
Rebased-From: d2ae6be80f
2019-06-07 11:11:56 +02:00
João Barbosa 7ed1a60193 gui: Enable console line edit on setClientModel
Github-Pull: #16122
Rebased-From: 2d8ad2f997
2019-06-07 11:11:56 +02:00
shannon1916 b55cbe82d9 qt: fix opening bitcoin.conf via Preferences on macOS; see #15409
Github-Pull: #16044
Rebased-From: 6e6494b3fb
2019-06-07 11:11:56 +02:00
MarcoFalke b6c1f9478f Disallow extended encoding for non-witness transactions (take 3)
Github-Pull: #16021
Rebased-From: fa2b52af32
2019-05-20 12:25:27 -04:00
Pieter Wuille 206f5ee875 Disallow extended encoding for non-witness transactions
Github-Pull: #14039
Rebased-From: bb530efa18
2019-05-20 12:23:45 -04:00
MeshCollider 3dbc7def0f Show loaded wallets as disabled in open menu instead of nothing
Github-Pull: #15957
Rebased-From: c3ef63a52f
2019-05-18 09:40:46 -04:00
David A. Harding eb85ee62b3 Doc: remove text about txes always relayed from -whitelist
Updates text since -whitelistforcerelay was set to false by default in
PR #15193.

Github-Pull: #15890
Rebased-From: e0bb279999
2019-05-17 07:35:48 -04:00
MarcoFalke 890a92eba8 doc: Mention blocksonly in reduce-traffic.md, unhide option
Github-Pull: #15990
Rebased-From: fa8ced32a6
2019-05-16 16:15:54 -04:00
MarcoFalke 9c1a607a09 net: Rename ::fRelayTxes to ::g_relay_txes
This helps to distinguish it from CNode::fRelayTxes and avoid bugs like
425278d17b

Github-Pull: #15990
Rebased-From: fa1dce7329
2019-05-16 16:15:47 -04:00
Wladimir J. van der Laan a4fc2fbb11
gui: Pre-rc4 translations update
Tree-SHA512: f3a7c9e0c935c869a85e3bc93a4bd33999270ffc13d35de34c46e9dab19229af19fb9c1a61a99264e8411c0966bf8b02a5ee94bf20a07f66b92234473f0e0801
2019-04-18 22:21:42 +02:00