aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
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-11validation: check the specified number of blocks (off-by-one)Karl-Johan Alm
2018-06-10Fix compiler warnings emitted when compiling under stock OpenBSD 6.3practicalswift
2018-06-08Drop ParseHashUV in favor of calling ParseHashStrBen Woosley
The one existing call already validates get_str will pass via checkObject.
2018-06-08qa: Remove portseed_offset from test runnerMarcoFalke
2018-06-08Merge #13374: utils and libraries: checking for bitcoin address in translationsWladimir J. van der Laan
85f0135eaefe3d9f696689a7e83606c579da40a8 utils: checking for bitcoin addresses in translations (Max Kaplan) Pull request description: Closes #13363 Tree-SHA512: 8509b4ab004139942c847b93d7b44096a13df8e429dd05459b430a1cf7eaef16c4906ab9dc854f4e635312e1ebb064cfab1bad97fec914c7e926c83ad45cc99b
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 #13369: [docs] update transifex doc linkWladimir J. van der Laan
2b30ccc30ab688835e4bcfbd91a4e93197fd38ba [docs] update transifex doc link (Cristian Mircea Messel) Pull request description: The old link is no longer working. #13364 Tree-SHA512: 5729b9eabbdf8e05cb60be1bedc7e21a2052bb2921dca8322d8348c3ea0f7ee33f2e2e32a19f21bbe2b93b48ed221cfcb020592d0e6b118b77ca34e14bb30b89
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-07Merge #13041: build: Add linter checking for accidental introduction of ↵Wladimir J. van der Laan
locale dependence 698cfd081144845f6246171b8a2a0cfa8daaecdb docs: Mention lint-locale-dependence.sh in developer-notes.md (practicalswift) 0a4ea2f4589961868ab4d25e0277485c31938e20 build: Add linter for checking accidental locale dependence (practicalswift) Pull request description: This linter will check for code accidentally introducing locale dependencies. Unnecessary locale dependence can cause bugs that are very tricky to isolate and fix. We should avoid using locale dependent functions if possible. Context: https://github.com/bitcoin/bitcoin/pull/12881#issuecomment-378564722 Example output: ``` $ contrib/devtools/lint-locale-dependence.sh The locale dependent function tolower(...) appears to be used: src/init.cpp: if (s[0] == '0' && std::tolower(s[1]) == 'x') { Unnecessary locale dependence can cause bugs that are very tricky to isolate and fix. Please avoid using locale dependent functions if possible. Advice not applicable in this specific case? Add an exception by updating the ignore list in contrib/devtools/lint-locale-dependence.sh ``` **Note to reviewers:** What is the most appropriate `LOCALE_DEPENDENT_FUNCTIONS` function list? What should be added or removed? Tree-SHA512: 14e448828804bb02bf59070647e38b52fce120c700c903a4a8472769a2cee5dd529bd3fc182386993cb8720482cf4250b63a0a477db61b941ae4babe5c65025f
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-06Merge #13301: lint: Add linter to error on #include <*.cpp>MarcoFalke
9d6c9dbb88 lint: Add linter to error on #include <*.cpp> (Ben Woosley) Pull request description: Files should depend on one another by interface, not by implementation. This checks for quoted includes as well. Tree-SHA512: d36d468f48d538077f5f927b9561729fd7d76319f6b2e2cc10414a9f243588194e90ca1d85eca65019f9259268f555d25106eaaa56da28c58fa8d5837b469661
2018-06-06lint: Add linter to error on #include <*.cpp>Ben Woosley
Files should depend on one another by interface, not by implementation. This checks for quoted includes as well. With practicalswift
2018-06-06Clarify include recommendationpracticalswift
2018-06-06Enforce the use of bracket syntax includes ("#include <foo.h>")practicalswift
2018-06-06Use bracket syntax includes ("#include <foo.h>")practicalswift
2018-06-06docs: Mention lint-locale-dependence.sh in developer-notes.mdpracticalswift
2018-06-06build: Add linter for checking accidental locale dependencepracticalswift
2018-06-05Document validationinterace callback blocking deadlock potential.Matt Corallo
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-05Merge #13385: build: Guard against accidental introduction of new Boost ↵Wladimir J. van der Laan
dependencies 81bbd32a2c755482c6e8ef049a59de672715b545 build: Guard against accidental introduction of new Boost dependencies (practicalswift) Pull request description: Guard against accidental introduction of new Boost dependencies. Context: #13383 – the usage of `boost::lexical_cast` was introduced in #11517 from December 2017 Tree-SHA512: 8d7b667ecf7ea62d84d9d41a71726f1e46c5a411b5a7db475c973ef364cac65609399afda7931e143a27d40c2947ff286e5e98ab263e8f0d225e2ae2c0872935
2018-06-05Merge #13366: Docs: Rename “OS X” to the newer “macOS” conventionWladimir J. van der Laan
989c8990bb765eef45c8ee471f084ca81a0bead4 Rename “OS X” to the newer “macOS” convention (Giulio Lombardo) Pull request description: Since 2016, with [macOS 10.12 Sierra](https://en.wikipedia.org/wiki/MacOS_Sierra), Mac OS X has been renamed in macOS. It would be a nice if Bitcoin's macOS build instructions follow this naming convention to avoid misunderstandings. Tree-SHA512: 51b7d54bfc39a1a9d0773c64780817c7beca7094aded80481086287474dfa272bf0a1dfa6ef6e3cae91548aa127f65fa730003dddcb97147cdc8c249146aea22
2018-06-05utils: checking for bitcoin addresses in translationsMax Kaplan
Checking for and removing any bitcoin addresses in translations
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-04Enable double-SHA256-for-64-byte code on 32-bit x86Pieter Wuille
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-04build: Guard against accidental introduction of new Boost dependenciespracticalswift