aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2018-07-11Use common SetDataDir method to create temp directory in tests.winder
2018-06-11Merge #12634: [refactor] Make TransactionWithinChainLimit more flexibleWladimir J. van der Laan
f77e1d34fd5f17304ce319b5f962b8005592501a test: Add MempoolAncestryTests (Karl-Johan Alm) a08d76bcfee6f563a268933357931abe32060668 mempool: Calculate descendant maximum thoroughly (Karl-Johan Alm) 6d3568371eb2559d65a3e2334252d36a262319e8 wallet: Switch to using ancestor/descendant limits (Karl-Johan Alm) 6888195b062c8c58dd776fd10b44b25554eb1f15 wallet: Strictly greater than for ancestor caps (Karl-Johan Alm) 322b12ac4e0a8c892e81a760ff7225619248b74f Remove deprecated TransactionWithinChainLimit (Karl-Johan Alm) 47847515473b054929af0c8de3d54b6672500cab Switch to GetTransactionAncestry() in OutputEligibleForSpending (Karl-Johan Alm) 475a385a80198a46a6d99846f99b968f04e9b470 Add GetTransactionAncestry to CTxMemPool for general purpose chain limit checking (Karl-Johan Alm) 46847d69d2c1cc908fd779daac7884e365955dbd mempool: Fix max descendants check (Karl-Johan Alm) b9ef21dd727dde33f5bd3c33226b05d07eb12aac mempool: Add explicit max_descendants (Karl-Johan Alm) Pull request description: Currently, `TransactionWithinChainLimit` is restricted to single-output use, and needs to be called every time for different limits. If it is replaced with a chain limit value calculator, that can be called once and reused, and is generally more flexible (see e.g. #12257). Update: this PR now corrects usage of max ancestors / max descendants, including calculating the correct max descendant value, as advertised for the two limits. ~~This change also makes `nMaxAncestors` signed, as the replacement method will return `-1` for "not in the mempool", which is different from "0", which means "no ancestors/descendants in mempool".~~ ~~This is a subset of #12257.~~ Tree-SHA512: aa59c849360542362b3126c0e29d44d3d58f11898e277d38c034dc4b86a5b4500f77ac61767599ce878c876b5c446fec9c02699797eb2fa41e530ec863a00cf9
2018-06-11Merge #13060: [wallet] [rpc] Remove getlabeladdress RPCWladimir J. van der Laan
67e0e04140b3dfac12d628cee391d40b5fac5cfa [wallet] [docs] Update release notes for removing `getlabeladdress` (John Newbery) 81608178cff793ee205a4f70481c76d34c5448a4 [wallet] [rpc] Remove getlabeladdress RPC (John Newbery) Pull request description: labels are associated with addresses (rather than addresses being associated with labels, as was the case with accounts). The getlabeladdress does not make sense in this model, so remove it. getaccountaddress is still supported for one release as the accounts API is deprecated. Tree-SHA512: 7f45d0456248ebcc4e54dd34e2578a09a8ea8e4fceda75238ccea9d731dc99a3f3c0519b18a9739de17d2e6e59c9c2259ba67c9ae2e3cb2a40ddb14b9193fe29
2018-06-11Merge #13294: Fix compiler warnings emitted when compiling under stock ↵Wladimir J. van der Laan
OpenBSD 6.3 a426098572884349a3d9081187eaeb999f6e2c5a Fix compiler warnings emitted when compiling under stock OpenBSD 6.3 (practicalswift) Pull request description: Fix compiler warnings emitted when compiling under stock OpenBSD 6.3 (OpenBSD clang version 5.0.1, based on LLVM 5.0.1): ``` random.cpp:182:13: warning: unused function 'GetDevURandom' [-Wunused-function] static void GetDevURandom(unsigned char *ent32) ^ txmempool.cpp:707:45: warning: comparison of integers of different signs: 'uint64_t' (aka 'unsigned long long') and 'long long' [-Wsign-compare] assert(it->GetSizeWithDescendants() >= childSizes + it->GetTxSize()); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ``` Tree-SHA512: da2ae86218054b10659ea694179433700ac91de8022e06007348168ed5adc3d8c4ad3b32a3fc5783a2cdf1ca7425aff586b839200dd3b226ebff72a7df15f120
2018-06-11Merge #13408: crypto: cleanup sha256 buildWladimir J. van der Laan
f68049dd879c216d1e98b6635eec488f8e936ed4 crypto: cleanup sha256 build (Cory Fields) Pull request description: Requested by @sipa in #13386. Rather than appending all possible cpu variants to all targets, create a convenience variable that encompasses all. Tree-SHA512: 8e9ab2185515672b79bb7925afa4f3fbfe921bfcbe61456833d15457de4feba95290de17514344ce42ee81cc38b252476cd0c29432ac48c737c2225ed515a4bd
2018-06-11Merge #13043: [qt] OptionsDialog: add prune settingWladimir J. van der Laan
cbede7dbfde83d53ef38d257e9940af5f163b03c [qt] OptionsDialog: add prune setting (Sjors Provoost) Pull request description: The default suggested value is 2 GB. Minimum is 1 GB (550 MB rounded up). When the user toggles this setting, a strong warning appears that undoing requires re-downloading the chain: <img width="478" alt="schermafbeelding 2018-05-15 om 12 35 24" src="https://user-images.githubusercontent.com/10217/40051858-7939cc20-583c-11e8-9120-327a75376732.png"> Tooltip points out that actual disk usage can be higher. It's a bit vague on the "advanced features", because I'm assuming anyone who needs to use `-rescan` and `-txindex` will read the documentation, and a more detailed text would needlessly confuse everyone else. <img width="450" alt="schermafbeelding 2018-05-15 om 12 33 51" src="https://user-images.githubusercontent.com/10217/40051791-49d6156a-583c-11e8-97b9-7de6dfd8c481.png"> The UI uses gigabytes for readability and easy of use. There is also no manual pruning UI (`prune=1`). The user will have to use `bitcoin.conf` for those things. Fixes #6461. When combined with #13029 the user, after pruning their node, can safely reset settings and/or use bitcoind without having to edit `bitcoin.conf`. However I don't think that's an essential prerequisite. Tree-SHA512: e17aff276d7235fbd40796adb6431d430620788a753ee13bc064abd35d2edc4280a3d3cddc18e42b4e00edff13ed18fd4f2a966c6f0b43b689afd13673e0c4bf
2018-06-11test: Add MempoolAncestryTestsKarl-Johan Alm
2018-06-11mempool: Calculate descendant maximum thoroughlyKarl-Johan Alm
2018-06-11wallet: Switch to using ancestor/descendant limitsKarl-Johan Alm
Instead of combining the -limitancestorcount and -limitdescendantcount into a nMaxChainLength, this commit uses each one separately in the coin eligibility filters.
2018-06-11wallet: Strictly greater than for ancestor capsKarl-Johan Alm
2018-06-11Remove deprecated TransactionWithinChainLimitKarl-Johan Alm
2018-06-11Switch to GetTransactionAncestry() in OutputEligibleForSpendingKarl-Johan Alm
2018-06-11Add GetTransactionAncestry to CTxMemPool for general purpose chain limit ↵Karl-Johan Alm
checking
2018-06-11mempool: Fix max descendants checkKarl-Johan Alm
The chain limits check for max descendants would check the descendants of the transaction itself even though the description for -limitdescendantcount says 'any ancestor'. This commit corrects the descendant count check by finding the top parent transaction in the mempool and comparing against that.
2018-06-11mempool: Add explicit max_descendantsKarl-Johan Alm
TransactionWithinChainLimits would take a 'limit' and check it against ascendants and descendants. This is changed to take an explicit max ancestors and max descendants value, and to test the corresponding value against its corresponding max.
2018-06-10Fix compiler warnings emitted when compiling under stock OpenBSD 6.3practicalswift
2018-06-08Merge #13259: refactoring: add a method for determining if a block is pruned ↵Wladimir J. van der Laan
or not e9a1881b90704c6708cfba79d2208debbd4476d0 refactor: add a function for determining if a block is pruned or not (Karl-Johan Alm) Pull request description: The check for whether a block is pruned or not is sufficiently obscure that it deserves a macro. It is also used in 2 places, ~~with more coming, e.g. #10757~~ (turns out it was a move, not an addition). Tree-SHA512: b9aeb60663e1d1196df5371d5aa00b32ff5d4cdea6a77e4b566f28115cce09570c18e45e4b81a4033f67c4135c8e32c027f67bae3b75c2ea4564285578a3f4dd
2018-06-07Merge #13396: Drop unused arith_uint256 ! operatorWladimir J. van der Laan
2acd1d6716959b99e751cf85a7c47aaa383e937f Drop uint 256 not operator (Ben Woosley) Pull request description: All the other operators are integer or bitwise operations, and this is unused apart from tests. Note attempting to call `!` on `arith_uint256` results in a build error after this change: ``` test/arith_uint256_tests.cpp:201:17: error: invalid argument type 'const arith_uint256' to unary expression BOOST_CHECK(!ZeroL); ``` Tree-SHA512: 5791b643f426dac9829e9499d678786f1ad294edb2d840879252a1b642bda55941632114f64048660a5991a984aeba49eeb5dfe64ba0a6275cbe7b1c049d7095
2018-06-07Merge #13243: Make reusable base class for auxiliary indicesWladimir J. van der Laan
ec3073a274bf7affe1b8c87a10f75d126f5ac027 index: Move index DBs into index/ directory. (Jim Posen) 89eddcd365e9a2218648f5cc5b9f22b28023f50a index: Remove TxIndexDB from public interface of TxIndex. (Jim Posen) 2318affd27de436ddf9d866a4b82eed8ea2e738b MOVEONLY: Move BaseIndex to its own file. (Jim Posen) f376a4924109af2496b5fd16a787299eb039f1c8 index: Generalize logged statements in BaseIndex. (Jim Posen) 61a1226d87d80234b2be123c5cad07534c318cfb index: Extract logic from TxIndex into reusable base class. (Jim Posen) e5af5fc6fb4658599b940d1d50853129b31b8766 db: Make reusable base class for index databases. (Jim Posen) 9b0ec1a7f9ffae816fd5ca32ff7e7559640b6f6d db: Remove obsolete methods from CBlockTreeDB. (Jim Posen) Pull request description: This refactors most of the logic in TxIndex into a reusable base class for other indices. There are two commits moving code between files, which may be be more easily reviewed using `git diff --color-moved` (https://blog.github.com/2018-04-05-git-217-released/). The motivation for this is to support BIP 157 by indexing block filters. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/bitcoin/bitcoin/13243) <!-- Reviewable:end --> Tree-SHA512: 0857f04df2aa920178dab2eb8e57984d8eb4d5010deca9971190358479e05b6672ccca2a08af0a7ac9fe02afb947be84cf35a3693204d0667263c6add2959cbf
2018-06-07Merge #13404: [tests] speed up of tx_validationcache_tests by reusing of ↵MarcoFalke
CTransaction. ebebedce20 speed up of tx_validationcache_tests by reusing of CTransaction. (lucash.dev@gmail.com) Pull request description: The code was converting CMutableTransaction to CTransaction multiple times, which implies recalculating the hash multiple times. This commit fixes this by reusing a single CTransaction. Run-time results: ``` Before: 6.7s After: 5.5s -------------- Saved: 1.2s ``` This PR was split from #13050. Also, see #10026. Tree-SHA512: 61fb81972a08299085a7d3d0060485b265aefc7a4f82ab548e5f94371c8643cfb97bf0ef34f4e1211bf853d0217fa1c3338e4117f36fda1b37d203f690e86d60
2018-06-07Merge #13394: cli: Ignore libevent warningsWladimir J. van der Laan
0231ef6c6d4f45edffda4ac3bce2048f9c8a8c00 cli: Ignore libevent warnings (Cory Fields) Pull request description: Should fix rpc tests that fail due to an unclean stderr. Untested as I'm not seeing these warnings. @promag mind seeing if this fixes your problem? Tree-SHA512: fba5ae3f239b515e93e19f9c3eca659eb7fb21f1b1fec25b68285695bfd1ecbdcd9b2235543689aaf97bff85cbb762840f65365a67e791314e9a6b8db2c9e246
2018-06-06crypto: cleanup sha256 buildCory Fields
Rather than appending all possible cpu variants to all targets, create a convenience variable that encompasses all.
2018-06-06speed up of tx_validationcache_tests by reusing of CTransaction.lucash.dev@gmail.com
The code was converting CMutableTransaction to CTransaction multiple times, which implies recalculating the hash multiple times. This commit fixes this by reusing a single CTransaction.
2018-06-05Merge #13288: rpc: Remove the need to include rpc/blockchain.cpp in order to ↵Wladimir J. van der Laan
put `GetDifficulty` under test ebec7317ca1acbc65afa7fb08fc219c315fc4527 Drop the chain argument to GetDifficulty (Ben Woosley) Pull request description: By dropping the chain argument to `GetDifficulty`. `GetDifficulty` was called in two ways: * with a guaranteed non-null blockindex * with no argument Change the latter case to be provided `chainActive.Tip()` explicitly. Introduced in: #11748 Tree-SHA512: f2c97014be185f3e3de92db15848548650e4a67fab20a41bcfa851c5c63c245915cbe9380f84d9da2081e8756d31a41de417db1d35cfecf41ddb4f25070eb525
2018-06-05Merge #13367: qa: Increase includeconf test coverageWladimir J. van der Laan
fa4760fbb3f1099dcd3c43ebc53c2a761a2170e8 qa: Increase includeconf test coverage (MarcoFalke) Pull request description: This adds some missing `return false` for error conditions and adds test coverage [1] for those. Also, extend recursion warning when the chain was set in one of the includeconfs. [1] See the red lines in https://marcofalke.github.io/btc_cov/total.coverage/src/util.cpp.gcov.html for missing coverage. Tree-SHA512: d32563c9bb277879895a173e699034db5ecdb4061a1ec8890c566d61e36a09efa5eda19a029baf952ff6d568f8b9684a13a0bb90827850075470975e2088fee4
2018-06-05Merge #13269: refactoring: Drop UpdateTransaction in favor of UpdateInputWladimir J. van der Laan
6aa33feadbe11bfa505a80a691d84db966aca134 Drop UpdateTransaction in favor of UpdateInput (Ben Woosley) Pull request description: Updating the input explicitly requires the caller to present a mutable input, which more clearly communicates the effects and intent of the call (and, often, the enclosing loop). In most cases, this input is already immediately available and need not be looked up. Tree-SHA512: 8c7914a8b7ae975d8ad0e9d760e3c5da65776a5f79d060b8ffb6b3ff7a32235f71ad705f2185b368d9263742d7796bb562395d22b806d90e8502d8c496011e57
2018-06-05Merge #13351: wallet: Prevent segfault when sending to unspendable witnessMarcoFalke
fa36aa7965 wallet: Prevent segfault when sending to unspendable witness (MarcoFalke) Pull request description: Previously we wouldn't care about the `txnouttype`, but after 4e91820531889e309dc4335fe0de8229c6426040 we `switch` on the type. Tree-SHA512: 6b597aba80cb43881671ad7b3a4ad97753864e8005a05c23fdd8ee79953483c08f241b5c392a9b494298eadc5cfba895b0480d916ef4f11d122fd6196f31b84a
2018-06-05Drop uint 256 not operatorBen Woosley
All the other operators are integer or bit operations, and this is unused apart from tests.
2018-06-04index: Move index DBs into index/ directory.Jim Posen
2018-06-04index: Remove TxIndexDB from public interface of TxIndex.Jim Posen
2018-06-04MOVEONLY: Move BaseIndex to its own file.Jim Posen
2018-06-04index: Generalize logged statements in BaseIndex.Jim Posen
2018-06-04index: Extract logic from TxIndex into reusable base class.Jim Posen
2018-06-04db: Make reusable base class for index databases.Jim Posen
2018-06-04db: Remove obsolete methods from CBlockTreeDB.Jim Posen
2018-06-04cli: Ignore libevent warningsCory Fields
2018-06-04Rename “OS X” to the newer “macOS” conventionGiulio Lombardo
2018-06-04Merge #13191: Specialized double-SHA256 with 64 byte inputs with SSE4.1 and AVX2Wladimir J. van der Laan
4defdfab94504018f822dc34a313ad26cedc8255 [MOVEONLY] Move unused Merkle branch code to tests (Pieter Wuille) 4437d6e1f3107a20a8c7b66be8b4b972a82e3b28 8-way AVX2 implementation for double SHA256 on 64-byte inputs (Pieter Wuille) 230294bf5fdeba7213471cd0b795fb7aa36e5717 4-way SSE4.1 implementation for double SHA256 on 64-byte inputs (Pieter Wuille) 1f0e7ca09c9d7c5787c218156fa5096a1bdf2ea8 Use SHA256D64 in Merkle root computation (Pieter Wuille) d0c96328833127284574bfef26f96aa2e4afc91a Specialized double sha256 for 64 byte inputs (Pieter Wuille) 57f34630fb6c3e218bd19535ac607008cb894173 Refactor SHA256 code (Pieter Wuille) 0df017889b4f61860092e1d54e271092cce55f62 Benchmark Merkle root computation (Pieter Wuille) Pull request description: This introduces a framework for specialized double-SHA256 with 64 byte inputs. 4 different implementations are provided: * Generic C++ (reusing the normal SHA256 code) * Specialized C++ for 64-byte inputs, but no special instructions * 4-way using SSE4.1 intrinsics * 8-way using AVX2 intrinsics On my own system (AVX2 capable), I get these benchmarks for computing the Merkle root of 9001 leaves (supported lengths / special instructions / parallellism): * 7.2 ms with varsize/naive/1way (master, non-SSE4 hardware) * 5.8 ms with size64/naive/1way (this PR, non-SSE4 capable systems) * 4.8 ms with varsize/SSE4/1way (master, SSE4 hardware) * 2.9 ms with size64/SSE4/4way (this PR, SSE4 hardware) * 1.1 ms with size64/AVX2/8way (this PR, AVX2 hardware) Tree-SHA512: efa32d48b32820d9ce788ead4eb583949265be8c2e5f538c94bc914e92d131a57f8c1ee26c6f998e81fb0e30675d4e2eddc3360bcf632676249036018cff343e
2018-06-03bench: Use non-throwing ParseDouble(...) instead of throwing ↵practicalswift
boost::lexical_cast<double>(...)
2018-06-01qa: Increase includeconf test coverageMarcoFalke
2018-06-01Merge #13058: [wallet] `createwallet` RPC - create new wallet at runtimeJonas Schnelli
f7e153e95 [wallets] [docs] Add release notes for createwallet RPC. (John Newbery) 32167e830 [wallet] [tests] Add tests for `createwallet` RPC. (John Newbery) 942131774 [wallet] [rpc] Add `createwallet` RPC (John Newbery) Pull request description: Adds a `createwallet` RPC to dynamically create a new wallet at runtime. Includes tests and release notes. Tree-SHA512: e0d89e3ae498234e9db5b827c56804cbab64f18a1875e2b5e676172c110278ea1b9e93a8a61b8dd80e2f2a691490bf229e923e4ccb284a1d3e420b8317815866
2018-06-01Merge #13355: Fix "gmake check" under OpenBSD 6.3 (probably *BSD): Avoid ↵Wladimir J. van der Laan
using GNU grep specific regexp handling db56755ca4a0e53785b5bf322d3b65ffe328b60a Fix "gmake check" under OpenBSD 6.3 (probably *BSD): Avoid using GNU grep specific regexp handling (practicalswift) Pull request description: Fixes #13337 (!) GNU grep and BSD grep differs in the way they handle regexps when extended regular expressions are not enabled via the `-E` flag: ``` $ grep --version | head -1 grep (GNU grep) 3.1 $ echo "BOOST_FIXTURE_TEST_SUITE(foo)" | grep "BOOST_FIXTURE_TEST_SUITE(\|BOOST_AUTO_TEST_SUITE(" BOOST_FIXTURE_TEST_SUITE(foo) $ ``` ``` $ grep --version | head -1 grep version 0.9 $ echo "BOOST_FIXTURE_TEST_SUITE(foo)" | grep "BOOST_FIXTURE_TEST_SUITE(\|BOOST_AUTO_TEST_SUITE(" $ ``` The portable way to do it is: ``` $ echo "BOOST_FIXTURE_TEST_SUITE(foo)" | grep -E "(BOOST_FIXTURE_TEST_SUITE\\(|BOOST_AUTO_TEST_SUITE\\()" BOOST_FIXTURE_TEST_SUITE(foo) $ ``` Tree-SHA512: d83c78f34421504dd8efc3921c98527f499045b702bd34715a5bc78e04ef2a5f49f601a55ad08632e870f137b1edada94a3f530291bc9107d8d6b16fe11e640b
2018-05-31[wallets] [docs] Add release notes for createwallet RPC.John Newbery
2018-05-31Merge #13349: bench: Don't return a bool from mainMarcoFalke
493a166948 bench: Don't return a bool from main (Wladimir J. van der Laan) Pull request description: Return `1` from `main()` on error, not the bool `false` (introduced in #13112). This is the correct value to return on error, and also shuts up a clang warning. Tree-SHA512: 52a0f1b2f6ae2697555f71ee2019ce657046f7f379f1f4faf3cce9d5f3fb21fcdc43a4c84895a2a8b6929997ba70bbe87c231f2f9553215b84c22333810d58d9
2018-05-31Merge #13309: Directly operate with CMutableTransaction in SignSignatureWladimir J. van der Laan
6b8b63af1461dc11ffd813401e2c36fa44656715 Generic TransactionSignatureCreator works with both CTransaction and CMutableTransaction (Martin Ankerl) Pull request description: Refactored `TransactionSignatureCreator` into a templated `GenericTransactionSignatureCreator` that works with both `CMutableTransaction` and `CTransaction`. The advantage is that now in `SignSignature`, the `MutableTransactionSignatureCreator` can now operate directly with the `CMutableTransaction` without the need to copy the data into a `CTransaction`. Running all unit tests brings a very noticable speedup on my machine: 48.4 sec before this change 36.4 sec with this change -------- 12.0 seconds saved running only `--run_test=transaction_tests/test_big_witness_transaction`: 16.7 sec before this change 5.9 sec with this change -------- 10.8 seconds saved This relates to my first attempt with the const_cast hack #13202, and to the slow unit test issue #10026. Also see #13050 which modifies the tests but not the production code (like this PR) to get a speedup. Tree-SHA512: 2cff0e9699f484f26120a40e431a24c8bc8f9e780fd89cb0ecf20c5be3eab6c43f9c359cde244abd9f3620d06c7c354e3b9dd3da41fa2ca1ac1e09386fea25fb
2018-05-31Fix "gmake check" under OpenBSD 6.3 (probably *BSD): Avoid using GNU grep ↵practicalswift
specific regexp handling
2018-05-31bench: Don't return a bool from mainWladimir J. van der Laan
Return `EXIT_SUCCESS` from `main()` on error, not the bool `false` (introduced in #13112). This is the correct value to return on error, and also shuts up a clang warning. Also add a final return for clarity.
2018-05-30Merge #13069: docs: Fix typosMarcoFalke
d8c4998f31 Fix typos (practicalswift) Pull request description: Fix typos. Tree-SHA512: 9af52a9799e6892b162e4aa1bcd6585502e10650b8aced59e7346dbb2f08544330081eb79328255fad1d358c095507956e049d354c4383b6965d4d5a7d635425
2018-05-30wallet: Prevent segfault when sending to unspendable witnessMarcoFalke
2018-05-30Merge #13112: Throw an error for unknown argsMarcoFalke
903055730b Test gArgs erroring on unknown args (Andrew Chow) 4f8704d57f Give an error and exit if there are unknown parameters (Andrew Chow) 174f7c8080 Use a struct for arguments and nested map for categories (Andrew Chow) Pull request description: Following #13190, gArgs is aware of all of the command line arguments. This PR has gArgs check whether the arguments provided are actually valid arguments. When an unknown argument is encountered, an error is printed to stderr and the program exist. Since gArgs is used for everything that has command line arguments, `bitcoind`, `bitcoin-cli`, `bitcoin-qt`, `bitcoin-tx`, and `bench_bitcoin` are all effected by this change and all now have the same argument checking behavior. Closes #1044 Tree-SHA512: 388201319a7d6493204bb5433da47e8e6c8266882e809f6df45f86d925f1f320f2fd13edb3e57ffc6a37415dfdfc689f83929452bca224229783accb367032e7