aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-07-24scripted-diff: Make translation bilingualHennadii Stepanov
-BEGIN VERIFY SCRIPT- sed -i 's/inline std::string _(const char\* psz)/inline bilingual_str _(const char\* psz)/' src/util/translation.h sed -i 's/return G_TRANSLATION_FUN ? (G_TRANSLATION_FUN)(psz) : psz;/return bilingual_str{psz, G_TRANSLATION_FUN ? (G_TRANSLATION_FUN)(psz) : psz};/' src/util/translation.h sed -i 's/\b_("\([^"]\|\\"\)*")/&.translated/g' $(git grep --files-with-matches '\b_("' src) echo Hard cases - multiline strings. sed -i 's/"Visit %s for further information about the software.")/&.translated/g' src/init.cpp sed -i "s/\"Only rebuild the block database if you are sure that your computer's date and time are correct\")/&.translated/g" src/init.cpp sed -i 's/" restore from a backup.")/&.translated/g' src/wallet/db.cpp sed -i 's/" or address book entries might be missing or incorrect.")/&.translated/g' src/wallet/wallet.cpp echo Special case. sed -i 's/_(COPYRIGHT_HOLDERS)/&.translated/' src/util/system.cpp test/lint/lint-format-strings.py -END VERIFY SCRIPT-
2019-07-24Add bilingual message typeHennadii Stepanov
2019-07-24Refactor out translation.hHennadii Stepanov
This is a prerequisite for introducing bilingual error messages. Note: #includes are arranged by clang-format-diff.py script.
2019-07-24Merge #16445: test: Skip flaky p2p_invalid_messages test on macOSMarcoFalke
c3dfc9103260935261eaf6cfbacf0623003f116d test: Skip flaky p2p_invalid_messages test on macOS (Fabian Jahr) Pull request description: This mitigates https://github.com/bitcoin/bitcoin/issues/15400 I had a look into the issue today and this seems to be the best we can do given that the root causes some unexpected custom error code from the macOS kernel that python/asyncio doesn't know how to handle properly yet. Top commit has no ACKs. Tree-SHA512: 20a0551d45c405b6eb0ae58190b701c7026c52eff6c434bc678f723a4dabf0074e5b52a8bb3d51ee7132dc29419d1e67a24696761c444c62cd4d429ec768e67d
2019-07-23Merge #16366: init: Use InitError for all errors in bitcoind/qtMarcoFalke
fa6f402bde146f92ed131e0c9c8e15a55e723307 Call node->initError instead of InitError from GUI code (Russell Yanofsky) fad2502240a1c440ef03ac3f880475702e418275 init: Use InitError for all errors in bitcoind/qt (MarcoFalke) Pull request description: Using the same InitError for startup error in the daemon and the gui makes it possible to run the tests with the gui again: ```sh BITCOIND=bitcoin-qt ./test/functional/test_runner.py feature_includeconf feature_config_args ACKs for top commit: hebasto: ACK fa6f402bde146f92ed131e0c9c8e15a55e723307 ryanofsky: utACK fa6f402bde146f92ed131e0c9c8e15a55e723307. Only changes since last review are removing more includes and adding Node::initError method to avoid accessing node `InitError` function and global variables from GUI code. Tree-SHA512: bd19e08dcea4019dfe40356bc5c63cb583cefed54b6c9dcfb82f1b5b00308d8e2b363549afcaea5e93bf83864dbe0917400c3b70f43a8a5bdff45c9cd34cc294
2019-07-23test: Skip flaky p2p_invalid_messages test on macOSFabian Jahr
2019-07-23Merge #16408: depends: Prune X packagesfanquake
0c55d8b58186ba69fffc147cd02b174450dac578 depends: qt: Patch to remove dep on libX11 (Carl Dong) 222e6cc52075cf6f866ce4a2e5900f0d6358f903 gitignore: Actually pay attention to depends patches (Carl Dong) 65f8da08df601ac98bad6f638392343fd564c0b9 symbol-check: Disallow libX11-*.so.* shared libraries (Carl Dong) 924569914e6079763fd1692bed372ded2c63d685 depends: libXext isn't needed by anyone (Carl Dong) 689d3b4a030675b6de87a55463a8e155843293fb build-aux: Remove check for x11-xcb (Carl Dong) aa53cb7a2f04a59a4722c662e67b7a6ec04e32b5 depends: libX11: Make package headers-only (Carl Dong) 9a01ab04e1125b37618266d7fd1c3a6e3bb7e3f8 depends: qt: Explicitly stop using Xlib/libX11 (Carl Dong) 1ec30b8fbe4a162d6e2e6a9711d83f1bafd9b645 depends: xproto is only directly needed by libXau (Carl Dong) Pull request description: Related to: #16150 We noticed that we could build QT without using XLib/libX11 as a library. XLib/libX11's headers are still used, and a minimal `configure.ac` has been added to eliminate overly-enthusiastic configure-time dependencies that aren't actually required to obtain the headers. This also means that we eliminate XLib/libX11 as required shared libraries at runtime, which is desirable. See commit messages for more details. --- Reviewers: I am least sure about the minimal `configure.ac`, as I'm not too familiar with the autoconf syntax. Any improvements w/re robustness would be welcome. ACKs for top commit: theuni: ACK 0c55d8b58186ba69fffc147cd02b174450dac578 fanquake: ACK 0c55d8b58186ba69fffc147cd02b174450dac578 Tree-SHA512: 41f653a0f91bc0e0faac49713c0c6dfd8cb605f9c4e34eb75a790dd808ebf3e5c160f1dd40bc8fbc911ee718ea319313b526d63733c98ff62d8dffecb58caa01
2019-07-23Merge #16355: refactor: move CCoinsViewErrorCatcher out of init.cppfanquake
4f050b91c706181084b9288b8a87b7b637e4e4f7 move-onlyish: move CCoinsViewErrorCatcher out of init.cpp (James O'Beirne) Pull request description: This is part of the [assumeutxo project](https://github.com/bitcoin/bitcoin/projects/11): Parent PR: #15606 Issue: #15605 Specification: https://github.com/jamesob/assumeutxo-docs/tree/2019-04-proposal/proposal --- This change moves `CCoinsViewErrorCatcher` out of `init` and into `coins` so that it can later be included in [a `CoinsView` instance](https://github.com/bitcoin/bitcoin/pull/15606/commits/91284964ef34b90ee6c626137973d2c15e7b25da#diff-349fbb003d5ae550a2e8fa658e475880R504) under `CChainState`. Instead of hardcoding read failure behavior that has knowledge of qt, it accepts error callbacks via `AddReadErrCallback()`. ACKs for top commit: dongcarl: re-ACK 4f050b91c706181084b9288b8a87b7b637e4e4f7 ryanofsky: utACK 4f050b91c706181084b9288b8a87b7b637e4e4f7. Only change since last review is fixing const. Tree-SHA512: eaba21606d15d2b8d0e3db7cec57779ce181af953db1ef4af80a0bc1dfb57923d0befde9d61b7be55c32224744f7fb6bd47d4e4c72f3ccfe6eaf0f4ae3765c17
2019-07-23Merge #16430: doc: Update bips 35, 37 and 111 statusfanquake
fa56b21c744577eb5d2085fd6104cbc3dc62d677 doc: Update bips 35, 37 and 111 status (MarcoFalke) Pull request description: Follow-up to * #16152: Disable bloom filtering by default ACKs for top commit: laanwj: ACK fa56b21c744577eb5d2085fd6104cbc3dc62d677, thanks for keeping this file up to date fanquake: ACK fa56b21c744577eb5d2085fd6104cbc3dc62d677 Tree-SHA512: 50c17067abbba096e8604b8abccbd0474ecc2dca973935751720c79a023a2d517bb025bb6c36d4fb0d29b7338322af7ae1c0d5a9aaf2712000d9d336c898c204
2019-07-22Merge #16438: travis: Print memory and number of cpusMarcoFalke
fa4010e1129f2a4f3348f7a02896021df9270ee0 travis: Print memory and number of cpus (MarcoFalke) Pull request description: For some reason it shows a different value than the one they advertise. This might be related to the flood of sanitizer warnings we see. https://docs.travis-ci.com/user/reference/overview/#virtualisation-environment-vs-operating-system Top commit has no ACKs. Tree-SHA512: 285bdf6e7fe29990b980acf64ca658f4319d17c770f45cfd4339244e6b7ec11b7a39b9c4a54e71415c32fef08ee5da75ab7171861905494d633631779480c146
2019-07-22travis: Print memory and number of cpusMarcoFalke
2019-07-21move-onlyish: move CCoinsViewErrorCatcher out of init.cppJames O'Beirne
and into coins.cpp. This move is necessary so that we can later include a CCoinsViewErrorCatcher instance under CChainState. Co-authored-by: MarcoFalke <falke.marco@gmail.com>
2019-07-21doc: Update bips 35, 37 and 111 statusMarcoFalke
2019-07-19Merge #15681: [mempool] Allow one extra single-ancestor transaction per packageWladimir J. van der Laan
50cede3f5a4d4fbfbb7c420b94e661a6a159bced [mempool] Allow one extra single-ancestor transaction per package (Matt Corallo) Pull request description: This implements the proposed policy change from [1], which allows certain classes of contract protocols involving revocation punishments to use CPFP. Note that some such use-cases may still want some form of one-deep package relay, though even this alone may greatly simplify some lightning fee negotiation. [1] https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2018-November/016518.html ACKs for top commit: ajtowns: ACK 50cede3f5a4d4fbfbb7c420b94e661a6a159bced -- looked over code again, compared with previous commit, compiles, etc. sdaftuar: ACK 50cede3f5a4d4fbfbb7c420b94e661a6a159bced ryanofsky: utACK 50cede3f5a4d4fbfbb7c420b94e661a6a159bced. Changes since last review: adding EXTRA_DESCENDANT_TX_SIZE_LIMIT constant, changing max ancestor size from 1,000,000 to nLimitAncestorSize constant (101,000), fixing test comment and getting rid of unused test node. Tree-SHA512: b052c2a0f384855572b4579310131897b612201214b5abbb225167224e4f550049e300b471dbf320928652571e92ca2d650050b7cf39ac92b3bc1d2bcd386c1c
2019-07-19Merge #16412: net: Make poll in InterruptibleRecv only filter for POLLIN events.Wladimir J. van der Laan
a52818cc5633494992da7d1dc8fdb04b4a1b7c29 net: Make poll in InterruptibleRecv only filter for POLLIN events. poll should block until there is data to be read or the timeout expires. (tecnovert) Pull request description: poll should block until there is data to be read or the timeout expires. Filtering for the POLLOUT event causes poll to return immediately which leads to high CPU usage when trying to connect to non-responding peers through tor. When USE_POLL is not defined select is used with the writefds parameter set to nullptr. Removing POLLOUT causes the behavior of poll to match that of select. Fixes: #16004. ACKs for top commit: laanwj: code review ACK a52818cc5633494992da7d1dc8fdb04b4a1b7c29 jonasschnelli: utACK a52818cc5633494992da7d1dc8fdb04b4a1b7c29 Tree-SHA512: 69934cc14e3327c7ff7f6c5942af8761e865220b2540d74ea1e176adad326307a73860417dddfd32d601b5c0e9e2ada1848bd7e3d27b0b7a9b42f11129af8eb1
2019-07-19Merge #16422: test: remove redundant setup in addrman_testsMarcoFalke
5c3c24cf9eab7bf19a9201599e93955cace5c154 test: remove redundant setup in addrman_tests (zenosage) Pull request description: #10765 make this default behavior. No reason to keep these line. Top commit has no ACKs. Tree-SHA512: 545eea9c2d0741a75708f288f2c8752534ecaa6d54a9d014ef9afa295b0d075007704b64809eec090023703f47753e8ec755d22c9ccecf57b75f6898f6b708dd
2019-07-19Merge #16152: Disable bloom filtering by default.fanquake
bead32e31e399090af30b2ee3539995d4105a66d Add release notes for DEFAULT_BLOOM change (Matt Corallo) f27309f55c4fa2b115525d72abb280757a568709 Move DEFAULT_PEERBLOOMFILTERS from validation.h to net_processing.h (Matt Corallo) 5efcb772838e404ca5757818d5548efcb872724b Disable bloom filtering by default. (Matt Corallo) Pull request description: BIP 37 bloom filters have been well-known to be a significant DoS target for some time. However, in order to provide continuity for SPV clients relying on it, the NODE_BLOOM service flag was added, and left as a default, to ensure sufficient nodes exist with such a flag. NODE_BLOOM is, at this point, well-established and, as long as there exist 0.18 nodes with default config (which I'd anticipate will be true for many years), will be available from some peers. By that time, the continued slowdown of BIP 37-based filtering will likely have rendered it useless (though this is already largely the case). Further, BIP 37 was deliberately never updated to support witness-based filtering as newer wallets are expected to migrate to some yet-to-be-network-exposed filters. ACKs for top commit: jnewbery: ACK bead32e31e399090af30b2ee3539995d4105a66d kallewoof: ACK bead32e31e399090af30b2ee3539995d4105a66d Tree-SHA512: ecd901898e8efe1a7c82b471af0acc2373c2282ac633eb58d9aae7c35deda1999d0f79fb0485e6cecbda7246aeda00206cd82c7fa36866e2ac64705ba93f9390
2019-07-19Merge #16420: QA: Fix race condition in wallet_encryption testfanquake
024ecd7e01d436ad7de608e571a20c7284b3951b QA: Fix race condition in wallet_encryption test (Jonas Schnelli) Pull request description: There is some imprecision probably in the internal HTTPRPCTimer class (haven't exactly figured out where). But we can't expect that waiting excatly 2 seconds right after calling `walletpassphrase(2)` will result in a locked wallet due to the nature how we internally handle threads/timers. The wallet_encryption test fails regularely in CIs. Here is a logged session: ```shell  node0 2019-07-18T18:51:22.569739Z [] ThreadRPCServer method=walletpassphrase user=__cookie__   node0 2019-07-18T18:51:22.628656Z [] queue run of timer lockwallet() in 2 seconds (using HTTP)   node0 2019-07-18T18:51:22.629002Z [] Received a POST request for / from 127.0.0.1:46898   node0 2019-07-18T18:51:22.629081Z [] ThreadRPCServer method=dumpprivkey user=__cookie__   node0 2019-07-18T18:51:24.445620Z [] Flushing wallet.dat   node0 2019-07-18T18:51:24.451421Z [] Flushed wallet.dat 6ms   node0 2019-07-18T18:51:24.631703Z [] Received a POST request for / from 127.0.0.1:46898   node0 2019-07-18T18:51:24.631737Z [] ThreadRPCServer method=dumpprivkey user=__cookie__   test 2019-07-18T18:51:24.632000Z TestFramework (ERROR): Assertion failed   Traceback (most recent call last):  File "/home/ubuntu/src/test/functional/test_framework/test_framework.py", line 193, in main  self.run_test()  File "/home/ubuntu/src/test/functional/wallet_encryption.py", line 53, in run_test  assert_raises_rpc_error(-13, "Please enter the wallet passphrase with walletpassphrase first", self.nodes[0].dumpprivkey, address) ``` ACKs for top commit: promag: ACK 024ecd7e01d436ad7de608e571a20c7284b3951b, simple fix, one second shouldn't hurt. MarcoFalke: ACK 024ecd7e01d436ad7de608e571a20c7284b3951b fanquake: ACK 024ecd7e01d436ad7de608e571a20c7284b3951b Tree-SHA512: 0cda1b8969b084bb765d2b35e90a8611c565ee458a7be1f2dde675f8ddbd9b9e421514547a7683f836e2c996e0538eb66b8c5b935b5a81e9319fb2be27624374
2019-07-18test: remove redundant setup in addrman_testszenosage
2019-07-18depends: qt: Patch to remove dep on libX11Carl Dong
We can actually patch QT to remove its dependency on libX11's headers. It turns it this wasn't that hard.
2019-07-18gitignore: Actually pay attention to depends patchesCarl Dong
There was a previous attempt to achieve this, and it was bad. This works.
2019-07-18Add release notes for DEFAULT_BLOOM changeMatt Corallo
2019-07-18QA: Fix race condition in wallet_encryption testJonas Schnelli
2019-07-18Merge #16379: Fix autostart filenames on Linux for testnet/regtestWladimir J. van der Laan
ae311bc036e9461187f5396751d2e63a71248715 Fix autostart filenames on Linux (Hennadii Stepanov) Pull request description: Currently, on master the `bitcoin-test.lnk` and `bitcoin-regtest.lnk` files do not work as autostart application `.desktop` files. This PR fixes it. Refs: - #7045 - [Autostart Of Applications During Startup](https://standards.freedesktop.org/autostart-spec/autostart-spec-latest.html) ACKs for top commit: promag: utACK ae311bc, weird why extension `.lnk` was used in #7045. laanwj: Code review ACK ae311bc036e9461187f5396751d2e63a71248715 Tree-SHA512: 210cc346600d52b0a262c81ed5f258365a3cea2e5522f4b5f4798fd3b54f45ed82aba68eefae59a6b6f1d8e4d00221476c23bdffc038f16f2f45c1acc837f522
2019-07-18Merge #16405: fix: tor: Call event_base_loopbreak from the event's callbackWladimir J. van der Laan
a981e749e6553487cd48eda28e590f769e81c85c fix: tor: Call event_base_loopbreak from the event's callback (João Barbosa) Pull request description: Calling `event_base_loopbreak` before `event_base_dispatch` has no effect. Fix this by calling `event_base_loopbreak` from the event's callback. From the [documentation](http://www.wangafu.net/~nickm/libevent-2.0/doxygen/html/event_8h.html#a07a7599e478e4031fa8cf52e26d8aa1e): > event_base_loop() will abort the loop after the next event is completed; event_base_loopbreak() is typically invoked from this event's callback. This behavior is analogous to the "break;" statement. This can be tested by running the following with and without this change: ```sh bitcoind -- -regtest -proxy=127.0.0.1:9050 -listen=1 -bind=127.0.0.1 -whitebind=127.0.0.1:0 ``` Fixes #16376. ACKs for top commit: laanwj: code review ACK a981e749e6553487cd48eda28e590f769e81c85c fanquake: ACK a981e749e6553487cd48eda28e590f769e81c85c Tree-SHA512: 328fe71366404d5be8177d7081d5b4868cee73412df631a1865d24fb1c153427210762738109e06b737f037f4c68966812fba041831bb9e8129861f19ce61a63
2019-07-18net: Make poll in InterruptibleRecv only filter for POLLIN events.tecnovert
poll should block until there is data to be read or the timeout expires. Filtering for the POLLOUT event causes poll to return immediately which leads to high CPU usage when trying to connect to non-responding peers through tor. Removing POLLOUT matches how select is used when USE_POLL isn't defined.
2019-07-18Merge #16374: test: Enable passing wildcard test names to test runner from rootfanquake
e142ee03e7a139168aa1dbf5910c616f60d25042 doc: describe how to pass wildcard names to test runner (Jon Atack) 6a7a70b8cf05a82737c72020fd2b0eebc97cb5e4 test: enable passing wildcards with path to test runner (Jon Atack) Pull request description: Currently, passing wildcard testname args to the test runner from outside the test/functional/ directory does not work, even though developers expect it to. See these recent IRC discussions for more background: http://www.erisian.com.au/bitcoin-core-dev/log-2019-07-10.html#l-262 (lines 262 to 323) and http://www.erisian.com.au/bitcoin-core-dev/log-2019-07-11.html#l-134. 1. [BUGFIX] Enable passing wildcards with paths. Examples: - `test/functional/test_runner.py test/functional/wallet*` - `functional/test_runner.py functional/wallet*` - `test/functional/test_runner.py ./test/functional/tool* test/functional/mempool*` - A current limitation this PR does not change: 9 test files with arguments in their filename are not picked up by wildcard search. 2. [Docs] Describe how to pass wildcard names (multiple and with paths) to the test runner in test/README.md. ACKs for top commit: jnewbery: tested ACK e142ee03e7a139168aa1dbf5910c616f60d25042 jachiang: Tested ACK https://github.com/bitcoin/bitcoin/commit/e142ee03e7a139168aa1dbf5910c616f60d25042. Thanks a lot for this fix! MarcoFalke: ACK e142ee03e7a139168aa1dbf5910c616f60d25042, fine with me Tree-SHA512: cb3d994880cdc9b8918546b573a25faa5b4c7339826ac7cfe20f076aac6e731a34271609c0cf5a7ee5e4a2d5ae205298319d24bf36ef5b5d569a1a0c57883e54
2019-07-17symbol-check: Disallow libX11-*.so.* shared librariesCarl Dong
They should no longer be needed as we build QT without libX11/XLib libraries now.
2019-07-17depends: libXext isn't needed by anyoneCarl Dong
libXext was only needed (as a library) by QT when it was using XLib/libX11 (as a library), now that we're building QT without XLib/libX11, we can safely remove libXext.
2019-07-17build-aux: Remove check for x11-xcbCarl Dong
We're no longer building QT with libX11/XLib, so it doesn't make sense to check for the x11-xcb package.
2019-07-17depends: libX11: Make package headers-onlyCarl Dong
We're no longer building QT with libX11/XLib, however, libX11/XLib headers are still required for parts of QT. In this commit we add a minimal configure.ac for libX11/XLib that is headers-only. This change allows us to remove all of libX11/XLib's dependencies.
2019-07-17depends: qt: Explicitly stop using Xlib/libX11Carl Dong
Previously, in 683b7d7a3fc1b9240333faf3d04497aa61583016 and 0e752637a26cf75187864a466db9a92540a2d3c8, we accidentally broke QT's ability to pick up Xlib thru the config.gui.tests.xlib configuration test, which also means that config.gui.libraries.xcb_xlib wasn't run. This resulted in a QT build that was implicitly -no-xcb-lib and -no-feature-xlib. This is actually a desired behaviour, as it means less required shared objects for our final bitcoin-qt binary. Specifically, it eliminated the libX11-xcb.so.1 and libX11.so.6 requirements. In this commit, we explicitly build without Xlib. We should continue to track upstream ticket https://bugreports.qt.io/browse/QTBUG-61452 which talks about adding a -no-xlib (non-hidden) flag instead of the -no-feature-xlib (hidden) flag.
2019-07-17depends: xproto is only directly needed by libXauCarl Dong
2019-07-17fix: tor: Call event_base_loopbreak from the event's callbackJoão Barbosa
2019-07-17Merge #16208: wallet: Consume ReserveDestination on successful CreateTransactionMeshCollider
e10e1e8db043e9b7c113e07faf408f337c1b732d Restrict lifetime of ReserveDestination to CWallet::CreateTransaction (Gregory Sanders) d9ff862f2d24784ee081a8f62a76ffdfe409c10a CreateTransaction calls KeepDestination on ReserveDestination before success (Gregory Sanders) Pull request description: The typical usage pattern of `ReserveDestination` is to explicitly `KeepDestination`, or `ReturnDestination` when it's detected it will not be used. Implementers such as myself may fail to complete this pattern, and could result in key re-use: https://github.com/bitcoin/bitcoin/pull/15557#discussion_r271956393 Since ReserveDestination is currently only used directly in the `CreateTransaction`/`CommitTransaction` flow(or fee bumping where it's just used in `CreateTransaction`), I instead make the assumption that if a transaction is returned by `CreateTransaction` it's highly likely that it will be accepted by the caller, and the `ReserveDestination` kept. This simplifies the API as well. There are very few cases where this would not be the case which may result in keys being burned. Those failure cases appear to be: `CommitTransaction` failing to get the transaction into the mempool Belt and suspenders check in `WalletModel::prepareTransaction` Alternative to https://github.com/bitcoin/bitcoin/pull/15796 ACKs for top commit: achow101: ACK e10e1e8db043e9b7c113e07faf408f337c1b732d Reviewed the diff stevenroose: utACK e10e1e8db043e9b7c113e07faf408f337c1b732d meshcollider: utACK e10e1e8db043e9b7c113e07faf408f337c1b732d Tree-SHA512: 78d047a00f39ab41cfa297052cc1e9c224d5f47d3d2299face650d71827635de077ac33fb4ab9f7dc6fc5a27f4a68415a1bc9ca33a3cb09a78f4f15b2a48411b
2019-07-16Merge #15891: test: Require standard txs in regtest by defaultMarcoFalke
fa89badf887dcc01e5bdece248b5e7d234fee227 test: Require standard txs in regtest (MarcoFalke) fa9b4191609c3ef75e69d391eb91e4d5c1e0bcf5 test: Add test that mainnet requires standard txs (MarcoFalke) fa613ca0a8f99c4771859de9e571878530d3ecb5 chainparams: Remove unused fMineBlocksOnDemand (MarcoFalke) Pull request description: I don't see a reason why regtest should allow non-standard txs, as it makes testing mainnet behaviour such as #15846 unnecessarily hard and unintuitive. Of course, testnet policy remains unchanged to allow propagation of non-standard txs. ACKs for top commit: ajtowns: ACK fa89badf887dcc01e5bdece248b5e7d234fee227 Tree-SHA512: c4c675affb054868850bd2683aa07f4c741a448cbacb2ea8334191e105f426b0790fe6a468be61e9c5880d24154f7bf1c7075051697172dce92180c1bc3a1c90
2019-07-16Merge #16194: refactor: share blockmetadata with BlockManagerWladimir J. van der Laan
682a1d0f2004d808b87b3106d0dfae547005e638 refactoring: remove mapBlockIndex global (James O'Beirne) 55d525ab9004631d30dcc60a1ec5d9cd6c6afe56 refactoring: make pindexBestInvalid internal to validation.cpp (James O'Beirne) 4ed55dfcd7894fd5ba6395f244a17ab1f8e786d4 refactoring: add block_index_candidates arg to LoadBlockIndex (James O'Beirne) 613c46fe9e39f55b0f0daa18fee20b4120db2539 refactoring: move block metadata structures into BlockManager (James O'Beirne) Pull request description: This is part of the [assumeutxo project](https://github.com/bitcoin/bitcoin/projects/11): Parent PR: #15606 Issue: #15605 Specification: https://github.com/jamesob/assumeutxo-docs/tree/2019-04-proposal/proposal --- Under an assumeutxo model, we have multiple CChainState instances in use at once in order to support background validation. Currently, each CChainState instance has its own mapBlockIndex, a collection of linked block headers, in addition to a few other data structures that are related to maintenance of the block tree but not necessarily to any given chainstate. In order to avoid duplicating this data across chainstates, this change moves chainstate-agnostic block metadata (and related behavior) into a class, `BlockManager`. Chainstates are parameterized with a reference to a blockmanager instance and in practice they share the same instance. Most of this change is conceptually move-only, though the diff is somewhat muddled. The first commit can be reviewed slightly more easily with `--color-moved=dimmed_zebra`. Admittedly, that commit is pretty unwieldy; I tried to split it up after the fact with `git add --patch`, but that was difficult because of git's inability to split hunks past a certain point. Some of the moves also ended up being obscured when done over separate commits. ACKs for top commit: MarcoFalke: ACK 682a1d0f2004d808b87b3106d0dfae547005e638 ryanofsky: utACK 682a1d0f2004d808b87b3106d0dfae547005e638, only changes since last review were rebase and fixing conflict on a moved line ariard: utACK 682a1d0. Most of the changes are move-only, with main problem being to avoid creating circular dependencies between `BlockManager` and `CChainState`. Tested, comments are mostly nits, feel free to ignore them Tree-SHA512: 738d8d06539ba53acf4bd2d48ae000473e645bbc4e63d798d55d247a4d5a4f781b73538ed590f6407be9ab402ea9d395570ea20bff0a4b9ce747bcc1600c5108
2019-07-16Merge #16390: qa: Add --filter option to test_runner.pyMarcoFalke
1a6242526093424947eb49f3416dc0c6bc9fc3a8 qa: Add --filter option to test_runner.py (João Barbosa) Pull request description: Allows to run functional tests like: ```sh test/functional/test_runner.py --filter wallet ``` ACKs for top commit: jonatack: ACK 1a6242526093424947eb49f3416dc0c6bc9fc3a8 Tree-SHA512: 53199e01da3b2e0112843c1c68c69d8fd7fc9bb6a6cb45a81c324973c4824ebf5fef574f9efab81a64d52e397e25d979ae40f0eaba35afb771e80012768f0b08
2019-07-16Merge #16380: Remove unused bits from the service flags enumfanquake
fa0d0ff6e1bee60fde63724ae28a51aac5a94d4a Remove unused bits from the service flags enum (MarcoFalke) Pull request description: Remove all bits that have no BIP specification nor can be observed on the active network ACKs for top commit: practicalswift: utACK fa0d0ff6e1bee60fde63724ae28a51aac5a94d4a LarryRuane: utACK fa0d0ff6e1bee60fde63724ae28a51aac5a94d4a promag: ACK fa0d0ff6e1bee60fde63724ae28a51aac5a94d4a. laanwj: ACK fa0d0ff6e1bee60fde63724ae28a51aac5a94d4a Tree-SHA512: 6342017bfd4c2a39c998fbb02497931b11892e1cb60fc13b948b91812f281b605a25a3fdc0d5358dff18da4e82eb4eb4de95c43c7e76ecb331c1c3985443dd21
2019-07-16qa: Add --filter option to test_runner.pyJoão Barbosa
2019-07-15Merge #15824: docs: Improve netbase commentsWladimir J. van der Laan
c7f6ce74d3a5cf2a0c5bac20eab1efd997175a72 docs: Improve netbase comments (Carl Dong) Pull request description: Second in a series of PRs documenting the net stack. Contributed with sincere thanks to sipa, laanwj, and gmaxwell for providing much of the history, context, and rationale. ACKs for top commit: laanwj: ACK c7f6ce74d3a5cf2a0c5bac20eab1efd997175a72 Tree-SHA512: ad83054d3b8d0c8c3fb55be011bcf294176e7509513bf61326866afd53e8159644e0d59bb3a2f404717f525cbf736096d4c1990e61cfd89845d51fa6b5394b7c
2019-07-15docs: Improve netbase commentsCarl Dong
- Improve and add various Lookup* docs - Improve InterruptibleRecv docs - Improve Socks5 docs - Add CreateSocket docs - Add ConnectSocketDirectly docs - Add SetNameProxy docs - Add ConnectThroughProxy docs - Add LookupSubNet docs
2019-07-15Merge #15282: test: Replace hard-coded hex tx with class in test frameworkMarcoFalke
8f250ab7882a852f1b1947cef4837d2de5ca6913 TEST: Replace hard-coded hex tx with classes (Steven Roose) Pull request description: Came across these breaking Elements. ACKs for top commit: MarcoFalke: ACK 8f250ab7882a852f1b1947cef4837d2de5ca6913 instagibbs: utACK https://github.com/bitcoin/bitcoin/commit/8f250ab7882a852f1b1947cef4837d2de5ca6913 Tree-SHA512: e8615dad4cda0beea4b0c7d4951a467fb9882a0a64d49c9b5ecf167369ea62a3fe5348e2401153162b0ccadecdb128492c94be36ebb881c3c42659626d86eda8
2019-07-15doc: describe how to pass wildcard names to test runnerJon Atack
2019-07-15test: enable passing wildcards with path to test runnerJon Atack
Currently, passing wildcard testname args to the test runner from outside the `test/functional/` directory does not work. See this recent IRC discussion for more background: http://www.erisian.com.au/bitcoin-core-dev/log-2019-07-10.html#l-262 (lines 262 to 323). This small change enables passing multiple wildcards with paths, as long as the paths are coherent. Examples: - test/functional/test_runner.py test/functional/wallet* - functional/test_runner.py functional/wallet* - test/functional/test_runner.py ./test/functional/tool* test/functional/mempool* A current limitation that this PR does not change: 9 test files with arguments in their name are not picked up by wildcard search. - Squashed commit: non-mutating version - Squashed commit: minor code optimisation
2019-07-12Merge #16334: test: rpc_users: Also test rpcauth.py with password.Wladimir J. van der Laan
e263a343d4b6a2622df6bb734cd9d51a0d20a663 test: rpc_users: Make variable names more clear. (Carl Dong) 830dc2dd0fccb7f3ec49ff7233a188d92c541e7e test: rpc_users: Also test rpcauth.py with specified password. (Carl Dong) c73d871799982ca29c29cef90e1a78814cf34019 test: rpc_users: Add function for testing auth params. (Carl Dong) 604e2a997ff26202dd0fa1932d60dc14cc53ac6d test: rpc_users: Add function for auth'd requests. (Carl Dong) Pull request description: Fixes #14758 First two commits are tidy-ups which I feel are worthwhile as they are very straightforward, cut down the file by 50%, and made the final diff more minimal. Happy to squash after review. ACKs for top commit: laanwj: ACK e263a343d4b6a2622df6bb734cd9d51a0d20a663 Tree-SHA512: aa75c48570a87060238932d4c68e17234e158077f6195fb4917367e1ecc565e3cd8dd0ae51f9159ddd3d03742739680391bc1246454302db22d4a608c0633e80
2019-07-12Remove unused bits from the service flags enumMarcoFalke
2019-07-12Merge #15277: contrib: Enable building in Guix containersWladimir J. van der Laan
751549b52a9a4cd27389d807ae67f02bbb39cd7f contrib: guix: Additional clarifications re: substitutes (Carl Dong) cd3e947f50db7cfe05c05b368c25742193729a62 contrib: guix: Various improvements. (Carl Dong) 8dff3e48a9e03299468ed3b342642f01f70da9db contrib: guix: Clarify SOURCE_DATE_EPOCH. (Carl Dong) 3e80ec3ea9691c7c89173de922a113e643fe976b contrib: Add deterministic Guix builds. (Carl Dong) Pull request description: ~~**This post is kept updated as this project progresses. Use this [latest update link](https://github.com/bitcoin/bitcoin/pull/15277#issuecomment-497303718) to see what's new.**~~ Please read the `README.md`. ----- ### Guix Introduction This PR enables building bitcoin in Guix containers. [Guix](https://www.gnu.org/software/guix/manual/en/html_node/Features.html) is a transactional package manager much like Nix, but unlike Nix, it has more of a focus on [bootstrappability](https://www.gnu.org/software/guix/manual/en/html_node/Bootstrapping.html) and [reproducibility](https://www.gnu.org/software/guix/blog/tags/reproducible-builds/) which are attractive for security-sensitive projects like bitcoin. ### Guix Build Walkthrough Please read the `README.md`. [Old instructions no. 4](https://github.com/bitcoin/bitcoin/pull/15277#issuecomment-497303718) [Old instructions no. 3](https://github.com/bitcoin/bitcoin/pull/15277#issuecomment-493827011) [Old instructions no. 2](https://github.com/bitcoin/bitcoin/pull/15277#issuecomment-471658439) <details> <summary>Old instructions no. 1</summary> In this PR, we define a Guix [manifest](https://www.gnu.org/software/guix/manual/en/html_node/Invoking-guix-package.html#profile_002dmanifest) in `contrib/guix/manifest.scm`, which declares what packages we want in our environment. We can then invoke ``` guix environment --manifest=contrib/guix/manifest.scm --container --pure --no-grafts --no-substitutes ``` To have Guix: 1. Build an environment containing the packages we defined in our `contrib/guix/manifest.scm` manifest from the Guix bootstrap binaries (see [bootstrappability](https://www.gnu.org/software/guix/manual/en/html_node/Bootstrapping.html) for more details). 2. Start a container with that environment that has no network access, and no access to the host's filesystem except to the `pwd` that it was started in. 3. Drop you into a shell in that container. > Note: if you don't want to wait hours for Guix to build the entire world from scratch, you can eliminate the `--no-substitutes` option to have Guix download from available binary sources. Note that this convenience doesn't necessarily compromise your security, as you can check that a package was built correctly after the fact using `guix build --check <packagename>` Therefore, we can perform a build of bitcoin much like in Gitian by invoking the following: ``` make -C depends -j"$(nproc)" download && \ cat contrib/guix/build.sh | guix environment --manifest=contrib/guix/manifest.scm --container --pure --no-grafts --no-substitutes ``` We don't include `make -C depends -j"$(nproc)" download` inside `contrib/guix/build.sh` because `contrib/guix/build.sh` is run inside the container, which has no network access (which is a good thing). </details> ### Rationale I believe that this represents a substantial improvement for the "supply chain security" of bitcoin because: 1. We no longer have to rely on Ubuntu for our build environment for our releases ([oh the horror](https://github.com/bitcoin/bitcoin/blob/72bd4ab867e3be0d8410403d9641c08288d343e3/contrib/gitian-descriptors/gitian-linux.yml#L10)), because Guix builds everything about the container, we can perform this on almost any Linux distro/system. 2. It is now much easier to determine what trusted binaries are in our supply chain, and even make a nice visualization! (see [bootstrappability](https://www.gnu.org/software/guix/manual/en/html_node/Bootstrapping.html)). 3. There is active effort among Guix folks to minimize the number of trusted binaries even further. OriansJ's [stage0](https://github.com/oriansj/stage0), and janneke's [Mes](https://www.gnu.org/software/mes/) all aim to achieve [reduced binary boostrap](http://joyofsource.com/reduced-binary-seed-bootstrap.html) for Guix. In fact, I believe if OriansJ gets his way, we will end up some day with only a single trusted binary: hex0 (a ~500 byte self-hosting hex assembler). ### Steps to Completion - [x] Successfully build bitcoin inside the Guix environment - [x] Make `check-symbols` pass - [x] Do the above but without nasty hacks - [x] Solve some of the more innocuous hacks - [ ] Make it cross-compile (HELP WANTED HERE) - [x] Linux - [x] x86_64-linux-gnu - [x] i686-linux-gnu - [x] aarch64-linux-gnu - [x] arm-linux-gnueabihf - [x] riscv64-linux-gnu - [ ] OS X - [ ] x86_64-apple-darwin14 - [ ] Windows - [ ] x86_64-w64-mingw32 - [ ] Maybe make importer for depends syntax - [ ] Document build process for future releases - [ ] Extra: Pin the revision of Guix that we build with with Guix [inferiors](https://www.gnu.org/software/guix/manual/en/html_node/Inferiors.html) ### Help Wanted [Old content no. 3](https://github.com/bitcoin/bitcoin/pull/15277#issuecomment-483318210) [Old content no. 2](https://github.com/bitcoin/bitcoin/pull/15277#issuecomment-471658439) <details> <summary>Old content no. 1</summary> As of now, the command described above to perform a build of bitcoin a lot like Gitian works, but fails at the `check-symbols` stage. This is because a few dynamic libraries are linked in that shouldn't be. Here's what `ldd src/bitcoind` looks like when built in a Guix container: ``` linux-vdso.so.1 (0x00007ffcc2d90000) libdl.so.2 => /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/lib/libdl.so.2 (0x00007fb7eda09000) librt.so.1 => /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/lib/librt.so.1 (0x00007fb7ed9ff000) libstdc++.so.6 => /gnu/store/4sqps8dczv3g7rwbdibfz6rf5jlk7w90-gcc-5.5.0-lib/lib/libstdc++.so.6 (0x00007fb7ed87c000) libpthread.so.0 => /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/lib/libpthread.so.0 (0x00007fb7ed85b000) libm.so.6 => /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/lib/libm.so.6 (0x00007fb7ed6da000) libgcc_s.so.1 => /gnu/store/4sqps8dczv3g7rwbdibfz6rf5jlk7w90-gcc-5.5.0-lib/lib/libgcc_s.so.1 (0x00007fb7ed6bf000) libc.so.6 => /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/lib/libc.so.6 (0x00007fb7ed506000) /gnu/store/h90vnqw0nwd0hhm1l5dgxsdrigddfmq4-glibc-2.28/lib/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007fb7ee3a0000) ``` And here's what it looks in one of our releases: ``` linux-vdso.so.1 (0x00007ffff52cd000) libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f87726b4000) librt.so.1 => /usr/lib/librt.so.1 (0x00007f87726aa000) libm.so.6 => /usr/lib/libm.so.6 (0x00007f8772525000) libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f877250b000) libc.so.6 => /usr/lib/libc.so.6 (0x00007f8772347000) /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007f8773392000) ``` ~~I suspect it is because my script does not apply the gitian-input patches [described in the release process](https://github.com/bitcoin/bitcoin/blob/master/doc/release-process.md#fetch-and-create-inputs-first-time-or-when-dependency-versions-change) but there is no description as to how these patches are applied.~~ It might also be something else entirely. Edit: It is something else. It appears that the gitian inputs are only used by [`gitian-win-signer.yml`](https://github.com/bitcoin/bitcoin/blob/d6e700e40f861ddd6743f4d13f0d6f6bc19093c2/contrib/gitian-descriptors/gitian-win-signer.yml#L14) </details> ### How to Help 1. Install Guix on your distro either [from source](https://www.gnu.org/software/guix/manual/en/html_node/Requirements.html) or perform a [binary installation](https://www.gnu.org/software/guix/manual/en/html_node/Binary-Installation.html#Binary-Installation) 2. Try out my branch and the command described above! ACKs for top commit: MarcoFalke: Thanks for the replies. ACK 751549b52a9a4cd27389d807ae67f02bbb39cd7f laanwj: ACK 751549b52a9a4cd27389d807ae67f02bbb39cd7f Tree-SHA512: 50e6ab58c6bda9a67125b6271daf7eff0ca57d0efa8941ed3cd951e5bf78b31552fc5e537b1e1bcf2d3cc918c63adf19d685aa117a0f851024dc67e697890a8d
2019-07-12contrib: guix: Additional clarifications re: substitutesCarl Dong
2019-07-12Fix autostart filenames on LinuxHennadii Stepanov