aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2018-11-29fix uninitialized read when stringifying an addrLocalKaz Wesley
Reachable from either place where SetIP is used when our best-guess addrLocal for a peer is IPv4, but the peer tells us it's reaching us at an IPv6 address. In that case, SetIP turns an IPv4 address into an IPv6 address without setting the scopeId, which is subsequently read in GetSockAddr during CNetAddr::ToStringIP and passed to getnameinfo. Fix by ensuring every constructor initializes the scopeId field with something. Github-Pull: #14728 Rebased-From: b7b36decaf878a8c1dcfdb4a27196c730043474b
2018-11-29Throw error if CPubKey is invalid during PSBT keypath serializationGregory Sanders
Github-Pull: #14690 Rebased-From: 4e4de10f69d5d705256cadfb15d76314dff16e77
2018-11-29Bugfix: RPC: Add address_type named param for createmultisigLuke Dashjr
Github-Pull: #14596 Rebased-From: d8bf1071cf819fb4e848bb832af8199f084e0434
2018-11-28Fix listreceivedbyaddress not taking address as a stringEric Scrivner
Fixes #14173. Add the patch in #14173 and include a regression test. Github-Pull: #14417 Rebased-From: d4d70eda339f6f74390b56edd4021e928bb588a7
2018-11-28wallet: Avoid potential use of unitialized value bnb_used in ↵practicalswift
CWallet::CreateTransaction(...) Github-Pull: #13546 Rebased-From: a23a7f60aa07de52d23ff1f2034fc43926ec3520
2018-11-28disallow oversized CBlockHeaderAndShortTxIDsKaz Wesley
Otherwise we'd reply with a bogus BlockTransactionsRequest trying to request indexes with overflowed deltas. Github-Pull: #14685 Rebased-From: b08af10fb299dc3fdcd1f022619fb112c72e5d8e
2018-11-28fix a deserialization overflow edge caseKaz Wesley
A specially-constructed BlockTransactionsRequest can overflow in deserialization in a way that is currently harmless. Github-Pull: #14685 Rebased-From: 6bed4b374daf26233e96fa7863d4324a5bfa99c2
2018-11-28add a test demonstrating an overflow in a deserialization edge caseKaz Wesley
Also add a test that the highest legal index is accepted. Github-Pull: #14685 Rebased-From: 051faf7e9d4e32142f95f7adb31d2f53f656cb66
2018-11-28[wallet] Ensure wallet is unlocked before signinggustavonalle
Github-Pull: #14310 Rebased-From: db15805668e923c3493d77122d20926496cf6a1a
2018-11-10Merge #14441: [wallet] Backport(0.17): Restore ability to list incoming ↵Wladimir J. van der Laan
transactions by label 89306ab0df93bfdf5630910bc20b1eccb7379172 [wallet] Restore ability to list incoming transactions by label (Russell Yanofsky) Pull request description: Backport of PR #14411 to v0.17. This change partially reverts #13075 and #14023. Fixes #14382 Tree-SHA512: 1f8300e1a79e826cd706561265b8788deef505fa510be1a76ed9a62e5fca37cf6a741423ac0e5de2a36d6e8b9f25f141885455aacacbbf6474814e6eae406a27
2018-11-06qt: Revert "Force TLS1.0+ for SSL connections"Tim Ruffing
This reverts commit 15e26a6a9afe299b9ca6fced73b876644365879b, whose purpose was to tweak the Qt configuration to force TLS, i.e., to disable SSLv3, in Qt versions >= 5.5. However, the default behavior of Qt >= 5.4 is to disable SSLv3 anyway [1], so the configuration tweak is redundant. With Qt 5.11.2, the configuration tweak is not only redundant but in fact provokes a deadlock (#14359) due to Qt 5.11.2 being incompatible with OpenSSL 1.1.1 [2]. Since the deadlock occurs at the early startup stage of bitcoin-qt, it renders bitcoin-qt entirely non-functional when compiled against OpenSSL 1.1.1 and Qt 5.11.2 (and possible future combinations of OpenSSL and Qt versions). This commit fixes #14359 by removing the redundant code. [1] https://code.qt.io/cgit/qt/qtbase.git/commit/?id=3fd2d9eff8c1f948306ee5fbfe364ccded1c4b84 [2] https://bugreports.qt.io/browse/QTBUG-70956 Github-Pull: #14403 Rebased-From: 7d173c4cd1885ff5bcf9e5f8f7f712138dd8a445 Tree-SHA512: 71a34b13202c834c5ca73bcb9b70efff26c34e1aac3b954f098620b62c2be53a8e319929c4764a5b5cc5d0dd163ff70f4eb3a4f1f608363b7d23d1b16b25ddc7
2018-10-28Merge #14566: 0.17: qa backportsMarcoFalke
9461f98c53 Disable wallet and address book Qt tests on macOS minimal platform (Russell Yanofsky) 703a24418c descriptors.md: Refer to descriptors as describing instead of matching (Russell Yanofsky) 5f51fd6d59 doc/descriptors.md tweaks (Russell Yanofsky) 29899ecd36 Import CInv from correct module (Chun Kuan Lee) f7adb32e38 qa: Run all tests even if wallet is not compiled (MarcoFalke) 86fadee990 qa: Premine to deterministic address with -disablewallet (MarcoFalke) 8bc1badada Test rpc_help.py failed: Check whether ZMQ is enabled or not. (Kvaciral) 24d796a6cc test: Add tests for RPC help (João Barbosa) 168efeaca6 qa: Use named args in some tests (MarcoFalke) 73e538cf6a scripted-diff: Use named arguments in feature_block (MarcoFalke) 96dc936862 scripted-diff: Pass node into p2p_segwit acceptance tests (MarcoFalke) 7ff32a6b98 qa: Add some actual witness in rpc_rawtransaction (MarcoFalke) b72fbabe17 [qa] Use correct python index slices in example test (Suhas Daftuar) 06544faff0 qa: Add TestNode::assert_debug_log (MarcoFalke) Pull request description: Just the test and doc changes from #14328 to prevent that one from piling up. Tree-SHA512: 51c1e66d346cbf51bc67b2f365448620dd9992ba4ef70592c5eb489cd50a047dab8179c86db2cafe161d8b2aa04498cc760fb5deb7eef49b39272911c74227a9
2018-10-24Disable wallet and address book Qt tests on macOS minimal platformRussell Yanofsky
macOS Qt minimal platform is frequently broken, and these are currently failing with Qt 5.11.1. The tests do pass when run on the full cocoa platform (with `test_bitcoin-qt -platform cocoa`). Github-Pull: #14011 Rebased-From: a3197c5294df4711bab0ff6dcdd061ceab115c7d
2018-10-18[doc] getblocktemplate: use SegWit in exampleSjors Provoost
2018-10-10[wallet] Restore ability to list incoming transactions by labelRussell Yanofsky
Backport of PR 14411 to v0.17. This change partially reverts #13075 and #14023. Fixes #14382
2018-09-17Fix crash bug with duplicate inputs within a transactionSuhas Daftuar
Introduced by #9049
2018-09-11Convert non-witness UTXOs to witness if witness sig createdAndrew Chow
If a witness signature was created when a non-witness UTXO is used, convert the non-witness UTXO to a witness one.
2018-09-11Drop the unnecessary UTXO based on the UTXOs present, not on earlier wallet ↵Andrew Chow
things Instead of dropping the unnecessary UTXO based on whether the wallet did something, do it based on whether two UTXOs are there.
2018-09-06Replace duplcate reference with reference to reference docv0.17.0rc3Pieter Wuille
Github-Pull: #14096 Rebased-From: 2b5d6f8df24b381d35b75187c97ae0cc9f7c3ed0 Tree-SHA512: 79af808c581ebb17d60aab8322b1debcc4182480b84eaedcbfac1e67c8b543c61df22789095742d67d732dba35e7e5fad77912385b695f89fb0f44f75db11560
2018-09-06Adjust TODO linkPieter Wuille
Github-Pull: #14096 Rebased-From: 89709db7a2710456011eac9dcd6a60d5e87b97ae Tree-SHA512: 0bf74e1179bee6e616d8fd2c125411ef30611d9aa3b32412025615a793abbc629a7b6d89a89ef05b11ac3541cc869c0caebba2d00942fdd6ab8d2e98d9b9caca
2018-09-06util: Report parse errors in configuration fileWladimir J. van der Laan
Report errors while parsing the configuration file, instead of silently ignoring them. $ src/bitcoind -regtest Error reading configuration file: parse error on line 22: nodebuglogfile, if you intended to specify a negated option, use nodebuglogfile=1 instead $ src/bitcoind -regtest Error reading configuration file: parse error on line 22: sdafsdfafs $ src/bitcoind -regtest Error reading configuration file: parse error on line 24: -nodebuglogfile=1, options in the configuration file must be specified without leading - Github-Pull: #14105 Rebased-From: a66c0f78a941968340f030911765a84219908c4d Tree-SHA512: 2b6be1ab643623e6ef9b53354820147a6c5d2baae3795ffe428fc60d8563ec00a68a379aee4029380f80f892abe23763afb1c75c32b60a13bffe7b82496bf2bb
2018-09-05doc: Change documentation for =0 for non-boolean optionsWladimir J. van der Laan
PR #12713 changed the interpretation for negation of non-boolean options (e.g. -noconnect) to no longer set the option to 0, but to remove it from the options. I think this is better because it gets rid of the special meaning of '0'. However it needs to be documented. I attempt to do so in this PR. Addreses #14064. Github-Pull: #14100 Rebased-From: e9a78e9b3b17e09f923f09c5aae0eda9dfd58e66
2018-08-28fix walletcreatefundedpsbt deriv paths, add testGregory Sanders
Github-Pull: #14055 Rebased-From: 61fe653bd919cb0533b2b9d6259bc86a4b2975c0 Tree-SHA512: 2f3edf62318fab4b405b47788096005f59cbe6ba4723fe51ce3b386539a58b7ea7369c31c3840c6baa76cdf6ba8f8440f977c36e2ee2916e711d7872bd1eadad
2018-08-27Use assert when running from multithreaded code as BOOST_CHECK_* are not ↵Jesse Cohen
thread safe Github-Pull: #14069 Rebased-From: 737670c036e802e0fd8b51efffb41131d08f0204
2018-08-27qa: Stop txindex thread before calling destructorMarcoFalke
Github-Pull: #14071 Rebased-From: faf4a9b674186923f8c837e3621d147f504c1944
2018-08-27Docs: Fix help message typo optiona -> optionalBen Woosley
Github-Pull: #14056 Rebased-From: 7d0a8ad3103200145ab2e73368c3b8345a66c15d
2018-08-21RPCTypeCheck bip32derivs arg in walletcreatefundedGregory Sanders
Github-Pull: #13968 Rebased-From: faaac5caaab4d5131040292f4ef2404074ad268b Tree-SHA512: 758c0c3e4435897d1a9b03ea93f1b2a1a1b64071eda9450f968acf537c172ee61acf9d962bc22ddb6de26e0ad39d9165cdee6f260bb5a95bf97b4003853f0874
2018-08-21walletcreatefundedpsbt: remove duplicate replaceable argGregory Sanders
Github-Pull: #13968 Rebased-From: 1f18d7b591ffcc8bb9422a9b728bd9a0d8da6a2a Tree-SHA512: 90391703181db6880a135c60aca792a9e92c4abcad26907cd6cb0a0378593fe45cf995a22ae142ea7de2767c72a9df444e918ff15e460ce19c0435163917d812
2018-08-21Allow ConstructTransaction to not throw error with 0-input txnGregory Sanders
Github-Pull: #13968 Rebased-From: 2252ec50085c151e7998ca9a30cda6a33ee862b6 Tree-SHA512: 1f9978ee25fbe9bb338af19d81b401fa531d314ac8288cdb21c1bf10459edea50b43e2d5e97c9bb5fe24c8db89363f8233c0a3d96066ed85f7bd6d2eb234aac0
2018-08-16qt: Pre-rc1 translations updatev0.17.0rc1Wladimir J. van der Laan
Tree-SHA512: 11d0d6a23f47e428661b33fa175aa97cc6841452c0c55845fdb0a903a0b147cd6df65e8fdab8b98823bf411018d5d85006af8c2cf14597286e9e284764d15041
2018-08-15Only wipe wrong UTXO type data if overwritten by walletPieter Wuille
GitHub-Pull: #13917 Rebased-From: c05712c
2018-08-15Additional sanity checks in SignPSBTInputPieter Wuille
GitHub-Pull: #13917 Rebased-From: 8254e99
2018-08-15Serialize non-witness utxo as a non-witness tx but always deserialize as witnessAndrew Chow
Strip out the witnesses when serializing the non-witness utxo. However witness serializations are allowed, so make sure we always deserialize as witness. GitHub-Pull: #13960 Rebased-From: bd19cc7
2018-08-15Fix PSBT deserialization of 0-input transactionsAndrew Chow
0-input transactions can be ambiguously deserialized as being witness transactions. Since the unsigned transaction is never serialized as a witness transaction as it has no witnesses, we should always deserialize it as a non-witness transaction and set the serialization flags as such. Also always serialize the unsigned transaction as a non-witness transaction. GitHub-Pull: #13960 Rebased-From: 43811e6
2018-08-13net: Update hardcoded seedsWladimir J. van der Laan
Pre-0.17 branch hardcoded seeds update.
2018-08-13Merge #13905: docs: fixed bitcoin-cli -help output for help2manMarcoFalke
869193f5a6 docs: fixed bitcoin-cli -help output for help2man (Hennadii Stepanov) Pull request description: Currently `bitcon-cli -help` output forces help2man to produce `.TP` and `.IP` commands instead of a single `.IP` command for `-stdinrpcpass` option. Removing an extra space fixes this issue. This pull request is rebased from #13879 Tree-SHA512: 1c5b25ed2ef7b7de42bc6210165bdbabe63f045699487f2db4790e0d3176f6493dfd3e8e19f4ddc38b551539465d7b41aea570f20dccbc0609f00fdfee1b5180
2018-08-13Merge #13918: rpc: Replace median fee rate with feerate percentiles in ↵MarcoFalke
getblockstats 4b7091a842 Replace median fee rate with feerate percentiles (Marcin Jachymiak) Pull request description: Currently, the `medianfeerate` statistic is calculated from the feerate of the middle transaction of a list of transactions sorted by feerate. This PR instead uses the value of the 50th percentile weight unit in the block, and also calculates the feerate at the 10th, 25th, 75th, and 90th percentiles. This more accurately corresponds with what is generally meant by median feerate. Tree-SHA512: 59255e243df90d7afbe69839408c58c9723884b8ab82c66dc24a769e89c6d539db1905374a3f025ff28272fb25a0b90e92d8101103e39a6d9c0d60423a596714
2018-08-13Merge #13666: Always create signatures with Low R valuesWladimir J. van der Laan
e306be742932d4ea5aca0ea4768e54b2fc3dc6a0 Use 72 byte dummy signatures when watching only inputs may be used (Andrew Chow) 48b1473c898129a99212e2db36c61cf93625ea17 Use 71 byte signature for DUMMY_SIGNATURE_CREATOR (Andrew Chow) 18dfea0dd082af18dfb02981b7ee1cd44d514388 Always create 70 byte signatures with low R values (Andrew Chow) Pull request description: When creating signatures for transactions, always make one which has a 32 byte or smaller R and 32 byte or smaller S value. This results in signatures that are always less than 71 bytes (32 byte R + 32 byte S + 6 bytes DER + 1 byte sighash) with low R values. In most cases, the signature will be 71 bytes. Because R is not mutable in the same way that S is, a low R value can only be found by trying different nonces. RFC 6979 for deterministic nonce generation has the option to specify additional entropy, so we simply use that and add a uin32_t counter which we increment in order to try different nonces. Nonces are sill deterministically generated as the nonce used will the be the first one where the counter results in a nonce that results in a low R value. Because different nonces need to be tried, time to produce a signature does increase. On average, it takes twice as long to make a signature as two signatures need to be created, on average, to find one with a low R. Having a fixed size signature makes size calculations easier and also saves half a byte of transaction size, on average. DUMMY_SIGNATURE_CREATOR has been modified to produce 71 byte dummy signatures instead of 72 byte signatures. Tree-SHA512: 3cd791505126ce92da7c631856a97ba0b59e87d9c132feff6e0eef1dc47768e81fbb38bfbe970371bedf9714b7f61a13a5fe9f30f962c81734092a4d19a4ef33
2018-08-13Merge #13808: wallet: shuffle coins before grouping, where warrantedWladimir J. van der Laan
18f690ec2f7eb1b4aa51825bfed0cbfdadc93ac7 wallet: shuffle coins before grouping, where warranted (Karl-Johan Alm) Pull request description: Coins are randomly shuffled in coin selection to avoid unintentional privacy leaks regarding the user's coin set. For the case where a user has a lot of coins with the same destination, these will be grouped into groups of 10 *before* the shuffling. It is unclear whether this has any implications at all, but this PR plugs the potential issue, if there ever is one, by shuffling the coins before they are grouped. Issue brought up in https://github.com/bitcoin/bitcoin/pull/12257#discussion_r204554549 Tree-SHA512: fb50ed4b5fc03ab4853d45b76e1c64476ad5bcd797497179bc37b9262885c974ed6811159fd8e581f1461b6cc6d0a66146f4b70a2777c0f5e818d1322e0edb89
2018-08-13docs: fixed bitcoin-cli -help output for help2manHennadii Stepanov
The `help2man` parses a string containing two spaces between words with an issue: it gives out `.TP` and `.IP` commands instead of a single `.IP` command. Removing an extra space fixes this issue. Currently the `-help` output for the `-stdin` option looks without any issue due to eliminating of two spaces between words by a `FormatParagraph` call for this particular case. For consistency and preventing from future regressions extra spaces have been removed from the both lines. The redundant `strprintf` call has been removed aswell.
2018-08-13qt: Translations update before 0.17 branchWladimir J. van der Laan
Make sure that translations are synchronized with transifex before the branch-off point to minimize the difference and prevent duplicate work. Tree-SHA512: 41e71eaf14094606fd90011d035c551a635d5a715f865a49841dbe2b54a76b7fbf59a7918f86e5fd80a717e2934a9613fe463391fd01848d0a01e5c4e7e7fef0
2018-08-11Replace median fee rate with feerate percentilesMarcin Jachymiak
Removes medianfeerate result from getblockstats. Adds feerate_percentiles which give the feerate of the 10th, 25th, 50th, 75th, and 90th percentile weight unit in the block.
2018-08-10Merge #13908: [Docs] upgrade rescan time warning from minutes to >1 hourMarcoFalke
bb5b1c0b2d [Docs] upgrade rescan time warning from minutes to >1 hour (Mason Simon) Pull request description: When I rescanned just now it took well over an hour. The time warning "may take minutes" didn't prepare me for that. ``` 2018-08-08T03:10:17Z [wallet] Still rescanning. At block 174747. Progress=0.008341 2018-08-08T03:11:17Z [wallet] Still rescanning. At block 204233. Progress=0.024533 2018-08-08T03:12:17Z [wallet] Still rescanning. At block 221170. Progress=0.038340 ... 2018-08-08T04:16:17Z [wallet] Still rescanning. At block 524815. Progress=0.957105 2018-08-08T04:17:17Z [wallet] Still rescanning. At block 528572. Progress=0.971323 2018-08-08T04:18:17Z [wallet] Still rescanning. At block 532458. Progress=0.986824 ``` This is on a 4-core 4ghz system with a 7200rpm drive. Tree-SHA512: 722ccf566bfd6a3381fa173e08849cb676fe4c1f1cb2c4b86b07df2a5dc1ca0d54797cbe8fd606cdc2c60fef2be7c98e052460decdac2132ba759cff822132e8
2018-08-10Merge #13927: rpc: Use pushKV in some new PSBT RPCsMarcoFalke
227d27e70c Use pushKV in some new PSBT RPCs. (Daniel Kraft) Pull request description: Most of the code uses `UniValue::pushKV` where appropriate, but some new RPC code related to PSBTs did not. This fixes those places - after this change, there are no remaining source files I could find that contain `push_back(Pair(`. Tree-SHA512: d6567cf144d05d7e42276bd66ff4cd44413328f985772d11bb9d7339d32ab7c3438d4bb0040a37e75f8d193c610b08fa971073935885e0a178546aa045daf9fa
2018-08-10Merge #13907: Introduce a maximum size for locators.Wladimir J. van der Laan
e254ff5d53b79bee29203b965fca572f218bff54 Introduce a maximum size for locators. (Gregory Maxwell) Pull request description: The largest sensible size for a locator is log in the number of blocks. But, as noted by Coinr8d on BCT a maximum size message could encode a hundred thousand locators. If height were used to limit the messages that could open new attacks where peers on long low diff forks would get disconnected and end up stuck. Ideally, nodes first first learn to limit the size of locators they send before limiting what would be processed, but common implementations back off with an exponent of 2 and have an implicit limit of 2^32 blocks, so they already cannot produce locators over some size. Locators are cheap to process so allowing a few more is harmless, so this sets the maximum to 64-- which is enough for blockchains with 2^64 blocks before the get overhead starts increasing. Tree-SHA512: da28df9c46c988980da861046c62e6e7f93d0eaab3083d32e408d1062f45c00316d5e1754127e808c1feb424fa8e00e5a91aea2cc3b80326b71c148696f7cdb3
2018-08-10Merge #13925: Merge leveldb subtreeWladimir J. van der Laan
ec749b1bcdf2483b642fb51d635800e272c68ba6 Squashed 'src/leveldb/' changes from 64052c76c5..524b7e36a8 (MarcoFalke) Pull request description: For review: ```sh git fetch https://github.com/bitcoin-core/leveldb ./test/lint/git-subtree-check.sh src/leveldb ``` Closes #13860 Tree-SHA512: 9d13384fe35e7144b4a7fca57efe77b0cc5295952da4a397e4c6d8aa3f8043d5113fccedd3ae1dcaa3d2649e732e5f57a71504847946e055aa4dc8c3780e29fc
2018-08-09Use 72 byte dummy signatures when watching only inputs may be usedAndrew Chow
With watching only inputs, we do not know how large the signatures for those inputs will be as their signers may not have implemented 71 byte signatures. Thus we estimate their fees using the 72 byte dummy signature to ensure that we pay enough fees. This only effects fundrawtransaction when includeWatching is true.
2018-08-09Use 71 byte signature for DUMMY_SIGNATURE_CREATORAndrew Chow
Changes DUMMY_SIGNATURE_CREATOR to create 71 byte dummy signatures. Update comments to reflect this change
2018-08-09Always create 70 byte signatures with low R valuesAndrew Chow
When extra entropy is not specified by the caller, CKey::Sign will now always create a signature that has a low R value and is at most 70 bytes. The resulting signature on the stack will be 71 bytes when the sighash byte is included. Using low R signatures means that the resulting DER encoded signature will never need to have additional padding to account for high R values.
2018-08-10wallet: shuffle coins before grouping, where warrantedKarl-Johan Alm
Issue brought up in https://github.com/bitcoin/bitcoin/pull/12257\#discussion_r204554549