aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-12-03contrib: Add test for ELF symbol-checkWladimir J. van der Laan
Check both failure cases: - Use a glibc symbol from a version that is too new - Use a symbol from a library that is not in the allowlist And also check a conforming binary. Adding a similar check for Windows PE can be done in a separate PR.
2020-11-24doc: Document current boost dependency as 1.71.0Wladimir J. van der Laan
This was forgotten in #19764.
2020-11-24Merge #19764: depends: Split boost into build/host packages + bump + cleanupWladimir J. van der Laan
f190343c96520db254d6689f8f24c9eb36bead6b depends: boost: Specify cflags+compileflags (Carl Dong) b2328b7989997652af52295a4b2e988e68b8428b depends: boost: Remove unnecessary _archiver_ (Carl Dong) ab9e047cc2226198d22384c286cb30c4c7d51e83 depends: boost: Cleanup toolset selection (Carl Dong) 86002e7e90d7c78d5a76a159bf17db48aec94f94 depends: boost: Cleanup architecture/address-model (Carl Dong) d7048fa73fafaf0d89d891d98e51a251a64a1495 depends: boost: Disable all compression (Carl Dong) 9cf2ee54d366c3f5fcfce96244988858599e7e95 depends: boost: Split into non-/native packages (Carl Dong) a57b49856033f3de4a861367b70aba85aec58cf8 depends: boost: Bump to 1.71.0 (Carl Dong) 800655ff3199782b803e671f5baa77ff90a5591d depends: boost: Refer to version in URL (Carl Dong) Pull request description: This PR improves the robustness of our boost package in depends, most notably: 1. Bumps boost from `1.70.0` to `1.71.0`, because `1.71.0`: 1. Removes the need to patch out the unused variable. https://github.com/bitcoin/bitcoin/blob/f8462a6d2794be728cf8550f45d19a354aae59cf/depends/packages/boost.mk#L36 Upstream boost patched it out in https://github.com/boostorg/process/commit/d20b64cf37a773e452b84ce619752e3785be756c, which was first included in the `1.71.0` release 2. Comes packaged with a version of `b2` which allows us to override its `CXX` and `CXXFLAGS`. Previously, choosing a toolset while building `b2` such as `clang` or `gcc` would force `b2`'s build system to invoke the compiler as a bare, hardcoded `clang` or `gcc`. However, our `depends` build system often want to customize this behaviour, adding extra flags or invoking the compiler by an alternate name. So this is useful. 1. Commit where `CXX` was introduced: https://github.com/boostorg/build/commit/374f96516a6210687cdf63c987710501634bcac9 2. Commit where `CXXFLAGS` was introduced: https://github.com/boostorg/build/commit/5d49abc1f291573d4bdcd2ee647b05a66f9c6497 2. The boost package is now split into `native_b2` and `boost`, better representing what actually happens. - In our `depends` build system, we have a distinction between `native` packages and non-`native` packages. The output of `native` packages are meant to be used on the machine that's performing the build, and the output of non-`native` packages are meant to be used on/for the machine that will ultimately be running bitcoin. Previously, `boost` existed in `depends` as a non-`native` package, but that's partly inaccurate because the `./bootstrap.sh` invocation in its `$(package)_config_cmds` stage actually produced a binary called `b2`, which is run on the machine that's performing the build. This means that `b2` is a `native` package which is being built in an environment set up for the non-`native` package `boost`. This reveals a hidden unintended behavior in our `depends` build system: for linux->darwin cross builds, we use `gcc` for `native` packages, and `clang` for non-`native` packages. But `b2` was actually being built using `clang`, since it was being built in an environment set up for non-`native` packages. theuni you might be interested in taking a look ACKs for top commit: laanwj: Concept and code review ACK f190343c96520db254d6689f8f24c9eb36bead6b Tree-SHA512: f8b728a34da4f0a9a985a819a5762f2fc2689ea24c7eba1d24d26dfbd4c59f202227c699b0a4069dab10b6329cf9f4c6dd95082685776ee43dd5f7b659acdef1
2020-11-23depends: boost: Specify cflags+compileflagsCarl Dong
2020-11-23depends: boost: Remove unnecessary _archiver_Carl Dong
We already have $(package)_ar, so just use that instead
2020-11-23depends: boost: Cleanup toolset selectionCarl Dong
2020-11-23depends: boost: Cleanup architecture/address-modelCarl Dong
2020-11-23depends: boost: Disable all compressionCarl Dong
2020-11-23depends: boost: Split into non-/native packagesCarl Dong
2020-11-23depends: boost: Bump to 1.71.0Carl Dong
2020-11-23depends: boost: Refer to version in URLCarl Dong
2020-11-23Merge #19179: ci: Run ci configs on cirrusMarcoFalke
fa7a4385d08797876de9a05ae8a6fde18e36bd67 ci: Fix doc typos in .cirrus.yml (MarcoFalke) fa73674738b0b5a271ae387e2ebd76d747e02d91 ci: Run i686 centos ci config on cirrus (MarcoFalke) fa1f949a4dc2568456f3ba30bbd8ecbc78a423ca ci: Run nowallet ci config on cirrus (MarcoFalke) Pull request description: Travis CI Org is shutting down, so move the configs to cirrus ci ACKs for top commit: practicalswift: ACK fa7a4385d08797876de9a05ae8a6fde18e36bd67: patch looks correct Tree-SHA512: 1b7125c7f0d2288931fb8c5e90345891d5f7c1f00c4af136afbeb36bd2836f72920a1877dacc7be787e2c8d84de2a733c1ca71931e5c101b222c1fea588619b3
2020-11-23ci: Fix doc typos in .cirrus.ymlMarcoFalke
2020-11-23ci: Run i686 centos ci config on cirrusMarcoFalke
2020-11-23ci: Run nowallet ci config on cirrusMarcoFalke
2020-11-23Merge #20458: test: add is_bdb_compiled helperMarcoFalke
b87caf10b57fbab148949727f4004805be2bbc1d test: add is_bdb_compiled helper (Sjors Provoost) Pull request description: Followup for #20202, needed by #16546. Allow the functional test suite to skip tests that require BDB, as well as introduce specific logic to handle whether BDB support is enabled or not. It follows the same pattern as `skip_if_no_sqlite` and `is_sqlite_compiled`. ACKs for top commit: laanwj: Code review ACK b87caf10b57fbab148949727f4004805be2bbc1d Tree-SHA512: e84fb22e017b28f0f75d17e5368fcba22a893484b31b12082cfe9354e6fbd566daf34b3b82f7deb7205b2061c9c61538e402df000e2f05428affae6dbea05c5e
2020-11-23Merge #20419: build: set minimum supported macOS to 10.14Wladimir J. van der Laan
a52ecc936a267cae97c2f313743bf75d5af07700 build: set minimum supported macOS to 10.14 (fanquake) Pull request description: This is a requirement for C++17 support. See my comments [here](https://github.com/bitcoin/bitcoin/issues/16684#issuecomment-643722538): > You cannot use std::get with std::variant on macOS < 10.14, because Apples libc++ doesn't support the std::bad_variant_access exception. [Relevant comment](https://github.com/bitcoin/bitcoin/pull/19183#discussion_r439794318) in #19183. > While we could work around this in our own code, using std::get_if, this would still be a problem for 3rd-party dependencies. > I've been testing Qt 5.15LTS (we'll have to enable C++17 in qt, and may upgrade to a newer version at the same time), and you can't enable -std c++17, while targeting a macOS deployment version < 10.14, configuring will fail. They are making use of std::get with std::variant throughout their cocoa code. We would have to had to have bumped to at least 10.13 in any case, as Qt 5.15 (#19716) [requires 10.13+](https://doc.qt.io/qt-5/supported-platforms.html). ACKs for top commit: hebasto: ACK a52ecc936a267cae97c2f313743bf75d5af07700, I have reviewed the code and it looks OK, I agree it can be merged. Tree-SHA512: f669b2fc777aeea1e9afdbbc7bd9afe3997418211db6ba53c934cae0e62a9b999603da539518c229f34961d275c9e2f315c7b022cf5fb97bd201a69c85d470cc
2020-11-23Merge #20449: build: Fix Windows installer buildWladimir J. van der Laan
68c2ef13e953f142f818a84be9e2c09ef8636ccc Fix version string in Windows and Mac installers (Andrew Chow) Pull request description: Apparently NSIS requires a 4 digit version number, and #20223 dropped the 4th digit. So this adds a 4th 0 digit so that building the Windows installer doesn't fail. Also fixes a typo in that version string that was also present in a plist file. ACKs for top commit: fanquake: ACK 68c2ef13e953f142f818a84be9e2c09ef8636ccc laanwj: Code review ACK 68c2ef13e953f142f818a84be9e2c09ef8636ccc hebasto: Approach ACK 68c2ef13e953f142f818a84be9e2c09ef8636ccc, tested on Linux Mint 20 (x86_64, nsis 3.05-2). Tree-SHA512: 845560ff176eae8081096426790c928a773fa75d366f42a2a4631c1be2ae9234d7a5b72854ccfaa7fa1a32002b937ca393b12168ffacf9a5e3e311a76725483a
2020-11-23test: add is_bdb_compiled helperSjors Provoost
2020-11-23Merge #20202: wallet: Make BDB support optionalWladimir J. van der Laan
d52f502b1ea1cafa7d58c5517f01dba26ecb7269 Fix mock SQLiteDatabases (Andrew Chow) 99309ab3e96a290359b84f9b657c5115aa3470dd Allow disabling BDB in configure with --without-bdb (Andrew Chow) ee47f11f7399ec3a4330ea1f2fc388c7e32959d6 GUI: Force descriptor wallets when BDB is not compiled (Andrew Chow) 71e40b33bd1e72ccf5d82e1d3f8b481f8e965492 RPC: Require descriptors=True for createwallet when BDB is not compiled (Andrew Chow) 6ebc41bf9cb0184554923e84e1935195d356f2b3 Enforce salvage is only for BDB wallets (Andrew Chow) a58b719cf75e2d97205ec260bcff0d4780fe4fb8 Do not compile BDB things when USE_BDB is defined (Andrew Chow) b33af48210c117a734fc3e1bebeb1c2057645775 Include wallet/bdb.h where it is actually being used (Andrew Chow) Pull request description: Adds a `--without-bdb` option to `configure` which disables the compilation of the BDB stuff. Legacy wallets will not be created when BDB is not compiled. A legacy-sqlite wallet can be loaded, but we will not create them. Based on #20156 to resolve the situation where both `--without-sqlite` and `--without-bdb` are provided. In that case, the wallet is disabled and `--disable-wallet` is effectively set. ACKs for top commit: laanwj: Code review ACK d52f502b1ea1cafa7d58c5517f01dba26ecb7269 Tree-SHA512: 5a92ba7a542acc2e27003e9d4e5940e0d02d5c1f110db06cdcab831372bfd83e8d89c269caff31dd5bff062c1cf5f04683becff12bd23a33be731676f346553d
2020-11-23Merge #20432: net: Treat raw message bytes as uint8_tWladimir J. van der Laan
fabecce71909c984504c21fa05f91d5f1b471e8c net: Treat raw message bytes as uint8_t (MarcoFalke) Pull request description: Using `uint8_t` from the beginning when messages are `recv`ed has two style benefits: * The signedness is clear from reading the code, as it does not depend on the architecture * When passing the bytes on, the need for static signedness casts is dropped, making the code a bit less verbose and more coherent ACKs for top commit: laanwj: Code review ACK fabecce71909c984504c21fa05f91d5f1b471e8c theStack: Code Review ACK fabecce71909c984504c21fa05f91d5f1b471e8c jonatack: Tested ACK fabecce71909c984504c21fa05f91d5f1b471e8c Tree-SHA512: e6d9803c78633fde3304faf592afa961ff9462a7912d1da97a24720265274aa10ab4168d71b6ec2756b7448dd42585321afee0e5c889e705be778ce9a330d145
2020-11-22Merge #19867: build: document and cleanup Qt hacksfanquake
e1f2553e1148de9bd57818b40b5fe9da7ff5e246 build: remove global_init_link_order from mac qt qmake.conf (fanquake) 498fa16beabcbba0ef66acd4162e0f77de064268 build: document preprocessing steps in qt package (fanquake) bd5d9336d9e1c2345d72531adf2027bc4d099d1b build: don't copy Info.plist.* into mkspec for macOS qt build (fanquake) bfd7e33b4b255c3a5ba14993665e04349c6bdf0a build: remove plugin_no_soname from mac qt qmake.conf (fanquake) fdde4c7ce624d4dbf72d38e9783c304d70430386 build: pass XCODE_VERSION through to qt macOS cross compile conf (fanquake) 49473ef211343a25658d7c2de17c92e3123ab33b build: convert "echo" usage into a patch in qt package (fanquake) Pull request description: Follow up on removing `sed` usage in #19761. Also nice to revisit & cleanup before 5.15.x. ACKs for top commit: laanwj: Code review ACK e1f2553e1148de9bd57818b40b5fe9da7ff5e246 Tree-SHA512: 4e6489d877aaa300f69e091d7117136da49611bd80afd45adfbd7ddeb5b3c9c76fb0f87a3249cbe63ba93129df56281fd4a9389daadc852211325c5ca9ac6567
2020-11-21Fix version string in Windows and Mac installersAndrew Chow
Fixes some typos that cause gitian to fail to make the installers.
2020-11-21Merge #20426: wallet: allow zero-fee ↵MarcoFalke
fundrawtransaction/walletcreatefundedpsbt and other fixes 9f08780dd7946b63476e9736745131db8e7f4e93 Use the correct incremental fee constant in bumpfee help (Jon Atack) 3f1e10b2b1cd11f7112fbad6355464bd4adbbc5c Update feeRate (BTC/kvB) to fee_rate (sat/vB) in wallet_bumpfee (Jon Atack) 1b3d7009280595108eb22ac1188bc4367804fc5d Allow zero-fee fundrawtxn and walletcreatefundedpsbt calls (Jon Atack) Pull request description: - Fixes https://github.com/bitcoin/bitcoin/pull/20305/files#r525406176. A check to raise an error on zero-fee txns was mistakenly extended in a0d4957 from the bumpfee and send{toaddress, many} RPCs to also include fundrawtransaction and walletcreatefundedpsbt. This commit re-overrides zero fee rate checking for these two RPCs, not only for the feeRate (BTC/kvB) arg to return to previous behavior, but also for the new fee_rate (sat/vB) arg. Negative fee rates will still raise "amount out of range" by the MoneyRange check in src/bitcoin-tx.cpp::AmountFromValue. - Updates a wallet bumpfee test from feeRate (BTC/kvB) to fee_rate (sat/vB) - Fixes https://github.com/bitcoin/bitcoin/pull/20305/files#r525405363 to use the correct incremental fee rate constant in the bumpfee help (thanks Marco Falke for the catch) and rectifies "1.000 sat/vB sat/vB" in the help to "1.000 sat/vB" ACKs for top commit: MarcoFalke: review ACK 9f08780dd7946b63476e9736745131db8e7f4e93 🐾 promag: Code review ACK 9f08780dd7946b63476e9736745131db8e7f4e93. Xekyo: Code review reACK 9f08780dd7946b63476e9736745131db8e7f4e93. Tree-SHA512: 413dfb4f23ebaf3d2ef210dd04610a843272e64eabba428699f5de4d646a86ac4911dab66b5e2f5ebea53b76e4be8347ef40824c1592c750d5eaa12579d3cdf6
2020-11-20Merge #20223: build: Drop the leading 0 from the version numberMarcoFalke
8f7b93047581c67f2133cdb8c7845471de66c30f Drop the leading 0 from the version number (Andrew Chow) Pull request description: Removes the leading 0 from the version number. The minor version, which we had been using as the major version, is now the major version. The revision, which we had been using as the minor version, is now the minor version. The revision number is dropped. The build number is promoted to being part of the version number. This also avoids issues where it was accidentally not included in the version number. The CLIENT_VERSION remains the same format as previous as previously, as the Major version was 0 so it never actually got included in it. The user agent string formatter is updated to follow this new versioning. *** Honestly I'm just tired of all of the people asking for "1.0" that maybe this'll shut them up. Skip the whole 1.0 thing and go straight to version 22.0! Also, this means that the terminology we commonly use lines up with how the variables are named. So major versions are actually bumping the major version number, etc. ACKs for top commit: jnewbery: Code review ACK 8f7b930475 MarcoFalke: review ACK 8f7b93047581c67f2133cdb8c7845471de66c30f 🎻 Tree-SHA512: b5c3fae14d4c0a9c0ab3b1db7c949ecc0ac3537646306b13d98dd0efc17c489cdd16d43f0a24aaa28e9c4a92ea360500e05480a335b03f9fb308010cdd93a436
2020-11-20net: Treat raw message bytes as uint8_tMarcoFalke
2020-11-20Merge #20430: sanitizers: Add suppression for unsigned-integer-overflow in ↵fanquake
libstdc++ 0f020cdf0a8c3c88499c96522470e2e5e79f27fa sanitizers: Add suppression for unsigned-integer-overflow in libstdc++ basic_string.tcc (Jonas Schnelli) Pull request description: Reported here: https://bitcoinbuilds.org/logs/e35cd579-0f0f-47e4-b49a-4ceba8ff9830.log Issue: https://github.com/gcc-mirror/gcc/blob/master/libstdc%2B%2B-v3/include/bits/basic_string.tcc#L1271 ACKs for top commit: MarcoFalke: cr ACK 0f020cdf0a8c3c88499c96522470e2e5e79f27fa practicalswift: cr ACK 0f020cdf0a8c3c88499c96522470e2e5e79f27fa Tree-SHA512: e304259a1eed878263bd715b4d16c57f8974264c23ccd6799f85e8141b2eb0b5c6468a6452ffbc7334f57c1957b6e43bb248760b3c0718d93f092d57764d0a8f
2020-11-20Merge #20424: build: Update univalue subtreefanquake
2a55a0ed3055a2ce0a33b58a3a7bbf6e30df3dfd Squashed 'src/univalue/' changes from 98261b1e7b..98fadc0909 (MarcoFalke) Pull request description: Just a minor bugfix: Currently we don't push booleans into arrays, but if we did they'd be pushed as integers. Can be tested by reverting the diff in `include/` and observing a test failure. ACKs for top commit: laanwj: ACK fa17eef6274811be5348149443e563bca95d54a3 practicalswift: cr ACK fa17eef6274811be5348149443e563bca95d54a3 Tree-SHA512: d87ca5be6769b4cd0c9b9e319973bc0c4f2b7121779f9554e11f34a4edb0013997e875c7edb7bc6eb9309ff5c13379d22f436cd4fb9e6e68df6f0aee29fed914
2020-11-20Use the correct incremental fee constant in bumpfee helpJon Atack
and remove redundant units ("Must be at least 1.000 sat/vB sat/vB" -> "1.00 sat vB")
2020-11-20Update feeRate (BTC/kvB) to fee_rate (sat/vB) in wallet_bumpfeeJon Atack
as the feeRate argument should soon be deprecated. Also loosen one test (and a similar one) that caused a one-off CI failure with: expected message 'Insufficient total fee 0.00000141, must be at least 0.00001704 (oldFee 0.00000999 + incrementalFee 0.00000705)' actual message 'Insufficient total fee 0.00000141, must be at least 0.00001712 (oldFee 0.00001007 + incrementalFee 0.00000705)'
2020-11-20Allow zero-fee fundrawtxn and walletcreatefundedpsbt callsJon Atack
A check to raise an error on zero-fee txns was mistakenly extended in commit a0d4957 from the bumpfee and send{toaddress, many} RPCs to also include fundrawtransaction and walletcreatefundedpsbt. This commit overrides zero fee rate checking for these two RPCs, not only for the feeRate (BTC/kvB) arg to return to previous behavior, but also for the new fee_rate (sat/vB) arg.
2020-11-20Merge bitcoin-core/gui#13: Hide peer detail view if multiple are selectedJonas Schnelli
76277cc77dea39b53e09ee1c440cd37270826201 qt: Hide peer detail view if multiple are selected (João Barbosa) Pull request description: Currently if multiple peers are selected the peer detail view shows the first new selected peer. With this PR the peer detail view is hidden when multiple peers are selected. It is also a slight refactor to simplify and remove duplicate code. ACKs for top commit: jonasschnelli: Tested ACK 76277cc77dea39b53e09ee1c440cd37270826201. hebasto: ACK 76277cc77dea39b53e09ee1c440cd37270826201, tested on Linux Mint 20 (Qt 5.12.8). Tree-SHA512: 16c9cfd6ccb7077a9f31917a6cb3532e32d17d21f735e43bf4720fb0c8bb1bd539d42569c105df4b551f5dccb4acaeedb6bb2362620a9cb9267a602d9d065b9f
2020-11-20Merge bitcoin-core/gui#21: Update pruning tooltip, original author ↵Jonas Schnelli
BitcoinErrorLog 2fc5efc55c886f1b874ce6cd02c9082b5bb6435a Update pruning tooltip, original author BitcoinErrorLog (Riccardo Spagni) Pull request description: Squashed commits from BitcoinErrorLog at his request, per the original discussion on #15: this tooltip has been adjusted to be more user-friendly and reflect what the net effect of pruning is for the user. ACKs for top commit: harding: Untested ACK 2fc5efc55c886f1b874ce6cd02c9082b5bb6435a Sjors: utACK 2fc5efc55c886f1b874ce6cd02c9082b5bb6435a and welcome to the dark side! jonasschnelli: ACK 2fc5efc55c886f1b874ce6cd02c9082b5bb6435a Tree-SHA512: 45d6a7efbf4d34d20b9de439c988a39c739591b854726b6682c4cffcb23dff7d9131afab572fa0c9a8bc033c46c3878efdfbf8a984aafde632e1dfc1caa1cbbb
2020-11-20Merge #20428: tests: shrink feature_taproot transfer of funds txMarcoFalke
7ffac12545328cadd92a3caec4f1c6ca7c127493 tests: shrink feature_taproot transfer of funds tx (Anthony Towns) Pull request description: When moving funds from node 1 to node 0 for the pre-activation tests, there can be a large number of inputs, potentially resulting in a tx that is larger than standardness rules allow, or that takes a long time to sign. This just takes the top 500 outputs, which is plenty (~90% of the wallet balance). ACKs for top commit: luke-jr: utACK 7ffac12545328cadd92a3caec4f1c6ca7c127493 MarcoFalke: cr ACK 7ffac12545328cadd92a3caec4f1c6ca7c127493 Tree-SHA512: 68445b4827dddb9a8e8614d61a68f5bbd7152557bf940be0a75741cb49deeff1566198da1a777ac66cb3fed93e64a30bf895875d6cc6ae9e48275e3febb620a6
2020-11-20sanitizers: Add suppression for unsigned-integer-overflow in libstdc++ ↵Jonas Schnelli
basic_string.tcc
2020-11-20Merge #20056: net: Use Span in ReceiveMsgBytesWladimir J. van der Laan
fa5ed3b4ca609426b2622cad235e107d33db7b30 net: Use Span in ReceiveMsgBytes (MarcoFalke) Pull request description: Pass a data pointer and a size as span in `ReceiveMsgBytes` to get the benefits of a span ACKs for top commit: jonatack: ACK fa5ed3b4ca609426b2622cad235e107d33db7b30 code review, rebased to current master 12a1c3ad1a43634, debug build, unit tests, ran bitcoind/-netinfo/getpeerinfo theStack: ACK fa5ed3b4ca609426b2622cad235e107d33db7b30 Tree-SHA512: 89bf111323148d6e6e50185ad20ab39f73ab3a58a27e46319e3a08bcf5dcf9d6aa84faff0fd6afb90cb892ac2f557a237c144560986063bc736a69ace353ab9d
2020-11-20Merge #19851: refactor: Extract ParseOpCode from ParseScriptWladimir J. van der Laan
c92387232f750397da7d131f262c150a608408c2 refactor: Extract ParseOpCode from ParseScript (João Barbosa) Pull request description: Seems more natural to have `mapOpNames` "hidden" in `ParseOpCode` than in `ParseScript`. A second lookup in `mapOpNames` is also removed. ACKs for top commit: laanwj: ACK c92387232f750397da7d131f262c150a608408c2 theStack: re-ACK c92387232f750397da7d131f262c150a608408c2 Tree-SHA512: d59d1964760622cf365479d44e3e676aa0bf46b60e77160140d967e012042df92121d3224c7551dc96eff5ff3294598cc6bade82adb3f60d28810e18e60e1257
2020-11-20Merge #20000: test: fix creation of "std::string"s with \0sWladimir J. van der Laan
ecc6cf1a3b097b9b5b047282063a0b6779631b83 test: fix creation of std::string objects with \0s (Vasil Dimov) Pull request description: A string literal `"abc"` contains a terminating `\0`, so that is 4 bytes. There is no need to write `"abc\0"` unless two terminating `\0`s are necessary. `std::string` objects do not internally contain a terminating `\0`, so `std::string("abc")` creates a string with size 3 and is the same as `std::string("abc", 3)`. In `"\01"` the `01` part is interpreted as one number (1) and that is the same as `"\1"` which is a string like `{1, 0}` whereas `"\0z"` is a string like `{0, 'z', 0}`. To create a string like `{0, '1', 0}` one must use `"\0" "1"`. Adjust the tests accordingly. ACKs for top commit: laanwj: ACK ecc6cf1a3b097b9b5b047282063a0b6779631b83 practicalswift: ACK ecc6cf1a3b097b9b5b047282063a0b6779631b83 modulo happily green CI Tree-SHA512: 5eb489e8533a4199a9324b92f7280041552379731ebf7dfee169f70d5458e20e29b36f8bfaee6f201f48ab2b9d1d0fc4bdf8d6e4c58d6102f399cfbea54a219e
2020-11-20tests: shrink feature_taproot transfer of funds txAnthony Towns
2020-11-19Merge bitcoin-core/gui#46: refactor: Fix deprecation warnings when building ↵MarcoFalke
against Qt 5.15 705c1f0648c72aa97e0ee699ff9a3da23fc9bd61 qt, refactor: Fix 'buttonClicked is deprecated' warnings (Hennadii Stepanov) c2f4e5ea1d6f01713ac69aaf6018884028aa55bd qt, refactor: Fix 'split is deprecated' warnings (Hennadii Stepanov) 8e12d6996116e786e928077b22d9f47cee27319e qt, refactor: Fix 'QFlags is deprecated' warnings (Hennadii Stepanov) fa5749c805878304c107bcae0ae5ffa401dc7c4d qt, refactor: Fix 'pixmap is deprecated' warnings (Hennadii Stepanov) b02264cb5dfcef50eec8a6346471cbaa25370e00 qt, refactor: Fix 'QDateTime is deprecated' warnings (Hennadii Stepanov) Pull request description: [What's New in Qt 5.15](https://doc.qt.io/qt-5/whatsnew515.html#deprecated-modules): > To help preparing for the transition to Qt 6, numerous classes and member functions that will be removed from Qt 6.0 have been marked as deprecated in the Qt 5.15 release. Fixes #36 ACKs for top commit: jonasschnelli: utACK 705c1f0648c72aa97e0ee699ff9a3da23fc9bd61 promag: Tested ACK 705c1f0648c72aa97e0ee699ff9a3da23fc9bd61 on macos with Apple clang version 11.0.3 (clang-1103.0.32.62) and brew qt 5.15.1. Tree-SHA512: 29e00535b4583ceec0dfb29612e86ee29bdea13651b548c6d22167917a4a10464af49160a12b05151030699f690f437ebb9c4ae9f130f66a722415222165b44f
2020-11-19Merge #20329: docs/descriptors.md: Remove hardened marker in the path after xpubMarcoFalke
dc80a7d0b0817b43d41af3a08b5800c425ebd5d8 docs/descriptors.md: Remove hardened marker in the path after xpub (Dmitry Petukhov) Pull request description: As described in "Key origin identification" section, a descriptor that has hardened derivation after xpub does not let you compute scripts without access to the corresponding private keys. Such a descriptor is practically useless. The text after the descriptor said "with child key *1'/2* of the specified xpub", and clearly an xpub cannot have "child key" with hardened derivation. Therefore it makes sense to fix this inconsistency to not confuse the reader of the doc Top commit has no ACKs. Tree-SHA512: 9f35951d90868585303681c27ea2ef9d36d4036181e337cfbd48730de0c346320b08dd089350b116d4c8542f3b506868cf318796bb713e5f80600ccbd96f9970
2020-11-19Merge #20385: test: run mempool_spend_coinbase.py even with wallet disabledWladimir J. van der Laan
21f24336019d438e225c7bd6653871119883a4ee test: run mempool_spend_coinbase.py even with wallet disabled (Michael Dietz) Pull request description: Run the mempool spend coinbase test even when the wallet was not compiled, as proposed in #20078. ACKs for top commit: laanwj: ACK 21f24336019d438e225c7bd6653871119883a4ee Tree-SHA512: 301582c04376371cfa8f1ebb2418a4341b42ddcd9ad4f48b58bcf888d867a97bdc409972856b67a8339ac5e60124aefee82a049b4f7fc6bca7a18d7e92e090be
2020-11-19Merge #20054: Remove confusing and useless "unexpected version" warningWladimir J. van der Laan
0000a0c7e9e4e7c1afafe6ef75b7624f4c573190 Remove confusing and almost useless "unexpected version" warning (MarcoFalke) Pull request description: It is useless because it isn't displayed for most users: * It isn't displayed in normal operation (because the validation debug category is disabled by default) * It isn't displayed for users that sync up their nodes intermittently, e.g. once a day or once a week (because it is disabled for IBD) * It is only displayed in the debug log (as opposed to the versionbits warning, which is displayed more prominently) It is confusing because it doesn't have a use case: Despite the above, if a user *did* see the warning, it would most likely be a false positive (like it has been in the past). Even if it wasn't, there is nothing they can do about it. The only thing they could do is to check for updates and hope that a fixed version is available. But why would the user be so scrupulously precise in enabling the warning and reading the log, but then fail to regularly check update channels for updated software? ACKs for top commit: practicalswift: ACK 0000a0c7e9e4e7c1afafe6ef75b7624f4c573190 decryp2kanon: ACK 0000a0c LarryRuane: ACK 0000a0c7e9e4e7c1afafe6ef75b7624f4c573190 Tree-SHA512: 16e069c84be6ab6034baeefdc515d0e5cdf560b2005d2faec5f989d45494bd16cfcb4ffca6a17211d9556ae44f9737a60a476c08b5c2bb5e1bd29724ecd6d5c1
2020-11-19Merge #20291: [net] Consolidate logic around calling CAddrMan::Connected()MarcoFalke
0bfce9dc46234b196a8b3679c21d6f8455962495 [addrman] Fix Connected() comment (John Newbery) eefe19471868ef0cdc9d32473d0b57015e7647ee [net] Consolidate logic around calling CAddrMan::Connected() (John Newbery) Pull request description: Currently, the logic around whether we called CAddrMan::Connected() for a peer is spread between verack processing (where we discard inbound peers) and FinalizeNode (where we discard misbehaving and block-relay-only peers). Consolidate that logic to a single place. Also remove the CNode.fCurrentlyConnected bool, which is now redundant. We can rely on CNode.fSuccessfullyConnected, since the two bools were only ever flipped to true in the same place. ACKs for top commit: mzumsande: Code review ACK 0bfce9dc46234b196a8b3679c21d6f8455962495 amitiuttarwar: code review ACK 0bfce9dc46. nice tidy, and bonus that we get to remove an unnecessary call to `cs_main` Tree-SHA512: 1ab74dae3bc12a6846da57c853033e546bb4f91caa39f4c50bf0cf7eca59cb917bdb2ef795da55363e7e9f70949cb28bb3be004cb3afa4389f970d2fe097d932
2020-11-19Update univalue subtreeMarcoFalke
2020-11-19Squashed 'src/univalue/' changes from 98261b1e7b..98fadc0909MarcoFalke
98fadc0909 Merge #24: Push bool into array correctly 5f03f1f39a Push bool into array correctly git-subtree-dir: src/univalue git-subtree-split: 98fadc090984fa7e070b6c41ccb514f69a371c85
2020-11-19Merge #20047: test: use wait_for_{block,header} helpers in p2p_fingerprint.pyWladimir J. van der Laan
6b56c1f4d0d5857d9d61a81dc96db1b603c368b5 test: remove last_{block,header}_equals() in p2p_fingerprint.py (Sebastian Falbesoner) 136d96b71f94bde2c7471ed852d447ec008e3a30 test: use wait_for_{block,header} helpers in p2p_fingerprint.py (Sebastian Falbesoner) Pull request description: This small PR takes use of the message receiving helper functions `wait_for_block()` and `wait_for_header()` (from module `test_framework.p2p`) in the test `p2p_fingerprint.py`. It also simplifies the checks for very old stale blocks/headers requests by getting rid of the functions `last_block_equals()` and `last_header_equals()` and rather only testing that not any blocks/headers message is received at all. Unneeded sending of requests are also removed and calls to time.sleep(...) substituted by ping syncs. ACKs for top commit: guggero: ACK 6b56c1f4 Tree-SHA512: 9114db70f3804adad4ab658236762d4fa73fef91158c5756dd1af2d24196ea740451b0028667e0c4047f1f89fe1355031921d3dfb973acc1370052a4bc12c2ab
2020-11-19Merge #20024: init: Fix incorrect warning "Reducing -maxconnections from N ↵Wladimir J. van der Laan
to N-1, because of system limitations" ea93bbeb26948c0ddba39b589bd166eaecf446c8 init: Fix incorrect warning "Reducing -maxconnections from N to N-1, because of system limitations" (practicalswift) Pull request description: Fix incorrect warning `Reducing -maxconnections from N to N-1, because of system limitations`. Before this patch (only the first warning is correct): ``` $ src/bitcoind -maxconnections=10000000 | grep Warning 2020-09-26T01:23:45Z Warning: Reducing -maxconnections from 10000000 to 1048417, because of system limitations. $ src/bitcoind -maxconnections=1000000 | grep Warning 2020-09-26T01:23:45Z Warning: Reducing -maxconnections from 1000000 to 999999, because of system limitations. $ src/bitcoind -maxconnections=100000 | grep Warning 2020-09-26T01:23:45Z Warning: Reducing -maxconnections from 100000 to 99999, because of system limitations. $ src/bitcoind -maxconnections=10000 | grep Warning 2020-09-26T01:23:45Z Warning: Reducing -maxconnections from 10000 to 9999, because of system limitations. $ src/bitcoind -maxconnections=1000 | grep Warning 2020-09-26T01:23:45Z Warning: Reducing -maxconnections from 1000 to 999, because of system limitations. $ src/bitcoind -maxconnections=100 | grep Warning [no warning] ``` After this patch (no incorrect warnings): ``` $ src/bitcoind -maxconnections=10000000 | grep Warning 2020-09-26T01:23:45Z Warning: Reducing -maxconnections from 10000000 to 1048417, because of system limitations. $ src/bitcoind -maxconnections=1000000 | grep Warning [no warning] $ src/bitcoind -maxconnections=100000 | grep Warning [no warning] $ src/bitcoind -maxconnections=10000 | grep Warning [no warning] $ src/bitcoind -maxconnections=1000 | grep Warning [no warning] $ src/bitcoind -maxconnections=100 | grep Warning [no warning] ``` ACKs for top commit: n-thumann: tACK https://github.com/bitcoin/bitcoin/pull/20024/commits/ea93bbeb26948c0ddba39b589bd166eaecf446c8, Ran on other systems running Debian 10.5 (4.19.0-8-amd64) and Debian bullseye/sid (5.3.0-1-amd64) and was able to reproduce the issue exactly as you described above on both of them. After applying your patch the issue is fixed :v: laanwj: Code review ACK ea93bbeb26948c0ddba39b589bd166eaecf446c8 theStack: tACK ea93bbeb26948c0ddba39b589bd166eaecf446c8 Tree-SHA512: 9b0939a1a51fdf991d11024a5d20b4f39cab1a80320b799a1d24d0250aa059666bcb1ae6dd79c941c2f2686f07f59fc0f6618b5746aa8ca6011fdd202828a930
2020-11-19Merge #18531: rpc: remove deprecated CRPCCommand constructorMarcoFalke
faaf9c58e4aa809019d4ca12747dd47411988e37 remove CRPCCommand constructor that takes rpcfn_type function pointer (MarcoFalke) fa19bb2cd8c575593583138a84e6bb3444d6196d remove dead rpc code (MarcoFalke) Pull request description: Remove the CRPCCommand arguments, now that they are asserted to be equal and thus redundant ### Future work > Here or follow up, makes sense to also assert type of returned UniValue? Sure, but let's not get ahead of ourselves. I am going to submit any further works as follow-ups, including: * Removing all python regex linters on the args, now that RPCMan can be used to generate any output, including the cli.cpp table * Auto-formatting and sanity checking the RPCExamples with RPCMan * Checking passed-in json in self-check. Removing redundant checks * Checking returned json against documentation to avoid regressions or false documentation * Compile the RPC documentation at compile-time to ensure it doesn't change at runtime and is completely static ### Bugs found * The assert identified issue #18607 * The changes itself fixed bug #19250 ACKs for top commit: fjahr: tested ACK faaf9c58e4aa809019d4ca12747dd47411988e37 promag: Tested ACK faaf9c58e4aa809019d4ca12747dd47411988e37. ryanofsky: Code review ACK faaf9c58e4aa809019d4ca12747dd47411988e37. Two obviously good simplifications. Tree-SHA512: 5de3b440f7b2ed2c3e86655d4f0e2e5df9c67e8ce3c7817d5ea5311d1a38690f2f3e28fab41aad6936be9fc884326d037e5f19e85d4d2fe281474dada13911ee
2020-11-19Merge #15710: wallet: Catch ios_base::failure specificallyWladimir J. van der Laan
7486e2771e7b5d6fa84df6e954be76350c84e220 Tests: Unit test related to WalletDB ReadKeyValue (Bushstar) 32def8d1c29e0855fe5429687acabd2f29119316 Catch ios_base::failure specifically (Peter Bushnell) Pull request description: In https://github.com/bitcoin/bitcoin/pull/2950 a hash of the pubkey and private was added to speed up key import, this was made backwards compatible by reading the hash in a try block with an ellipses catch all in case the hash was not present. CDataStream::read() specifically throws std::ios_base::failure, backwards compatibility expects only that error to be thrown, if something else gets thrown we should not be catching it. The change in this commit is to catch that exception only. If any other exception is thrown other than std::ios_base::failure it will be caught by the wider try block and an error written to the log and/or console. CDataStream::read() throwing std::ios_base::failure. https://github.com/bitcoin/bitcoin/blob/2c364fde423e74b4e03ebcff4582a9db7a6c4e4b/src/streams.h#L191 Wider catch statements that pick up all others exceptions other than ios_base::failure. https://github.com/bitcoin/bitcoin/blob/2c364fde423e74b4e03ebcff4582a9db7a6c4e4b/src/wallet/walletdb.cpp#L425 https://github.com/bitcoin/bitcoin/blob/2c364fde423e74b4e03ebcff4582a9db7a6c4e4b/src/wallet/walletdb.cpp#L430 ACKs for top commit: laanwj: Code review ACK 7486e2771e7b5d6fa84df6e954be76350c84e220 Tree-SHA512: 5364bf935af8ec603bf5b8fef8c23b5cdaa4fe3506090cff988413221f2eaa99f7a91929afb42a35f8881ce2328744a0d32052da51ca0a5b2e65b6809e97f604