aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-05-24Merge #13246: doc: Bump to Ubuntu Bionic 18.04 in build-windows.mdWladimir J. van der Laan
9d4f9421a4898f75a4c49aaefaba2868de071d79 doc: Bump to Ubuntu Bionic 18.04 in build-windows.md (Chun Kuan Lee) Pull request description: Windows starts to provide Ubuntu 18.04 WSL, it can be downloaded from Microsoft Store. Tree-SHA512: a96ed03f36894ad867fd88631c1497eac7fc1cdaee8f59f36f34781df0b0f0b352a1bd8f09eba61002534fb7e0fe460006f223e37d61ad888197a36d17b43178
2018-05-24Fix FreeBSD build by including utilstrencodings.hWladimir J. van der Laan
`random.cpp` needs to explicitly include `utilstrencodings.h` to get `ARRAYLEN`. This fixes the FreeBSD build. This was broken in 84f41946b9026e8bf7bc44ed848dfb945394b693.
2018-05-23Merge #13151: net: Serve blocks directly from disk when possibleWladimir J. van der Laan
0bf431870e45d8e20c4671e51a782ebf97b75fac net: Serve blocks directly from disk when possible (Wladimir J. van der Laan) Pull request description: In `ProcessGetBlockData`, send the block data directly from disk if type MSG_WITNESS_BLOCK is requested. This is a valid shortcut as the on-disk format matches the network format. This is expected to increase performance because a deserialization and subsequent serialization roundtrip is avoided. Tree-SHA512: 9a9500b4c1354eaae1a6f1c6ef2416c1c1985029852589266f3a70e808f6c7482c135e9ab251a527566935378ab7c32dba4ed43ba5451e802d8e72b77d1ba472
2018-05-23Merge #13011: Cache witness hash in CTransactionWladimir J. van der Laan
fac1223a568fa1ad6dd602350598eed278d115e8 Cache witness hash in CTransaction (MarcoFalke) faab55fbb17f2ea5080bf02bc59eeef5ca746f07 Make CMutableTransaction constructor explicit (MarcoFalke) Pull request description: This speeds up: * compactblocks (v2) * ATMP * validation and miner (via `BlockWitnessMerkleRoot`) * sigcache (see also unrelated #13204) * rpc and rest (nice, but irrelevant) This presumably slows down rescan, which uses a `CTransaction` and its `GetHash`, but never uses the `GetWitnessHash`. The slow down is proportional to the number of witness transactions in the rescan window. I.e. early in the chain there should be no measurable slow down. Later in the chain, there should be a slow down, but acceptable given the speedups in the modules mentioned above. Tree-SHA512: 443e86acfcceb5af2163e68840c581d44159af3fd1fce266cab3504b29fcd74c50812b69a00d41582e7e1c5ea292f420ce5e892cdfab691da9c24ed1c44536c7
2018-05-23Merge #10757: RPC: Introduce getblockstats to plot thingsWladimir J. van der Laan
41d0476f62269027ec2193a5f80d508d789de8aa Tests: Add data file (Anthony Towns) 4cbfb6aad9ba8fa17b5e7ed3e9a36dc8a24f1fcf Tests: Test new getblockstats RPC (Jorge Timón) 35e77a0288bcac5594ff25c10c9679a161cb730b RPC: Introduce getblockstats (Jorge Timón) cda8e36f019dd181e5c3774961b4f1335e5602cb Refactor: RPC: Separate GetBlockChecked() from getblock() (Jorge Timón) Pull request description: It returns per block statistics about several things. It should be easy to add more if people think of other things to add or remove some if I went too far (but once written, why not keep it? EDIT: answer: not to test or maintain them). The currently available options are: minfee,maxfee,totalfee,minfeerate,maxfeerate,avgfee,avgfeerate,txs,ins,outs (EDIT: see updated list in the rpc call documentation) For the x axis, one can use height or block.nTime (I guess I could add mediantime if there's interest [EDIT: nobody showed interest but I implemented mediantime nonetheless, in fact there's no distinction between x or y axis anymore, that's for the caller to judge]). To calculate fees, -txindex is required. Tree-SHA512: 2b2787a3c7dc4a11df1fce62c8a4c748f5347d7f7104205d5f0962ffec1e0370c825b49fd4d58ce8ce86bf39d8453f698bcd46206eea505f077541ca7d59b18c
2018-05-23qa: Fix wallet_listreceivedby raceMarcoFalke
2018-05-22build: split warnings out of CXXFLAGSCory Fields
CXXFLAGS should not be modified anyway. Also, this will enable us to selectively disable warnings.
2018-05-22Tests: Add data fileAnthony Towns
2018-05-22Tests: Test new getblockstats RPCJorge Timón
Includes commit from Anthony Towns @ajtowns: Tests: Save and load block and corresponding expected statistics
2018-05-22RPC: Introduce getblockstatsJorge Timón
2018-05-22wallet: Use shared pointer to retain wallet instanceJoão Barbosa
2018-05-22Merge #13282: trivial: Mark overrides as such.MarcoFalke
60ebc7da4c trivial: Mark overrides as such. (Daniel Kraft) Pull request description: This trivial change adds the `override` keyword to some methods that override virtual base class / interface methods. This ensures that any future changes to the interface's method signatures which are not correctly mirrored in the subclasses will break at compile time with a clear error message, rather than at runtime. Tree-SHA512: cc1bfa5f03b5e29d20e3eab07b0b5fa2f77b47f79e08263dbff43e4f463e9dd8f4f537e2c8c9b6cb3663220dcf40cfd77723cd9fcbd623c9efc90a4cd44facfc
2018-05-22qa: Initialize lockstack to prevent null pointer derefMarcoFalke
2018-05-22docs: Update OpenBSD build instructions for OpenBSD 6.3practicalswift
2018-05-21Declare TorReply parsing functions in torcontrol_testsBen Woosley
Rather than including the implementation file into the test, which is bad practice.
2018-05-21Merge #13297: [wallet] Fix incorrect comment for DeriveNewSeed.MarcoFalke
be87c6f837 [wallet] Fix incorrect comment for DeriveNewSeed. (John Newbery) Pull request description: Fix incorrect comment not changed in #12924 Tree-SHA512: 16a90944e2827b18c63814bdc926041c3b1d749782c46f03690694798864de75f85ebec65cc365ad4cdb5d1e4b6dfeb052052613c7c4617746dae0f4af1b2dc4
2018-05-21[wallet] Fix incorrect comment for DeriveNewSeed.John Newbery
2018-05-21Merge #13254: Remove improper qt/moc_* cleaning glob from the general MakefileMarcoFalke
4138f42d24 Revert "Merge #12870: make clean removes src/qt/moc_ files" (Ben Woosley) Pull request description: As noted by theuni and Sjors in #12870, qt moc cleaning is handled by CLEAN_QT via QT_MOC_CPP in Makefile.qt.include. In my testing I configured, built and cleaned with qt4 and qt5 both, absent the associated wildcard, and no MOC files were left after clean. Propose we revert the change and reconsider if a specific file is identified, and in that case add that file to QT_MOC_CPP. This reverts commit 1d540046fe47eb7b6062c55ebebd801ece96231c, reversing changes made to ad960f5771dc251c8e1198dd8a82e18df4562171. Tree-SHA512: 5d5d07733b273e6d1f6cc6634e9bfab3d8ebbe2131ed9b80dafd73d22b4f99d13babf146023703d1cd6471d1d576305ba3ab6a75e6578c79f3caa3e76b407e7f
2018-05-21Merge #12924: Fix hdmaster-key / seed-key confusion (scripted diff)Jonas Schnelli
6249021d1 [docs] Add release notes for HD master key -> HD seed rename (John Newbery) 79053a5f2 [rpc] [wallet] Add 'hdmasterkeyid' alias return values. (John Newbery) c75c35141 [refactor] manually change remaining instances of master key to seed. (John Newbery) 131d4450b scripted-diff: Rename master key to seed (John Newbery) Pull request description: Addresses #12084 and #8684 This renames a couple of functions and members (no functional changes, expect log prints): - Rename CKey::SetMaster to CKey::SetSeed - Rename CHDChain::masterKeyId to CHDChain::seedID - Rename CHDChain::hdMasterKeyID to CHDChain::hdSeedID - Rename CWallet::GenerateNewHDMasterKey to CWallet::GenerateNewHDSeed - Rename CWallet::SetHDMasterKey to CWallet::SetHDSeed As well it introduces a tiny API change: - RPC API change: Rename "hdmasterkeyid" to "hdseedid", rename "hdmaster" in wallet-dump output to "hdseed" Fixes also a bug: - Bugfix: use "s" instead of the incorrect "m" for the seed-key hd-keypath key metadata Tree-SHA512: c913252636f213135a3b64df5de5d21844fb9c2d646567c1aad0ec65745188587de26119de99492c67e559bd49fdd9606b54276f00dddb84301785beba58f281
2018-05-20trivial: Mark overrides as such.Daniel Kraft
This trivial change adds the "override" keyword to some methods of subclasses meant to override interface methods. This ensures that any future change to the interface' method signatures which are not correctly mirrored in the subclass will break at compile time with a clear error message, rather than fail at runtime (which is harder to debug).
2018-05-20Increased max width of amount field to prevent number overflow bug.Brandon Ruggles
2018-05-19[docs] Add release notes for HD master key -> HD seed renameJohn Newbery
2018-05-19[rpc] [wallet] Add 'hdmasterkeyid' alias return values.John Newbery
Restores the return value in getwalletinfo() and getaddressinfo() RPC methods for backwards compatibility
2018-05-19[refactor] manually change remaining instances of master key to seed.John Newbery
2018-05-19scripted-diff: Rename master key to seedJohn Newbery
-BEGIN VERIFY SCRIPT- ren() { git grep -l "\<$1\>" 'src/*.cpp' 'src/*.h' test | xargs sed -i "s:\<$1\>:$2:g"; } ren GenerateNewHDMasterKey GenerateNewSeed ren DeriveNewMasterHDKey DeriveNewSeed ren SetHDMasterKey SetHDSeed ren hdMasterKeyID hd_seed_id ren masterKeyID seed_id ren SetMaster SetSeed ren hdmasterkeyid hdseedid ren hdmaster hdseed -END VERIFY SCRIPT-
2018-05-19Qt: use [default wallet] as name for wallet with no nameJonas Schnelli
2018-05-18Qt/Bugfix: fix handling default wallet with no nameJoão Barbosa
2018-05-18Merge #13228: Add script to detect circular dependencies between source modulesMarcoFalke
a7b295e91e Add circular dependencies script (Pieter Wuille) Pull request description: This script finds dependencies between source code modules, treating the `.cpp` and `.h` file as one unit (so it will detect `A.cpp` depending on `B.h` where `B.cpp` depends on `A.h`). This can be used to find out which modules cannot be used independently from each other. It is very simplistic at this point, and assumes that a `.cpp` file's corresponding header has the exact same name, with `.cpp` replaced by `.h`. Furthermore, it assumes all `#include`s are relative to the `src/` directory. This is not a linter, and is not enforced through Travis or otherwise. This is the current output: ``` $ ../contrib/devtools/circular-dependencies.py {*,*/*,*/*/*}.{h,cpp} Circular dependency: chain -> pow -> chain Circular dependency: chainparamsbase -> util -> chainparamsbase Circular dependency: checkpoints -> validation -> checkpoints Circular dependency: init -> index/txindex -> init Circular dependency: init -> validation -> init Circular dependency: init -> net_processing -> init Circular dependency: init -> rpc/server -> init Circular dependency: init -> txdb -> init Circular dependency: init -> validationinterface -> init Circular dependency: random -> util -> random Circular dependency: sync -> util -> sync Circular dependency: txmempool -> validation -> txmempool Circular dependency: txmempool -> policy/fees -> txmempool Circular dependency: validation -> index/txindex -> validation Circular dependency: validation -> policy/policy -> validation Circular dependency: validation -> validationinterface -> validation Circular dependency: qt/addresstablemodel -> qt/walletmodel -> qt/addresstablemodel Circular dependency: qt/bantablemodel -> qt/clientmodel -> qt/bantablemodel Circular dependency: qt/bitcoingui -> qt/walletview -> qt/bitcoingui Circular dependency: qt/bitcoingui -> qt/walletframe -> qt/bitcoingui Circular dependency: qt/bitcoingui -> qt/utilitydialog -> qt/bitcoingui Circular dependency: qt/clientmodel -> qt/peertablemodel -> qt/clientmodel Circular dependency: qt/paymentserver -> qt/walletmodel -> qt/paymentserver Circular dependency: qt/recentrequeststablemodel -> qt/walletmodel -> qt/recentrequeststablemodel Circular dependency: qt/sendcoinsdialog -> qt/walletmodel -> qt/sendcoinsdialog Circular dependency: qt/transactiontablemodel -> qt/walletmodel -> qt/transactiontablemodel Circular dependency: qt/walletmodel -> qt/walletmodeltransaction -> qt/walletmodel Circular dependency: rpc/rawtransaction -> wallet/rpcwallet -> rpc/rawtransaction Circular dependency: wallet/coincontrol -> wallet/wallet -> wallet/coincontrol Circular dependency: wallet/fees -> wallet/wallet -> wallet/fees Circular dependency: wallet/rpcwallet -> wallet/wallet -> wallet/rpcwallet Circular dependency: wallet/walletdb -> wallet/wallet -> wallet/walletdb Circular dependency: txmempool -> validation -> policy/rbf -> txmempool Circular dependency: txmempool -> validation -> validationinterface -> txmempool Circular dependency: qt/addressbookpage -> qt/bitcoingui -> qt/walletview -> qt/addressbookpage Circular dependency: qt/guiutil -> qt/walletmodel -> qt/optionsmodel -> qt/guiutil Circular dependency: qt/addressbookpage -> qt/bitcoingui -> qt/walletview -> qt/signverifymessagedialog -> qt/addressbookpage Circular dependency: qt/addressbookpage -> qt/bitcoingui -> qt/walletview -> qt/receivecoinsdialog -> qt/addressbookpage Circular dependency: qt/guiutil -> qt/walletmodel -> qt/optionsmodel -> qt/intro -> qt/guiutil Circular dependency: qt/addressbookpage -> qt/bitcoingui -> qt/walletview -> qt/sendcoinsdialog -> qt/sendcoinsentry -> qt/addressbookpage ``` Tree-SHA512: 29bc985b7a41699f4666b0aaa785ca63c2145e84c37458536f4dcf8e3de8f1312cf0323fe09cb8f348a9d363583f76eac2d5bee574bc6a9f9cc97a9b0aad406f
2018-05-18Merge #13176: Improve CRollingBloomFilter performance: replace modulus with ↵Wladimir J. van der Laan
FastMod 9aac9f90d5e56752cc6cbfac48063ad29a01143c replace modulus with FastMod (Martin Ankerl) Pull request description: Not sure if this is optimization is necessary, but anyway I have some spare time so here it is. This replaces the slow modulo operation with a much faster 64bit multiplication & shift. This works when the hash is uniformly distributed between 0 and 2^32-1. This speeds up the benchmark by a factor of about 1.3: ``` RollingBloom, 5, 1500000, 3.73733, 4.97569e-07, 4.99002e-07, 4.98372e-07 # before RollingBloom, 5, 1500000, 2.86842, 3.81630e-07, 3.83730e-07, 3.82473e-07 # FastMod ``` Be aware that this changes the internal data of the filter, so this should probably not be used for CBloomFilter because of interoperability problems. Tree-SHA512: 04104f3fb09f56c9d14458a6aad919aeb0a5af944e8ee6a31f00e93c753e22004648c1cd65bf36752b6addec528d19fb665c27b955ce1666a85a928e17afa47a
2018-05-18Merge #13265: wallet: Exit SyncMetaData if there are no transactions to syncWladimir J. van der Laan
b0d2ca9fb66d793e3c0f2e6ede811f1b16c33a9f wallet: Exit SyncMetaData if there are no transactions to sync (Wladimir J. van der Laan) Pull request description: Instead of crash with an assertion error, simply exit the function `SyncMetaData` if there is no metadata to sync. Fixes #13110. Tree-SHA512: 44c4789497b5b63963bef66d8b695987dde80764199f6ea0f2c974be19d29c2663f32446a663a2ee9029e143e5d1d9e8a591e52e6e7e795b982782626bec25bb
2018-05-18Merge #13097: ui: Support wallets loaded dynamicallyJonas Schnelli
2e7513471 fixup! ui: Support wallets loaded dynamically (João Barbosa) 0e674ba55 ui: Support wallets loaded dynamically (João Barbosa) 1c8fe0bf9 ui: Remove unnecessary variable fFirstWallet (João Barbosa) Pull request description: Add support in the UI for wallets loaded dynamically. Tree-SHA512: 4016d61580b31e28c49861b1cb0e77fac5417f9676a6ce6156be28cb6059fdf3d3dd4d57dbbc22a574ad428c2a4a3702aedca596a84e644ce148e1084feb29c9
2018-05-18Merge #13264: [qt] Satoshi unitJonas Schnelli
c722f00a7 [qt] Added satoshi unit "Satoshi (sat)" will be displayed in dropdowns and status bars. "sat" will be used when appended to numbers. (GreatSock) 4ddbcbf8c [qt] BitcoinUnits::format with zero decimals Formatting with zero decimals will now result in 123 instead of 123.0 (GreatSock) Pull request description: This adds satoshi as an additional amount unit for the GUI. Tree-SHA512: c166c96c9a434b6ac700e1628e54f2dbb132c5232d949c0b464f61276a91d56f9bab4a62d50780535f1d34eaac6484f693a1e0611cd7c9d1ed5ebee066c0dd08
2018-05-18fixup! ui: Support wallets loaded dynamicallyJoão Barbosa
2018-05-17wallet: Exit SyncMetaData if there are no transactions to syncWladimir J. van der Laan
Instead of crash with an assertion error, simply exit the function `SyncMetaData` if there is no metadata to sync. Fixes #13110.
2018-05-17Merge #13236: break circular dependency: random/sync -> util -> random/syncMarcoFalke
84f41946b9 break circular dependency: random/sync -> util -> random/sync (Chun Kuan Lee) Pull request description: LogPrintf has acutally been moved to logging.h Tree-SHA512: a7135f5fea421e62f010f2e434873bd1c1738f115453377dada7d24900b3b095535d8aa0462c3acffdacf2f4e819e05ad39b13f2de5a36ac8f7b8467c639a0db
2018-05-17Merge #13251: GUI: Rephrase Bech32 checkbox texts, and enable it with legacy ↵MarcoFalke
address default 82dda6bed9 GUI: Allow generating Bech32 addresses with a legacy-address default (Luke Dashjr) 7ab1c6f6a7 GUI: Rephrase Bech32 checkbox text/tooltip (Luke Dashjr) Pull request description: - "Bech32" isn't very user-friendly; used "native segwit" as in #11937. - You don't spend from addresses. - No reason to block off Bech32 access with legacy address default. Rebased from #12208 Tree-SHA512: c82dd20d967a7f47bcc75b25be0d3a8cf00cfccc1cd14916b87d70b9c56fd53e366b456348b173f36c89b145b76624413780abaed4cea82117a9ecd47dd8fb99
2018-05-17[qt] Added satoshi unitGreatSock
"Satoshi (sat)" will be displayed in dropdowns and status bars. "sat" will be used when appended to numbers.
2018-05-17[qt] BitcoinUnits::format with zero decimalsGreatSock
Formatting with zero decimals will now result in 123 instead of 123.0
2018-05-17doc: Bump to Ubuntu Bionic 18.04 in build-windows.mdChun Kuan Lee
Windows starts to provide Ubuntu 18.04 WSL, it can be downloaded from Microsoft Store.
2018-05-17break circular dependency: random/sync -> util -> random/syncChun Kuan Lee
2018-05-16Wallet: Refactor ReserveKeyFromKeyPool for safetyBen Woosley
ReserveKeyFromKeyPool's previous behaviour is to set nIndex to -1 if the keypool is empty, OR throw an exception for technical failures. Instead, we now return false if the keypool is empty, true if the operation succeeded. This is to make failure more easily detectable by calling code.
2018-05-16Revert "Merge #12870: make clean removes src/qt/moc_ files"Ben Woosley
As noted by theuni and Sjors in #12870, qt moc cleaning is handled by CLEAN_QT via QT_MOC_CPP in Makefile.qt.include. In my testing I configured, built and cleaned with qt4 and qt5 both, absent the associated wildcard, and no MOC files were left after clean. Propose we revert the change and reconsider if a specific file is identified, then add that file to QT_MOC_CPP. This reverts commit 1d540046fe47eb7b6062c55ebebd801ece96231c, reversing changes made to ad960f5771dc251c8e1198dd8a82e18df4562171.
2018-05-17GUI: Allow generating Bech32 addresses with a legacy-address defaultLuke Dashjr
2018-05-17GUI: Rephrase Bech32 checkbox text/tooltipLuke Dashjr
- "Bech32" isn't very user-friendly - You don't spend from addresses
2018-05-16Add circular dependencies scriptPieter Wuille
2018-05-16ui: Support wallets loaded dynamicallyJoão Barbosa
2018-05-16ui: Remove unnecessary variable fFirstWalletJoão Barbosa
2018-05-16Merge #10740: [wallet] `loadwallet` RPC - load wallet at runtimeWladimir J. van der Laan
cd53981 [docs] Add release notes for `loadwallet` RPC. (John Newbery) a46aeb6 [wallet] [tests] Test loadwallet (John Newbery) 5d15260 [wallet] [rpc] Add loadwallet RPC (John Newbery) 876eb64 [wallet] Pass error message back from CWallet::Verify() (John Newbery) e0e90db [wallet] Add CWallet::Verify function (John Newbery) 470316c [wallet] setup wallet background flushing in WalletInit directly (John Newbery) 59b87a2 [wallet] Fix potential memory leak in CreateWalletFromFile (John Newbery) Pull request description: Adds a `loadwallet` RPCs. This allows wallets to be loaded dynamically during runtime without having to stop-start the node with new `-wallet` params. Includes functional tests and release notes. Limitations: - currently this functionality is only available through the RPC interface. - wallets loaded in this way will not be displayed in the GUI. Tree-SHA512: f80dfe32b77f5c97ea3732ac538de7d6ed7e7cd0413c2ec91096bb652ad9bccf05d847ddbe81e7cd3cd44eb8030a51a5f00083871228b1b9b0b8398994f6f9f1
2018-05-16Merge #13023: Fix some concurrency issues in ActivateBestChain()Wladimir J. van der Laan
dd435ad Add unit tests for signals generated by ProcessNewBlock() (Jesse Cohen) a3ae8e6 Fix concurrency-related bugs in ActivateBestChain (Jesse Cohen) ecc3c4a Do not unlock cs_main in ABC unless we've actually made progress. (Matt Corallo) Pull request description: Originally this PR was just to add tests around concurrency in block validation - those tests seem to have uncovered another bug in ActivateBestChain - this now fixes that bug and adds tests. ActivateBestChain (invoked after a new block is validated) proceeds in steps - acquiring and releasing cs_main while incrementally disconnecting and connecting blocks to sync to the most work chain known (FindMostWorkChain()). Every time cs_main is released the result of FindMostWorkChain() can change - but currently that value is cached across acquisitions of cs_main and only refreshed when an invalid chain is explored. It needs to be refreshed every time cs_main is reacquired. The test added in https://github.com/bitcoin/bitcoin/pull/13023/commits/6094ce73045fe0b4654ff94327c2059512af88fb will occasionally fail without the commit fixing this issue https://github.com/bitcoin/bitcoin/pull/13023/commits/26bfdbaddbb9f13864deb7241c6d513f22c5ab62 Original description below -- After a bug discovered where UpdatedBlockTip() notifications could be triggered out of order (#12978), these unit tests check certain invariants about these signals. The scheduler test asserts that a SingleThreadedSchedulerClient processes callbacks fully and sequentially. The block validation test generates a random chain and calls ProcessNewBlock from multiple threads at random and in parallel. ValidationInterface callbacks verify that the ordering of BlockConnected BlockDisconnected and UpdatedBlockTip events occur as expected. Tree-SHA512: 4102423a03d2ea28580c7a70add8a6bdb22ef9e33b107c3aadef80d5af02644cdfaae516c44933924717599c81701e0b96fbf9cf38696e9e41372401a5ee1f3c
2018-05-16[docs] Add release notes for `loadwallet` RPC.John Newbery