Commit Graph

22901 Commits

Author SHA1 Message Date
Wladimir J. van der Laan
179504ccb6
Merge #17948: build: pass -fno-ident in Windows gitian descriptor
530d02addb build: pass -fno-ident in Windows gitian descriptor (fanquake)

Pull request description:

  `-fno-ident` prevents compilers from emitting compiler name and version number information that can needlessly bloat binaries.

  For example, in the `v0.19.0.1` Windows release binaries, there are > 1000 GCC compiler version strings embedded:
  ```bash
  # GCC: (GNU) 7.3-posix 20180312... & GCC: (GNU) 6.3.0 20170415.......
  strings bitcoind.exe | rg GCC | wc -l
      1021
  ```

  They end up collected in the end of the`.rdata` section, and cannot be removed by `strip`. i.e:

  ```bash
  objdump --section=.rdata --full-contents bitcoind.exe
  ...
   cfcc00 00000000 00000000 00000000 00000000  ................
   cfcc10 00000000 00000000 00000000 00000000  ................
   cfcc20 4743433a 2028474e 55292036 2e332e30  GCC: (GNU) 6.3.0
   cfcc30 20323031 37303431 35000000 00000000   20170415.......
   cfcc40 4743433a 2028474e 55292037 2e332d70  GCC: (GNU) 7.3-p
   cfcc50 6f736978 20323031 38303331 32000000  osix 20180312...
   cfcc60 4743433a 2028474e 55292037 2e332d70  GCC: (GNU) 7.3-p
   cfcc70 6f736978 20323031 38303331 32000000  osix 20180312...
  ```

  The flag is available for [Clang](https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-qn) and [GCC](https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#index-fno-ident).

  Relevant code in [GCC](https://github.com/gcc-mirror/gcc/blob/master/gcc/toplev.c#L565-L578):
  ```c
    /* Attach a special .ident directive to the end of the file to identify
       the version of GCC which compiled this code.  The format of the .ident
       string is patterned after the ones produced by native SVR4 compilers.  */
    if (!flag_no_ident)
      {
        const char *pkg_version = "(GNU) ";
        char *ident_str;

        if (strcmp ("(GCC) ", pkgversion_string))
  	pkg_version = pkgversion_string;

        ident_str = ACONCAT (("GCC: ", pkg_version, version_string, NULL));
        targetm.asm_out.output_ident (ident_str);
      }
  ```

ACKs for top commit:
  practicalswift:
    ACK 530d02addb
  laanwj:
    ACK 530d02addb

Tree-SHA512: b3b28f43ec483dee28d1df8548fe72425bf00e750701825c256395f6aa7b23256eb27609b51779b86aed108b6eaa3912181a9d8282e23eebf9cee7784f9fabe0
2020-02-17 12:05:44 +01:00
Wladimir J. van der Laan
051439813e
Merge #13339: wallet: Replace %w by wallet name in -walletnotify script
4e9efac678 test: Check wallet name in -walletnotify script (João Barbosa)
9a5b5ee81f wallet: Replace %w by wallet name in -walletnotify script (João Barbosa)

Pull request description:

  Fixes #13237.

ACKs for top commit:
  laanwj:
    ACK 4e9efac678

Tree-SHA512: 189dd1c785485f2e974d7c12531851b2a977778b3b954aa95efd527322ba3345924cfd587fb9c90b0fa979202af0ab2d90e53d125fe266a36c94f757e4176203
2020-02-17 11:59:23 +01:00
MarcoFalke
263f53e2d0
Merge #18098: scripted-diff: Add missing spaces in RPCResult, Normalize type names
fad027fb0c scripted-diff: Add missing spaces in RPCResult, Fix type names (MarcoFalke)

Pull request description:

  This makes the rendered diff smaller when the RPCResult is machine generated later on (Previous attempts: #14601 and #14459)

ACKs for top commit:
  Sjors:
    ACK fad027fb0c

Tree-SHA512: 48afd571b1cd349ca0b29bb444c1c7cda657e07dd96c610d479f931ccd938186aec98e533d0552b5b10afc9a3d7b911359260a49448e8e1106e3647b2c71f3ba
2020-02-16 17:26:21 -08:00
MarcoFalke
94c0287aec
Merge #18159: tests: Add --valgrind option to test/fuzz/test_runner.py for running fuzzing test cases under valgrind
1b068c50dd tests: Add --valgrind option to test/fuzz/test_runner.py for running fuzzing test cases under valgrind (practicalswift)

Pull request description:

  Add `--valgrind` option to `test/fuzz/test_runner.py` for running fuzzing test cases under `valgrind`.

  Test this PR using:

  ```
  $ make distclean
  $ ./autogen.sh
  $ CC=clang CXX=clang++ ./configure --enable-fuzz --with-sanitizers=fuzzer
  $ make
  $ git clone https://github.com/bitcoin-core/qa-assets
  $ test/fuzz/test_runner.py --valgrind -l DEBUG qa-assets/fuzz_seed_corpus/
  ```

ACKs for top commit:
  MarcoFalke:
    ACK 1b068c50dd 🌒

Tree-SHA512: e6eb99af1bceaa6f36f49092a05de415848099ccc1497cc098a62e925954c978cb37a46410b44ed5eef2c6464ca4ecb06397b75b5d35701f5a8525436e47b9fd
2020-02-16 09:47:54 -08:00
MarcoFalke
33861a8367
Merge #18145: build: add Wreturn-type to Werror flags, check on more Travis machines
c98c26ee99 ci: use --enable-werror on more hosts (Sjors Provoost)
6ba617dbe2 build: add Wreturn-type to Werror flags (Sjors Provoost)

Pull request description:

  I overlooked a missing `return false` in https://github.com/bitcoin/bitcoin/pull/17577#discussion_r379137776 and the warning only showed up on one Travis machine (`warning: control reaches end of non-void function [-Wreturn-type]`).

  This PR promotes `Wreturn-type` to an error when configured with `--enable-werror`. I also added `--enable-werror` to the Travis machine that happened to catch this particular instance.

ACKs for top commit:
  vasild:
    ACK c98c26e.
  practicalswift:
    ACK c98c26ee99

Tree-SHA512: 64e86c67fef2c5048aab201a8400b7e4a6f27b93d626159ba0b2807b5f119d2b0a83e3372db88f692cb4b0d059722d6a642d130c74a4f991a27f3a6b21780b5f
2020-02-16 09:22:06 -08:00
practicalswift
1b068c50dd tests: Add --valgrind option to test/fuzz/test_runner.py for running fuzzing test cases under valgrind 2020-02-16 11:11:54 +00:00
MarcoFalke
2a2631fb0d
Merge #18108: Fix .gitignore policy in build_msvc directory
dcb7af053d Ignore only auto-generated .vcxproj files (Hennadii Stepanov)
79c811ca2b Specify ignored bitcoin-qt file precisely (Hennadii Stepanov)

Pull request description:

  This PR makes `git` to ignore only auto-generated `.vcxproj` files, i.e.:
  4c2578706c/build_msvc/msvc-autogen.py (L14-L25)

  Fix #17287

ACKs for top commit:
  sipsorcery:
    ACK dcb7af053d.

Tree-SHA512: 5acfc3cb50e1239655bc9715711c8a0489093ed7cc287756614740f67908f11a55976cec75b29e263d4d3579b6b8af99bb3823515d43adf204cd5935fb2e1a3f
2020-02-15 10:40:44 -08:00
Sjors Provoost
c98c26ee99
ci: use --enable-werror on more hosts 2020-02-14 10:40:23 +01:00
Sjors Provoost
6ba617dbe2
build: add Wreturn-type to Werror flags
This is supported by GCC and Clang.
https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html
https://clang.llvm.org/docs/DiagnosticsReference.html#wreturn-type
2020-02-14 10:40:23 +01:00
Wladimir J. van der Laan
470664f2b7
Merge #17746: refactor: rpc: Remove vector copy from listtransactions
25bc17fceb refactor: rpc: Remove vector copy from listtransactions (João Barbosa)

Pull request description:

  Current approach
   - copy accumulated `ret` vector to `arrTmp`
   - drop unnecessary elements from `arrTmp`
   - reverse `arrTmp`
   - clear `ret`
   - copy `arrTmp` to the `ret`

  New approach
   - create a vector from the accumulated `ret` with just the necessary elements already reversed
   - copy it to the result

  This PR doesn't change behavior.

ACKs for top commit:
  ryanofsky:
    Code review ACK 25bc17fceb. Just comment and commit message tweaks since last review

Tree-SHA512: 87906561e3accdbdb0f4a8194cbcd76ea53ae53d0ce135b90bc54a5f77e300b14ef08505e7daf1fe52426f135442a743da5a027416a769bd454922357cebe7c0
2020-02-13 18:50:02 +01:00
João Barbosa
25bc17fceb refactor: rpc: Remove vector copy from listtransactions
No change in behavior.
2020-02-13 15:43:35 +00:00
fanquake
530d02addb
build: pass -fno-ident in Windows gitian descriptor
This prevents compilers from emitting compiler name and
version number info that can needlessly bloat binaries.

Accepted by Clang and GCC. See:

https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-qn

https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html#index-fno-ident
2020-02-13 18:20:43 +08:00
Jonas Schnelli
0c20809da8
Merge #18121: gui: Throttle GUI update pace when -reindex
c9fe61291e gui: Throttle GUI update pace when -reindex (Hennadii Stepanov)

Pull request description:

  This is grabbed from #17565.

  All **laanwj**'s and **ryanofsky**'s suggestions are implemented.

  With this PR,  the GUI does not freeze when a user runs:
  ```
  $ ./src/qt/bitcoin-qt -reindex
  ```

ACKs for top commit:
  jonasschnelli:
    utACK c9fe61291e

Tree-SHA512: c7be316cb73d3d286bdf8429a960f71777d13a73d059869a64e23ad276499252b561a3a5b9613c4c1ad58cc0de26283c1ec72be745c401f604eaa05f70bf7d64
2020-02-13 08:48:07 +01:00
Jonas Schnelli
b6a16fa44e
Merge #18123: gui: Fix race in WalletModel::pollBalanceChanged
bf36a3ccc2 gui: Fix race in WalletModel::pollBalanceChanged (Russell Yanofsky)

Pull request description:

  Poll function was wrongly setting cached height to the current chain height instead of the chain height at the time of polling.

  This bug could cause balances to appear out of date, and was first introduced a0704a8996 (diff-2e3836af182cfb375329c3463ffd91f8L117). Before that commit, there wasn't a problem because cs_main was held during the poll update.

  Currently, the problem should be rare. But if 8937d99ce81a27ae5e1012a28323c0e26d89c50b from #17954 were merged, the problem would get worse, because the wrong cachedNumBlocks value would be set if the wallet was polled in the interval between a block being connected and it processing the BlockConnected notification.

  MarcoFalke also points out that a0704a8996 could lead to GUI hangs as well, because previously the pollBalanceChanged method, which runs on the GUI thread, would only make a nonblocking TRY_LOCK(cs_main) call, but after could make blocking LOCK(cs_main) calls, potentially locking up the GUI.

  Thanks to John Newbery for finding this bug this while reviewing https://github.com/bitcoin/bitcoin/pull/17954.

ACKs for top commit:
  Empact:
    utACK bf36a3ccc2
  jonasschnelli:
    utACK bf36a3c

Tree-SHA512: 1f4f229fa70a6d1fcf7be3806dca3252e86bc1755168fb421258389eb95aae67f863cb1216e6dc086b596c33560d1136215a4c87b5ff890abc8baaa3333b47f4
2020-02-13 08:44:36 +01:00
Hennadii Stepanov
c9fe61291e
gui: Throttle GUI update pace when -reindex
Co-authored-by: Barry Deeney <mxaddict@codedmaster.com>
Co-authored-by: Russell Yanofsky <russ@yanofsky.org>
2020-02-12 23:51:41 +02:00
Wladimir J. van der Laan
2bdc476d4d
Merge #17708: prevector: avoid misaligned member accesses
5f26855f10 test: Remove ubsan alignment suppressions (Wladimir J. van der Laan)
9d933ef919 prevector: avoid misaligned member accesses (Anthony Towns)

Pull request description:

  Ensure prevector data is appropriately aligned. Earlier discussion in #17530.

  **Edit laanwj**: In contrast to #17530, it does this without increase in size of any of the coin cache data structures (x86_64, clang)

  | Struct        | (size,align) before           | (size,align) after  |
  | ------------- | ------------- | ------- |
  | Coin | 48, 8        |     48, 8   |
  | CCoinsCacheEntry | 56, 8    |   56, 8  |
  | CScript | 32, 1       |      32, 8  |

ACKs for top commit:
  laanwj:
    ACK 5f26855f10
  practicalswift:
    ACK 5f26855f10
  jonatack:
    ACK 5f26855f10

Tree-SHA512: 98d112d6856f683d5b212410b73f3071d2994f1efb046a2418a35890aa1cf1aa7c96a960fc2e963fa15241e861093c1ea41951cf5b4b5431f88345eb1dd0a98a
2020-02-12 17:48:30 +01:00
Wladimir J. van der Laan
d4fc9aeb8b
Merge #18125: doc: remove PPA note from release-process.md
53234fd0c7 doc: remove PPA note from release-process.md (fanquake)

Pull request description:

  The PPA is [no longer maintained](https://launchpad.net/~bitcoin/+archive/ubuntu/bitcoin) (in favour of the [snap](https://github.com/bitcoin-core/packaging/tree/master/snap)), so no need to bug the bluematt.

  Also fixes a link to the macdeploy instructions.

ACKs for top commit:
  laanwj:
    LGTM ACK 53234fd0c7
  practicalswift:
    ACK 53234fd0c7

Tree-SHA512: 11b32f9b8256f3250139a74522f35496af717cc611ff6de92bca13e0300c049630a61a2ce21976907f4bf8d2cabc54647e862d7ebffc07f2ef6b7d3ba24b3f32
2020-02-12 16:45:17 +01:00
MarcoFalke
caa2f3af29
Merge #12134: Build previous releases and run functional tests
c456145b2c [test] add 0.19 backwards compatibility tests (Sjors Provoost)
b769cd142d [test] add v0.17.1 wallet upgrade test (Sjors Provoost)
9d9390dab7 [tests] add wallet backwards compatility tests (Sjors Provoost)
c7ca630896 [scripts] support release candidates of earlier releases (Sjors Provoost)
8b1460dbd1 [tests] check v0.17.1 and v0.18.1 backwards compatibility (Sjors Provoost)
ae379cf7d1 [scripts] build earlier releases (Sjors Provoost)

Pull request description:

  This PR adds binaries for 0.17, 0.18 and 0.19 to Travis and runs a basic block propagation test.

  Includes test for upgrading v0.17.1 wallets and opening master wallets with older versions.

  Usage:

  ```sh
  contrib/devtools/previous_release.sh -f -b v0.19.0.1 v0.18.1 v0.17.1
  test/functional/backwards_compatibility.py
  ```

  Travis caches these earlier releases, so it should be able to run these tests with little performance impact.

  Additional scenarios where it might be useful to run tests against earlier releases:

  * creating a wallet with #11403's segwit implementation, copying it to an older node and making sure the user didn't lose any funds (although this PR doesn't support `v0.15.1`)
  * future consensus changes
  * P2P changes (e.g. to make sure we don't accidentally ban old nodes)

ACKs for top commit:
  MarcoFalke:
    ACK c456145b2c 🔨

Tree-SHA512: 360bd870603f95b14dc0cd629532cc147344f632b808617c18e1b585dfb1f082b401e5d493a48196b719e0aeaee533ae0a773dfc9f217f704aae898576c19232
2020-02-12 06:20:12 -08:00
fanquake
53234fd0c7
doc: remove PPA note from release-process.md
Also fixes a link to the macdeploy instructions.
2020-02-12 09:42:28 +08:00
fanquake
73a396e028
Merge #18004: build: don't embed a build-id when building libdmg-hfsplus
cb9e88e73a build: don't embed a build-id when building libdmg-hfsplus (fanquake)

Pull request description:

  There was a [reproducibility issue (IRC logs)](http://www.erisian.com.au/bitcoin-core-dev/log-2020-01-25.html) with the osx `0.19.1rc1` gitian builds. The `build-id` embedded into the `dmg` tool was mismatching. It's possible that differing versions of binutils/ld were the cause.

  While it was resolved after rebuilding the base gitian image, whether an upstream package issue or fluke, we can remove the possibility of it happening in future by just not embedding a build-id into the `dmg` tool at all. Can close if it's not deemed worth it.

  You can test this change using the following:

  ```bash
  # build libdmg
  make native_libdmg-hfsplus_built -C depends/ HOST=x86_64-apple-darwin16 -j6 V=1

  # master
  readelf --string-dump .note.gnu.build-id /bitcoin/depends/work/build/x86_64-apple-darwin16/native_libdmg-hfsplus/7ac55ec64c96f7800d9818ce64c79670e7f02b67-3830944ef98/build/dmg/dmg

  String dump of section '.note.gnu.build-id':
    [     c]  GNU
    [    11]  CjRa?]?^V8?v?;%n??

  # this pr
  readelf --string-dump  .note.gnu.build-id /bitcoin/depends/work/build/x86_64-apple-darwin16/native_libdmg-hfsplus/7ac55ec64c96f7800d9818ce64c79670e7f02b67-a72f53ab110/build/dmg/dmg
  readelf: Warning: Section '.note.gnu.build-id' was not dumped because it does not exist!
  ```

ACKs for top commit:
  laanwj:
    tested ACK cb9e88e73a

Tree-SHA512: 191eed32ed0a04a908f9c1b22188180b2db2f35bae0281940f0f9da2450c5c6807cd6ff5bbcce7c933a9133387b127c3478f7a39a2918c14f17be19fd9ea19b4
2020-02-12 08:50:07 +08:00
Russell Yanofsky
bf36a3ccc2 gui: Fix race in WalletModel::pollBalanceChanged
Poll function was wrongly setting cached height to the current chain height
instead of the chain height at the time of polling.

This bug could cause balances to appear out of date, and was first introduced
a0704a8996 (r378452145)
Before that commit, there wasn't a problem because cs_main was held during the
poll update.

Currently, the problem should be rare. But if
8937d99ce81a27ae5e1012a28323c0e26d89c50b from #17954 were merged, the problem
would get worse, because the wrong cachedNumBlocks value would be set if the
wallet was polled in the interval between a block being connected and it
processing the BlockConnected notification.

MarcoFalke <falke.marco@gmail.com> also points out that a0704a8996 could lead
to GUI hangs as well, because previously the pollBalanceChanged method, which
runs on the GUI thread, would only make a nonblocking TRY_LOCK(cs_main) call,
but after could make blocking LOCK(cs_main) calls, potentially locking up the
GUI.

Thanks to John Newbery <john@johnnewbery.com> for finding this bug this while
reviewing https://github.com/bitcoin/bitcoin/pull/17954.
2020-02-11 16:53:53 -05:00
Sjors Provoost
c456145b2c
[test] add 0.19 backwards compatibility tests 2020-02-11 21:46:23 +01:00
Sjors Provoost
b769cd142d
[test] add v0.17.1 wallet upgrade test 2020-02-11 21:46:23 +01:00
Sjors Provoost
9d9390dab7
[tests] add wallet backwards compatility tests 2020-02-11 21:46:23 +01:00
Sjors Provoost
c7ca630896
[scripts] support release candidates of earlier releases 2020-02-11 21:46:22 +01:00
Sjors Provoost
8b1460dbd1
[tests] check v0.17.1 and v0.18.1 backwards compatibility 2020-02-11 21:46:21 +01:00
Sjors Provoost
ae379cf7d1
[scripts] build earlier releases 2020-02-11 19:37:37 +01:00
fanquake
98264e2ccb
Merge #18104: build: Skip i686 build by default in guix and gitian
fae9084ac5 build: Skip i686 build by default in guix and gitian (MarcoFalke)
fa55a2554c depends: Remove reference to win32 (MarcoFalke)

Pull request description:

  Closes #17504

  Now that we no longer provide downloads for i686 on our website (https://bitcoincore.org/en/download/), there is no need to build them by default.

  i686 can still be built in depends (tested by ci/travis) and in guix/gitian by setting the appropriate `HOSTS`.

ACKs for top commit:
  practicalswift:
    ACK fae9084ac5 -- patch looks correct
  dongcarl:
    ACK fae9084ac5 patch looks correct
  laanwj:
    Code review ACK fae9084ac5
  hebasto:
    ACK fae9084ac5, I have reviewed the code and it looks OK, I agree it can be merged.

Tree-SHA512: b000c19a2cd2a596a52028fa298c4022c24cfdfc1bdb3795a90916d0a00a32e4dd22278db93790b6a11724e08ea8451f4f05c77bc40d1664518e11a8c82d6e29
2020-02-11 16:32:17 +08:00
fanquake
35b7a8e539
Merge #18087: Get rid of VARINT default argument
0e0fa27acb Get rid of VARINT default argument (Pieter Wuille)

Pull request description:

  This removes the need for the non-strandard use of variadic macros.

ACKs for top commit:
  ryanofsky:
    Code review ACK 0e0fa27acb. Only change since last review reverting outdated documentation change from earlier version of pr
  jonatack:
    ACK 0e0fa27 code review, built/ran tests/bitcoind
  practicalswift:
    ACK 0e0fa27acb -- diff looks correct
  MarcoFalke:
    ACK 0e0fa27acb 📯

Tree-SHA512: 6e335e4b586d62112b7260a12481cd949d1b3bbdb83edf8db690348f0a01852e68504336ff3e072e5131a7c8cb404ef11a2f786f842b8d08bbf6ea0e688777b1
2020-02-11 15:26:31 +08:00
Pieter Wuille
0e0fa27acb Get rid of VARINT default argument
This removes the need for the GNU C++ extension of variadic macros.
2020-02-10 12:00:10 -08:00
Wladimir J. van der Laan
646f0ada02
Merge #18051: build: Fix behavior when ALLOW_HOST_PACKAGES unset
0e519fe284 build: Fix behavior when ALLOW_HOST_PACKAGES unset (Hennadii Stepanov)

Pull request description:

  On master (f05c1ac444) during building with depends host packages are always considered by `pkg-config` regardless of `ALLOW_HOST_PACKAGES` environment variable. This causes issues like #18042.

  This is an alternative to #18042 and #18045.

  On master:
  ```
  $ make HOST=x86_64-apple-darwin16 -C depends
  $ CONFIG_SITE=$PWD/depends/x86_64-apple-darwin16/share/config.site ./configure
  ...
  checking for QT_DBUS... yes
  ...
  checking whether to build GUI with support for D-Bus... yes
  ...
  ```

  ---

  With this PR:
  1) `ALLOW_HOST_PACKAGES` unset
  ```
  $ make HOST=x86_64-apple-darwin16 -C depends
  $ CONFIG_SITE=$PWD/depends/x86_64-apple-darwin16/share/config.site ./configure
  ...
  checking for QT_DBUS... no
  ...
  checking whether to build GUI with support for D-Bus... no
  ...
  ```
  2) `ALLOW_HOST_PACKAGES=1`
  ```
  $ make HOST=x86_64-apple-darwin16 ALLOW_HOST_PACKAGES=1 -C depends
  $ CONFIG_SITE=$PWD/depends/x86_64-apple-darwin16/share/config.site ./configure
  ...
  checking for QT_DBUS... yes
  ...
  checking whether to build GUI with support for D-Bus... yes
  ...
  ```

ACKs for top commit:
  jonasschnelli:
    Tested ACK 0e519fe284 - After this PR (and after a `make clean` & `make HOST=x86_64-apple-darwin16` in depends), the macOS depends build on a Debian machine with qt as host package worked (it fails on master due to `ENABLE_DBUS=1`).

Tree-SHA512: d11e1c2bc8ce8a07f3f9b465b01c9b2c814afe75b085a8b88aab74fd3a922aa98180c447457dfc4174515513181c5f4edc521978a1d3d0a112106c98b5c73c0e
2020-02-10 18:11:49 +01:00
Wladimir J. van der Laan
ceb3d45f7d
Merge #17947: test: add unit test for non-standard txs with too large tx size
4537ba5f21 test: add unit test for non-standard txs with too large tx size (Sebastian Falbesoner)

Pull request description:

  Approaches another missing unit test of issue #17394: Checks that the function `IsStandardTx()` returns rejection reason `"tx-size"` if the transaction weight is larger than `MAX_STANDARD_TX_WEIGHT` (=400000 vbytes).

ACKs for top commit:
  Empact:
    Code Review ACK 4537ba5f21
  instagibbs:
    ACK 4537ba5f21

Tree-SHA512: ab32e3e47e0b337253aef3da9b7c97d01f4130d00d5860588dfed02114eec3ba49473acc6419448affd63e883fd827bf308716965606eaddee242c4c5a4eb799
2020-02-10 17:59:50 +01:00
Hennadii Stepanov
dcb7af053d
Ignore only auto-generated .vcxproj files 2020-02-10 18:47:26 +02:00
Hennadii Stepanov
79c811ca2b
Specify ignored bitcoin-qt file precisely
This commit prevents ignoring the build_msvc/bitcoin-qt directory.
2020-02-10 18:42:13 +02:00
Wladimir J. van der Laan
4c2578706c
Merge #18021: Serialization improvements step 4 (undo.h)
3c94b0039d Convert undo.h to new serialization framework (Pieter Wuille)
3cd8ab9d11 Make std::vector and prevector reuse the VectorFormatter logic (Pieter Wuille)
abf8624356 Add custom vector-element formatter (Pieter Wuille)
37d800bea0 Add a constant for the maximum vector allocation (5 Mbyte) (Pieter Wuille)

Pull request description:

  The next step of changes from #10785.

  This one adds:
  * A meta-formatter for vectors, which serializes the vector elements using another formatter
  * Switch the undo.h code to the new framework, using the above (where undo entries are serialized as a vector, each of which uses a modified serializer for the UTXOs).

ACKs for top commit:
  laanwj:
    code review ACK 3c94b0039d
  jonatack:
    Qualified ACK 3c94b0039d
  ryanofsky:
    Code review ACK 3c94b0039d. Changes since last review: renaming formatter classes, adding suggested static_assert, and removing temporary in VectorFormatter

Tree-SHA512: 44eebf51a303f6adbbc1ca2b9d043e8ae7fd37e06778e026590892f8d09f8253067862a68ba8ca5d733fd2f8e7c84edd255370f5a4b6560259427a65f94632df
2020-02-10 16:10:34 +01:00
Wladimir J. van der Laan
b063cb690f
Merge #18081: test: set a name for CI Docker containers
9e111db088 test: set a name for CI Docker containers (fanquake)

Pull request description:

  Addresses one part of #16664, by making it easier to identify CI containers that are running locally. By default Docker will generate random names, like `peaceful_rubin`, with this change, we explicitly set names for all containers.

ACKs for top commit:
  MarcoFalke:
    ACK 9e111db088

Tree-SHA512: 0a29ada0d8cf6b0e9ae7a35f4f6df7a3dcc448523ceaed01371124360d6e3d1bf351172104a5fb629488eeaa57994ba04134dcb83c261eb1dfd2f0d73edf5f60
2020-02-10 14:52:51 +01:00
MarcoFalke
ab7915f804
Merge #18106: test: Disable s390 build on travis
b0a01299ed test: Disable s390 build on travis (Wladimir J. van der Laan)

Pull request description:

  Travis is consistently failing on s390 due to out of disk space issues,
  which causes false positives. Disable the s390 build for now until
  this is fixed some other way.

ACKs for top commit:
  MarcoFalke:
    ACK b0a01299ed 🍠
  jonasschnelli:
    ACK b0a01299ed

Tree-SHA512: ae8a78fa03bc620d802e4992d46929a0a4b801b50a6066d8f093f93fc5ebbc010d221c04787cbfc75436a2c40f9292257bf85fbb251593e21afff11756b6d8d4
2020-02-10 04:49:40 -08:00
fanquake
9e111db088
test: set a name for CI Docker containers 2020-02-10 20:03:52 +08:00
fanquake
657c5e5f1c
Merge #18099: Update univalue subtree
97aa5740c0 Squashed 'src/univalue/' changes from 5a58a46671..98261b1e7b (MarcoFalke)

Pull request description:

  Closes #17742

ACKs for top commit:
  fanquake:
    ACK fad9ea8fdb

Tree-SHA512: 6316cb0e974ee6575e2a98930203dc7d155b346d2d2fe5a322e3d8b77a87d378d31fde16ea2f90ff93736429ddb89799a26945de13ce4a20132550bbcec0a48e
2020-02-10 19:57:35 +08:00
Wladimir J. van der Laan
b0a01299ed test: Disable s390 build on travis
Travis is consistently failing on s390 due to out of disk space issues,
which causes false positives. Disable the s390 build for now until
this is fixed some other way.
2020-02-10 12:44:35 +01:00
Wladimir J. van der Laan
9e77726fb7
Merge #18101: qt: Fix deprecated QCharRef usage
ac57859e53 qt: Fix deprecated QCharRef usage (Hennadii Stepanov)

Pull request description:

  From Qt docs:
  - [`QKeyEvent::text()`](https://doc.qt.io/qt-5/qkeyevent.html#text):
  > Return values when modifier keys such as Shift, Control, Alt, and Meta are pressed differ among platforms and could return an empty string.

  - [`QString::operator[]()`](https://doc.qt.io/qt-5/qstring.html#operator-5b-5d):

  > **Note:** Before Qt 5.14 it was possible to use this operator to access a character at an out-of-bounds position in the string, and then assign to such a position, causing the string to be automatically resized. Furthermore, assigning a value to the returned `QCharRef` would cause a detach of the string, even if the string has been copied in the meanwhile (and the `QCharRef` kept alive while the copy was taken). These behaviors are deprecated, and will be changed in a future version of Qt.

  Since Qt 5.14 this causes a `QCharRef` warning if any modifier key is pressed while the splashscreen is still displayed.

  Fix #18080.

  Note: Ctrl+Q will also close the spashscreen now.

ACKs for top commit:
  jonasschnelli:
    utACK ac57859e53

Tree-SHA512: a7e5559410bd05c406007ab0243f458b82d434b0543276ed331254c8d7a6b1aaa54d0b406f799b830859294975004380160f8af04ba403d3bf185d51e6784f54
2020-02-10 12:30:28 +01:00
Wladimir J. van der Laan
407d7c831a
Merge #18091: Qt: pass clientmodel changes from walletframe to walletviews
2af3e16ca9 Qt: pass clientmodel changes from walletframe to walletviews (Jonas Schnelli)

Pull request description:

  Fixes #18090

  We currently don't pass `clientmodel` changes from the `walletframe` to the `walletviews` leading to possible invalid access during shutdown because all walletviews miss the nullifying of the clientmodel.

  TODO: needs investigation if this is should be backported.

ACKs for top commit:
  laanwj:
    Good catch, code review ACK 2af3e16ca9

Tree-SHA512: f8c0a114f01deac07fb311112d144f3bfc1c1882dd19e8742b372dd597d7a5d59cd0af99fc50494de2334cad98d6701675317474e40fe8820d04c058aeca1b75
2020-02-10 12:24:15 +01:00
Wladimir J. van der Laan
0193fd766b
Merge #18082: logging: enable thread_local usage on macOS
d76894987d logging: enable thread_local usage on macOS (fanquake)

Pull request description:

  Now that we're building against a newer SDK (`10.14`), we should be able to enable `thread_local` usage on macOS. Have tested building and running locally, as well as cross-compiling and running the binaries on a macOS 10.14 system.

  #### master 8a56f79d49
  ```bash
  src/bitcoind -logthreadnames=1
  2020-02-06T04:38:33Z [] Bitcoin Core version v0.19.99.0-8a56f79d4 (release build)
  2020-02-06T04:38:33Z [] Assuming ancestors of block 00000000000000000005f8920febd3925f8272a6a71237563d78c2edfdd09ddf have valid signatures.
  2020-02-06T04:38:33Z [] Setting nMinimumChainWork=000000000000000000000000000000000000000008ea3cf107ae0dec57f03fe8
  2020-02-06T04:38:33Z [] Using the 'sse4(1way),sse41(4way),avx2(8way)' SHA256 implementation
  2020-02-06T04:38:33Z [] Using RdSeed as additional entropy source
  ```

  #### this PR d76894987d
  ```bash
  checking for thread_local support... yes
  ...
  src/bitcoind -logthreadnames=1
  2020-02-06T04:17:49Z [net] net thread start
  2020-02-06T04:17:49Z [opencon] opencon thread start
  2020-02-06T04:17:49Z [dnsseed] dnsseed thread start
  2020-02-06T04:17:49Z [init] init message: Done loading
  2020-02-06T04:17:49Z [msghand] msghand thread start
  2020-02-06T04:17:49Z [addcon] addcon thread start
  ...
  2020-02-06T04:17:54Z [init] tor: Thread interrupt
  2020-02-06T04:17:54Z [init] Shutdown: In progress...
  ```

  From the [Xcode 8 release notes](https://developer.apple.com/library/archive/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW78)
  > C++ now supports the thread_local keyword, which declares thread-local storage (TLS) and supports C++ classes with non-trivial constructors and destructors. (9001553)

ACKs for top commit:
  jonasschnelli:
    Tested ACK d76894987d
  nijynot:
    ACK d768949
  hebasto:
    ACK d76894987d

Tree-SHA512: 48f3e4104b80bd7b6aedcef10bb1957b073530130f33af7c5cb59e876ac3f5480e53d7af1c0b226d809fe9eef1add3d6c3fb6de4af174966202c6030060ea823
2020-02-10 12:22:32 +01:00
Wladimir J. van der Laan
22d11187ee
Merge #17398: build: Update leveldb to 1.22+
677fb8e923 test: Add ubsan surpression for crc32c (Wladimir J. van der Laan)
8e68bb1dde build: Disable msvc warning 4722 for leveldb build (Aaron Clauson)
be23949765 build: MSVC changes for leveldb update (Aaron Clauson)
9ebdf04757 build: CRC32C build system integration (Wladimir J. van der Laan)
402252a808 build: Add LCOV exception for crc32c (Wladimir J. van der Laan)
3a037d0067 test: Add crc32c exception to various linters and generation scripts (Wladimir J. van der Laan)
84ff1b2076 test: Add crc32c to subtree check linter (Wladimir J. van der Laan)
7cf13a5134 doc: Add crc32c subtree to developer notes (Wladimir J. van der Laan)
24d02a9ac0 build: Update build system for new leveldb (Wladimir J. van der Laan)
2e1819311a Squashed 'src/crc32c/' content from commit 224988680f7673cd7c769963d4035cb315aa3388 (Wladimir J. van der Laan)
66480821b3 Squashed 'src/leveldb/' changes from f545dfabff4c2e9836efed094dba99a34fbc6b88..f8ae182c1e5176d12e816fb2217ae33a5472fdd7 (Wladimir J. van der Laan)

Pull request description:

  This updates leveldb to currently newest upstream commit 0c40829872:

  - CRC32C hardware acceleration is now an external library [crc32c](https://github.com/google/crc32c). This adds acceleration on ARM, and should be faster on x86 because of using prefetch. It also makes it easy to support similar instruction sets on other platforms in the future.
  - Thread handling uses C++11, instead of platform specific code.
  - Native windows environment was added. No need to maintain our own hacky one, anymore.
  - Upstream now builds using CMake. This doesn't mean we need to use that (phew), but internal configuration changed to a a series of checks, instead of OS profiles. This means the blanket error "Cannot build leveldb for $host. Please file a bug report' is removed.

  All changes: a53934a3ae...0c40829872

  Pretty much all our changes have been subsumed by upstream, so we figured it was cleaner to start over with a new branch from upstream with the still-relevant patches applied: https://github.com/bitcoin-core/leveldb/tree/bitcoin-fork-new

  There's quite some testing to be done (see below). See https://github.com/bitcoin-core/leveldb/issues/25 and https://github.com/bitcoin-core/leveldb/pull/26 for more history and context.

  TODO:
  - [x] Subtree `crc32c`
  - [x] Make linters happy about crc32 subtree
  - [x] Integrate `crc32c` library into build system
  - [x] MSVC build system

ACKs for top commit:
  sipa:
    ACK 677fb8e923

Tree-SHA512: 37ee92a750e053e924bc4626b12bb3fd81faa9f8c5ebaa343931fee810c45ba05aa6051fdea82535fa351bf2be7297801b98af9469865fc5ead771650a5d6240
2020-02-10 11:36:09 +01:00
MarcoFalke
fae9084ac5
build: Skip i686 build by default in guix and gitian 2020-02-09 13:22:53 -08:00
MarcoFalke
fa55a2554c
depends: Remove reference to win32
win32 is no longer mentioned in doc/build-windows.md
2020-02-09 13:22:29 -08:00
Hennadii Stepanov
ac57859e53
qt: Fix deprecated QCharRef usage 2020-02-09 18:59:14 +02:00
MarcoFalke
fad9ea8fdb
Update univalue subtree 2020-02-09 07:44:29 -08:00
MarcoFalke
97aa5740c0 Squashed 'src/univalue/' changes from 5a58a46671..98261b1e7b
98261b1e7b Merge #22: Clamp JSON object depth to PHP limit
54c4015415 Clamp JSON object depth to PHP limit

git-subtree-dir: src/univalue
git-subtree-split: 98261b1e7be4ce9820e25c8ce37d40cdef19ab20
2020-02-09 07:43:12 -08:00
MarcoFalke
fad027fb0c
scripted-diff: Add missing spaces in RPCResult, Fix type names
This makes the rendered diff smaller when the RPCResult is machine
generated later on

-BEGIN VERIFY SCRIPT-
 # Add space after dictionary key and before colon
 sed -i --regexp-extended -e 's/(^ +" +\\"[a-zA-Z_]+\\"): ?/\1 : /g' $(git grep -l '\\":')
 # Rename (array) to (json array)
 sed -i -e 's/ (array) / (json array) /g' $(git grep -l '(array)' ./src)
 # Rename (object) to (json object)
 sed -i -e 's/ (object) / (json object) /g' $(git grep -l '(object)' ./src)
 # Rename (bool) to (boolean)
 sed -i -e 's/ (bool) / (boolean) /g' $(git grep -l '(bool)' ./src)
 # Rename (int) to (numeric)
 sed -i -e 's/  (int) /  (numeric) /g' $(git grep -l '(int)' ./src)
-END VERIFY SCRIPT-
2020-02-09 05:12:43 -08:00