Commit graph

26547 commits

Author SHA1 Message Date
Wladimir J. van der Laan
5bab08df17 contrib: Add test for ELF symbol-check
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-12-03 12:15:12 +01:00
Wladimir J. van der Laan
0918eb49d5 doc: Document current boost dependency as 1.71.0
This was forgotten in #19764.
2020-11-24 10:36:07 +01:00
Wladimir J. van der Laan
7ebbee551d
Merge #19764: depends: Split boost into build/host packages + bump + cleanup
f190343c96 depends: boost: Specify cflags+compileflags (Carl Dong)
b2328b7989 depends: boost: Remove unnecessary _archiver_ (Carl Dong)
ab9e047cc2 depends: boost: Cleanup toolset selection (Carl Dong)
86002e7e90 depends: boost: Cleanup architecture/address-model (Carl Dong)
d7048fa73f depends: boost: Disable all compression (Carl Dong)
9cf2ee54d3 depends: boost: Split into non-/native packages (Carl Dong)
a57b498560 depends: boost: Bump to 1.71.0 (Carl Dong)
800655ff31 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.
  		f8462a6d27/depends/packages/boost.mk (L36)
  		Upstream boost patched it out in d20b64cf37, 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: 374f96516a
  		2. Commit where `CXXFLAGS` was introduced: 5d49abc1f2
  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 f190343c96

Tree-SHA512: f8b728a34da4f0a9a985a819a5762f2fc2689ea24c7eba1d24d26dfbd4c59f202227c699b0a4069dab10b6329cf9f4c6dd95082685776ee43dd5f7b659acdef1
2020-11-24 10:33:08 +01:00
Carl Dong
f190343c96
depends: boost: Specify cflags+compileflags 2020-11-23 15:50:59 -05:00
Carl Dong
b2328b7989
depends: boost: Remove unnecessary _archiver_
We already have $(package)_ar, so just use that instead
2020-11-23 15:50:58 -05:00
Carl Dong
ab9e047cc2
depends: boost: Cleanup toolset selection 2020-11-23 15:50:57 -05:00
Carl Dong
86002e7e90
depends: boost: Cleanup architecture/address-model 2020-11-23 15:50:56 -05:00
Carl Dong
d7048fa73f
depends: boost: Disable all compression 2020-11-23 15:50:55 -05:00
Carl Dong
9cf2ee54d3
depends: boost: Split into non-/native packages 2020-11-23 15:50:54 -05:00
Carl Dong
a57b498560
depends: boost: Bump to 1.71.0 2020-11-23 15:50:53 -05:00
Carl Dong
800655ff31
depends: boost: Refer to version in URL 2020-11-23 15:50:52 -05:00
MarcoFalke
cb89e18845
Merge #19179: ci: Run ci configs on cirrus
fa7a4385d0 ci: Fix doc typos in .cirrus.yml (MarcoFalke)
fa73674738 ci: Run i686 centos ci config on cirrus (MarcoFalke)
fa1f949a4d 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 fa7a4385d0: patch looks correct

Tree-SHA512: 1b7125c7f0d2288931fb8c5e90345891d5f7c1f00c4af136afbeb36bd2836f72920a1877dacc7be787e2c8d84de2a733c1ca71931e5c101b222c1fea588619b3
2020-11-23 21:02:17 +01:00
MarcoFalke
fa7a4385d0
ci: Fix doc typos in .cirrus.yml 2020-11-23 17:11:05 +01:00
MarcoFalke
fa73674738
ci: Run i686 centos ci config on cirrus 2020-11-23 17:09:12 +01:00
MarcoFalke
fa1f949a4d
ci: Run nowallet ci config on cirrus 2020-11-23 17:08:48 +01:00
MarcoFalke
2ee954daae
Merge #20458: test: add is_bdb_compiled helper
b87caf10b5 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 b87caf10b5

Tree-SHA512: e84fb22e017b28f0f75d17e5368fcba22a893484b31b12082cfe9354e6fbd566daf34b3b82f7deb7205b2061c9c61538e402df000e2f05428affae6dbea05c5e
2020-11-23 15:53:40 +01:00
Wladimir J. van der Laan
555b5d1bf9
Merge #20419: build: set minimum supported macOS to 10.14
a52ecc936a 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 a52ecc936a, I have reviewed the code and it looks OK, I agree it can be merged.

Tree-SHA512: f669b2fc777aeea1e9afdbbc7bd9afe3997418211db6ba53c934cae0e62a9b999603da539518c229f34961d275c9e2f315c7b022cf5fb97bd201a69c85d470cc
2020-11-23 14:24:58 +01:00
Wladimir J. van der Laan
b0c9024a7c
Merge #20449: build: Fix Windows installer build
68c2ef13e9 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 68c2ef13e9
  laanwj:
    Code review ACK 68c2ef13e9
  hebasto:
    Approach ACK 68c2ef13e9, tested on Linux Mint 20 (x86_64, nsis 3.05-2).

Tree-SHA512: 845560ff176eae8081096426790c928a773fa75d366f42a2a4631c1be2ae9234d7a5b72854ccfaa7fa1a32002b937ca393b12168ffacf9a5e3e311a76725483a
2020-11-23 13:36:41 +01:00
Sjors Provoost
b87caf10b5
test: add is_bdb_compiled helper 2020-11-23 11:30:55 +01:00
Wladimir J. van der Laan
86bf3ae3b5
Merge #20202: wallet: Make BDB support optional
d52f502b1e Fix mock SQLiteDatabases (Andrew Chow)
99309ab3e9 Allow disabling BDB in configure with --without-bdb (Andrew Chow)
ee47f11f73 GUI: Force descriptor wallets when BDB is not compiled (Andrew Chow)
71e40b33bd RPC: Require descriptors=True for createwallet when BDB is not compiled (Andrew Chow)
6ebc41bf9c Enforce salvage is only for BDB wallets (Andrew Chow)
a58b719cf7 Do not compile BDB things when USE_BDB is defined (Andrew Chow)
b33af48210 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 d52f502b1e

Tree-SHA512: 5a92ba7a542acc2e27003e9d4e5940e0d02d5c1f110db06cdcab831372bfd83e8d89c269caff31dd5bff062c1cf5f04683becff12bd23a33be731676f346553d
2020-11-23 10:30:01 +01:00
Wladimir J. van der Laan
1b75f2542d
Merge #20432: net: Treat raw message bytes as uint8_t
fabecce719 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 fabecce719
  theStack:
    Code Review ACK fabecce719
  jonatack:
    Tested ACK fabecce719

Tree-SHA512: e6d9803c78633fde3304faf592afa961ff9462a7912d1da97a24720265274aa10ab4168d71b6ec2756b7448dd42585321afee0e5c889e705be778ce9a330d145
2020-11-23 10:26:25 +01:00
fanquake
e9a1c9fbde
Merge #19867: build: document and cleanup Qt hacks
e1f2553e11 build: remove global_init_link_order from mac qt qmake.conf (fanquake)
498fa16bea build: document preprocessing steps in qt package (fanquake)
bd5d9336d9 build: don't copy Info.plist.* into mkspec for macOS qt build (fanquake)
bfd7e33b4b build: remove plugin_no_soname from mac qt qmake.conf (fanquake)
fdde4c7ce6 build: pass XCODE_VERSION through to qt macOS cross compile conf (fanquake)
49473ef211 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 e1f2553e11

Tree-SHA512: 4e6489d877aaa300f69e091d7117136da49611bd80afd45adfbd7ddeb5b3c9c76fb0f87a3249cbe63ba93129df56281fd4a9389daadc852211325c5ca9ac6567
2020-11-22 14:30:16 +08:00
Andrew Chow
68c2ef13e9 Fix version string in Windows and Mac installers
Fixes some typos that cause gitian to fail to make the installers.
2020-11-21 14:12:08 -05:00
MarcoFalke
816132e6eb
Merge #20426: wallet: allow zero-fee fundrawtransaction/walletcreatefundedpsbt and other fixes
9f08780dd7 Use the correct incremental fee constant in bumpfee help (Jon Atack)
3f1e10b2b1 Update feeRate (BTC/kvB) to fee_rate (sat/vB) in wallet_bumpfee (Jon Atack)
1b3d700928 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 9f08780dd7  🐾
  promag:
    Code review ACK 9f08780dd7.
  Xekyo:
    Code review reACK 9f08780dd7.

Tree-SHA512: 413dfb4f23ebaf3d2ef210dd04610a843272e64eabba428699f5de4d646a86ac4911dab66b5e2f5ebea53b76e4be8347ef40824c1592c750d5eaa12579d3cdf6
2020-11-21 07:47:40 +01:00
MarcoFalke
d4159984c3
Merge #20223: build: Drop the leading 0 from the version number
8f7b930475 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 8f7b930475 🎻

Tree-SHA512: b5c3fae14d4c0a9c0ab3b1db7c949ecc0ac3537646306b13d98dd0efc17c489cdd16d43f0a24aaa28e9c4a92ea360500e05480a335b03f9fb308010cdd93a436
2020-11-20 15:42:07 +01:00
MarcoFalke
fabecce719
net: Treat raw message bytes as uint8_t 2020-11-20 15:11:21 +01:00
fanquake
ea460291f9
Merge #20430: sanitizers: Add suppression for unsigned-integer-overflow in libstdc++
0f020cdf0a 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 0f020cdf0a
  practicalswift:
    cr ACK 0f020cdf0a

Tree-SHA512: e304259a1eed878263bd715b4d16c57f8974264c23ccd6799f85e8141b2eb0b5c6468a6452ffbc7334f57c1957b6e43bb248760b3c0718d93f092d57764d0a8f
2020-11-20 17:56:03 +08:00
fanquake
4c2ee5c855
Merge #20424: build: Update univalue subtree
2a55a0ed30 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 fa17eef627
  practicalswift:
    cr ACK fa17eef627

Tree-SHA512: d87ca5be6769b4cd0c9b9e319973bc0c4f2b7121779f9554e11f34a4edb0013997e875c7edb7bc6eb9309ff5c13379d22f436cd4fb9e6e68df6f0aee29fed914
2020-11-20 17:53:34 +08:00
Jon Atack
9f08780dd7
Use the correct incremental fee constant in bumpfee help
and remove redundant units ("Must be at least 1.000 sat/vB sat/vB" -> "1.00 sat vB")
2020-11-20 09:43:52 +01:00
Jon Atack
3f1e10b2b1
Update feeRate (BTC/kvB) to fee_rate (sat/vB) in wallet_bumpfee
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-20 09:40:47 +01:00
Jon Atack
1b3d700928
Allow zero-fee fundrawtxn and walletcreatefundedpsbt calls
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-20 09:40:44 +01:00
Jonas Schnelli
094663842d
Merge bitcoin-core/gui#13: Hide peer detail view if multiple are selected
76277cc77d 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 76277cc77d.
  hebasto:
    ACK 76277cc77d, tested on Linux Mint 20 (Qt 5.12.8).

Tree-SHA512: 16c9cfd6ccb7077a9f31917a6cb3532e32d17d21f735e43bf4720fb0c8bb1bd539d42569c105df4b551f5dccb4acaeedb6bb2362620a9cb9267a602d9d065b9f
2020-11-20 09:38:05 +01:00
Jonas Schnelli
c45e1d9aa7
Merge bitcoin-core/gui#21: Update pruning tooltip, original author BitcoinErrorLog
2fc5efc55c 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 2fc5efc55c
  Sjors:
    utACK 2fc5efc55c and welcome to the dark side!
  jonasschnelli:
    ACK 2fc5efc55c

Tree-SHA512: 45d6a7efbf4d34d20b9de439c988a39c739591b854726b6682c4cffcb23dff7d9131afab572fa0c9a8bc033c46c3878efdfbf8a984aafde632e1dfc1caa1cbbb
2020-11-20 09:35:00 +01:00
MarcoFalke
3d632c3f49
Merge #20428: tests: shrink feature_taproot transfer of funds tx
7ffac12545 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 7ffac12545
  MarcoFalke:
    cr ACK 7ffac12545

Tree-SHA512: 68445b4827dddb9a8e8614d61a68f5bbd7152557bf940be0a75741cb49deeff1566198da1a777ac66cb3fed93e64a30bf895875d6cc6ae9e48275e3febb620a6
2020-11-20 09:30:12 +01:00
Jonas Schnelli
0f020cdf0a sanitizers: Add suppression for unsigned-integer-overflow in libstdc++ basic_string.tcc 2020-11-20 08:40:50 +01:00
Wladimir J. van der Laan
fdd068507d
Merge #20056: net: Use Span in ReceiveMsgBytes
fa5ed3b4ca 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 fa5ed3b4ca code review, rebased to current master 12a1c3ad1a, debug build, unit tests, ran bitcoind/-netinfo/getpeerinfo
  theStack:
    ACK fa5ed3b4ca

Tree-SHA512: 89bf111323148d6e6e50185ad20ab39f73ab3a58a27e46319e3a08bcf5dcf9d6aa84faff0fd6afb90cb892ac2f557a237c144560986063bc736a69ace353ab9d
2020-11-20 06:10:58 +01:00
Wladimir J. van der Laan
46f0b2f976
Merge #19851: refactor: Extract ParseOpCode from ParseScript
c92387232f 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 c92387232f
  theStack:
    re-ACK c92387232f

Tree-SHA512: d59d1964760622cf365479d44e3e676aa0bf46b60e77160140d967e012042df92121d3224c7551dc96eff5ff3294598cc6bade82adb3f60d28810e18e60e1257
2020-11-20 05:36:01 +01:00
Wladimir J. van der Laan
2878167c18
Merge #20000: test: fix creation of "std::string"s with \0s
ecc6cf1a3b 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 ecc6cf1a3b
  practicalswift:
    ACK ecc6cf1a3b modulo happily green CI

Tree-SHA512: 5eb489e8533a4199a9324b92f7280041552379731ebf7dfee169f70d5458e20e29b36f8bfaee6f201f48ab2b9d1d0fc4bdf8d6e4c58d6102f399cfbea54a219e
2020-11-20 04:39:37 +01:00
Anthony Towns
7ffac12545 tests: shrink feature_taproot transfer of funds tx 2020-11-20 07:29:42 +10:00
MarcoFalke
0a267f4eb8
Merge bitcoin-core/gui#46: refactor: Fix deprecation warnings when building against Qt 5.15
705c1f0648 qt, refactor: Fix 'buttonClicked is deprecated' warnings (Hennadii Stepanov)
c2f4e5ea1d qt, refactor: Fix 'split is deprecated' warnings (Hennadii Stepanov)
8e12d69961 qt, refactor: Fix 'QFlags is deprecated' warnings (Hennadii Stepanov)
fa5749c805 qt, refactor: Fix 'pixmap is deprecated' warnings (Hennadii Stepanov)
b02264cb5d 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 705c1f0648
  promag:
    Tested ACK 705c1f0648 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-19 19:04:22 +01:00
MarcoFalke
db58b857f7
Merge #20329: docs/descriptors.md: Remove hardened marker in the path after xpub
dc80a7d0b0 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-19 17:59:20 +01:00
Wladimir J. van der Laan
04670ef81e
Merge #20385: test: run mempool_spend_coinbase.py even with wallet disabled
21f2433601 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 21f2433601

Tree-SHA512: 301582c04376371cfa8f1ebb2418a4341b42ddcd9ad4f48b58bcf888d867a97bdc409972856b67a8339ac5e60124aefee82a049b4f7fc6bca7a18d7e92e090be
2020-11-19 16:40:02 +01:00
Wladimir J. van der Laan
848d66519c
Merge #20054: Remove confusing and useless "unexpected version" warning
0000a0c7e9 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 0000a0c7e9
  decryp2kanon:
    ACK 0000a0c
  LarryRuane:
    ACK 0000a0c7e9

Tree-SHA512: 16e069c84be6ab6034baeefdc515d0e5cdf560b2005d2faec5f989d45494bd16cfcb4ffca6a17211d9556ae44f9737a60a476c08b5c2bb5e1bd29724ecd6d5c1
2020-11-19 16:39:31 +01:00
MarcoFalke
884bde510e
Merge #20291: [net] Consolidate logic around calling CAddrMan::Connected()
0bfce9dc46 [addrman] Fix Connected() comment (John Newbery)
eefe194718 [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 0bfce9dc46
  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-19 16:30:54 +01:00
MarcoFalke
fa17eef627
Update univalue subtree 2020-11-19 15:48:24 +01:00
MarcoFalke
2a55a0ed30 Squashed 'src/univalue/' changes from 98261b1e7b..98fadc0909
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-19 15:47:07 +01:00
Wladimir J. van der Laan
c4d1e24f54
Merge #20047: test: use wait_for_{block,header} helpers in p2p_fingerprint.py
6b56c1f4d0 test: remove last_{block,header}_equals() in p2p_fingerprint.py (Sebastian Falbesoner)
136d96b71f 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-19 15:38:17 +01:00
Wladimir J. van der Laan
7aa94569ce
Merge #20024: init: Fix incorrect warning "Reducing -maxconnections from N to N-1, because of system limitations"
ea93bbeb26 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 ea93bbeb26, 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 ✌️
  laanwj:
    Code review ACK ea93bbeb26
  theStack:
    tACK ea93bbeb26

Tree-SHA512: 9b0939a1a51fdf991d11024a5d20b4f39cab1a80320b799a1d24d0250aa059666bcb1ae6dd79c941c2f2686f07f59fc0f6618b5746aa8ca6011fdd202828a930
2020-11-19 15:33:02 +01:00
MarcoFalke
71d068db40
Merge #18531: rpc: remove deprecated CRPCCommand constructor
faaf9c58e4 remove CRPCCommand constructor that takes rpcfn_type function pointer (MarcoFalke)
fa19bb2cd8 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 faaf9c58e4
  promag:
    Tested ACK faaf9c58e4.
  ryanofsky:
    Code review ACK faaf9c58e4. Two obviously good simplifications.

Tree-SHA512: 5de3b440f7b2ed2c3e86655d4f0e2e5df9c67e8ce3c7817d5ea5311d1a38690f2f3e28fab41aad6936be9fc884326d037e5f19e85d4d2fe281474dada13911ee
2020-11-19 14:19:05 +01:00
Wladimir J. van der Laan
9ab9665c74
Merge #15710: wallet: Catch ios_base::failure specifically
7486e2771e Tests: Unit test related to WalletDB ReadKeyValue (Bushstar)
32def8d1c2 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.
  2c364fde42/src/streams.h (L191)

  Wider catch statements that pick up all others exceptions other than ios_base::failure.
  2c364fde42/src/wallet/walletdb.cpp (L425)

  2c364fde42/src/wallet/walletdb.cpp (L430)

ACKs for top commit:
  laanwj:
    Code review ACK 7486e2771e

Tree-SHA512: 5364bf935af8ec603bf5b8fef8c23b5cdaa4fe3506090cff988413221f2eaa99f7a91929afb42a35f8881ce2328744a0d32052da51ca0a5b2e65b6809e97f604
2020-11-19 12:32:48 +01:00