aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-02-05Update linearize-hashes.pyOverlordQ
Fix class case issue.
2019-02-05Merge #14519: tests: add utility to easily profile node performance with perfMarcoFalke
13782b8ba8 docs: add perf section to developer docs (James O'Beirne) 58180b5fd4 tests: add utility to easily profile node performance with perf (James O'Beirne) Pull request description: Adds a context manager to easily (and selectively) profile node performance during functional test execution using `perf`. While writing some tests, I encountered some odd bitcoind slowness. I wrote up a utility (`TestNode.profile_with_perf`) that generates performance diagnostics for a node by running `perf` during the execution of a particular region of test code. `perf` usage is detailed in the excellent (and sadly unmerged) https://github.com/bitcoin/bitcoin/pull/12649; all due props to @eklitzke. ### Example ```python with node.profile_with_perf("large-msgs"): for i in range(200): node.p2p.send_message(some_large_msg) node.p2p.sync_with_ping() ``` This generates a perf data file in the test node's datadir (`/tmp/testtxmpod0y/node0/node-0-TestName-large-msgs.perf.data`). Running `perf report` generates nice output about where the node spent most of its time while running that part of the test: ```bash $ perf report -i /tmp/testtxmpod0y/node0/node-0-TestName-large-msgs.perf.data --stdio \ | c++filt \ | less # To display the perf.data header info, please use --header/--header-only options. # # # Total Lost Samples: 0 # # Samples: 135 of event 'cycles:pp' # Event count (approx.): 1458205679493582 # # Children Self Command Shared Object Symbol # ........ ........ ............... ................... ........................................................................................................................................................................................................................................................................ # 70.14% 0.00% bitcoin-net bitcoind [.] CNode::ReceiveMsgBytes(char const*, unsigned int, bool&) | ---CNode::ReceiveMsgBytes(char const*, unsigned int, bool&) 70.14% 0.00% bitcoin-net bitcoind [.] CNetMessage::readData(char const*, unsigned int) | ---CNetMessage::readData(char const*, unsigned int) CNode::ReceiveMsgBytes(char const*, unsigned int, bool&) 35.52% 0.00% bitcoin-net bitcoind [.] std::vector<char, zero_after_free_allocator<char> >::_M_fill_insert(__gnu_cxx::__normal_iterator<char*, std::vector<char, zero_after_free_allocator<char> > >, unsigned long, char const&) | ---std::vector<char, zero_after_free_allocator<char> >::_M_fill_insert(__gnu_cxx::__normal_iterator<char*, std::vector<char, zero_after_free_allocator<char> > >, unsigned long, char const&) CNetMessage::readData(char const*, unsigned int) CNode::ReceiveMsgBytes(char const*, unsigned int, bool&) ... ``` Tree-SHA512: 9ac4ceaa88818d5eca00994e8e3c8ad42ae019550d6583972a0a4f7b0c4f61032e3d0c476b4ae58756bc5eb8f8015a19a7fc26c095bd588f31d49a37ed0c6b3e
2019-02-05Merge #15332: [Docs] Small updates to getrawtransaction descriptionMarcoFalke
47012391ec [Docs] Small updates to getrawtransaction description (Amiti Uttarwar) Pull request description: As per review comments on https://github.com/bitcoin/bitcoin/pull/15159 Tree-SHA512: 0bbbe956b47d177f7e67c5ab2048287783327d9e07a679d64d79aee3ea8633e769f75b59d3dbce517924ba5d64d6c44f26bf49e16d40612463e460ad1a238129
2019-02-05Merge #15327: tests: Make test updatecoins_simulation_test deterministicMarcoFalke
ef0b01217a tests: Make updatecoins_simulation_test deterministic (practicalswift) Pull request description: Make test `updatecoins_simulation_test` deterministic. Can be verified using `contrib/test_deterministic_coverage.sh` introduced in #15296. Related: * #15296: "tests: Add script checking for deterministic line coverage in unit tests" * #15324: "test: Make bloom tests deterministic" * #14343: "coverage reports non-deterministic" Tree-SHA512: 3466e28a42dd3735effb8542044d88e8350a470729d4a4f02abce9d6367de6568d698131469ba154d3dc76d448bacb360b7aefd066bb5b91408c0be375dd3ecb
2019-02-05Merge #15203: Fix issue #9683 "gui, wallet: random abort (segmentation fault)MarcoFalke
364cff1cab Fix issue #9683 "gui, wallet: random abort (segmentation fault) running master/HEAD". (Chris Moore) Pull request description: Patch taken from @ryanofsky's comment https://github.com/bitcoin/bitcoin/issues/9683#issuecomment-448035913. [MarcoFalke wrote](https://github.com/bitcoin/bitcoin/issues/9683#issuecomment-454066004): > Mind to submit this patch as a pull request? So that's what I'm doing. I was regularly seeing crashes on startup before applying this patch and haven't seen a single crash on startup since applying it almost a month ago. Tree-SHA512: 3bbb2291cdf03ab7e7b5b796df68d76272491e35d473a89f4550065554c092f867659a7b8d7a1a91461ae4dc9a3b13b72541eafdbd732536463e9f3cf82300c8
2019-02-06Merge #15297: wallet: Releases dangling files on BerkeleyEnvironment::CloseMeshCollider
d3bf3b930 qa: Test .walletlock file is closed (João Barbosa) 2f8b8f479 wallet: Close wallet env lock file (João Barbosa) 8602a1e6a wallet: Close dbenv error file db.log (João Barbosa) Pull request description: This PR closes `db.log` and removes `.walletlock` files when `BerkeleyEnvironment` is closed. Fixes https://github.com/bitcoin/bitcoin/issues/15291#issuecomment-459131886. Tree-SHA512: 05d8b027feea914e0ba873e75d117857473d1fd7b400e41bd473d638171fa39d5be048990bf685dc0807f7d92418579b763056dc2a6dcf6b96777d5688ddee04
2019-02-05Merge #14922: windows: Set _WIN32_WINNT to 0x0601 (Windows 7)Wladimir J. van der Laan
0164b0f5cf80cd00a4914d9fea0bcb9508cb7607 build: Remove WINVER pre define in Makefile.leveldb.inlcude (Chun Kuan Lee) d0522ec94ebbaa564f5f6b31236d4df032664411 Drop defunct Windows compat fixes (Ben Woosley) d8a299206780b38959d732cbe40ba1dd25834f0e windows: Call SetProcessDEPPolicy directly (Chun Kuan Lee) 1bd9ffdd44000b208d29d35451f4dc9f1ac9318f windows: Set _WIN32_WINNT to 0x0601 (Windows 7) (Chun Kuan Lee) Pull request description: The current minimum support Windows version is Vista. So set it to 0x0600 https://github.com/mirror/mingw-w64/blob/5a88def8ad862ef8f4e5f2e69661bfb2d07f1ce2/mingw-w64-headers/include/sdkddkver.h#L19 Tree-SHA512: 38e2afc79426ae547131c8ad3db2e0a7f54a95512f341cfa0c06e4b2fe79521ae67d2795ef96b0192e683e4f1ba6183c010d7b4b8d6b3e68b9bf48c374c59e7d
2019-02-05Merge #15245: remove deprecated mentions of signrawtransaction from fundraw helpMarcoFalke
851380ce17 remove deprecated mentions of signrawtransaction from fundraw help (Gregory Sanders) Pull request description: RPC call has been removed as of 0.17.99. Tree-SHA512: a6a12a0e4572acd9b532c1719be85ed6f29d1c1a28f9ce691398528b8dde4fb4a3222b8f68632fcb1a8eddfe2d31e96d5efd5bc51c041af8e7cb99b61ca3a167
2019-02-05Merge #15342: Suggested wallet code cleanups from #14711MarcoFalke
aebafd0edf Rename Chain getLocator -> getTipLocator (Russell Yanofsky) 2c1fbaa771 Drop redundant get_value_or (Russell Yanofsky) 84adb206fc Fix ScanForWalletTransactions start_block comment (Russell Yanofsky) 2efa66b464 Document rescanblockchain returned stop_height being null (Russell Yanofsky) db2d093233 Add suggested rescanblockchain comments (Russell Yanofsky) a8d645c934 Update ScanForWalletTransactions result comment (Russell Yanofsky) 95a812b599 Rename ScanResult stop_block field (Russell Yanofsky) Pull request description: This implements suggested changes from #14711 review comments that didn't make make it in before merging. There are no changes in behavior in this PR, just documentation updates, simplifications, and variable renames. Tree-SHA512: 39f1a5718195732b70b5e427c3b3e4295ea5af6328a5991763a422051212dfb95383186db0c0504ce2c2782fb61998dfd2fe9851645b7cb4e75d849049483cc8
2019-02-05Merge #15347: Fix build after pr 15266 mergedWladimir J. van der Laan
e1b6436aad2bac5d3051740e02430f339bc7ecc5 Fix build after pr 15266 merged (Hennadii Stepanov) Pull request description: Ref: #15266 Tree-SHA512: 6647264c3e3d94f0f10dc3bed1b82dfe8ed1192906270b0bb79f4d018807e06cb42286c86ced7fee0e2b38284739657336672c5a30650b6473ffafd65c315349
2019-02-04Fix issue #9683 "gui, wallet: random abort (segmentation fault) running ↵Chris Moore
master/HEAD". Patch taken from @ryanofsky's comment https://github.com/bitcoin/bitcoin/issues/9683#issuecomment-448035913 and refined according to https://github.com/bitcoin/bitcoin/pull/15203#discussion_r249168229
2019-02-05Fix build after pr 15266 mergedHennadii Stepanov
2019-02-04Merge #15266: memory: Construct globals on first useMarcoFalke
77777c5624 log: Construct global logger on first use (MarcoFalke) Pull request description: The (de)initialization order is not well defined in C++, so generally it is not safe to use globals as the (de/con)structor of one global could use the (de/con)structor of another global before/after it has been (con/de)structed. Specifically this fixes: * `g_logger` might not be initialized on the first use, so do that. (Fixes #15111) Tree-SHA512: eb9c22f4baf31ebc5b0b9ee6a51d1354bae1f0df186cc0ce818b4483c7b5a7f90268d2b549ee96b4c57f8ef36ab239dc6497f74f3e2ef166038f7437c368297d
2019-02-04Merge #15345: net: Correct comparison of addr countWladimir J. van der Laan
107623c26c2113428446effaa24edb986a3e780c net: Correct comparison of addr count (Carl Dong) Pull request description: `LOCAL_NONE` is supposed to be an enum indicating the `nScore` of a `LocalServiceInfo` rather than the count of an addr in `mapLocalHost`. Tree-SHA512: a47a0859dd11c991d75b54e96b08c502e3d235f7a6522a2355053f377d05e7853483996919292f458d917a561b23951e6945d6bf0ff5a2f29513c477c640bdd2
2019-02-04Merge #12255: Update bitcoin.service to conform to init.mdWladimir J. van der Laan
bad1716c6d30fdf4be6d5050a04e1211f920bbd6 init: Modify docs and add release note for 12255 (Carl Dong) b0c7b54d0c2e116d61e686b1adfdea6a1f7f02fe init: Use systemd automatic directory creation (Carl Dong) Pull request description: - `-datadir` option specified. - Ask systemd to create and set the right mode for PID directory, configuration directory, and data directory. - Tell systemd our group so it will set the right owner for aforementioned directories. More information: https://www.freedesktop.org/software/systemd/man/systemd.exec.html Tree-SHA512: a6fad1efa2be433c1fdd863df3ff232736ed709a9e281f51a003b40987d8c213dc64a52bc13a19c85bf85680e78f0be112ecaf32ac274b1ff93bac84a1208845
2019-02-04qa: Test .walletlock file is closedJoão Barbosa
2019-02-04net: Correct comparison of addr countCarl Dong
LOCAL_NONE is supposed to be an enum indicating the score of a LocalServiceInfo rather than the count of an addr in mapLocalHost.
2019-02-04[Docs] Small updates to getrawtransaction descriptionAmiti Uttarwar
2019-02-04Merge #15339: qt: Pre-0.18 split-off translations updateWladimir J. van der Laan
df8a7d3408598fd12d1961903ba6754e9f22ffe8 qt: Pre-0.18 split-off translations update (Wladimir J. van der Laan) Pull request description: - Update transifex slug - Mention update of MSVC build in `doc/translation_process.md` - Do a `make translate` to update English translations - Pull current translations from transifex Tree-SHA512: 2f3102ff64167d5feaf484b2c45cd6aa1d06ac4f370107f0db5575fde023b3dfaea07e7178978bfff111fa80dbe4e56bd05b5774fc7c111b5273d33b3dcd44ad
2019-02-04Merge #15328: travis: Revert "Run extended tests once daily"MarcoFalke
fa6b7b9cf6 travis: Revert "Run extended tests once daily" (MarcoFalke) Pull request description: Now that the extended tests are only pruning and dbcrash, both which are too long [1] to run on travis, we can revert this commit. All tests other than those two are still run for every travis pull request or cron run. [1] https://travis-ci.org/bitcoin/bitcoin/jobs/487615211#L2930 Tree-SHA512: dff293823336677380f6e804379125687869a4b547c968f0b6aae80daee1cbca2cfb845b63de7135f31fbe2383d8d7654694b6dc8a6a6b7d02d57ee8ff107527
2019-02-04Merge #15325: msvc: Fix silent merge conflict between #13926 and #14372MarcoFalke
bef8fdd6e2 msvc: Fix silent merge conflict between #13926 and #14372 (ken2812221) Pull request description: The bitcoin-wallet.exe would have to link with libsecp256k1 after we build libsecp256k1 in project. Tree-SHA512: cb3fafa301f39121f5d26ac8ac6009c9665fcad1061dbf14ba013104870abe5413ac57c97c97df12b6ba2ad709b776c51aeec20d41f3ae01d3460a5e18f40eec
2019-02-04remove deprecated mentions of signrawtransaction from fundraw helpGregory Sanders
2019-02-04qt: Pre-0.18 split-off translations updateWladimir J. van der Laan
- Update transifex slug - Mention update of MSVC build in `doc/translation_process.md` - Do a `make translate` to update English translations - Pull current translations from transifex
2019-02-04init: Modify docs and add release note for 12255Carl Dong
2019-02-04wallet: Close wallet env lock fileJoão Barbosa
Close .walletlock file when a BerkeleyEnvironment is deleted.
2019-02-04wallet: Close dbenv error file db.logJoão Barbosa
The error file db.log is opened by BerkeleyEnvironment instance and should be closed after dbenv is closed.
2019-02-04Merge #15322: wallet: Add missing cs_db lockWladimir J. van der Laan
712d35bc563ac7de0b7dfc3a35fc48dc6448fa6a wallet: Add missing cs_db lock (João Barbosa) Pull request description: Without this lock `BerkeleyEnvironment::~BerkeleyEnvironment` and `GetWalletEnv` would race for `g_dbenvs`. This wasn't detected before because thread safety analysis does not check constructors and destructors. Reference: http://releases.llvm.org/5.0.2/tools/clang/docs/ThreadSafetyAnalysis.html#no-checking-inside-constructors-and-destructors Tree-SHA512: 350cb2b991ca699a6bca85f87c82c38f0814484c8ccb0d7d83cb3bff9afcf60dd32b2a9554a9e72eb5803bfad8b6970fe7da618b39be5889178b86faa1b74124
2019-02-04Merge #15324: test: Make bloom tests deterministicWladimir J. van der Laan
fae169c95e09ddf068dcaebc8170c4f41b02cf66 test: Make bloom tests deterministic (MarcoFalke) Pull request description: non-deterministic tests are useless, since a failing test could not be reproduced unless the seed is known. Tree-SHA512: 4f634ff0c6adf663444f1ac504f6dbceaa46b78d697b840531977ba30006453ac559d5c21cc3eaef6d92b87d46008a34b0db6331ea3318001987fcfaec634acf
2019-02-04Merge #15280: gui: Fix shutdown orderWladimir J. van der Laan
0dd6a8c12489ea4428b398a2328dde5d1a9fe39b Check m_internals in UnregisterValidationInterface (João Barbosa) fd6d499bdacfa29f25b0f675375e3feaced08667 gui: Fix m_node.startShutdown() order (João Barbosa) 07b9aadcfc7cc72be9df344dd5715cf8fc78f0ad gui: Expose BitcoinGUI::unsubscribeFromCoreSignals (João Barbosa) 60e190ceb3563a8102d42fdfcbefccdd1b53e812 gui: Fix WalletController deletion (João Barbosa) Pull request description: This PR consists in small fixes in order to have a clean shutdown from the GUI. Tree-SHA512: a9c641f202bc810698c4a39d5c5a1f54e54bdab098c412d65418879e00764a9db9f38383813914d591e24e097e49f177942b2ae6c57bba05dcc095e8a1d0b8f4
2019-02-03Check m_internals in UnregisterValidationInterfaceJoão Barbosa
When a wallet is created it is registered in the validation interface (in CWallet::CreateWalletFromFile) but it is not immediately added to the wallets list. If a shutdown is requested before AddWallet (case more evident when -rescan is set) then m_internals can be released (in Shutdown -> UnregisterBackgroundSignalScheduler) before the wallet and then ReleaseWallet would call UnregisterValidationInterface with m_internals already released.
2019-02-03gui: Fix m_node.startShutdown() orderJoão Barbosa
This change forwards the shutdown request on the GUI (close the application for instace) to the node as soon as possible. This way the GUI doesn't have to wait for long operations to complete (rescan the wallet for instance), instead those operations detect the shutdown request and abort/interrupt.
2019-02-03gui: Expose BitcoinGUI::unsubscribeFromCoreSignalsJoão Barbosa
Move only change that makes unsubscribeFromCoreSignals public. It must be called if the event loop is not running otherwise core signals handlers can deadlock.
2019-02-03gui: Fix WalletController deletionJoão Barbosa
The wallet controller instanced must be deleted after the window instance since it is used there.
2019-02-03tests: Make updatecoins_simulation_test deterministicpracticalswift
2019-02-02Merge #15330: test: Fix race in p2p_invalid_messagesMarcoFalke
fac3a054cb test: Fix race in p2p_invalid_messages (MarcoFalke) Pull request description: After we change our magic bytes, the node may or may not send us messages such as feefilter or sendheaders, which would be rejected by `_on_data`. Solve that by replacing `_on_data` with a noop. Tree-SHA512: bd25a81f0c6e31f09155e00abab8062777d827b9210d6a9b85ef35cfe5069338f100fecf058842f41a1f134fdb3cf7ac1fe80db493e4dab7988acdacb33149df
2019-02-02test: Fix race in p2p_invalid_messagesMarcoFalke
2019-02-03Merge #15263: Descriptor expansions only need pubkey entries for PKH/WPKHMeshCollider
11e0fd8d6 Descriptor expansions only need pubkey entries for PKH/WPKH (Pieter Wuille) Pull request description: Currently, calling `Expand` on a `Descriptor` object will populate the output FlatSigningProvider with all public keys involved in the descriptor. This is overkill, as pubkey entries are only needed when the lookup of a public key based on its hash is desired (which is the case for `pkh`, `wpkh`, and `combo` descriptors). Fix this by pushing the population of pubkey entries down into the individual descriptor implementation's `MakeScript` function, instead of doing it generically. This should make it easier to implement #14491 without importing P2PKH outputs for the individual public keys listed inside a multisig. Tree-SHA512: 5bc7e9bd29f1b3bc63514803e9489b3bf126bfc177d46313aa9eeb98770ec61a97b55bd8ad4e2384154799f24b1bc4183bfdb4708b2ffa6e37ed2601a451cabc
2019-02-02travis: Revert "Run extended tests once daily"MarcoFalke
This reverts commit 88e3aa0bcbbf825f4afa6a9a689b1f5a5958ed14
2019-02-02test: Make bloom tests deterministicMarcoFalke
2019-02-01Merge #15303: travis: Remove unused FUNCTIONAL_TESTS_CONFIGMarcoFalke
facaae4cc4 travis: Save cache when compilation took very long (MarcoFalke) faee6c9cac travis: Remove unused FUNCTIONAL_TESTS_CONFIG (MarcoFalke) Pull request description: Closes #14163 Tree-SHA512: fb3dd0b7a0a3ee7ac1c6d4e9314239cd03ab4a11f04b6345ef4a1f50ea2b79ea4248c41e99a6fb923a4b1b477758c4fa665d56a4ab703acf5a58dbc7d852ffc4
2019-02-02msvc: Fix silent merge conflict between #13926 and #14372ken2812221
2019-02-01Rename Chain getLocator -> getTipLocatorRussell Yanofsky
Suggested https://github.com/bitcoin/bitcoin/pull/14711#discussion_r252044389
2019-02-01Drop redundant get_value_orRussell Yanofsky
Suggested https://github.com/bitcoin/bitcoin/pull/14711#discussion_r252041954
2019-02-01Fix ScanForWalletTransactions start_block commentRussell Yanofsky
Suggested https://github.com/bitcoin/bitcoin/pull/14711#discussion_r252036436
2019-02-01wallet: Add missing cs_db lockJoão Barbosa
Without this lock BerkeleyEnvironment::~BerkeleyEnvironment and GetWalletEnv would race for g_dbenvs. This wasn't detected before because thread safety analysis does not check constructors and destructors.
2019-02-01Document rescanblockchain returned stop_height being nullRussell Yanofsky
Suggested https://github.com/bitcoin/bitcoin/pull/14711#discussion_r252031485
2019-02-01travis: Save cache when compilation took very longMarcoFalke
2019-02-01Merge #15308: build: Restore compatibility with older boostMarcoFalke
119d360aab travis: Document whether functional tests are run in the job name (Ben Woosley) 64f28545e3 Revert "travis: Compile trusty with depends for now" (Ben Woosley) 267eac00f9 Prefer boost::optional#get_value_or over #value_or (Ben Woosley) 1971f5ba04 Piecewise construct to avoid invalid construction (Ben Woosley) Pull request description: In light of #14979, I realized that only qt 5.5+ was being tested under CI, while compatibility lists 5.2+. In #15276, Marco added Trusty to CI, building with depends. This changes that build to system libraries, in order to ensure ongoing compatibility with our claimed minimum required versions. Fixes #14983, previously open as #14998 Tree-SHA512: 6cff5e28c756ecb8bf797c8f6eb77c1944ba61a8dd6d7d4984e63eef384f6429dc79c505da3241c05b9c4db31c72b2a9846c7365aba9280f2e0620e5f3998d07
2019-02-01Add suggested rescanblockchain commentsRussell Yanofsky
From https://github.com/bitcoin/bitcoin/pull/14711#discussion_r252043990
2019-02-01Update ScanForWalletTransactions result commentRussell Yanofsky
Suggested https://github.com/bitcoin/bitcoin/pull/14711#discussion_r252038666