aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-12-13test: Make g_insecure_rand_ctx thread_localMarcoFalke
2018-12-13Merge #14947: scripts: Remove Python 2 import workaroundsMarcoFalke
4de11a3682 Remove Python 2 import workarounds (practicalswift) Pull request description: Remove Python 2 import workarounds. As noted by @jnewbery in https://github.com/bitcoin/bitcoin/pull/14903#discussion_r241396925: > This exception handling is a vestige from when github-merge.py supported Python 2 and Python 3. We only support Python 3 now so we should be able to remove it entirely and just import from urllib.request. Tree-SHA512: e0d21e6299dd62fb669ad95cbd3d19f7c803195fd336621aac72fd10ddc7431d90443831072a2e1eb2fc880d1d88eb7c3e2ead3da59f545f6db07d349af98fb3
2018-12-13Merge #14937: travis: fix travis would always be green even if it failMarcoFalke
fc91c1f28e Revert "travis: Save cache on build error" (Chun Kuan Lee) Pull request description: The current travis-ci job would fail only if the last command failed. It would be succeed if other commands than the last one fail. This PR execute the script in another shell instance, so we should export those variables and bash functions. It would return 1 if the script fail no matter if it's the last command. Sorry for ruin the travis ci system in #14231 Test: https://travis-ci.org/ken2812221/bitcoin/jobs/467086010 Tree-SHA512: 4d9d144fe4c7038b4eff6bf8496e821af603d81677142c0884ed52aea6ce3a50150669be4fdad72a5d372456a33a2452d75ec35e8a7ec2bc4bdfbeaeb93e9acb
2018-12-13Remove Python 2 import workaroundspracticalswift
2018-12-13Merge #14805: tests: Support calling add_nodes more than onceWladimir J. van der Laan
98a1846b00d9c3076d6dcd96244fae6f923e26a0 tests: Support calling add_nodes more than once (Steven Roose) Pull request description: Ran into this while writing [a multi-chain test for Elements](https://github.com/ElementsProject/elements/pull/458) where I call this method more than once. Tree-SHA512: f2d698fcb560552aa5d81a4c3fbf40b7269b228b34d85a118291649ef83f8c0a30cd82a28d418237b55893bcecd538046b704e64a4d8a41f2c0aef8033dc83e5
2018-12-13Merge #14834: validation: assert that pindexPrev is non-null when requiredWladimir J. van der Laan
fbaaf782cea54dc433e72129ee1088b3169cdfd4 validation: assert that pindexPrev is non-null when required (Karl-Johan Alm) Pull request description: In `ContextualCheckBlock`, we are checking if `pindexPrev == nullptr` conditionally at the start, but then assume it is non-`null` later. This removes the latter assumption. Tree-SHA512: 95f1e9dc839b2cc0e099d155e6180634ece8c6760d00b53e7d27128762e64c92e82d98a5f4a5786b48a4851b17cdbb4b667d3b6a99adb651256e2032de67d05c
2018-12-13Merge #14849: depends: qt 5.9.7Wladimir J. van der Laan
a46c8476e9598742e52944b6270b1854c8f500a2 depends: disable unused qt features (fanquake) 73b46eeb7ea78cab051d770e3fe8a0c0fbb43ef9 depends: qt 5.9.7 (fanquake) 095e765975c2204f7e730bc8f0716227e480caa5 depends: expat 2.2.6 (fanquake) Pull request description: This PR upgrades `expat` and `qt` in depends. The intention is to upgrade Qt in master to the latest point release of the current Qt LTS. This change can then be back-ported to the 0.17 branch (wether it makes it into 0.17.1 or not). Then, sometime before the 0.18.0 release, we could move to using Qt 5.12+ in depends (which is also LTS). That discussion, as well as minimum supported Qt versions is in #13478. ### Qt 5.9.7 [Release announcement](https://blog.qt.io/blog/2018/10/23/qt-5-9-7-released/) [Changelog](https://bugreports.qt.io/browse/QTBUG-70888?filter=20149) ### Expat 2.2.6 * Avoid doing arithmetic with NULL pointers in XML_GetBuffer * Fix 2.2.5 regression with suspend-resume while parsing a document like <root/> Full changelog [here](https://github.com/libexpat/libexpat/blob/R_2_2_6/expat/Changes) https://github.com/bitcoin/bitcoin/pull/14849/commits/a46c8476e9598742e52944b6270b1854c8f500a2 disables a bunch of qt features we aren't currently using. This speeds up the qt depends build slightly (also decreases the size of the built `qt-5.9.7` tar by about 2%). The disabling is somewhat unintuitive, hence `[wip]` until after a travis run and gitian build. Tree-SHA512: f3d51d0c7dabe5b7043ef23f264abf2aba3e94e55ffc9d5c323b153b6852d9161368e1591db3ba28f3498f0613bac77d40b855bd0465296f52be03f9230656de
2018-12-13Merge #14926: test: consensus: Check that final transactions are validWladimir J. van der Laan
aaaa8eb1edba2a28916d5da6001d421c1b1b253b test: consensus: Check that final transactions are valid (MarcoFalke) fae3617d79deee73dd375dc3ea5f4204a74420c5 test: Correctly deserialize without witness (MarcoFalke) Pull request description: There is no check that checks that final transactions are valid, i.e. the consensus rules could be changed (accidentally) with none of the tests failing. Tree-SHA512: 48f4c24bfcc525ddbc1bfe8c37131953b464823428c1f7a278ba6d98b98827b6b84a8eb2b33396bfb5b8cc4012b7cc1cd771637f405ea20beddae001c22aa290
2018-12-13Revert "travis: Save cache on build error"Chun Kuan Lee
This reverts commit d3ecc3d695f33d90d6c4e61f3d7ceb57f44eb200.
2018-12-13Merge #14940: test: Add test for truncated pushdata scriptWladimir J. van der Laan
fa694f706c37a1c512a7c346591a63c5e09ee239 test: Add tests for truncated scripts (MarcoFalke) Pull request description: Previously not covered by any test Tree-SHA512: 9f99659bdf3947271074938456a2fe64f5b39fc868e9aa474cec199a536ae5d7428f1cfa7f361936b71b09ee4c426261e6b25668fa77b8416b30dbe4ddb357f0
2018-12-13Merge #14624: Some simple improvements to the RNG codeWladimir J. van der Laan
e414486d56b9f06af7aeb07ce13e3c3780c2b69b Do not permit copying FastRandomContexts (Pieter Wuille) 022cf47dd7ef8f46e32a184e84f94d1e9f3a495c Simplify testing RNG code (Pieter Wuille) fd3e7973ffaaa15ed32e5aeadcb02956849b8fc7 Make unit tests use the insecure_rand_ctx exclusively (Pieter Wuille) 8d98d426116f0178612f14d1874d331042c4c4b7 Bugfix: randbytes should seed when needed (non reachable issue) (Pieter Wuille) 273d02580aa736b7ccea8fce51d90541665fdbd1 Use a FastRandomContext in LimitOrphanTxSize (Pieter Wuille) 3db746beb407f7cdd9cd6a605a195bef1254b4c0 Introduce a Shuffle for FastRandomContext and use it in wallet and coinselection (Pieter Wuille) 8098379be5465f598220e1d6174fc57c56f9da42 Use a local FastRandomContext in a few more places in net (Pieter Wuille) 9695f31d7544778853aa373f0aeed629fa68d85e Make addrman use its local RNG exclusively (Pieter Wuille) Pull request description: This improves a few minor issues with the RNG code: * Avoid calling `GetRand*()` functions (which currently invoke OpenSSL, later may switch to using our own RNG pool) inside loops in addrman, networking code, `KnapsackSolver`, and `LimitOrphanSize` * Fix a currently unreachable bug in `FastRandomContext::randbytes`. * Make a number of simplifications to the unit tests' randomness code (some tests unnecessarily used their own RNG or the OpenSSL one, instead of using the unit test specific `insecure_rand_ctx`). * As a precaution, make it illegal to copy a `FastRandomContext`. Tree-SHA512: 084c70b533ea68ca7adc0186c39f0b3e0a5c0ae43a12c37286e5d42086e056a8cd026dde61b12c0a296dc80f87fdc87fe303b9e8e6161b460ac2086cf7615f9d
2018-12-13Merge #14319: doc: Fix PSBT howto and example parametersWladimir J. van der Laan
78542a3f36381fe96f60708834c8378042e3bab6 doc: Fix PSBT howto and example parameters (priscoan) Pull request description: Tree-SHA512: 2fcdd67717647e2f6166e6744c0938c96d8df6951e2ee5507372dad22ff66660f34c4554c86624c25f9a0dac2cdf8aff19bb7fc64a60e8e80a175f729ef913e4
2018-12-13Merge #14741: doc: Indicate -rpcauth option password hashing algWladimir J. van der Laan
dcb70b152292a8df9fe834bacdf231ea848819b1 Indicate -rpcauth option password hashing alg (Carl Dong) Pull request description: By indicating the password hashing algorithm, users of bitcoin distributions without the script in `share/rpcauth` and users who don't want to rely on said script can use alternative means to generate the password hash. Question for reviewers: perhaps we should also indicate that it is specifically a HMAC-SHA-256 of the _**UTF-8**_ encoding of their password? Tree-SHA512: 86b546c2e78699fa253da0c1e76b21ef60e9b6a5778826ac5136e764d70e3213044cc05cdb4786ba27968781647c46e358a823bbc2db7d45d041d291ee03b83c
2018-12-13Merge #14884: Travis: enforce Python 3.4 support through linterWladimir J. van der Laan
31926ee8cfc73501524dfa0fef2ccbaa786d6a00 [test] functional framework: add CScript hex() for Python 3.4 (Sjors Provoost) 74ce32683199b987e45eb16f0320ae392ff10edc [test] Travis: enforce Python 3.4 support in functional tests (Sjors Provoost) Pull request description: The minimum supported version of Python is 3.4 according to [dependencies.md](https://github.com/bitcoin/bitcoin/blob/master/doc/dependencies.md). This PR makes the Travis linter use this version in order to catch accidental use of modern syntax. Tree-SHA512: 71b2c102be72b135a8ba049378d66875760f20a04a657102a399240c5c2b2ddbdfa7d5ab4c0c0242ecc3259e0ee8eb2273f331bc5eb824f4ae4c3cc58aea37ac
2018-12-13Merge #14903: tests: Handle ImportError explicitly, improve comparisons ↵Wladimir J. van der Laan
against None c9ba253f4f5d675d7736d24c1167229d0898ef1a Add E711 to flake8 check (Daniel Ingram) 17b55202dae8d6e21d2490de89b345c55f7694c0 Compare to None with is/is not (Daniel Ingram) 1b89074ae27ce123adbeed57343deaef13c14f81 Change '== None' to 'is None' (Daniel Ingram) 16d293772365d57cc1a279d5ad0fa6f44b12ed54 Handle exception as ImportError (Daniel Ingram) Pull request description: Tree-SHA512: aa5875ea3d9ac47ac898545ff023b511042cd377ea0c4594074daae119f3d4f3fc295721aad94a732a907086ecb32bce19a8eed38adf479f12663c4e8944f721
2018-12-12Do not permit copying FastRandomContextsPieter Wuille
2018-12-12Simplify testing RNG codePieter Wuille
2018-12-12Make unit tests use the insecure_rand_ctx exclusivelyPieter Wuille
2018-12-12Bugfix: randbytes should seed when needed (non reachable issue)Pieter Wuille
2018-12-12Use a FastRandomContext in LimitOrphanTxSizePieter Wuille
2018-12-12Introduce a Shuffle for FastRandomContext and use it in wallet and coinselectionPieter Wuille
2018-12-12Use a local FastRandomContext in a few more places in netPieter Wuille
2018-12-12Make addrman use its local RNG exclusivelyPieter Wuille
2018-12-12test: Add tests for truncated scriptsMarcoFalke
2018-12-12Merge #14908: test: Removed implicit CTransaction constructor calls from ↵MarcoFalke
tests and benchmarks. 8db0c3d42b Removed implicit CTransaction conversion from benchmaks (lucash-dev) ed61abedb2 Removed implicit CTransaction constructor from tests (lucash-dev) Pull request description: This PR was split from #14906 and is a prerequisite for it. It updates tests and benchmarks, removing all implicit calls to `CTransaction(CMutableTransaction&)` constructors. This will make possible making the constructor explicit in the next PR. The original rationale for making the constructor explicit: - Conversion constructors should not be explicit unless there's a strong reason for it (in the opinion of, for example, https://google.github.io/styleguide/cppguide.html, and https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#Ro-conversion. Let me know your take on this). - This particular conversion is very costly -- it implies a serialization plus hash of the transaction. - Even though `CTransaction` and `CMutableTransaction` represent the same data, they have very different use cases and performance properties. - Making it explicit allows for easier reasoning of performance trade-offs. - There has been previous performance issues caused by unneeded use of this implicit conversion. - This PR creates a map for places to look for possible refactoring and performance gains (this benefit still holds if the PR is not merged). Tree-SHA512: de8073aa6ff8a3153bcbe10818616677ecf9598e4978d8a0b4c39a262e71c36be5679cec08554c760d1f011ba6d37350318248eef15f6d9b86f9e4462b2de0d2
2018-12-12Merge #14914: Docs: Add nice table to files.mdWladimir J. van der Laan
9b51b158fc42f2d5ad4fe161053e44e667d42fd6 Add nice table to files.md (Emil Engler) Pull request description: I have added a nice table to the files.md in the documentation. This looks way more better and lightweight than before. [Screenshot](https://imgur.com/a/wJuQgZN) Tree-SHA512: 0c59171531b99f3bc898108c7c570e9e8309e7011d6f3b3211b0200eb2354fd4c4211bba5950d450522523f346631e23b87201813337ed5849336d359c0e166d
2018-12-12Merge #14701: build: Add CLIENT_VERSION_BUILD to CFBundleGetInfoStringWladimir J. van der Laan
8e209340c85fc2493d7d1d7affe7e316bb613cbd build: Add CLIENT_VERSION_BUILD to CFBundleGetInfoString (fanquake) Pull request description: As mentioned in #14697, if you download the `0.17.0.1` dmg, and inspect the `.app` bundle, the version in the GetInfo string reads `0.17.0`, which is confusing given you're expecting `0.17.0.1`: <img width="391" alt="0 17 0 1" src="https://user-images.githubusercontent.com/863730/48300032-fbb54b00-e510-11e8-9bcd-77e1fffffc63.png"> This PR adds `CLIENT_VERSION_BUILD` to the string, so that the full version number is displayed, i.e: <img width="327" alt="this pr" src="https://user-images.githubusercontent.com/863730/48300015-7893f500-e510-11e8-98b9-80424719a082.png"> Tree-SHA512: f553253d03283639cc4dda00c8004b5c63ae2b489762e5e8c666166e71b14e672792c1df678f87484d51d153b5781c5ec1b145774096600f504833024ae8baea
2018-12-12depends: disable unused qt featuresfanquake
2018-12-12depends: qt 5.9.7fanquake
2018-12-12depends: expat 2.2.6fanquake
2018-12-12Merge #14909: doc: Update minimum required QtWladimir J. van der Laan
b7bee6af76e076e619b4ce5f165e81c6b4c52b2d doc: Update minimum required qt (fanquake) Pull request description: After #14725 the minimum required version of Qt is 5.2. Tree-SHA512: 130c69ed6810723ac86eb7a341e5a985af73186d47cb2bce3e5f239991157cfd44bb28903f59e33dc2ebe3d628d21b6864ad6c8223218aae287d0cde7506dc7f
2018-12-12[test] functional framework: add CScript hex() for Python 3.4Sjors Provoost
test/functional/wallet_importmulti.py failed with: AttributeError: 'CScript' object has no attribute 'hex'
2018-12-12[test] Travis: enforce Python 3.4 support in functional testsSjors Provoost
Make lint/check-doc.py Python 3.4 compatible. Also add .python-version for pyenv which will cause tests with too modern syntax to fail on developer machine rather than on Travis.
2018-12-12Merge #13076: Fix ScanForWalletTransactions to return an enum indicating ↵MeshCollider
scan result: success / failure / user_abort bd3b0361d Add stop_block out arg to ScanForWalletTransactions (Ben Woosley) 3002d6cf3 Return a status enum from ScanForWalletTransactions (Ben Woosley) bb24d6865 Make CWallet::ScanForWalletTransactions args and return value const (Ben Woosley) Pull request description: Return the failed block as an out arg. Fixes #11450. /cc #12275 Tree-SHA512: 6a523e5425ebfe24e664a942ae21c797ccc1281c25b1bf8d02ad95c19dae343fd8051985ef11853474de7628fd6bed5f15190fbc087c3466ce6fdecab37d72a9
2018-12-12Merge #14646: Add expansion cache functions to descriptors (unused for now)MeshCollider
26879509f Add comments to descriptor tests (Pieter Wuille) 82df4c64f Add descriptor expansion cache (Pieter Wuille) 1eda33aab [refactor] Combine the ToString and ToPrivateString implementations (Pieter Wuille) 24d3a7b3a [refactor] Use DescriptorImpl internally, permitting access to new methods (Pieter Wuille) 6be0fb4b3 [refactor] Add a base DescriptorImpl with most common logic (Pieter Wuille) Pull request description: This patch modifies the internal `Descriptor` class to optionally construct and use an "expansion cache". Such a cache is a byte array that encodes all information necessary to expand a `Descriptor` a second time without access to private keys, and without the need to perform expensive BIP32 derivations. For all currently defined descriptors, the cache simply contains a concatenation of all public keys used. This is motivated by the goal of importing a descriptor into the wallet and using it as a replacement for the keypool, where it would be impossible to expand descriptors if they use hardened derivation. Tree-SHA512: f531a0a82ec1eecc30b78ba8a31724d1249826b028cc3543ad32372e1aedd537f137ab03dbffc222c5df444d5865ecd5cec754c1ae1d4989b6e9baeaffade32a
2018-12-11Removed implicit CTransaction conversion from benchmakslucash-dev
2018-12-11Removed implicit CTransaction constructor from testslucash-dev
2018-12-11Add nice table to files.mdEmil Engler
Update files.md Fix linting issue Return to unix line endings Update files.md Fix trailing whitespaces Add backtick quotes Just one backtick
2018-12-11Merge #14886: [tests] Refactor importmulti testsMarcoFalke
ee3b21dccb [tests] Add docstring for wallet_importmulti.py (John Newbery) fbdba40594 [tests] add test_address method to wallet_import.py (John Newbery) fd3a02c381 [tests] add test_importmulti method to wallet_import.py (John Newbery) 08a4a0f70f [tests] add get_multisig function to wallet_importmulti.py (John Newbery) 7c99614b40 [tests] add get_key function to wallet_importmulti.py (John Newbery) e5a8ea8f14 [tests] tidy up imports in wallet_importmulti.py (John Newbery) cb41ade6b1 [tests] fix flake8 warnings in wallet_importmulti.py (John Newbery) Pull request description: https://github.com/bitcoin/bitcoin/pull/14565 needs test coverage. This PR refactors wallet_importmulti.py to the following pattern: 1. Add `get_key()` and `get_multisig()` methods, which generate keys on node0 and return the priv/pubkeys and all scriptPubKey and address variants. 2. Add `test_importmulti()` method, which takes an importmulti request, sends it to node1 and tests against success and error codes/messages. 3. Add `test_address()` method, which takes an address, sends it as a getaddressinfo request to node1 and tests the values returned. This does not add any specific testing for #14565, but makes it very straightforward to add that testing: `test_importmulti()` can be easily updated to test for returned warnings, and `test_address()` can be called multiple times against the different address variants for a singlesig/multisig. Tree-SHA512: e0ae9d3436f0b4eec4f6b9bdc0f02aef49c5a16bbac319fd47b2cfcaf01d01780d7b296280e8760686a57fac63275eec09e2959d8aaeceae1b406d8eff768435
2018-12-11Merge #14857: wallet_keypool_topup.py: Test for all keypool address typesMarcoFalke
0dcac51049 wallet_keypool_topup.py: Test for all keypool address types (Gregory Sanders) Pull request description: To protect against regressions if key scanning is changed. Tree-SHA512: d1c4bb033bafd97203a3f68fb262a501442be947907d67902f0391fbdec39c095196403c7675e602806cc68d7e2d1f552ab339a58346162379978d06dad1c4bb
2018-12-11Merge #14883: add `--retry 5` to curl opts in install_db4.shMarcoFalke
522b80b33f add `--retry 5` to curl opts in install_db4.sh (qubenix) Pull request description: I ran into some network issue that caused the clang patch to not download and the script exited. A retry would have solved it. The fallback choice, `wget`, has a default 20 retries. I chose 5 retries because `curl` backs of after each try, starting at one second and doubling each time. 5 retries means that worst case scenario would be a total of 31 seconds waiting between attempts. IMO that should be enough tries if internet is working, but not too much if internet is not working. Tree-SHA512: ff48e1f8a9d39b9c6fabc616223974f46fadc5a1b30793cdaaf5ea4ce79f7c76efd259bfa9e81a5a7a7cff60b7133d89448faa3f86cc2f9b0c5ac9adf8dd2a9b
2018-12-11test: consensus: Check that final transactions are validMarcoFalke
2018-12-11test: Correctly deserialize without witnessMarcoFalke
2018-12-10[tests] Add docstring for wallet_importmulti.pyJohn Newbery
Adds a docstring describing the new importmulti test.
2018-12-10[tests] add test_address method to wallet_import.pyJohn Newbery
Adds a new test_address method for testing the imported addresses.
2018-12-10[tests] add test_importmulti method to wallet_import.pyJohn Newbery
Adds a new test_importmulti method for testing the importmulti RPC method.
2018-12-10[tests] add get_multisig function to wallet_importmulti.pyJohn Newbery
Adds a new get_multisig function which generates a new multisig and returns the public keys, private keys and all script and address types.
2018-12-10[tests] add get_key function to wallet_importmulti.pyJohn Newbery
Adds a new get_key function which generates a new key and returns the public key, private key and all script and address types.
2018-12-10Add E711 to flake8 checkDaniel Ingram
2018-12-10Compare to None with is/is notDaniel Ingram