aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-07-22Merge #13683: wallet: Introduce assertion to document the assumption that ↵MarcoFalke
cache and cache_used are always set in tandem d06330396f wallet: Avoid potential null pointer dereference in CWalletTx::GetAvailableCredit(...) (practicalswift) Pull request description: Avoid potential null pointer dereference in `CWalletTx::GetAvailableCredit(...)`. Introduced in 4279da47855ec776f8d57c6579fe89afc9cbe8c1. Tree-SHA512: 92d1da9682f0bab11f6f96395ca30549331b0a056cbceb7e1a7f98b3d17d10082aaeed0907cafd46f4164b0e0f4b77e01f78bfd7d24e0503a66c6942ae842aa5
2018-07-21Merge #13726: Utils and libraries: Removes the boost/algorithm/string/join ↵MarcoFalke
dependency 5f019d5354 Removes the boost/algorithm/string/join dependency (251) Pull request description: This commit removes the `boost/algorithm/string/join` dependency from the project by replacing `boost::algorithm::join` with the helper function proposed by @MarcoFalke in https://github.com/bitcoin/bitcoin/pull/13726#discussion_r204159967 Tree-SHA512: d4ba3e7621b76bd5210aec9b8d6c320f7ee963d7f902e6d2d3fc0eadbee1cd77799e5c09be9c11452d2825f25740fc436cdec3a6b6c66ced674d771e4ed306ae
2018-07-22tiny refactor for ArgsManagerAtsukiTak
This commit contains 2 refactors. 1. mark "const" on ArgsManager::GetHelpMessage and IsArgKnown. 2. remove unused "error" argument from ArgsManager::IsArgKnown. Firstly, I mark "const" on where it is possible to. It is mentioned before (e.g. https://github.com/bitcoin/bitcoin/pull/13190#pullrequestreview-118823133). And about 2nd change, ArgsManager::IsArgKnown was added at commit #4f8704d which was merged at PR #13112. But from its beggining, "error" argument never be used. I think it should be refactored.
2018-07-21Avoid locking mutexes that are already held by the same threadpracticalswift
2018-07-21Use the Travis python language feature on the lint buildBen Woosley
Rather than installing python via apt. https://docs.travis-ci.com/user/languages/python/
2018-07-21Don't unnecessarily install shellcheck on the lint buildBen Woosley
"Travis CI has now integrated ShellCheck by default, so you don't need to manually install it." https://github.com/koalaman/shellcheck#travis-ci
2018-07-21trivial: Replace CPubKey::operator[] with CPubKey::vch where possibleNikolay Mitev
2018-07-21Removes the boost/algorithm/string/join dependency251
This commit removes the `boost/algorithm/string/join` dependency from the project by replacing `boost::algorithm::join` with a simple helper function.
2018-07-20Avoid unnecessarily setting env variables on the lint buildBen Woosley
The relevent env variables are set for the matrix builds, and are irrelevant to the lint build. By default the first matrix entry is applied. "Each job included in jobs.include inherits the first value of the array that defines a matrix dimension." https://docs.travis-ci.com/user/build-stages/#Build-Stages-and-Build-Matrix-Expansion
2018-07-21[contrib] Add automatic setup for Ubuntu BionicChun Kuan Lee
2018-07-20Merge #13725: Fix bitcoin-cli --versionMarcoFalke
5b82aa7352 Fix bitcoin-cli --version (Ben Woosley) Pull request description: By declaring the relevant option, as it is in init.cpp https://github.com/bitcoin/bitcoin/blob/2dc5ab637803283dd28717f49c43498350cd6308/src/init.cpp#L356 Note contrib/devtools/gen-manpages.sh relies on this version information. Tree-SHA512: 64c1b9635e86fea42b797471f66f784ed0c7ad4d6a454a49eb433018d8936265624fa4edf2f138efe3ff938af61763bd473b7b86d558f5288687b25f59fa87ea
2018-07-20Fix bitcoin-cli --versionBen Woosley
By declaring the relevant option. Note contrib/devtools/gen-manpages.sh relies on this version information.
2018-07-20Merge #13482: Remove boost::program_options dependencyWladimir J. van der Laan
f447a0a7079619f0d650084df192781cca9fd826 Remove program options from build system (Chun Kuan Lee) 11588c639e8912f1b28e981c1a2a0e4306dbd093 Replace boost program_options (Chun Kuan Lee) Pull request description: Concept from #12744, but without parsing negated options. Tree-SHA512: 7f418744bb8934e313d77a5f162633746ef5d043de802b9c9cd9f7c1842e7e566eb5f171cd9e2cc13317281b2449c6fbd553fa4f09b837e6af2f5d2b2aabdca2
2018-07-20Merge #13695: lint: Add linter for circular dependenciesWladimir J. van der Laan
5c613aadd64453c75cb2373c6fcc1326c3cf0b7a lint: Add linter for circular dependencies (Ben Woosley) Pull request description: Protects against added circular depencies, makes it explicit in the code when circular dependencies have been removed. Modeled after EXPECTED_BOOST_INCLUDES in lint-includes.sh Example output: ``` $ test/lint/lint-circular-dependencies.sh A new circular dependency in the form of "qt/paymentserver -> qt/walletmodel -> qt/paymentserver" appears to have been introduced. $ echo $? 1 $ test/lint/lint-circular-dependencies.sh Good job! The circular dependency "Fake" is no longer present. Please remove it from EXPECTED_CIRCULAR_DEPENDENCIES in test/lint/lint-circular-dependencies.sh to make sure this circular dependency is not accidentally reintroduced. $ echo $? 1 $ test/lint/lint-circular-dependencies.sh $ echo $? 0 ``` Tree-SHA512: 4519434de29f6d50859daed1480e531c01c1cdbc3f0a5f093251daf62ae2b5b9073fb274b86f541a985e06837aa1165b76558c5f35fb51a759d72e83f1b61e44
2018-07-20Merge #11637: p2p: Remove dead service bits codeWladimir J. van der Laan
fa4bf92be9420919c74cdde9a973f7327d01ac88 Remove dead service bits code (MarcoFalke) Pull request description: Seems fine to remove for the upcoming 0.17 release Fixes #10993 Tree-SHA512: 3a4664b787e3da399bcaaba693619bd384826df14f469dbdfbbfffc540d9da3f2b322cda262b43388376785f77907c2540541c239ab0fca82bd7eb69d02b6b7a
2018-07-20Merge #13718: docs: Specify preferred Python string formatting techniqueMarcoFalke
b1b8863fd6 docs: Specify preferred Python string formatting technique (Mason Simon) Pull request description: @practicalswift this documents the nit you suggested in my previous PR https://github.com/bitcoin/bitcoin/pull/13707#discussion_r203628395 Tree-SHA512: b75335976b30ccbce5c2e3a46e5b6218e797944e7025c17b4e56f294670397d731e1a9f4fe7e809d907136e2e62cd9c2b8404b875b4879a1e3f0b1970b94d5a8
2018-07-20Merge #9662: Add createwallet "disableprivatekeys" option: a sane mode for ↵Wladimir J. van der Laan
watchonly-wallets a3fa4d6a6acf19d640a1d5879a00aa1f059e2380 QA: Fix bug in -usecli logic that converts booleans to non-lowercase strings (Jonas Schnelli) 4704e5f074e57782d058404a594a7313cf170cf0 [QA] add createwallet disableprivatekey test (Jonas Schnelli) c7b8f343e99d9d53ea353ddce9a977f1886caf30 [Qt] Disable creating receive addresses when private keys are disabled (Jonas Schnelli) 2f15c2bc20d583b4c1788da78c9c635c36e03ed0 Add disable privatekeys option to createwallet (Jonas Schnelli) cebefba0855cee7fbcb9474b34e6779369e8e9ce Add option to disable private keys during internal wallet creation (Jonas Schnelli) 9995a602a639b64a749545b7c3bafbf67f97324f Add facility to store wallet flags (64 bits) (Jonas Schnelli) Pull request description: This mode ('createwallet {"disableprivatekeys": true}') is intended for a sane pure watch-only mode, ideal for a use-case where one likes to use Bitcoin-Core in conjunction with a hardware-wallet or another solutions for cold-storage. Since we have support for custom change addresses in `fundrawtransaction`, pure watch-only wallets including coin-selection are possible and do make sense for some use cases. This new mode disables all forms of private key generation and ensure that no mix between hot and cold keys are possible. Tree-SHA512: 3ebe7e8d54c4d4e5f790c348d4c292d456f573960a5b04d69ca5ef43a9217c7e7671761c6968cdc56f9a8bc235f3badd358576651af9f10855a0eb731f3fc508
2018-07-19Fix merging of global unknown data in PSBTsAndrew Chow
Actually merge the global unknown key-value pairs. Add a test for merging unknown key-value pairs.
2018-07-19Check that PSBT keys are the correct lengthAndrew Chow
Checks that all of the one byte type keys are actually one byte and throw an error if they are not. Add tests for each type to check for this behavior.
2018-07-19Avoid creating a temporary vector for size-prefixed elementsPieter Wuille
2018-07-19Merge #13712: wallet: Fix non-determinism in ParseHDKeypath(...). Avoid ↵MarcoFalke
using an uninitialized variable in path calculation. 27ee53c1ae wallet: Add error handling. Check return value of ParseUInt32(...) in ParseHDKeypath(...). (practicalswift) 7223263899 wallet: Add tests for ParseHDKeypath(...) (practicalswift) Pull request description: Add error handling. Check return value of `ParseUInt32(...)` in `ParseHDKeypath(...)`. `ParseUInt32(...)` returns `false` if the entire string could not be parsed or when an overflow or underflow occurred. In such case the uninitialized variable `number` would be used in the calculation of `path` (prior to this commit). An example key path triggering this is `m/0/4294967296`: ``` ParseHDKeypath("m/0/4294967296", keypath); ``` `4294967296` is `1` + `0xFFFFFFFF` (`uint32_t` max: `4294967295`). Introduced in a4b06fb42eb0ad94e562ca839391b57e69285136 which was merged into `master` 14 hours ago as part of #13557 ("BIP 174 PSBT Serializations and RPCs"). Tree-SHA512: e5ff423f67c18d82c1231bde6343587a453e793c32004d93dc9b61be6d9372b57a6b2c9978d9eb1000d6cc82fd180f2486013f928dca737fb92daad22c16e467
2018-07-19Merge #13074: [trivial] Correct help text for `importaddress` RPCMarcoFalke
2c71edc2fc [wallet] [rpc] Fix importaddress help text (John Newbery) Pull request description: Help text for `importaddress` referred to the first parameter as `script`, when in fact it's `address`. Calling with a script argument fails: ``` → bcli -named importaddress script=2N3qhMpHK8WNo7wv87W9eHMgvGyJU1593Ei error code: -8 error message: Unknown named parameter script → bcli -named importaddress address=2N3qhMpHK8WNo7wv87W9eHMgvGyJU1593Ei # success! ``` Tree-SHA512: 24dcb2cbd0a43e25896b1c67fa0386df2453ec04d49a339e10992417b3921ce3df8a6aa5abba7d2237d6188b018948b2a21ea2f04d37120ad36c31c7b7fc9f1c
2018-07-19docs: Specify preferred Python string formatting techniqueMason Simon
2018-07-19wallet: Add error handling. Check return value of ParseUInt32(...) in ↵practicalswift
ParseHDKeypath(...).
2018-07-19wallet: Add tests for ParseHDKeypath(...)practicalswift
2018-07-19[travis] Don't store debug info if --enable-debug is setChun Kuan Lee
2018-07-19Merge #13689: depends: disable Werror when building zmqMarcoFalke
a4ba2388fe depends: disable Werror for zmqlib release, causes ndk build to break (Lawrence Nahum) Pull request description: This PR ~~backports this libzmq commit https://github.com/zeromq/libzmq/pull/3140/commits/58d13395ece1fa0dd9b0583d736af4ac342c1267 from this merged upstream PR (but unreleased as of today) https://github.com/zeromq/libzmq/pull/3140 as a patch to our zmq 4.2.3 version.~~ passes --disable-Werror when we build zmq. For reference see https://github.com/bitcoin/bitcoin/issues/11844#issuecomment-398406988 ~~This patch~~ A similar patch is already in use in abcore/bitcoin_ndk and needed to build bitcoind for android using NDK or some versions of clang 6+ during cross compilation. This patch won't be necessary once zmqlib releases a 4.2.6+ version including the fix and bitcoin core updates to it but it may be good to [have](https://github.com/bitcoin/bitcoin/pull/13689#issuecomment-405644394) ~~It also reintroduces autogen.sh as it is necessary for the patch to work, otherwise you'll have aclocal issues (see https://travis-ci.org/greenaddress/bitcoin/jobs/404902106). autogen,sh was removed in master only https://github.com/bitcoin/bitcoin/pull/11986 as non-necessary but otherwise unreleased.~~ In the likely case https://github.com/bitcoin/bitcoin/pull/13578 is merged first I rebased the patch for the newer zmq version (4.2.5) in https://github.com/greenaddress/bitcoin/tree/zmq-upgrade-mruddy-patched and i can update the PR accordingly or close and open a new one. Tree-SHA512: ba8780c84b4ac4ead5605c0305827431a85c1c8503b7ed255a552469b22bdb4ca018449282f738794f573f93caed95c14ede7caadb3a3f14989f57cb74501f00
2018-07-19Merge #13715: tests: fixes mininode's P2PConnection sending messages on ↵MarcoFalke
closing transport ea5340c9d2 tests: fixes mininode's P2PConnection sending messages on closing transport (marcoagner) Pull request description: Fixes #13579. I think one possible solution is to check for [`_transport.is_closing()`](https://docs.python.org/3.4/library/asyncio-protocol.html#asyncio.BaseTransport.is_closing) in the lambda before sending a message (compatible with Python 3.4 too). Let me know if I missed any side effects this introduces. Tree-SHA512: cab46f81dccfec7b4460fda478a617845564520694449a9e85bf8a5f1e75f35f52cafd7c64966712c3d6c29956344d5a9dbad8851424f061eb3748bc621b900b
2018-07-19tests: fixes mininode's P2PConnection sending messages on closing transportmarcoagner
- checks if _transport.is_closing() (added in python3.4.4/python3.5.1) before attempting to send messages on P2PConnection's send_message method.
2018-07-19doc: Improve command to generate list of authors for release notesMitchell Cash
- Remove dependency on sed (sed was overkill when you can just add plain text to the git log --format command) - Sort resulting list of authors alphabetically (case-insensitive) - Provide an example of how to only generate authors between versions
2018-07-19doc: Update broken links to now point to gitian-build.pyMitchell Cash
2018-07-18Merge #13500: [wallet] Decouple wallet version from client versionWladimir J. van der Laan
cd3f4aa80810fc077c7f9528a4ef53c1438c86e1 Decouple wallet version from client version (Andrew Chow) Pull request description: Instead of comparing version numbers in the wallet to the client version number, compare them to the latest supported wallet version in the client. This allows for wallet version numbers to be unrelated to the client version number. Tree-SHA512: 69c3e1f45a40bde01d622d504a803fea32fc14e2e27b14b0729725349d8592d56ebca26fd06f117fd6f5164fb4ce980122751b6370f6e25f1a947dbdf4143ddd
2018-07-18Merge #13557: BIP 174 PSBT Serializations and RPCsWladimir J. van der Laan
020628e3a4e88e36647eaf92bac4b3552796ac6a Tests for PSBT (Andrew Chow) a4b06fb42eb0ad94e562ca839391b57e69285136 Create wallet RPCs for PSBT (Andrew Chow) c27fe419efb3b6588c400d764122ffb33375e028 Create utility RPCs for PSBT (Andrew Chow) 8b5ef2793748065727a9a2498805ae5b269dcb4f SignPSBTInput wrapper function (Andrew Chow) 58a8e28918025c28f19ba19cbaa4a72374162942 Refactor transaction creation and transaction funding logic (Andrew Chow) e9d86a43ad8b1ab83b324e9a7a64c43a61337501 Methods for interacting with PSBT structs (Andrew Chow) 12bcc64f277f642ece03c25653e726f2276f0d51 Add pubkeys and whether input was witness to SignatureData (Andrew Chow) 41c607f09badb2c3ed58ff6fb17a8ebbef2cdabd Implement PSBT Structures and un/serialization methods per BIP 174 (Andrew Chow) Pull request description: This Pull Request fully implements the [updated](https://github.com/bitcoin/bips/pull/694) BIP 174 specification. It is based upon #13425 which implements the majority of the signing logic. BIP 174 specifies a binary transaction format which contains the information necessary for a signer to produce signatures for the transaction and holds the signatures for an input while the input does not have a complete set of signatures. This PR contains structs for PSBT, serialization, and deserialzation code. Some changes to `SignatureData` have been made to support detection of UTXO type and storing public keys. *** Many RPCs have been added to handle PSBTs. `walletprocesspsbt` takes a PSBT format transaction, updates the PSBT with any inputs related to this wallet, signs, and finalizes the transaction. There is also an option to not sign and just update. `walletcreatefundedpsbt` creates a PSBT from user provided data in the same form as createrawtransaction. It also funds the transaction and takes an options argument in the same form as `fundrawtransaction`. The resulting PSBT is blank with no input or output data filled in. It is analogous to a combination of `createrawtransaction` and `fundrawtransaction` `decodepsbt` takes a PSBT and decodes it to JSON. It is analogous to `decoderawtransaction` `combinepsbt` takes multiple PSBTs for the same tx and combines them. It is analogous to `combinerawtransaction` `finalizepsbt` takes a PSBT and finalizes the inputs. If all inputs are final, it extracts the network serialized transaction and returns that instead of a PSBT unless instructed otherwise. `createpsbt` is like `createrawtransaction` but for PSBTs instead of raw transactions. `convertpsbt` takes a network serialized transaction and converts it into a psbt. The resulting psbt will lose all signature data and an explicit flag must be set to allow transactions with signature data to be converted. *** This supersedes #12136 Tree-SHA512: 1ac7a79e5bc669933f0a6fcc93ded55263fdde9e8c144a30266b13ef9f62aacf43edd4cbca1ffbe003090b067e9643c9298c79be69d7c1b10231b32acafb6338
2018-07-18Merge #13655: bitcoinconsensus: invalid flags error should be set to ↵Wladimir J. van der Laan
bitcoinconsensus_err 417b6c1d2990ffc78c029442e027797d724a101f bitcoinconsensus: invalid flags should be set to bitcoinconsensus_error type, add test cases covering bitcoinconsensus error codes (Thomas Kerin) Pull request description: A check was added to the bitcoinconsensus verify_script codepath to ensure that callers only used _exposed_ interpreter flags. I think this error should be written to `bitcoinconsensus_err* err` and not returned by verify_script? I modified the check so it indicates the error using *err like the others, and added tests covering the error codes. Tree-SHA512: 8ab370e56956a7d4740f83475e6078774affd663ac92383a02b85295da550f1b4f7a7a68f32ed5c5bcb39d98e2f15ec0b76de8399887e7763eb7c1e21d131093
2018-07-18Merge #13625: doc: Add release notes for -printtoconsole and -debuglogfile ↵Wladimir J. van der Laan
changes 801cb307b5cc89d09c5aafd0a3c7874848c6a75d doc: Add release notes for -printtoconsole and -debuglogfile changes (Samuel B. Atwood) Pull request description: This adds release notes relevant to the changes in #13004 and documented in command line help in #13614. Tree-SHA512: ff320415afa9be1ace37ebf0a69ee5a7e6d4167465bc41111be062a556da9b8accfc39553fac610e68521c7ab2095126ace4f012a32f5e9f37cbec39cfa74b04
2018-07-18Merge #13687: travis: Check that ~/.bitcoin is never createdWladimir J. van der Laan
fabe28a0cdcfa13e0e595a0905e3642a960d3077 qa: Temporarily disable test that reads the default datadir location (MarcoFalke) 41a8c8dfafeb02e7bd1b755a9673638e1eed238b travis: Check that ~/.bitcoin is never created (MarcoFalke) Pull request description: Tree-SHA512: d114db29a18f684d207caa0d7c947b13c945e2dd8b6d7fdeacdf7aa194f8123579d1139331b9d308df69a1132796e805a9ab63580aebde9b719860c0ff4b5652
2018-07-18lint: Add linter for circular dependenciesBen Woosley
Protects against added circular depencies, makes it explicit in the code when circular dependencies have been removed. Modeled after EXPECTED_BOOST_INCLUDES in lint-includes.sh
2018-07-18Merge #13672: Modified in_addr6 cast in CConman class to work with msvcWladimir J. van der Laan
822a2a33a74c3f997e7982d629c8f6158b80c093 Modified in_addr6 cast in CConman class to work with msvc. (Aaron Clauson) Pull request description: Fix to allow net.cpp to compile with MSVC. Without this fix the `(in6_addr)IN6ADDR_ANY_INIT` implicit cast generates a compilation error. Tree-SHA512: f21c5002401dc93564dcf8d49fbafe7c03ad4182df1616d2ee201e2e172f1d696ca7982fb5b42a3b7d6878c8649823044a858401b4172239fb4b0cc2a38db282
2018-07-18Merge #13699: contrib: correct version checkWladimir J. van der Laan
066d2973a6fff0bf494c4a0000218fe72983808b contrib: correct version check (Karl-Johan Alm) Pull request description: [ not(major >= 3 and minor >= 4) ] fails for '4.0': ```Python >>> major=4 >>> minor=0 >>> if not (major >= 3 and minor >= 5): ... print('This example only works with Python 3.5 and greater') ... This example only works with Python 3.5 and greater ``` Tree-SHA512: 41cb8c5dabe0061ead37b0d6447b699c5d5e1a5551a75dd279bb2ec6d6afa51f8b27a48e01195093db7ec37b28ff6445d59646a4a2b6dcee37776afb60eac8dc
2018-07-18Merge #13692: contrib: Clone core repo in gitian-buildWladimir J. van der Laan
fa7f8a7769a4acf4368c9d59b852065a9596a079 contrib: Clone core repo in gitian-build (MarcoFalke) Pull request description: Cloning the core repo is mentioned in https://github.com/bitcoin/bitcoin/blob/master/doc/release-process.md#first-time--new-builders and required later on in the script. Also, remove a redundant `-a` option to `git commit` when commiting the signatures. Also, install missing commands, which are required later on in the script. Tree-SHA512: dde422fce27492cc00d2542962c6ceb6d9f1e7dbb64acc978c424a575548b7319de0d27d4270a512774e641ec06e62a3036315819e692bcd1be2fdfd8e5c0cf2
2018-07-18contrib: correct version checkKarl-Johan Alm
[ not(major >= 3 and minor >= 4) ] fails for '4.0'
2018-07-18Remove redundant statementpracticalswift
2018-07-18Remove redundant unused variablespracticalswift
2018-07-18Remove redundant forward declarationpracticalswift
2018-07-18Remove program options from build systemChun Kuan Lee
2018-07-18Replace boost program_optionsChun Kuan Lee
2018-07-17contrib: Clone core repo in gitian-buildMarcoFalke
2018-07-17Merge #13690: [moveonly] Extract MakeUnique into utilmemory.hMarcoFalke
33539cb34b Extract MakeUnique into utilmemory.h (Ben Woosley) Pull request description: And use it to reduce chainparamsbase.cpp's and remove interfaces/handler.cpp's reliance on util.h This is a step toward fixing the chainparamsbase -> util circular dependency. Confirmed no need for the util.h include via iwyu and visual inspection. Extracted from #13639 for easier review. Tree-SHA512: 61cbf9eafb68c3e3706d21c70aeb0586a85364dad32cc49c2d40e963ac3b2c44424ad1522788a0a6b2a689fd9294ebce4482a392ceb88a94eabe09a84f070ce4
2018-07-17depends: disable Werror for zmqlib release, causes ndk build to breakLawrence Nahum
2018-07-17Merge #13623: Migrate gitian-build.sh to pythonMarcoFalke
78f06e4af7 Migrate gitian-build.sh to python (Chun Kuan Lee) Pull request description: Fixes #13620 - Rename Mac OSX to MacOS, rename option from 'x' to 'm' - Fix a bug from https://github.com/bitcoin/bitcoin/blob/b641f60425674d737d77abd8c49929d953ea4154/contrib/gitian-build.sh#L338-L342 Tree-SHA512: ff943055d5feca345bd17b64311374db3937d14d2f21493116fd7ab7b4cb7042480abd6a3d1d7640073b00bc0badb300e8dd32618bf73ba182df417c0633397a