aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-08-28blockfilter: Omit empty scripts from filter contents.Jim Posen
Code change also avoids out-of-bounds script access bug.
2018-08-26Merge #14062: build: generate MSVC project files via python scriptMarcoFalke
0b16f679d5 auto generate MSVC project files (Chun Kuan Lee) Pull request description: The reason that I move from original `*.vcxproj` to template `*.vcxproj.in` file: - There are many developers does not know how to edit .vcxproj file - To keep consistency, don't need to edit file at two different places Now the devs do not have to update two seperate files. Tree-SHA512: ab06dbec588cab57f16c1993ea80ed25a49b0b129884634512a8bcd8a21a1a55d38636922489bcf9120d504cfc2cbe4d2b888a217c4e65a50555b41fcd3b7004
2018-08-26auto generate MSVC project filesChun Kuan Lee
2018-08-26Merge #12254: BIP 158: Compact Block Filters for Light ClientsWladimir J. van der Laan
254c85b68794ada713dbdae415db72adf5fcbaf3 bench: Benchmark GCS filter creation and matching. (Jim Posen) f33b717a85363e067316c133a542559d2f4aaeca blockfilter: Optimization on compilers with int128 support. (Jim Posen) 97b64d67daf0336dfb64b132f3e4d6a4c1967da4 blockfilter: Unit test against BIP 158 test vectors. (Jim Posen) a4afb9cadbaecb0676e6475ab8d32a52faecb47a blockfilter: Additional helper methods to compute hash and header. (Jim Posen) cd09c7925b5af4104834971cfe072251e3ac2bda blockfilter: Serialization methods on BlockFilter. (Jim Posen) c1855f6052aca806fdb51be01b30dfeee8b55f40 blockfilter: Construction of basic block filters. (Jim Posen) 53e7874e079f9ddfe8b176f11d46e6b59c7283d5 blockfilter: Simple test for GCSFilter construction and Match. (Jim Posen) 558c536e35a25594881693e6ff01d275c88d7af1 blockfilter: Implement GCSFilter Match methods. (Jim Posen) cf70b550054eed36f194eaa13f4a9cb31e32df38 blockfilter: Implement GCSFilter constructors. (Jim Posen) c454f0ac63c6028f54c7eb51683b3ccdb475b19b blockfilter: Declare GCSFilter class for BIP 158 impl. (Jim Posen) 9b622dc72279b027c59d6541cddff53800fc689b streams: Unit tests for BitStreamReader and BitStreamWriter. (Jim Posen) fe943f99bf0a2bbb12e30bc4803c0337e3c95b93 streams: Implement BitStreamReader/Writer classes. (Jim Posen) 87f2d9ee43a9220076b1959d1ca65245d9591be9 streams: Unit test for VectorReader class. (Jim Posen) 947133dec92cd25ec2b3358c09b8614ba6fb40d4 streams: Create VectorReader stream interface for vectors. (Jim Posen) Pull request description: This implements the compact block filter construction in [BIP 158](https://github.com/bitcoin/bips/blob/master/bip-0158.mediawiki). The code is not used anywhere in the Bitcoin Core code base yet. The next step towards [BIP 157](https://github.com/bitcoin/bips/blob/master/bip-0157.mediawiki) support would be to create an indexing module similar to `TxIndex` that constructs the basic and extended filters for each validated block. ### Filter Sizes [Here](https://gateway.ipfs.io/ipfs/QmRqaAAQZ5ZX5eqxP7J2R1MzFrc2WDdKSWJEKtQzyawqog) is a CSV of filter sizes for blocks in the main chain. As you can see below, the ratio of filter size to block size drops after the first ~150,000 blocks: ![filter_sizes](https://user-images.githubusercontent.com/881253/42900589-299772d4-8a7e-11e8-886d-0d4f3f4fbe44.png) The reason for the relatively large filter sizes is that Golomb-coded sets only achieve good compression with a sufficient number of elements. Empirically, the average element size with 100 elements is 14% larger than with 10,000 elements. The ratio of filter size to block size is computed without witness data for basic filters. Here is a summary table of filter size ratios *for blocks after height 150,000*: | Stat | Filter Type | |-------|--------------| | Weighted Size Ratio Mean | 0.0198 | | Size Ratio Mean | 0.0224 | | Size Ratio Std Deviation | 0.0202 | | Mean Element Size (bits) | 21.145 | | Approx Theoretical Min Element Size (bits) | 21.025 | Tree-SHA512: 2d045fbfc3fc45490ecb9b08d2f7e4dbbe7cd8c1c939f06bbdb8e8aacfe4c495cdb67c820e52520baebbf8a8305a0efd8e59d3fa8e367574a4b830509a39223f
2018-08-26Merge #14069: qa: Use assert not BOOST_CHECK_* from multithreaded testsMarcoFalke
737670c036 Use assert when running from multithreaded code as BOOST_CHECK_* are not thread safe (Jesse Cohen) Pull request description: Resolves thread sanitizer failure @MarcoFalke found in #14058 Tree-SHA512: 24d86c2cdae21fee029ee4b06f633de4b3e655d3371d97f09db6fd3f24b29388a78110996712249c49e7fefa7bbc3d3c405d8b480382174831fe2f9a042a557e
2018-08-26Use assert when running from multithreaded code as BOOST_CHECK_* are not ↵Jesse Cohen
thread safe
2018-08-26Merge #14063: Move cs_main locking annotations from .cpp to .hMarcoFalke
9e2de6b9d0 Move cs_main locking annotations from .cpp to .h (practicalswift) Pull request description: Move `cs_main` locking annotations from `.cpp` to `.h`. Tree-SHA512: 591bdc408a7a04c8208530fb6992b7535f30d2473e6c33fe39920330319a40e8dfb40407f2ea2d4c6c0d4624c24e34ffbdf57271b332e82f98339792372be84e
2018-08-26Move cs_main locking annotations from .cpp to .hpracticalswift
2018-08-25Merge #13083: Add compile time checking for cs_main runtime locking assertionsMarcoFalke
9e0a514112 Add compile time checking for all cs_main runtime locking assertions (practicalswift) Pull request description: Add compile time checking for `cs_main` runtime locking assertions. This PR is a subset of #12665. The PR was broken up to make reviewing easier. The intention is that literally all `EXCLUSIVE_LOCKS_REQUIRED`/`LOCKS_EXCLUDED`:s added in this PR should follow either directly or indirectly from `AssertLockHeld(…)`/`AssertLockNotHeld(…)`:s already existing in the repo. Consider the case where function `A(…)` contains `AssertLockHeld(cs_foo)` (without first locking `cs_foo` in `A`), and that `B(…)` calls `A(…)` (without first locking `cs_main`): * It _directly_ follows that: `A(…)` should have an `EXCLUSIVE_LOCKS_REQUIRED(cs_foo)` annotation. * It _indirectly_ follows that: `B(…)` should have an `EXCLUSIVE_LOCKS_REQUIRED(cs_foo)` annotation. Tree-SHA512: 120e7410c4c223dbc7d42030b1a19e328d01a55f041bb6fb5eaac10ac35cb0c5d469b9b3bda6444731164c73b88ac6495a00890672b107d9305e891571f64dd6
2018-08-26Add compile time checking for all cs_main runtime locking assertionspracticalswift
2018-08-26Merge #12676: Show "bip125-replaceable" flag, when retrieving mempool entriesWladimir J. van der Laan
870bd4c73ddf494dc23c658bf0fb672ee0109158 Update functional RBF test to check replaceable flag (dexX7) 820d31f95fb6b886b38dab5d378825bea7edd49e Add "bip125-replaceable" flag to mempool RPCs (dexX7) Pull request description: This pull request adds a flag "bip125-replaceable" to the mempool RPCs getrawmempool, getmempoolentry, getmempoolancestors and getmempooldescendants, which indicates whether an unconfirmed transaction might be replaced. Initially the flag was added to the raw transaction RPCs, but thanks to @conscott, it was moved to the mempool RPCs, which actually have access to the mempool. ~~This pull request adds a flag "bip125-replaceable" to the RPCs "getrawtransaction" and "decoderawtransaction", which indicates, whether a transaction signals BIP 125 replaceability.~~ There was some discussion in #7817, whether showing replaceability in the UI could lead to the false assumption that transactions that don't signal BIP 125 are truely non-replaceable, but given that this PR tackles the raw transaction interface, which is a rather low level tool, I believe having this extra piece of information isn't bad. Tree-SHA512: 1f5511957af2c20a9a6c79d80a335c3be37a2402dbf829c40cceaa01a24868eab81a9c1cdb0b3d77198fa3bb82799e3540a5c0ce7f35bbac80d73f7133ff7cbc
2018-08-25Merge #13707: tests: Add usage note to check-rpc-mappings.pyWladimir J. van der Laan
03a2d680101a9fee47c6fd818df7585cfc93ac06 Tests: add usage note to check-rpc-mappings.py (Mason Simon) Pull request description: This test would previously fail without a user-friendly warning message, if invoked with no arguments. Test plan: ``` bitcoin @_@$ python3 test/lint/check-rpc-mappings.py Usage: test/lint/check-rpc-mappings.py ROOT-DIR bitcoin @_@$ echo $? 1 bitcoin @_@$ python3 test/lint/check-rpc-mappings.py . * Checking consistency between dispatch tables and vRPCConvertParams bitcoin @_@$ echo $? 0 ``` Tree-SHA512: 0b7a94125d18ba5dbf3c3281a4af60718d2e495bf7645d7c2a3e1a2a1d80cffcea1383c90247186728037f1f2b38de75d0f59ccf7f792d69edd33884f3698c07
2018-08-25Merge #13961: util: Replace boost::signals2 with std::functionWladimir J. van der Laan
ddddce0e46e73d4ca369f2ce9696231cc579e1f9 util: Replace boost::signals2 with std::function (MarcoFalke) Pull request description: This removes the `#include <boost/signals2/signal.hpp>` from `util.h` (hopefully speeding up the build time and reducing the memory usage further after #13634) The whole translation interface is replaced by a function `G_TRANSLATION_FUN` that is set to nullptr in units that don't need translation. (Thus only set in the gui) Tree-SHA512: 087c717358bbed8bdb409463e225239d667f1ced381abb10e7cd31a41dcdd2cebe20b43c2ee86f0f8e55d53301f75e963f07421a99a7ff4c0cad2c6a375c5ab1
2018-08-25bench: Benchmark GCS filter creation and matching.Jim Posen
2018-08-25blockfilter: Optimization on compilers with int128 support.Jim Posen
2018-08-25blockfilter: Unit test against BIP 158 test vectors.Jim Posen
Full test of block filter and header construction.
2018-08-25blockfilter: Additional helper methods to compute hash and header.Jim Posen
2018-08-25blockfilter: Serialization methods on BlockFilter.Jim Posen
2018-08-25blockfilter: Construction of basic block filters.Jim Posen
2018-08-25blockfilter: Simple test for GCSFilter construction and Match.Jim Posen
2018-08-25blockfilter: Implement GCSFilter Match methods.Jim Posen
2018-08-25blockfilter: Implement GCSFilter constructors.Jim Posen
2018-08-25blockfilter: Declare GCSFilter class for BIP 158 impl.Jim Posen
2018-08-25streams: Unit tests for BitStreamReader and BitStreamWriter.Jim Posen
2018-08-25streams: Implement BitStreamReader/Writer classes.Jim Posen
Golomb-Rice coding, as specified in BIP 158, involves operations on individual bits. These classes will be used to implement the encoding/decoding operations.
2018-08-25streams: Unit test for VectorReader class.Jim Posen
2018-08-25streams: Create VectorReader stream interface for vectors.Jim Posen
This is a read analogue for the existing CVectorWriter.
2018-08-25Merge #13946: p2p: Clarify control flow in ProcessMessageWladimir J. van der Laan
fa6c3dea420b6c50c164ccc34f4e9e8a7d9a8022 p2p: Clarify control flow in ProcessMessage() (MarcoFalke) Pull request description: `ProcessMessage` is effectively a massive switch case construct. In the past there were attempts to clarify the control flow in `ProcessMessage()` by moving each case into a separate static function (see #9608). It was closed because it wasn't clear if moving each case into a function was the right approach. Though, we can quasi treat each case as a function by adding a return statement to each case. (Can be seen as a continuation of bugfix #13162) This patch does exactly that. Also note that this patch is a subset of previous approaches such as #9608 and #10145. Review suggestion: `git diff HEAD~ --function-context` Tree-SHA512: 91f6106840de2f29bb4f10d27bae0616b03a91126e6c6013479e1dd79bee53f22a78902b631fe85517dd5dc0fa7239939b4fefc231851a13c819458559f6c201
2018-08-25Merge #13429: Return the script type from SolverWladimir J. van der Laan
984d72ec659361d8c1a6f3c6864e839a807817a7 Return the script type from Solver (Ben Woosley) Pull request description: Because false is synonymous with TX_NONSTANDARD, this conveys the same information and makes the handling explicitly based on script type, simplifying each call site. Prior to this change it was common for the return value to be ignored, or for the return value and TX_NONSTANDARD to be redundantly handled. Tree-SHA512: 31864f856b8cb75f4b782d12678070e8b1cfe9665c6f57cfb25e7ac8bcea8a22f9a78d7c8cf0101c841f2a612400666fb91798bffe88de856e98b873703b0965
2018-08-25Merge #13631: Add CMerkleTx::IsImmatureCoinBase methodWladimir J. van der Laan
23f434378153cf764230066662f3ec3ad614ff30 Add CMerkleTx::IsImmatureCoinBase method (Ben Woosley) Pull request description: All but one call to `GetBlocksToMaturity` is testing it relative to 0 for the purposes of determining whether the coinbase tx is immature. In such case, the value greater than 0 implies that the tx is coinbase, so there is no need to separately test that status. This names the concept for easy singular use. Tree-SHA512: 4470d07404a0707144f9827b9a94c5c4905f23ee6f9248edc5df599a59d28e21ea0201d8abe5d5d73b39cb05b60c861ea8e04767eef04433e2ee95dcfed653ee
2018-08-24Merge #14024: qa: Add TestNode::assert_debug_logMarcoFalke
fa3e9f7627 qa: Add TestNode::assert_debug_log (MarcoFalke) Pull request description: Closes #13006 Tree-SHA512: 8e2d2331039d70525a425aad65a4eaf9b83fb1f85a4260d69453176f04dbede6dd9b7bb4d5f089b46cf8f8c98571aa6ba7fac8fa6847bb3bdf6a6ad21a27b1a7
2018-08-24qa: Add TestNode::assert_debug_logMarcoFalke
2018-08-24util: Replace boost::signals2 with std::functionMarcoFalke
2018-08-23Merge #12559: Avoid locking cs_main in some wallet RPCWladimir J. van der Laan
00f58f8c48db05dce9dceed73a0028482e037f0f rpc: Avoid locking cs_main in some wallet RPC (João Barbosa) Pull request description: Avoid locking `cs_main` in the folllowing wallet RPC: - `decoderawtransaction` - `getnewaddress` - `getrawchangeaddress` - `setlabel` Tree-SHA512: 54089766b2a969a17479af6c60e8ce151fac1f8cec268d43c61e679d5d17e76d17e414240c9ca2bfd280165f3a04e24a51310eb283591cd601a7eebc8b2423ea
2018-08-23Merge #14025: p2p: Remove dead code for nVersion=10300MarcoFalke
fa74d3d720 qa: Remove unused deserialization code in msg_version (MarcoFalke) fa5099ceb7 p2p: Remove dead code for nVersion=10300 (MarcoFalke) Pull request description: This code is undocumented and confusing as well as dead, since peers with a version that old are disconnected immediately. Tree-SHA512: 58c131a2730b630ffdc191cd65fe736ed1bd57e184902e2af1b1399443c4654617e68774432016df023434055e85d2e8cd32fb03b40c508c3bb8db6d19427434
2018-08-23qa: Remove unused deserialization code in msg_versionMarcoFalke
2018-08-23rpc: Avoid locking cs_main in some wallet RPCJoão Barbosa
2018-08-22Merge #14018: Bugfix: NSIS: Exclude Makefile* from docsWladimir J. van der Laan
8563341714a1ec452dd3304a39dd880face49c84 Bugfix: NSIS: Exclude Makefile* from docs (Luke Dashjr) Pull request description: Otherwise, the generated Makefile is included in the NSIS-installed documentation, which can lead to non-determinism (eg, if gawk is installed on some build VMs, but others only have mawk) (gawk is part of the standard Ubuntu bionic server install, but for some reason missing on many other developers' build VMs.) (Branch is safe to merge cleanly into 0.14-0.17 branches also) Testing requested. I have a separate `fix_nsis_makefile` branch directly on the `v0.17.0rc1` tag, which produces for me (with gawk installed): ``` f2f0e81e053f6bb59f3007a182e3e8b5cc4ccd374cfee29c80861d00c508a798 bitcoin-0.17.0-win-unsigned.tar.gz 935d4ef25e9602352833bbd594003a7b07ef9e2281fa9a2258c0f71167bdaaca bitcoin-0.17.0-win32-debug.zip 37a789993f4fef6007633a988614f8008389463ded6807c1beaaf3c04212d5f9 bitcoin-0.17.0-win32-setup-unsigned.exe 8b04d4d7de3d4308bff5f2e61bb771926dd66fa815fcea1eadc8d627f0f8970a bitcoin-0.17.0-win32.zip 8883dad775c2b97085b2217175e9916a9aa894ff97fbdc9b7ca74b4e8206298d bitcoin-0.17.0-win64-debug.zip cd30d3eb2b739f6e4956c768ea4fb0230fb23e01dcad094d2fbf4efa6c7dad52 bitcoin-0.17.0-win64-setup-unsigned.exe 817d5b9df4cc3f7fd323e134ed8670787aa9cafc921e883bbbb9cdfb439b03da bitcoin-0.17.0-win64.zip e3ed7f2d4a5993e4c343e967cfa838c6314fa98900c43519572a31b96d3e00ca src/bitcoin-0.17.0.tar.gz 38d2f92cf2c9823ea3c52aaa9c42f7cb38a87a12896a89379bfc4315a04d2e92 bitcoin-win-0.17-res.yml ``` Tree-SHA512: dda68a765e3e682f7b4352a8ec6942559eb6a29c740d6bd1008c788e3e50f44fd2d157100616cc7aaffc2568640ec6a74fb063a29645cd02ba14a0828ab6f01c
2018-08-22p2p: Remove dead code for nVersion=10300MarcoFalke
2018-08-22Merge #13765: contrib: add gitian build support for github pull requestWladimir J. van der Laan
46f83453701fc6116d97de6a16986388ba63488f contrib: Support github pull request gitian-build (Chun Kuan Lee) Pull request description: - Add `-p` or `--pull` to specify the version is github pull request number - `./gitian-build.py -bpDn test 13765` should work. This is helpful for someone want to try cross compiling. Tree-SHA512: b474b089127ffb2a67a42d99c1888bd5812a5ba725c8915a13a01cf93bde32b5b5011314e4193fa6b231caa5de2137e709ee5aa5bf889c4ac60a97aa83caac5c
2018-08-22Merge #13988: Add checks for settxfee reasonablenessWladimir J. van der Laan
317f2cb3f4499afbaa63e3cac80567744f12c95b test: Check RPC settxfee errors (João Barbosa) 48618daf262b84c2e2f7322b5ca14375d7d68b64 Add checks for settxfee reasonableness (Anthony Towns) Pull request description: When using the `settxfee` RPC, the value is silently ignored if it is less than either than minrelaytxfee or the wallet's mintxfee. This adds an error response if that's going to happen, but still allows "settxfee 0" to deliberately default to the minimum value. Tree-SHA512: ce685584cf8d6b9ca2cc97196d494220e3892b6a804a458086e04b3a23df281da432ad0a3053106a064c90c541ddb6f6b96a27cf8376d45af1e44449baf88456
2018-08-22Merge #13967: [walletdb] don't report minversion wallet entry as unknownWladimir J. van der Laan
321159e53e800c1df2d8dfd6ac03374f1829c327 don't report minversion wallet entry as unknown (Gregory Sanders) Pull request description: It is known in WalletBatch::LoadWallet Tree-SHA512: 82f7e12f48ae7d17317074ce5b5e27c70ba8334b04adbf7cc863f8169cc1aa460b9454571e2698aa00059c8c8f669fe19c0d40c4910dcded260ddca6ce78be9d
2018-08-21Bugfix: NSIS: Exclude Makefile* from docsLuke Dashjr
Otherwise, the generated Makefile is included in the NSIS-installed documentation, which can lead to non-determinism (eg, if gawk is installed on some build VMs, but others only have mawk)
2018-08-21Merge #13941: Add PSBT documentationWladimir J. van der Laan
19efc01aec6b0d8750413fa1b721e04aaecf8f73 Add PSBT documentation (Pieter Wuille) Pull request description: This is just some initial text to get going; other contributions welcome. I'd like to include other workflows, such as hardware wallets and (manual) coinjoins. However, the former will in practice require PSBT interfaces for existing hardware devices, and the second can really use some extra RPCs first. Tree-SHA512: 951e475e31bb2ea9ab5d84d139b8bc436153ad035185f00ad1d56afc0c6f7c4de8176a785a6d0c38bb3fd9cbf318e513e1a032e83e1da99ded5d43a36f9cbc60
2018-08-21Merge #14006: Add const modifier to HTTPRequest methodsWladimir J. van der Laan
18c49eb8877d8b11f763083a79a7b8250e060106 http: Add const modifier to HTTPRequest methods (João Barbosa) Pull request description: Tree-SHA512: 233617425ff3abc7419817a95337056c190640197c6c4d8b1a0810967d960c0968d02967e16ffbc1af1a2b3117fdc98722bf05e270504d59548e6838fa7f5ffb
2018-08-21Merge #13529: Use new Qt5 connect syntaxWladimir J. van der Laan
3567b247f43decb6fc102d5b0989d1746fce0441 test: Add lint to prevent SIGNAL/SLOT connect style (João Barbosa) f78558f1e39198779bdb17e2b0e256fb99ad4b28 qt: Use new Qt5 connect syntax (João Barbosa) Pull request description: Pros&cons in https://wiki.qt.io/New_Signal_Slot_Syntax. Note that connecting to/from overloaded slot/signal is ugly before qt 5.7 (see https://stackoverflow.com/a/16795664). Tree-SHA512: ab81f035099fecd34be546f7091bc29595349f2fd0fea26f6414242702955fca27faa4fe19ebfe105c01217908b51db762cb5a9f6ce25bc5e8e6f64c77428c22
2018-08-21test: Add lint to prevent SIGNAL/SLOT connect styleJoão Barbosa
2018-08-21qt: Use new Qt5 connect syntaxJoão Barbosa
2018-08-21Merge #13968: [wallet] couple of walletcreatefundedpsbt fixesWladimir J. van der Laan
faaac5caaab4d5131040292f4ef2404074ad268b RPCTypeCheck bip32derivs arg in walletcreatefunded (Gregory Sanders) 1f0c4282e961baea85d5f74d7493bd7459784391 QA: add basic walletcreatefunded optional arg test (Gregory Sanders) 1f18d7b591ffcc8bb9422a9b728bd9a0d8da6a2a walletcreatefundedpsbt: remove duplicate replaceable arg (Gregory Sanders) 2252ec50085c151e7998ca9a30cda6a33ee862b6 Allow ConstructTransaction to not throw error with 0-input txn (Gregory Sanders) Pull request description: 1) Previously an empty input argument transaction that is marked for replaceability fails to pass the `SignalsOptInRBF` check right before funding it. Explicitly check for that condition before throwing an error. 2) The rpc call had two separate `replaceable` arguments, each of which being used in mutually exclusive places. I preserved the `options` version to retain compatability with `fundtransaction`. Tree-SHA512: 26eb0c9e2d38ea51d11f741d61100223253271a084adadeb7e78c6d4e9004636f089e4273c5bf64a41bd7e9ff795317acf30531cb36aeb0d8db9304b3c8270c3
2018-08-21test: Check RPC settxfee errorsJoão Barbosa