aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-12-02policy: Add Clang thread safety annotations for variables guarded by ↵practicalswift
cs_feeEstimator
2018-12-01Merge #13966: gui: When private key is disabled, only show watch-only balanceWladimir J. van der Laan
82d6c5aad gui: Show watch-only eye instead of HD disabled (Chun Kuan Lee) fe1ff5026 Hide spendable label if priveate key is disabled (Chun Kuan Lee) Pull request description: If a wallet is in private key disabled mode, the spendable balance is always zero, it does not have to show on GUI. Show the watch-only balance at normal balance column if a wallet is in that mode. ![image](https://user-images.githubusercontent.com/11154118/45662527-dfaab400-bb34-11e8-98c8-c06ac5c0b08a.png) Tree-SHA512: 8b535427d26d3f8e61081f50e4773bd25656be042d378fd34cf647e9a0065cb4dfb67a8ab9fb4fbf5f196390df8cb983ebf2f0fa8a6503b7c046c56bec87ba72
2018-12-01Merge #14841: consensus: Move CheckBlock() call to critical sectionWladimir J. van der Laan
c5ed6e73d Move CheckBlock() call to critical section (Hennadii Stepanov) Pull request description: This is an alternative to #14803. Refs: - #14058 - #14072 - https://github.com/bitcoin/bitcoin/pull/14803#issuecomment-442233211 by @gmaxwell > It doesn't support multithreaded validation and there are lot of things that prevent that, which is why I was concerned. Why doesn't the lock on the block index or even cs main prevent concurrency here? - https://github.com/bitcoin/bitcoin/pull/14803#issuecomment-442237566 by @MarcoFalke Tree-SHA512: 2152e97106e11da5763b2748234ecd2982daadab13a0da04215f4db60af802a44ab5700f32249137d122eb13fc2a02e0f2d561d364607d727d8c6ab879339afb
2018-11-30Merge #13258: uint256: Remove unnecessary crypto/common.h dependencyWladimir J. van der Laan
bf2e01097 uint256: Remove unnecessary crypto/common.h use (Karl-Johan Alm) Pull request description: This is an alternative to #13242 which keeps the `ReadLE64` part, but moves the `crypto/common.h` dependency into `crypto/common.h` as a function outside of `uint256`. **Reason:** this change will remove dependencies for `uint256` to `crypto/common.h`, `compat/endian.h`, and `compat/byteswap.h`. This PR removes the need to update tests to be endian-aware/-independent, but keeps the (arguably dubious) `ReadLE64` part (which was only introduced to fix the tests, not for any functionality). Tree-SHA512: 78b35123cdb185b3b3ec59aba5ca8a5db72624d147f2d6a5484ffa5ce626a72f782a01dc6893fc8f5619b03e2eae7b5a03b0df5d43460f3bda428e719e188aec
2018-11-30Merge #14845: [tests] Add wallet_balance.pyMarcoFalke
c1825b9d39 [tests] Add wallet_balance.py (John Newbery) Pull request description: Adds a test specifically to test the wallet's getbalance and getunconfirmedbalance RPCs. `wallet_basic.py` is too large and should be broken down into more focused test cases. I wrote `wallet_balance.py` to test the changes in #14602. Offering as a PR in case people think it's more generally useful. Tree-SHA512: 573ae8faf377df3d87d5112870b40690efb285fc5578fff8acc2ac1a0e4625ae65d3dfa8abbac577c87bec015038f425833783fa09f014f87906e8d098ed30d7
2018-11-30Merge #14380: fix assert crash when specified change output spend size is ↵MarcoFalke
unknown 0fb2e69815 CreateTransaction: Assume minimum p2sh-p2wpkh spend size for unknown change (Gregory Sanders) b06483c96a Remove stale comment in CalculateMaximumSignedInputSize (Gregory Sanders) Pull request description: This is triggered anytime a fundraw type call(psbt or legacy) is used with a change output address that the wallet doesn't know how to sign for. This regression was added in 6a34ff5335786615771ca423134a484b04831c4e since BnB coin selection actually cares about this. The fix is to assume the smallest typical spend, a P2SH-P2WPKH, which is calculated using a "prototype" dummy signature flow. Future work could generalize this infrastructure to get estimated sizes of inputs for a variety of types. I also removed a comment which I believe is stale and misleading. Tree-SHA512: c7e2be189e524f81a7aa4454ad9370cefba715e3781f1e462c8bab77e4d27540191419029e3ebda11e3744c0703271e479dcd560d05e4d470048d9633e34da16
2018-11-30Merge #14683: tests: better combine_logs.py behaviorMarcoFalke
4aabadbf44 tests: have combine_logs default to most recent test dir (James O'Beirne) Pull request description: Have `combine_logs.py` default to the most recent test directory if no argument is provided. This allows you to avoid an annoying copy-paste when iterating on a failing test, since you can do something like ```sh alias testlogs='./test/functional/combine_logs.py -c | less' ./test/functional/some_test.py # fails testlogs ``` Tree-SHA512: 919642ab09c314888a23c9491963b35b9da87e60deb740d1d5e816444aa9bdda5e519dc8ca131669f2d563167ef5f5abb14e22f20f47bf8362915ed578181846
2018-11-30[tests] Add wallet_balance.pyJohn Newbery
Adds a test specifically to test the wallet's getbalance and getunconfirmedbalance RPCs.
2018-11-30Move CheckBlock() call to critical sectionHennadii Stepanov
This prevents data race for CBlock::fChecked.
2018-11-29tests: have combine_logs default to most recent test dirJames O'Beirne
2018-11-28Merge #14822: bench: Destroy wallet txs instead of leaking their memoryMarcoFalke
fa5cef0f78 bench: Destroy wallet txs instead of leaking their memory (MarcoFalke) Pull request description: This should destroy the wallet txs when the benchmark ends to avoid having to hold them when the following benchmarks run. Tree-SHA512: e2510946e6a47fad3ec5fb28d298df8ddc2e017455fcff777fa7bbc12d801c08739db6a7a7289509aaa881ccdc59dfff9bcb6772b48db2c457d3787081a46c06
2018-11-28Merge #13123: net: Add Clang thread safety annotations for guarded variables ↵MarcoFalke
in the networking code 4894133dc5 Add missing lock in CNode::copyStats(...) (practicalswift) b312cd7707 Add missing locking annotations (practicalswift) Pull request description: Add Clang thread safety annotations for variables guarded by: * `cs_addrLocal` * `cs_addrName` * `cs_feeFilter` * `cs_filter` * `cs_hSocket` * `cs_inventory` * `cs_mapLocalHost` * `cs_most_recent_block` * `cs_proxyInfos` * `cs_sendProcessing` * `cs_setBanned` * `cs_SubVer` * `cs_vOneShots` * `cs_vProcessMsg` * `cs_vRecv` * `cs_vSend` Changed files: * `src/net.{cpp,h}` * `src/netbase.cpp` Tree-SHA512: 319a1574a07d766e81fab19b9cfdcf8b5f0b175034ebef220cd406f1672b4ef2c57f5c456c623456ca7a1f96308de69c73535792e9e4c34b848b55fd4f35fc95
2018-11-28Merge #14819: Bugfix: test/functional/mempool_accept: Ensure oversize ↵MarcoFalke
transaction is actually oversize 29aeed1734 Bugfix: test/functional/mempool_accept: Ensure oversize transaction is actually oversize (Luke Dashjr) Pull request description: Simply integer dividing results in an acceptable size if the limit isn't an exact multiple of the input size. Use math.ceil to ensure the transaction is always oversize. (This issue can be triggered by changing the address style used.) Tree-SHA512: e45062b0e8a3e9cb08e9dac5275b68d86e4377b460f1b3b995944090a055b0542a6986826312ec0e223369838094e42e20d8614b5c2bab9975b9a6f749295b21
2018-11-28Add missing lock in CNode::copyStats(...)practicalswift
2018-11-28Add missing locking annotationspracticalswift
2018-11-27bench: Destroy wallet txs instead of leaking their memoryMarcoFalke
2018-11-27Merge #14794: tests: Add AddressSanitizer (ASan) Travis buildMarcoFalke
6541d59ddc Add LSan suppression warnings (practicalswift) ff7212ec32 Add ASan Travis build (practicalswift) ebd3bf2590 Make test p2p_invalid_messages.py pass: Allow for expected Travis ASAN memory increase (practicalswift) Pull request description: Add ASan Travis build. Tree-SHA512: b9712aaf0c9112b637b6ef0c5d93961863dcbecaf31d9561eb09258a61540fb31d2c8ecae86518a82763279e4aa6cac266cd352c2b2507df0335c0199f8b3d78
2018-11-27Merge #14477: Add ability to convert solvability info to descriptorPieter Wuille
109699dd33 Add release notes (Pieter Wuille) b65326b562 Add matching descriptors to scantxoutset output + tests (Pieter Wuille) 16203d5df7 Add descriptors to listunspent and getaddressinfo + tests (Pieter Wuille) 9b2a25b13f Add tests for InferDescriptor and Descriptor::IsSolvable (Pieter Wuille) 225bf3e3b0 Add Descriptor::IsSolvable() to distinguish addr/raw from others (Pieter Wuille) 4d78bd93b5 Add support for inferring descriptors from scripts (Pieter Wuille) Pull request description: This PR adds functionality to convert a script to a descriptor, given a `SigningProvider` with the relevant information about public keys and redeemscripts/witnessscripts. The feature is exposed in `listunspent`, `getaddressinfo`, and `scantxoutset` whenever these calls are applied to solvable outputs/addresses. This is not very useful on its own, though when we add RPCs to import descriptors, or sign PSBTs using descriptors, these strings become a compact and standalone way of conveying everything necessary to sign an output (excluding private keys). Unit tests and rudimentary RPC tests are included (more relevant tests can be added once RPCs support descriptors). Fixes #14503. Tree-SHA512: cb36b84a3e0200375b7e06a98c7e750cfaf95cf5de132cad59f7ec3cbd201f739427de0dc108f515be7aca203652089fbf5f24ed283d4553bddf23a3224ab31f
2018-11-27Merge #14820: test: Fix descriptor_tests not checking ToString output of ↵MarcoFalke
public descriptors c77f09230b Fix descriptor_tests not checking ToString output of public descriptors (Russell Yanofsky) Pull request description: This fixes a minor test bug introduced in #13697 that I noticed while reviewing #14646 Tree-SHA512: efed91200cdff5f86ba5de3461ac00759d285e2905f6cb24cea15d3e23e0581ce5fc14b24a40db093f7ebd662ee1ee2cf67f8798bac1903a78298eda08909cfb
2018-11-27Fix descriptor_tests not checking ToString output of public descriptorsRussell Yanofsky
2018-11-27Merge #14813: qa: Add wallet_encryption error testsMarcoFalke
fa739d4bd7 qa: Add wallet_encryption error tests (MarcoFalke) Pull request description: The errors for empty passphrases are the help text of the RPC call, which is not very specific. Replace that with proper RPC errors and test them. Tree-SHA512: 3137e0f8f2e42a1f8ab1eeb57c99052557725f6f85139ff48c24acc8f3cf4087802de5216f3ce97375b291d21bddb7cd1379a6f280166136a306a0c9663bbd42
2018-11-27Bugfix: test/functional/mempool_accept: Ensure oversize transaction is ↵Luke Dashjr
actually oversize Simply integer dividing results in an acceptable size if the limit isn't an exact multiple of the input size. Use math.ceil to ensure the transaction is always oversize.
2018-11-27Merge #14772: refactor: Convert comments to thread safety annotationsMarcoFalke
fa71eb5196 Convert comments to thread safety annotations (MarcoFalke) Pull request description: Convert human-only-readable annotations to human-and-machine-readable annotations. Tree-SHA512: 98a97b32b50e8ec816626ed853d56c9afb31065eb14f058cda8f22a16ddd2b0c02911f9e30478aa347f466891f972496d89a828eb6e4662fb712d7d9e7643d49
2018-11-26Add LSan suppression warningspracticalswift
2018-11-26Add ASan Travis buildpracticalswift
2018-11-26Make test p2p_invalid_messages.py pass: Allow for expected Travis ASAN ↵practicalswift
memory increase
2018-11-26Merge #14812: qa: fix p2p_invalid_messages on macOSMarcoFalke
5a1f57646b qa: clean up assert_memory_usage_stable utility (James O'Beirne) 0cf1632f03 qa: fix p2p_invalid_messages on macOS (James O'Beirne) Pull request description: Infinite mea culpa for the number of problems with this test. This change bumps the acceptable RSS increase threshold from 3% to 50% when spamming the test node with junk 4MB messages. On [@MarcoFalke's macOS test build](https://travis-ci.org/MarcoFalke/btc_nightly) we see RSS grow ~14% from ~71MB to 81MB, so a 50% increase threshold should be more than sufficient to avoid spurious failures. Tree-SHA512: 150a7b88080fd883c7a5d0b9ffa470f61a97c4885fccc1a06fde6260aaef15640a7c1de7e89c581b245df7807d617ec3d86775330386ec5149ad567492fc5d31
2018-11-26qa: Add wallet_encryption error testsMarcoFalke
2018-11-26qa: clean up assert_memory_usage_stable utilityJames O'Beirne
2018-11-26qa: fix p2p_invalid_messages on macOSJames O'Beirne
2018-11-26Merge #14808: doc: clarify RPC rawtransaction documentationMarcoFalke
848077f94d clarify RPC rawtransaction documentation (Jameson Lopp) Pull request description: Fixing an RPC documentation typo and clarifying the wording of the testmempoolaccept function. Tree-SHA512: 495c05ba322d0747ff569d02f5d2ad7d94b5542049c82091f5e74d8d02a8af408f31e10b112ca20d506125e3b39703ec3169f3a446f09ecae3cd46148ffc4041
2018-11-26clarify RPC rawtransaction documentationJameson Lopp
2018-11-25Merge #14400: Add Benchmark to test input de-duplication worst caseMarcoFalke
e4eee7d09d Add Benchmark to test input de-duplication worst case (Jeremy Rubin) Pull request description: Because there are now 2PRs referencing this benchmark commit, we may as well add it independently as it is worth landing the benchmark even if neither patch is accepted. https://github.com/bitcoin/bitcoin/pull/14397 https://github.com/bitcoin/bitcoin/pull/14387 Tree-SHA512: 4d947323c02297b0d8f5871f9e7cc42488c0e1792a8b10dc174a25f4dd53da8146fd276949a5dbacf4083f0c6a7235cb6f21a8bc35caa499bc2508f8a048b987
2018-11-25Add Benchmark to test input de-duplication worst caseJeremy Rubin
Fix nits replace utiltime?
2018-11-23Merge #14785: Scripts: Fix detection of copyright holdersMarcoFalke
af9a9918b2 Fix detection of copyright holders (Cornelius Schumacher) Pull request description: Fix copyright holder detection so that `copyright_header.py report` creates a clean and accurate report: * Fix list of copyright holders in the code * Also detect copyrights which have a comma after the date * Exclude directories which are git subtrees Tree-SHA512: 7ab78618aa62c7d40b6688ddcde4a85c6fc5df8275271fa85518e146c1db90760bfafaa6036b9f6afbe887fd7e9274c913786101668573a3e289b3411aa6842f
2018-11-23Fix detection of copyright holdersCornelius Schumacher
* There is a copyright notice in `src/crypto/sha256_sse4.cpp` in the middle of the file which contains a comma before the copyright holder name. Correctly detect this so it's added to the report. * Add missing copyright holders so that `copyright_header.py report` doesn't show any unexpected copyright holder names anymore. * Exclude files from git subtrees because they are maintained at the original source.
2018-11-23Merge #14764: travis: Run thread sanitizer on unit testsMarcoFalke
fa7d36b8e7 test: Move UBSAN suppressions to test/sanitizer_suppressions/ubsan (MarcoFalke) fa36d4e456 travis: --disable-hardening for xenial thread sanitizer (MarcoFalke) 89bf196c88 travis: Run thread sanitizer (MarcoFalke) Pull request description: On unit tests only for now. Disabled for the gui unit tests and all functional tests. Tree-SHA512: 56f7d3b44e7cb68c76a2dc5abd85658955b1c2188932e988667c5a1cbcdd6be995d37bb949d62c6eb08a4aebfc43ff0370b7da1719d4e4f322a3495c1941a5e0
2018-11-23Merge #14521: qt, docs: Fix `bitcoin-qt -version` output formattingWladimir J. van der Laan
60ae463a68206b08faaadfbb023d7ede78fff784 Fix `bitcoin-qt -version` output formatting (Hennadii Stepanov) Pull request description: This PR makes command line output of `bitcoin-qt -version` formatted in the same way as `bitcoind -version` output. Before: ![screenshot from 2018-10-19 20-16-42](https://user-images.githubusercontent.com/32963518/47233718-434a2a80-d3dc-11e8-90d4-84dd23e8ac3b.png) After: ![screenshot from 2018-10-19 20-22-09](https://user-images.githubusercontent.com/32963518/47233888-b653a100-d3dc-11e8-9155-000b517a8e7b.png) Tree-SHA512: fd8bd20e2108b9562bcbf6c094f950e867a5755994e8acc28b07e52fe73d04f783201c20bde47be2083ce89fb3ef9749f9c3757d479ad6c48ed09c633155f47e
2018-11-23Merge #14678: [wallet] remove redundant KeyOriginInfo access, already done ↵Wladimir J. van der Laan
in CreateSig b81a1860561ccbda3cd6913f54e49fdc91c7718c GetPubKey: make sigdata const (Gregory Sanders) f7beb95a1f921ed292680fbd2f042b4bac73bf59 remove redundant KeyOriginInfo access, already done in CreateSig (Gregory Sanders) Pull request description: This redundancy is confusing as it looks like pubkeyhashes are special in some way based on where it's called. Tree-SHA512: a980b7c774c6d69322945227a2b156489fb1991ebf57fe6f26096d5f8047f246a133debc241b05af67810f604b040079add3ab3d30d9e2928095905a2afe17eb
2018-11-23Merge #14612: Include full version number in released file namesWladimir J. van der Laan
75a4bf699fa6bdefa1b3d8cd405ea822d6ee01c0 Update release-process.md to include RC version bumping (Andrew Chow) 04b0bc7425e43de90856beeb1f33653db109fecd build: include rc number in version number (Andrew Chow) 895e6bbb2241e9175463734f3677398a9f38f0f8 build: if VERSION_BUILD is non-zero, include it in the package version (Andrew Chow) Pull request description: As noted on IRC, the filenames of the gitian build results do not contain the 4th digit of the version number if it has one, e.g. 0.17.0.1 produces files with the number 0.17.0. Furthermore, when RC's are built, the resulting filenames are of the release version and do not include `rc` in them. This occurs because `configure.ac` is written to create version numbers of the form `major.minor.rev` instead of `major.minor.rev.build` and without any rc version as it does not handle rc numbers. This PR changes `configure.ac` to include the build number if it is greater than 0. It will also include the rc number if it is greater than 0. So the filenames of the gitian builds will now contain the full version number. This behavior can be tested by setting `_CLIENT_VERSION_BUILD` and `_CLIENT_VERSION_RC` to non-zero values and then doing `make dist`. A tar file should be created with the correct versioning. Tree-SHA512: b77990485f2c7770be897dc136737cd805306afff9882ebef7170741f363203587356ccf8bec83163268ace1bd77433fbd2ba8c213f993677bfb867d99a0bbe7
2018-11-23Merge #14448: doc: Clarify rpcwallet flag url changeWladimir J. van der Laan
0c69ff61719e9bc4938a9675a36b4170dfca4e6c clarify rpcwallet flag url change (Jordan Baczuk) Pull request description: This adds clarification to the bitcoin-cli -rpcwallet flag in the help command. This will benefit users who want to utilize this feature without the cli, for example curl. It isn't readily apparent that this changes the url used in the RPC call. Tree-SHA512: 6fc759f193f0a918884aab8ba4dc77ed9e89ee3840feeff737a754be758750590f5bd44b40f4810c3b82601e125e62e10360af45cb8e9d95be206ebeb9120ebf
2018-11-23Merge #14728: fix uninitialized read when stringifying an addrLocalWladimir J. van der Laan
b7b36decaf878a8c1dcfdb4a27196c730043474b fix uninitialized read when stringifying an addrLocal (Kaz Wesley) 8ebbef016928811756e46b9086067d1c826797a8 add test demonstrating addrLocal UB (Kaz Wesley) Pull request description: Reachable from either place where SetIP is used when all of: - our best-guess addrLocal for a peer is IPv4 - the peer tells us it's reaching us at an IPv6 address - NET logging is enabled 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. Tree-SHA512: 8f0159750995e08b985335ccf60a273ebd09003990bcf2c3838b550ed8dc2659552ac7611650e6dd8e29d786fe52ed57674f5880f2e18dc594a7a863134739e3
2018-11-23Merge #14726: Use RPCHelpMan for all RPCsWladimir J. van der Laan
fa5e0452e875a7ca6bf6fe61fdd652d341eece40 rpc: Documentation fixups (MarcoFalke) fa91e8eda541acdb78ca481b74605639f319c108 Use RPCHelpMan for all RPCs (MarcoFalke) fa520e72f7b5964cea1ade666e71212914556cf3 lint: Must use RPCHelpMan to generate the RPC docs (MarcoFalke) Pull request description: The resulting documentation should not change unless the type in the oneline-summary was previously incorrect. (E.g. string vs bool) Tree-SHA512: 4ff355b6a53178f02781e97a7aca7ee1d0d97ff348b6bf5a01caa1c96904ee33c704465fae54c2cd7445097427fd04c71ad3779bb7a7ed886055ef36c1b5a1d0
2018-11-23Merge #14778: A few minor formatting fixes and clarifications to descriptors.mdWladimir J. van der Laan
8284756705dc05ef2e5a6bdfeab146d3cebe35ca A few minor formatting fixes and clarifications to descriptors.md (John Newbery) Pull request description: Fixes some markdown formatting issues, and also adds a few clarifications. Tree-SHA512: b12fc94035c075a990756e22fb60b95e6c851c80c8a60fc8fc46b07c6749df4d257401889be4d930996432ac08850770077e667fe48473140f38b94c8e9eacdc
2018-11-22Merge #14777: tests: Add regtest for JSON-RPC batch callsMarcoFalke
3d2c7d6f94 Add regtest for JSON-RPC batch calls. (Daniel Kraft) Pull request description: This adds a new regtest file `interface_rpc.py`, containing a test for batch JSON-RPC requests. Those were previously not tested at all. Tests for basic requests are not really necessary, as those are used anyway in lots of other regtests. The existing `interface_http.py` file is more about the underlying HTTP connection, so adding a new interface file for the JSON-RPC specific things makes sense. Tree-SHA512: 7c7576004c8474e23c98f4bf25fb655328ba6bb73ea06744ebee1c0ffbb26bc132e621ae52955d51dab0803b322f8d711667626a777ac9b26003339c2484502f
2018-11-22test: Move UBSAN suppressions to test/sanitizer_suppressions/ubsanMarcoFalke
2018-11-22travis: --disable-hardening for xenial thread sanitizerMarcoFalke
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67308
2018-11-22travis: Run thread sanitizerMarcoFalke
2018-11-22Merge #14771: test: Add BOOST_REQUIRE to getters returning optionalMarcoFalke
fa21ca09a8 test: Add BOOST_REQUIRE to getters returning optional (MarcoFalke) Pull request description: Usually the returned value is already checked for equality, but for sanity we might as well require that the getter successfully returned. Tree-SHA512: 0d613a9a721c61bd7a115ebc681a0890df09b8e5775f176ac18b3a586f2ca57bee0b5b816f5a7c314ff3ac6cbb2a4d9c434f8459e054a7c8a6934a75f0120c2a
2018-11-22Merge #14756: Improve rpcauth.py by using argparse and getpass modulesWladimir J. van der Laan
d6cde007db9d3e6ee93bd98a9bbfdce9bfa9b15b rpcauth: Improve by using argparse and getpass modules (João Barbosa) Pull request description: This PR improves argument handling in `rpcauth.py` script by using `argparse` module. Specifying `-` as password makes it prompt securely with `getpass` module which prevents leaking passwords to bash history. Tree-SHA512: 489d66c95f66b5618cb75fd8f07ea5647281226ab9e32b03051eb43f758b9334ac19b7c82c2ed4f8c7ffbb0bee949b3d389e1564ec7a6e372f2864233bc7cb88