aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-03-26Add Poly1305 benchJonas Schnelli
2019-03-26Add Poly1305 implementationJonas Schnelli
2019-03-02Merge #15118: Refactor block file logicWladimir J. van der Laan
04cca330944f859b4ed68cb8da8a79f5206fd630 Style cleanup. (Jim Posen) 4c01e4e159db82ce4b2acce75f709cac996367d7 flatfile: Unit tests for FlatFileSeq methods. (Jim Posen) 65a489e93d181d3c0f7a9cf79f7c11ff8cf2b0f0 scripted-diff: Rename CBlockDiskPos to FlatFilePos. (Jim Posen) d6d8a78f26f52fdfe43293686135e2fc6919926c Move CDiskBlockPos from chain to flatfile. (Jim Posen) e0380933e3745214331d358bda8c5e79299c84d2 validation: Refactor file flush logic into FlatFileSeq. (Jim Posen) 992404b31ed2f8cabeed59d074552f0ae10fda94 validation: Refactor block file pre-allocation into FlatFileSeq. (Jim Posen) e2d2abb99fe353ffc2ff3bc1ff578fad31065335 validation: Refactor OpenDiskFile into method on FlatFileSeq. (Jim Posen) 9183d6ef656c8f3ed406821b99827f9b5f047665 validation: Extract basic block file logic into FlatFileSeq class. (Jim Posen) 62e7addb632cad77cbd5fbccbaee51c7b32505d0 util: Move CheckDiskSpace to util. (Jim Posen) Pull request description: This cleans up and refactors block file helpers so that they may be used by the block filter indexer. Per [design discussion](https://github.com/bitcoin/bitcoin/pull/14121#issuecomment-451252591) about storing BIP 157 block filters, it has been suggested that they are stored in the same way as block and undo data. This refactor is sufficient to simplify file operations for this use case, though in the future perhaps more pruning-related logic ought to be moved into the new classes. The basic abstraction is a `FlatFileSeq` which manages access to a sequence of numbered files into which raw data is written. Tree-SHA512: b2108756777f2dad8964a1a2ef2764486e708a4a4a8cfac47b5de8bcb0625388964438eb096b10cfd9ea39212c299b5cb32fa943e768db2333cf49ea7def157e
2019-03-02Merge #15335: Fix lack of warning of unrecognized section namesMarcoFalke
1a7ba84e11 Fix lack of warning of unrecognized section names (Akio Nakamura) Pull request description: In #14708, It was introduced that to warn when unrecognized section names are exist in the config file. But ```m_config_sections.clear()``` in ```ArgsManager::ReadConfigStream()``` is called every time when reading each configuration file, so it can warn about only last reading file if ```includeconf``` exists. This PR fix lack of warning by collecting all section names by moving ```m_config_sections.clear()``` to ```ArgsManager::ReadConfigFiles()``` . Also add a test code to confirm this situation. Tree-SHA512: 26aa0cbe3e4ae2e58cbe73d4492ee5cf465fd4c3e5df2c8ca7e282b627df9e637267af1e3816386b1dc6db2398b31936925ce0e432219fec3a9b3398f01e3e65
2019-03-02Merge #15338: ci: Build and run tests once on freebsdMarcoFalke
fa1d400003 cirrus ci: Inital config (MarcoFalke) Pull request description: Could be activated through https://github.com/marketplace/cirrus-ci Tree-SHA512: 3a25ad2a58249463e97a3b31122581d5d382fa1d9c830f36c72ca6211b0822950e56ea754a6bddc8f79af21d1fe3469caee9efe0e90411a9c6a59cb98c09f845
2019-03-02Merge #15296: tests: Add script checking for deterministic line coverage in ↵MarcoFalke
unit tests 43206239a8 tests: Add script checking for deterministic line coverage (practicalswift) Pull request description: Add script checking for deterministic line coverage in unit tests. Context: #14343 ("coverage reports non-deterministic") When the coverage is deterministic this script can be invoked from Travis to guard against regressions, but left inactive for now. Output in case of determinism: ``` $ contrib/test_deterministic_coverage.sh 2 [2019-01-30 20:08:46] Measuring coverage, run #1 of 2 [2019-01-30 20:10:45] Measuring coverage, run #2 of 2 Coverage test passed: Deterministic coverage across 2 runs. ``` Output in case of non-determinism: ``` $ contrib/test_deterministic_coverage.sh 2 [2019-01-30 20:08:46] Measuring coverage, run #1 of 2 [2019-01-30 20:10:45] Measuring coverage, run #2 of 2 The line coverage is non-deterministic between runs. The test suite must be deterministic in the sense that the set of lines executed at least once must be identical between runs. This is a neccessary condition for meaningful coverage measuring. --- gcovr.run-1.txt 2019-01-30 23:14:07.419418694 +0100 +++ gcovr.run-2.txt 2019-01-30 23:15:57.998811282 +0100 @@ -471,7 +471,7 @@ test/crypto_tests.cpp 270 270 100% test/cuckoocache_tests.cpp 142 142 100% test/dbwrapper_tests.cpp 148 148 100% -test/denialofservice_tests.cpp 225 225 100% +test/denialofservice_tests.cpp 225 224 99% 363 test/descriptor_tests.cpp 116 116 100% test/fs_tests.cpp 24 3 12% 14,16-17,19-20,23,25-26,29,31-32,35-36,39,41-42,45-46,49,51-52 test/getarg_tests.cpp 111 111 100% @@ -585,5 +585,5 @@ zmq/zmqpublishnotifier.h 5 0 0% 12,31,37,43,49 zmq/zmqrpc.cpp 21 0 0% 16,18,20,22,33-35,38-45,49,52,56,60,62-63 ------------------------------------------------------------------------------ -TOTAL 61561 27606 44% +TOTAL 61561 27605 44% ------------------------------------------------------------------------------ ``` In this case line 363 of `test/denialofservice_tests.cpp` was executed only in the second run. Non-determinism detected! Tree-SHA512: 03f45590e70a87146f89aa7838beeff0925d7fd303697ff03e0e69f8a5861694be5f0dd10cb0020e3e3d40c9cf662f71dfcd838f6affb31bd5212314e0a4e3a9
2019-03-02Merge #15492: [rpc] remove deprecated generate methodMarcoFalke
07cae5287c [wallet] remove unused GetScriptForMining (Sjors Provoost) 8bb3e4c487 [rpc] remove deprecated generate method (Sjors Provoost) Pull request description: As announced in v0.18, the wallet generate rpc method is deprecated and will be fully removed in v0.19. Clients should transition to using the node rpc method `generatetoaddress`. Tree-SHA512: 9e5e913b59f3e18440b2b7b356124c7b87ad19f81a1ab6ada06a6c396b84e734895465f569296f1ba8c12abf74863bab5fd77765c9e806c239713aa83a59485f
2019-03-02Merge #15514: docs: Update Transifex linksMarcoFalke
10c7642a57 docs: Update Transifex links (marcuswin) Pull request description: Rebased, finished and squashed #15406. Tree-SHA512: 118f3d4701eeba998de35ffe7664bf82336e0db2c6062b050f8b91d035e4b2537b8fc790a85cfe28d90b736b6c596695d40c003cb158a22ed9e9acf711cda5cc
2019-03-02build: Bump version to 0.18.99Wladimir J. van der Laan
Now that 0.18 branch has been split off, master is 0.18.99 (pre-0.19). Also clean out release notes. Tree-SHA512: ed5ca8bed37027aa852ba16f3f1e7fcd4ebaf74fa77a2a265cb33a9c710511019c577fae7a3b1e33259e245274d5cd4601d4774948396d0cf299b38ba634346a
2019-03-02docs: Update Transifex linksmarcuswin
2019-03-02Merge #15510: [rpc] deriveaddresses: add range to CRPCConvertParamWladimir J. van der Laan
9586157c0f9c12d3cfa55926ccc6c022324fa60a [rpc] deriveaddresses: add range to CRPCConvertParam (Sjors Provoost) Pull request description: Missing from #15497 Tree-SHA512: 469de3f896bcd3435a480685e5257c51ba895df0311329d5e5a3cb2e1894e5358324473d998ea45221776aefe8836a7af6c4f12198a36d2d10bf6761991cfd60
2019-03-01Merge #15485: add rpc_misc.py, mv test getmemoryinfo, add test mallocinfoMarcoFalke
f13ad1cae0 modify test for memory locked in case locking pages failed at some point (Adam Jonas) 2fa85ebd1c add rpc_misc.py, mv test getmemoryinfo, add test mallocinfo (Adam Jonas) Pull request description: Creating the `rpc_misc.py` functional test file to add space for adding tests to a file that doesn't have a lot of coverage. - Removing the `getmemoryinfo()` smoke test from wallet basic rather than moving it to keep the wallet decoupled. Feel like testing for reasonable memory allocation values should suffice. - Adding coverage for `mallocinfo()`. Introduced standard lib XML parser since the function exports an XML string that describes the current state of the memory-allocation implementation in the caller. Tree-SHA512: ced30115622916c88d1e729969ee331272ec9f2881eb36dee4bb7331bf633a6810a57fed63a0cfaf86de698edb5162e6a035efd07c89ece1df56b69d61288072
2019-03-01modify test for memory locked in case locking pages failed at some pointAdam Jonas
2019-03-01Merge #15506: appveyor: fix cache issue and reduce dependencies build timeMarcoFalke
aeb7fbfd69 appveyor: Don't build debug libraries instead of "build and delete" (Chun Kuan Lee) Pull request description: - fix the filename typo on `appveyor.yml`. Maybe it's the reason that appveyor cache does not work properly. - Build release dependency libraries only. We build both release and debug on master. This could save ~5 mins. Tree-SHA512: 68cdaeab98a658ebcb6159ee3f2d53376496d63b21c91291a95ad2495181de9bb12bd0fbf31672dbe72222b6368ce088b6a06592db365fc247c86bc5ba79905b
2019-03-01[rpc] deriveaddresses: add range to CRPCConvertParamSjors Provoost
2019-03-01Merge #15497: rpc: Consistent range arguments in ↵MarcoFalke
scantxoutset/importmulti/deriveaddresses ca253f6ebf Make deriveaddresses use stop/[start,stop] notation for ranges (Pieter Wuille) 1675b7ce55 Use stop/[start,stop] notation in importmulti desc range (Pieter Wuille) 4566011631 Add support for stop/[start,stop] ranges to scantxoutset (Pieter Wuille) 6b9f45e81b Support ranges arguments in RPC help (Pieter Wuille) 7aa6a8aefb Add ParseRange function to parse args of the form int/[int,int] (Pieter Wuille) Pull request description: This introduces a consistent notation for RPC arguments in `scantxoutset`, `importmulti`, and `deriveaddresses`, either: * `"range" : int` to just specify the end of the range * `"range" : [int,int]` to specify both the begin and the end of the range. For `scantxoutset`, this is a backward compatible new feature. For the two other RPCs, it's an incompatible change, but neither of them has been in a release so far. Because of that non-released reason, this only makes sense in 0.18, in my opinion. I suggest this as an alternative to #15496, which only makes `deriveaddresses` compatible with `importmulti`, but not with the existing `scantxoutset` RPC. I also think `[int,int]` is more convenient than `{"start":int,"stop":int}`. I realize this is technically a feature added to `scantxoutset` after the feature freeze. If desired, I'll drop the `scantxoutset` changes. Tree-SHA512: 1cbebb90cf34f106786dbcec7afbf3f43fb8b7e46cc7e6763faf1bc1babf12375a1b3c3cf86ee83c21ed2171d99b5a2f60331850bc613db25538c38b6a056676
2019-03-01Merge #15507: test: Bump timeout on tests that timeout on windowsMarcoFalke
fa852f0e8d test: Bump timeout on tests that timeout on windows (MarcoFalke) Pull request description: Those tests build a ton of blocks and time out for me on Windows with: ``` test_framework.authproxy.JSONRPCException: 'generatetoaddress' RPC took longer than 60.000000 seconds. Consider using larger timeout for calls that take longer to return. (-344) Tree-SHA512: a8fffeaddd02c051fbcc04bfac69f6ed826b8f16616e3b2e210a469d07c3e5706baab8121f1cd7ed265481de3a6197cf371513e2afbe506cf13b1dabfe3a0005
2019-03-01[wallet] remove unused GetScriptForMiningSjors Provoost
2019-02-28Make deriveaddresses use stop/[start,stop] notation for rangesPieter Wuille
2019-02-28test: Bump timeout on tests that timeout on windowsMarcoFalke
2019-03-01appveyor: Don't build debug libraries instead of "build and delete"Chun Kuan Lee
2019-02-28Use stop/[start,stop] notation in importmulti desc rangePieter Wuille
2019-02-28Add support for stop/[start,stop] ranges to scantxoutsetPieter Wuille
2019-02-28Support ranges arguments in RPC helpPieter Wuille
2019-02-28Add ParseRange function to parse args of the form int/[int,int]Pieter Wuille
2019-02-28Merge #15503: msvc: Use a single file to specify the include pathMarcoFalke
4a5e52cb51 msvc: Use a single file to specify the include path (Chun Kuan Lee) Pull request description: Specify the include files in 1 line and 1 file instead of 64 lines and 16 files. Also, this could avoid MSVC and autoconf include path inconsistency. Tree-SHA512: e2e283913d8118d70fd94b0fb42c3b629b0d9d94aa08a4f625945992fda830c94ecdde8dc7647e28c4f35f8466de3b38cfd7ed7ca78d611612b3b49784fa3745
2019-03-01msvc: Use a single file to specify the include pathChun Kuan Lee
2019-02-28Merge #15489: doc: Update release process for snap packageWladimir J. van der Laan
fa466cbc5016aa8dff40e63a273a077f76c1cdcb doc: Update release process for snap package (MarcoFalke) Pull request description: Tree-SHA512: 44c083a9de96b8f128e32597071c5101b1f90a0396170955f4d8b21e46ad7bfad1e0e43a955ae1dd2968aa266ff6b5d4c80115a4a1e13a4073549d48278c4c90
2019-02-27[rpc] remove deprecated generate methodSjors Provoost
2019-02-27Merge #15477: doc: Remove misleading hint in getrawtransactionWladimir J. van der Laan
9999879f56c88ca2837f5d18e6688917ba96e9e2 refactor: Use RPCHelpMan::IsValidNumArgs in getrawtransaction (MarcoFalke) fa9ff8fe212ae40a1ef4980455bf916bc044fee2 doc: Remove misleading hint in getrawtransaction (MarcoFalke) Pull request description: For 0.18.0 I asked this line to be added in #15159, which was wrong because getmempoolentry does not return the raw transaction hex. Tree-SHA512: 7ac85500c8192314347b7283cd369196bb959c124863642b6c1ce73d5662b1cbe4f42ded9c374dac6657458ab70b01810caf1235dd1d2b404bf376ebf09efa69
2019-02-27Merge #15468: wallet: Use fsbridge::ifstream to fix Windows path issueWladimir J. van der Laan
6ad79cbd562d04ebbcb61c774fb3389e70fedb7c wallet: Use fsbridge::ifstream to fix Windows path issue (Chun Kuan Lee) Pull request description: Fix #15460 Tree-SHA512: 1dab04184608543d49c86cbcfb679d63d35cb7bf3bde2e2d9ddf25ec8977de42b7131db5e81a305f3452858079dbcf68f6ad4624c89575d3d7e5b550687fc6ad
2019-02-27Merge #15462: gui: Fix async open wallet call orderWladimir J. van der Laan
a720a983015c9ef8cc814c16a5b9ef6379695817 gui: Fix async open wallet call order (João Barbosa) Pull request description: Fixes #15455. Must call `OpenWalletActivity::open` asynchronously only after all connections are made to the `OpenWalletActivity` instance, otherwise signals can be missed. Tree-SHA512: 4e5fdbd09d2ca017ed07a1813c2707c09f96275f1498779804e322e0a4dbd7dcff0c2e9cd6ec18463cd427b88b192a8d02373de9edc2b03ba5e4b8484b264417
2019-02-26doc: Update release process for snap packageMarcoFalke
2019-02-26add rpc_misc.py, mv test getmemoryinfo, add test mallocinfoAdam Jonas
2019-02-26Merge #15471: rpc/gui: Remove 'Unknown block versions being mined' warningMarcoFalke
ef362f2773 rpc/gui: Remove 'Unknown block versions being mined' warning (Wladimir J. van der Laan) Pull request description: Due to miners inserting garbage into the version numbers causing false positives, the current version signalling has become completely useless. This removes the "unknown block versions" warning which has the tendency to scare users unnecessarily (and might get them to "update" to something bad). It preserves the warning in the logs. Whether this is desirable can be a point of discussion. Tree-SHA512: 51407ccd24a571462465d9c7180f0f28307c50b82a03284abe783e181d8ab7e0638dbb710698d883f28de8a609db70763e39be2470d956e67c833da0768e43e9
2019-02-25refactor: Use RPCHelpMan::IsValidNumArgs in getrawtransactionMarcoFalke
2019-02-25doc: Remove misleading hint in getrawtransactionMarcoFalke
2019-02-25Merge #15419: qa: Always refresh cache to be out of ibdMarcoFalke
fa2cdc9ac2 test: Simplify create_cache (MarcoFalke) fa25210d62 qa: Fix wallet_txn_doublespend issue (MarcoFalke) 1111aecbb5 qa: Always refresh stale cache to be out of ibd (MarcoFalke) fab0d85802 qa: Remove mocktime unless required (MarcoFalke) Pull request description: When starting a test, we are always in IBD because the timestamps on cached blocks are in the past. Usually, we solve that by generating a block at the beginning of the test. That is clumsy and might even lead to other problems such as #15360 and https://github.com/bitcoin/bitcoin/issues/14446#issuecomment-461926598 So fix that by getting rid of mocktime and always refreshing the last block of the cache when starting the test framework. Should fix #14446 Tree-SHA512: 6af09800f9c86131349a103af617a54551f5f3f3260d38e14e3f30fdd3d91a0feb0100c56cbb12eae4aeac5571ae4b530b16345cbb831d2670237b53351a22c1
2019-02-25test: Simplify create_cacheMarcoFalke
2019-02-25rpc/gui: Remove 'Unknown block versions being mined' warningWladimir J. van der Laan
Due to miners inserting garbage into the version numbers, the current version signalling has become completely useless. This removes the "unknown block versions" warning which has the tendency to scare users unnecessarily (and might get them to "update" to something bad). It preserves the warning in the logs. Whether this is desirable can be a point of discussion.
2019-02-25Merge #15456: Enable PID file creation on WINWladimir J. van der Laan
3f5ad622e5fe0781a70bee9e3322b23c2352e956 Enable PID file creation on Windows - Add available WIN PID function - Consider WIN32 in each relevant case - Add new preprocessor definitions to suppress warning - Update error message for generic OS (riordant) Pull request description: # Introduction As discussed with @laanwj on IRC: - PID file creation was never enabled for Windows, as the `pid_t` filetype is not available for it. However, the WIN32 API contains the header [`Processthreadsapi.h`](https://github.com/CodeShark/x86_64-w64-mingw32/blob/master/include/processthreadsapi.h) which in turn contains the function [`GetCurrentProcessId()`](https://docs.microsoft.com/en-gb/windows/desktop/api/processthreadsapi/nf-processthreadsapi-getcurrentprocessid). ~~This function is called at a higher level by [`_getpid()`](https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/getpid?view=vs-2017)~~ EDIT: `_getpid()` is not available to the MSVC compiler used in the AppVeyor build. As a result, I have changed the function call to`GetCurrentProcessId()`, which performs the same function and is available to both MinGW & MSVC. This allows one to capture the PID in Windows, without any additional includes - the above function is already available. - Within this PR, I have added a separate line that calls `GetCurrentProcessId()` in the case of a WIN compilation, and the usual `getpid()` otherwise. All code blocks processing PID file logic that avoid WIN32 have been changed to consider it. I have also updated the preprocessor definitions in `libbitcoin_server.vcxproj.in` to suppress a warning related to `std::strerror` for the MSVC build, that was causing the AppVeyor build to fail (see @fanquake comment below). # Rationale - Consistency between OS's running Bitcoin - Applications which build off of `bitcoind`, such as novel front-end clients, often need access to the PID in order to control the daemon. Instead of designing some alternate way of doing this for one system, it should be consistent between all of them. In collaboration with @joernroeder Tree-SHA512: 22fcbf866e99115d12ed29716e68d200d4c118ae2f7b188b7705dc0cf5f0cd0ce5fb18f772744c6238eecd9e6d0922c615e2f0e12a7fe7c810062a79d97aa6a2
2019-02-25Enable PID file creation on Windowsriordant
- Add available WIN PID function - Consider WIN32 in each relevant case - Add new preprocessor definitions to suppress warning - Update error message for generic OS Co-authored-by: Jörn Röder <kontakt@joernroeder.de>
2019-02-25Merge #15401: rpc: Actually throw help when passed invalid number of paramsWladimir J. van der Laan
fa4ce7038d444defe0b98a30097174c278054a33 rpc: Actually throw help when passed invalid number of params (MarcoFalke) fa05626ca7a0fe896ac554c79eaea4c36acdf861 rpc: Add RPCHelpMan::IsValidNumArgs() (MarcoFalke) Pull request description: Can be tested by * running the included test against an old binary (compiled without this patch) * calling `setban 1 "add" 3 4 5 6 7 8 9 0` in the gui Tree-SHA512: aa6a25bbe6f40722913ea292252a62a4012c964eed9f4035335a2e2d13be98eb60f368e8a3251a104a26a62c08b2cb926b06e5ab1418ef1cf4abdd71d87c2919
2019-02-23wallet: Use fsbridge::ifstream to fix Windows path issueChun Kuan Lee
2019-02-23gui: Fix async open wallet call orderJoão Barbosa
2019-02-22Style cleanup.Jim Posen
2019-02-22flatfile: Unit tests for FlatFileSeq methods.Jim Posen
2019-02-22scripted-diff: Rename CBlockDiskPos to FlatFilePos.Jim Posen
-BEGIN VERIFY SCRIPT- sed -i 's/CDiskBlockPos/FlatFilePos/g' $(git ls-files 'src/*.h' 'src/*.cpp') -END VERIFY SCRIPT-
2019-02-22Move CDiskBlockPos from chain to flatfile.Jim Posen
2019-02-22validation: Refactor file flush logic into FlatFileSeq.Jim Posen