Commit Graph

164 Commits

Author SHA1 Message Date
fanquake
a68de12c0e
Merge bitcoin/bitcoin#22890: doc: Replace a link to Qt precompiled binaries with compile instructions
6bc4398937 doc: Suggest using jom instead of nmake (Hennadii Stepanov)
c4139f06a9 doc: Replace a link to Qt precompiled binaries with compile instructions (Hennadii Stepanov)
5e42f2ad26 build: Make <QtBaseDir> default name Qt and VS versions agnostic (Hennadii Stepanov)

Pull request description:

  This PR replaces a [link to Qt precompiled binaries](https://github.com/sipsorcery/qt_win_binary/releases) with compile instructions that allow users to self-compile static Qt package which is required for building Bitcoin Core with Visual Studio.

ACKs for top commit:
  sipsorcery:
    ACK 6bc4398937.

Tree-SHA512: 0c91536e51177ec2ed437614cb37b3fd1dccce856548c22307359da68200433971fd97cd8a537b0856cfccc521ac50d61801a78cb5275b818829ee7b43bc7d6a
2021-10-07 08:39:52 +08:00
Hennadii Stepanov
6bc4398937
doc: Suggest using jom instead of nmake 2021-09-30 11:07:43 +03:00
Hennadii Stepanov
c4139f06a9
doc: Replace a link to Qt precompiled binaries with compile instructions 2021-09-30 11:07:42 +03:00
Hennadii Stepanov
5e42f2ad26
build: Make <QtBaseDir> default name Qt and VS versions agnostic
This change allows users to not patch `common.qt.init.vcxproj` to fit
their Qt and Visual Studio versions. Also it simplifies code base
maintaining.

To specify a non-default path, the QTBASEDIR environment variable can be
used.
2021-09-07 22:25:38 +03:00
Hennadii Stepanov
97292b1914
ci: Drop AppVeyor CI integration 2021-09-07 06:12:53 +03:00
Hennadii Stepanov
1fb70793b2
ci: Add Windows task to Cirrus CI 2021-09-07 06:12:51 +03:00
Hennadii Stepanov
d1267fdbb0
build: Update default platform toolset in msvc-autogen.py
The platform toolset was updated from v141 to v142 in #17364.
2021-09-04 15:34:58 +03:00
fanquake
528e08119f
Merge bitcoin/bitcoin#22219: multiprocess: Start using init makeNode, makeChain, etc methods
e4709c7b56 Start using init makeNode, makeChain, etc methods (Russell Yanofsky)

Pull request description:

  Use `interfaces::Init::make*` methods instead of `interfaces::Make*` functions, so interfaces can be constructed differently in different executable without having to change any code. (So for example `bitcoin-gui` can make an `interfaces::Node` pointer that communicates with a `bitcoin-node` subprocess, while `bitcoin-qt` can make an `interfaces::Node` pointer that controls node code in the same process.)

  ---

  This PR is part of the [process separation project](https://github.com/bitcoin/bitcoin/projects/10). The commit was first part of larger PR #10102.

ACKs for top commit:
  jamesob:
    reACK e4709c7b56
  achow101:
    ACK e4709c7b56
  benthecarman:
    utACK e4709c7b56

Tree-SHA512: 580c1979dbb2ef444157c8e53041e70d15ddeee77e5cbdb34f70b6d228cc2d2fe3843825f172da84e506200c58f7e0932f7cd4c006bb5058c1f4e43259394834
2021-09-16 08:47:38 +08:00
fanquake
5c0f46ca46
Merge bitcoin/bitcoin#22908: build: Drop 32-bit build configurations for MSVC
57b3c5bda6 build_msvc: Drop 32-bit build configurations (Hennadii Stepanov)
b3decea7f6 build_msvc: Make bitcoin-util ProjectGuid unique (Hennadii Stepanov)

Pull request description:

  A 32-bit application for Windows in 2021 looks outdated. I'm pretty sure no one is going to run Bitcoin Core v23.0 on 32-bit Windows.

  Also see #15939.

ACKs for top commit:
  sipsorcery:
    tACK 57b3c5bda6.

Tree-SHA512: d03dccb7bab9f6694d008c4b1fdade1dbd7e5980b5199cc6648c1a8c0c66f07170ae9cb6a77b4ab54c9195003587051b94217b014f97c215dffeec2bcd8fcd6e
2021-09-11 10:49:04 +08:00
MarcoFalke
fadecbd9a4
test: Fix tests on Windows 2021-09-08 18:58:31 +02:00
Hennadii Stepanov
57b3c5bda6
build_msvc: Drop 32-bit build configurations 2021-09-08 11:58:12 +03:00
Hennadii Stepanov
b3decea7f6
build_msvc: Make bitcoin-util ProjectGuid unique 2021-09-08 11:58:03 +03:00
fanquake
ae4ad1a125
msvc: update bitcoin_config.h defines
While not many of these are used, some, like HAVE_DLLEXPORT_ATTRIBUTE, are used
when creating libbitcoinconsensus.

Given this file is static, also just remove everything that is commented out.
2021-09-02 11:14:18 +08:00
Russell Yanofsky
e4709c7b56 Start using init makeNode, makeChain, etc methods
Use interfaces::Init::make* methods instead of interfaces::Make*
functions, so interfaces can be constructed differently in different
executables without having to change any code. (So for example
bitcoin-gui can make an interfaces::Node pointer that communicates with
a bitcoin-node subprocess, while bitcoin-qt can make an interfaces::Node
pointer that starts node code in the same process.)
2021-08-17 03:05:15 -05:00
MarcoFalke
7075a52b67
Merge bitcoin/bitcoin#22155: wallet test: Add test for subtract fee from recipient behavior
fe6dc76b7c wallet test: Add test for subtract fee from recipient behavior (Russell Yanofsky)
2565478c81 wallet test refactor: add CreateSyncedWallet function (Russell Yanofsky)

Pull request description:

  This adds test coverage for wallet subtract from recipient behavior without changing it. Behavior seems to have changed recently in a minor way in #17331 without being noticed.

ACKs for top commit:
  achow101:
    ACK fe6dc76b7c
  glozow:
    ACK fe6dc76b7c
  promag:
    Code review ACK fe6dc76b7c.

Tree-SHA512: e00c5dfe467e4ccef5edb0dd4fff6c53f35a37828a4327bea2e166751e5ef971d519ffca7b8f735b12912bb4a547980626356bc1855981005aed1a6c2a57be0b
2021-07-27 11:21:46 +02:00
W. J. van der Laan
36aee0f353
Merge bitcoin-core/gui#381: refactor: Make BitcoinCore class reusable
8169fc4e73 qt, refactor: Fix code styling of moved InitExecutor class (Hennadii Stepanov)
c82165a557 qt, refactor: Move InitExecutor class into its own module (Hennadii Stepanov)
dbcf56b6c6 scripted-diff: Rename BitcoinCore class to InitExecutor (Hennadii Stepanov)
19a1d00831 qt: Add BitcoinCore::m_thread member (Hennadii Stepanov)

Pull request description:

  This PR makes the `BitcoinCore` class reusable, i.e., it can be used by the widget-based GUI or by the [QML-based](https://github.com/bitcoin-core/gui-qml/tree/main/src/qml) one, and it makes the divergence between these two repos minimal.

  The small benefit to the current branch is more structured code.

  Actually, this PR is ported from https://github.com/bitcoin-core/gui-qml/pull/10.
  The example of the re-using of the `BitcoinCore` class is https://github.com/bitcoin-core/gui-qml/pull/11.

ACKs for top commit:
  laanwj:
    ACK 8169fc4e73
  ryanofsky:
    Code review ACK 8169fc4e73. Only change is switching from `m_executor` from pointer to optional type (thanks for update!)

Tree-SHA512: a0552c32d26d9acf42921eb12bcdf68f02d52f7183c688c43257b1a58679f64e45f193ee2d316850c7f0f516561e17abe989fe545bfa05e158ad3f4c66d19bca
2021-07-22 10:02:10 +02:00
W. J. van der Laan
3d8c714d8e
build: Bump master version to 22.99.0
Tree-SHA512: fcd9ab71dba1fc814980c144a76288c313f42a0123a6a2f44a4adc13b83b74f9fb4f029c5cd646d3c1a2bb28899e95e9fbf55cfd98b665a653624291dc9baf49
2021-07-20 15:27:12 +02:00
Hennadii Stepanov
c82165a557
qt, refactor: Move InitExecutor class into its own module
This change makes InitExecutor class re-usable by an alternative GUI,
e.g., QML-based one.
2021-07-14 21:54:32 +03:00
MarcoFalke
fa831e709a
build_msvc: Add bitcoin-util.exe 2021-06-18 20:08:06 +02:00
fanquake
de5512e28d
Merge bitcoin/bitcoin#22230: build: Fix MSVC linker /SubSystem option for bitcoin-qt.exe
9edd713c18 build: Fix MSVC linker /SubSystem option for bitcoin-qt.exe (Hennadii Stepanov)

Pull request description:

  On master (6f3fbc062f), running `bitcoin-qt.exe`, which was built with MSVC, causes a terminal window open along with the GUI.

  This PR fixes such behavior. See Microsoft [docs](https://docs.microsoft.com/en-us/cpp/build/reference/subsystem-specify-subsystem?view=msvc-160).

  It is still possible to use the `-printtoconsole` option for debug builds.

ACKs for top commit:
  sipsorcery:
    tACK 9edd713c18.

Tree-SHA512: 02f2874b13e484f98344f6a7e3b01fa82a78a39865787c77bd674ead22a84a7f98a1849ccad26bd2b8c8603b3e29dcc1633b0ad731ce7d61be2d6b1f9584839c
2021-06-14 10:06:55 +08:00
Russell Yanofsky
2565478c81 wallet test refactor: add CreateSyncedWallet function
No change in behavior. This just moves some code from the ListCoins test
setup to a reusable util function, so it can be reused in a new test in
the next commit.
2021-06-12 11:22:41 -04:00
Hennadii Stepanov
9edd713c18
build: Fix MSVC linker /SubSystem option for bitcoin-qt.exe
It is still possible to use -printtoconsole option for debug builds.
2021-06-12 17:13:27 +03:00
Aaron Clauson
e25ea54dbf
Update msvc and appveyor builds to use Qt5.12.11 binaries. 2021-06-11 16:36:31 +01:00
W. J. van der Laan
359f72105b
Merge bitcoin/bitcoin#21573: Update libsecp256k1 subtree to latest master
5c7ee1b2da libsecp256k1 no longer has --with-bignum= configure option (Pieter Wuille)
bdca9bcb6c Squashed 'src/secp256k1/' changes from 3967d96bf1..efad3506a8 (Pieter Wuille)
cabb566123 Disable certain false positive warnings for libsecp256k1 msvc build (Pieter Wuille)

Pull request description:

  This updates our src/secp256k1 subtree to the latest upstream master. The changes include:

  * The introduction of safegcd-based modular inverses, reducing ECDSA signing time by 25%-30% and ECDSA verification time by 15%-17%.
    * [Original paper](https://gcd.cr.yp.to/papers.html) by Daniel J. Bernstein and Bo-Yin Yang
    * [Implementation](https://github.com/bitcoin-core/secp256k1/pull/767) by Peter Dettman; [final](https://github.com/bitcoin-core/secp256k1/pull/831) version
    * [Explanation](https://github.com/bitcoin-core/secp256k1/blob/master/doc/safegcd_implementation.md) of the algorithm using Python snippets
    * [Analysis](https://github.com/sipa/safegcd-bounds) of the maximum number of iterations the algorithm needs
    * [Formal proof in Coq](https://medium.com/blockstream/a-formal-proof-of-safegcd-bounds-695e1735a348) by Russell O'Connor, for a high-level equivalent algorithm
  * Removal of libgmp as an (optional) dependency (which wasn't used in the Bitcoin Core build)
  * CI changes (Travis -> Cirrus)
  * Build system improvements

ACKs for top commit:
  laanwj:
    Tested ACK 5c7ee1b2da

Tree-SHA512: ad8ac3746264d279556a4aa7efdde3733e114fdba8856dd53218588521f04d83950366f5c1ea8fd56329b4c7fe08eedf8e206f8f26dbe3f0f81852e138655431
2021-06-07 17:05:11 +02:00
Hennadii Stepanov
ab86ac7739
build, qt: Make QWindowsVistaStylePlugin available again (regression)
In Qt 5.12.x style plugins are separated.

Co-authored-by: Jarol Rodriguez <jarolrod@tutanota.com>
2021-06-03 00:25:01 +03:00
MarcoFalke
32f1f021bf
Merge bitcoin/bitcoin#21817: refactor: Replace &foo[0] with foo.data()
fac30eec42 refactor: Replace &foo[0] with foo.data() (MarcoFalke)
faece47c47 refactor: Avoid &foo[0] on C-Style arrays (MarcoFalke)
face961109 refactor: Use only one temporary buffer in CreateObfuscateKey (MarcoFalke)
fa05dddc42 refactor: Use CPubKey vector constructor where possible (MarcoFalke)
fabb6dfe6e script: Replace address-of idiom with vector data() method (Guido Vranken)

Pull request description:

  The main theme of this refactor is to replace `&foo[0]` with `foo.data()`.

  The first commit is taken from #21781 with the rationale:

  * In CSignatureCache::ComputeEntryECDSA, change the way a vector pointer is resolved to prevent invoking undefined behavior if the vector is empty.

  The other commits aim to remove all `&foo[0]`, where `foo` is any kind of byte representation. The rationale:

  * Sometimes alternative code without any raw data pointers is easier to read (refer to the respective commit message for details)
  * If the raw data pointer is needed, `foo.data()` should be preferred, as pointed out in the developer notes. This addresses the instances that have been missed in commit 592404f03f, and https://github.com/bitcoin/bitcoin/pull/9804

ACKs for top commit:
  laanwj:
    Code review ACK fac30eec42
  practicalswift:
    cr ACK fac30eec42: patch looks correct
  promag:
    Code review ACK fac30eec42.

Tree-SHA512: e7e73146edbc78911a8e8c728b0a1c6b0ed9a88a008e650aa5dbffe72425bd42c76df70199a9cf7e02637448d7593e0eac52fd0f91f59240283e1390ee21bfa5
2021-05-05 18:24:09 +02:00
W. J. van der Laan
1b9a5236e9
Merge bitcoin/bitcoin#21740: test: add new python linter to check file names and permissions
46b025e00d test: add new python linter to check file names and permissions (windsok)
6f6bb3ebc7 test: fix file permissions on various scripts (windsok)

Pull request description:

  Adds a new python linter test which tests for correct filenames and file permissions in the repository.

  Replaces the existing tests in the `test/lint/lint-filenames.sh` and `test/lint/lint-shebang.sh` linter tests, as well as adding some new and increased testing. This increased coverage is intended to catch issues such as in #21728 and https://github.com/bitcoin/bitcoin/pull/16807/files#r345547050

  Summary of tests:
  * Checks every file in the repository against an allowed regexp to make sure only lowercase or uppercase alphanumerics (a-zA-Z0-9), underscores (_), hyphens (-), at (@) and dots (.) are used in repository filenames.

  * Checks only source files (*.cpp, *.h, *.py, *.sh) against a stricter allowed regexp to make sure only lowercase alphanumerics (a-z0-9), underscores (_), hyphens (-) and dots (.) are used in source code filenames. Additionally there is an exception regexp for directories or files which are excepted from matching this regexp (This should replicate the existing `test/lint/lint-filenames.sh` test)

  * Checks all files in the repository match an allowed executable or non-executable file permission octal. Additionally checks that for executable files, the file contains a shebang line.

  * Checks that for executable `.py` and `.sh` files, the shebang line used matches an allowable list of shebangs (This should replicate the existing `test/lint/lint-shebang.sh` test)

  * Checks every file that contains a shebang line to ensure it has an executable permission

  Additionally updates the permissions on various files to comply with the new tests.

  Fixes #21729

ACKs for top commit:
  practicalswift:
    cr re-ACK 46b025e00d: patch still looks correct
  kiminuo:
    code review ACK 46b025e00d if `contrib/gitian-descriptors/assign_DISTNAME` permission change is deemed OK.
  laanwj:
    Code review ACK 46b025e00d

Tree-SHA512: 1c8201a2cee0d9cbce15652b68cec9a6458a8b493fcd5392f98560aca0b1a12e668baab65a47100f116f626dadc3f591deb47f7368468c6a46c6c712c2533455
2021-05-05 17:14:22 +02:00
MarcoFalke
fac30eec42
refactor: Replace &foo[0] with foo.data() 2021-05-04 06:55:31 +02:00
Aaron Clauson
0a331456e4
Remove Visual Studio 2017 reference from readme
This PR was motivated by a comment in GUI PR (257) regarding a suggested improvement not being supported by VS2017.

When checking whether master can still be built with the VS2017 toolset ABI issues were encountered. Most likely due to the pre-compiled Qt binaries that are used.

It does not seem worth the effort to try and support VS2017, which would most likely require additional Qt binaries, or lengthy instructions on how to build static Qt binaries on Windows (which is very error prone and tedious).

Added advisory note about build not working with earlier Visual Studio versions.

Fixed grammar.
2021-05-01 17:15:38 +01:00
W. J. van der Laan
298fd02e4a
Merge bitcoin/bitcoin#21045: build: adds switch to enable/disable randomized base address in MSVC builds
9bd3f35003 build: adds switch for disabling random base addresses in MSVC (Ethan Heilman)

Pull request description:

  In m4 builds we have the --disable-hardening switch that can be given in `./configure` to turn off randomized addresses. This PR provides a simple way of turning off randomized addresses in MSVC builds.

  This PR:
  * Adds this option the common-init project file so that it can be globally set across the project
  * Documents this switch in msvc build readme

  I have run the following test to verify this works

  I ran the msvc build with `<RandomizedBaseAddress>true</RandomizedBaseAddress>` then checked `bitcoind.exe` and `bitcoin-cli.exe` with `dumpbin.exe`:

  bitcoind
  ```
  > .\dumpbin.exe /headers src/bitcoind.exe
  Microsoft (R) COFF/PE Dumper Version 14.16.27045.0
  ...
  OPTIONAL HEADER VALUES
               20B magic # (PE32+)
             14.28 linker version
            AE4600 size of code
            345C00 size of initialized data
                 0 size of uninitialized data
            6BED74 entry point (00000001406BED74) mainCRTStartup
              1000 base of code
         140000000 image base (0000000140000000 to 0000000140E2DFFF)
              1000 section alignment
               200 file alignment
              6.00 operating system version
              0.00 image version
              6.00 subsystem version
                 0 Win32 version
            E2E000 size of image
               400 size of headers
                 0 checksum
                 3 subsystem (Windows CUI)
              8160 DLL characteristics
                     High Entropy Virtual Addresses
                     Dynamic base
                     NX compatible
                     Terminal Server Aware
  ```

  bitcoin-cli
  ```
  > .\dumpbin.exe /headers src/bitcoin-cli.exe
  Microsoft (R) COFF/PE Dumper Version 14.16.27045.0
  ...
  OPTIONAL HEADER VALUES
               20B magic # (PE32+)
             14.28 linker version
            1E3E00 size of code
             92C00 size of initialized data
                 0 size of uninitialized data
            104384 entry point (0000000140104384) mainCRTStartup
              1000 base of code
         140000000 image base (0000000140000000 to 0000000140279FFF)
              1000 section alignment
               200 file alignment
              6.00 operating system version
              0.00 image version
              6.00 subsystem version
                 0 Win32 version
            27A000 size of image
               400 size of headers
                 0 checksum
                 3 subsystem (Windows CUI)
              8160 DLL characteristics
                     High Entropy Virtual Addresses
                     Dynamic base
                     NX compatible
                     Terminal Server Aware
  ```

  Then I built with `<RandomizedBaseAddress>false</RandomizedBaseAddress>` then checked `bitcoind.exe` and `bitcoin-cli.exe` with `dumpbin.exe` and observed that `Dynamic base` was longer listed in `OPTIONAL HEADER VALUES`

  bitcoind
  ```
  PS C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64> .\dumpbin.exe /headers C:\Users\e0\Documents\GitHub\bitcoin021noaslr/src/bitcoind.exe
  Microsoft (R) COFF/PE Dumper Version 14.16.27045.0
  ...
  OPTIONAL HEADER VALUES
               20B magic # (PE32+)
             14.28 linker version
            AE4600 size of code
            33FE00 size of initialized data
                 0 size of uninitialized data
            6BED74 entry point (00000001406BED74) mainCRTStartup
              1000 base of code
         140000000 image base (0000000140000000 to 0000000140E27FFF)
              1000 section alignment
               200 file alignment
              6.00 operating system version
              0.00 image version
              6.00 subsystem version
                 0 Win32 version
            E28000 size of image
               400 size of headers
                 0 checksum
                 3 subsystem (Windows CUI)
              8120 DLL characteristics
                     High Entropy Virtual Addresses
                     NX compatible
                     Terminal Server Aware
  ```

  bitcoin-cli
  ```
  > .\dumpbin.exe /headers src/bitcoin-cli.exe
  Microsoft (R) COFF/PE Dumper Version 14.16.27045.0
  ...
  OPTIONAL HEADER VALUES
               20B magic # (PE32+)
             14.28 linker version
            1E3E00 size of code
             90C00 size of initialized data
                 0 size of uninitialized data
            104384 entry point (0000000140104384) mainCRTStartup
              1000 base of code
         140000000 image base (0000000140000000 to 0000000140277FFF)
              1000 section alignment
               200 file alignment
              6.00 operating system version
              0.00 image version
              6.00 subsystem version
                 0 Win32 version
            278000 size of image
               400 size of headers
                 0 checksum
                 3 subsystem (Windows CUI)
              8120 DLL characteristics
                     High Entropy Virtual Addresses
                     NX compatible
                     Terminal Server Aware
  ```

ACKs for top commit:
  sipsorcery:
    ACK 9bd3f35003.
  practicalswift:
    cr ACK 9bd3f35003: patch looks correct

Tree-SHA512: ddffdb4ff8a09c7cfef61c07a5db2a2828e9e3aa795ad8e5a1bf51ab489a68b40f87f6694518c5e0b8858c0fad4f93bb947b052e6b9d5e55eb38e764b746fc02
2021-04-29 22:14:34 +02:00
Hennadii Stepanov
328da33557
Merge bitcoin-core/gui#18: Add peertablesortproxy module
5a4a15d2b4 qt, refactor: Drop no longer used PeerTableModel::getRowByNodeId func (Hennadii Stepanov)
9a9f180df0 qt, refactor: Drop no longer used PeerTableModel::sort function (Hennadii Stepanov)
778a64af20 qt: Use PeerTableSortProxy for sorting peer table (Hennadii Stepanov)
df2d165ba9 qt: Add peertablesortproxy module (Hennadii Stepanov)

Pull request description:

  The "Peers" table in the "Node" window does not hold multiple selection after sorting.

  This PR introduces a `QSortFilterProxyModel` subclass, that is a standard Qt [practice](https://doc.qt.io/qt-5/model-view-programming.html#custom-sorting-models) for such cases.

  Now the sorting code is encapsulated into the dedicated Qt class, and we do not need to maintain it.

  Fixes #283 (additionally).

  ---

  On **master** (7ae86b3c68):
  - rows are sorted by "Ping", and a selection is made
  ![Screenshot from 2020-11-28 22-53-11](https://user-images.githubusercontent.com/32963518/100525900-96eaed00-31cc-11eb-86e7-72ede3b8b33c.png)

  - rows are sorted by "NodeId", and the previous selection is _lost_
  ![Screenshot from 2020-11-28 22-53-21](https://user-images.githubusercontent.com/32963518/100525904-9c483780-31cc-11eb-957c-06f53d7d31ab.png)

  With **this PR**:
  - rows are sorted by "Ping", and a selection is made
  ![Screenshot from 2020-11-28 22-39-41](https://user-images.githubusercontent.com/32963518/100525776-06aca800-31cc-11eb-8c4e-9c6566fe80fe.png)

  - rows are sorted by "NodeId", and the row are still selected
  ![Screenshot from 2020-11-28 22-39-53](https://user-images.githubusercontent.com/32963518/100525791-2348e000-31cc-11eb-8b78-716a5551d7ec.png)

ACKs for top commit:
  jarolrod:
    re-ACK 5a4a15d2b4, tested on macOS 11.2 Qt 5.15.2 after rebase
  promag:
    Tested ACK 5a4a15d2b4.

Tree-SHA512: f81c1385892fbf1a46ffb98b42094ca1cc97da52114bbbc94fedb553899b1f18c26a349e186bba6e27922a89426bd61e8bc88b1f7832512dbe211b5f834e076e
2021-04-28 20:57:52 +03:00
windsok
6f6bb3ebc7 test: fix file permissions on various scripts
Updates permissions on files to comply with the new test added in the following commit
2021-04-23 17:13:28 -07:00
Russell Yanofsky
ddf7ecc8df multiprocess: Add bitcoin-node process spawning support
Add bitcoin-node startup code to let it spawn and be spawned by other
processes
2021-04-23 03:02:50 -05:00
MarcoFalke
bca00942ed
Merge bitcoin/bitcoin#21731: Update msvc build to use Qt5.12.10 binaries.
f02ca7a354 Update msvc build to use Qt5.12.10 binaries. (Aaron Clauson)

Pull request description:

  ![bitcoin_qt5 12 10](https://user-images.githubusercontent.com/197660/115268334-12c0e400-a132-11eb-9f59-e2d1e5332842.png)

ACKs for top commit:
  hebasto:
    ACK f02ca7a354, I made a customized AppVeyor build with an artifact: https://ci.appveyor.com/project/hebasto/bitcoin/builds/38786868/artifacts

Tree-SHA512: 0f8998a5b72bca9a08fc5ec5c40b0b79e9247486f58f74824ebf045175d9e3ce7485c16d8de574b7316e79a8433af0646870abf4b0f3b47fc35a92f63a7b5dc9
2021-04-20 19:07:55 +02:00
dplusplus1024
de17d245b7
Re-add command to install vcpkg
`vcpkg integrate install` must be executed so that msbuild will automatically install external dependencies.

It was removed in 712f95d332

It was originally added in 7644567758
2021-04-19 16:41:34 -06:00
Aaron Clauson
f02ca7a354
Update msvc build to use Qt5.12.10 binaries. 2021-04-19 16:41:50 +01:00
Pieter Wuille
cabb566123 Disable certain false positive warnings for libsecp256k1 msvc build 2021-04-02 13:17:49 -07:00
fanquake
3ececa76b7
Merge #21543: build: Enable safe warnings for msvc builds
7c543bc27b build: Enable safe warnings for msvc builds (Hennadii Stepanov)

Pull request description:

  Disabling of some specific warnings no longer needed.

ACKs for top commit:
  MarcoFalke:
    ACK 7c543bc27b if green
  practicalswift:
    ACK 7c543bc27b if green: compiler warnings are good, compiler safety warnings are great
  sipsorcery:
    tACK 7c543bc27b.

Tree-SHA512: a8253a5a0ccc22b8622ae66efae77a163c54bbd6dbd7e28b043ad4eb474b2c8e5c7b22d3870b15a2b9b91bade0a5ae5bfc5ee765d132dc32ddbbe690fb0146d9
2021-03-30 08:42:15 +08:00
Hennadii Stepanov
7c543bc27b
build: Enable safe warnings for msvc builds 2021-03-29 11:01:19 +03:00
fanquake
9ac86bcc0d
test: remove qt byteswap compattests
These were added as part of #9366 to fix issues with Protobuf.

Now that we no-longer use Protobuf, there's no reason to maintain a
duplicate set of byteswap tests for qt.
2021-03-29 11:12:26 +08:00
Hennadii Stepanov
0eabb2abed
build: Remove unused header from the build system 2021-03-22 19:10:49 +02:00
Hennadii Stepanov
df2d165ba9
qt: Add peertablesortproxy module 2021-03-07 16:57:11 +02:00
Wladimir J. van der Laan
e017a913d0 bitcoind: Add -daemonwait option to wait for initialization
This adds a `-daemonwait` flag that does the same as `-daemon` except
it, from a user perspective, backgrounds the process only after
initialization is complete.

This can be useful when the process launching bitcoind wants to
guarantee that either the RPC server is running, or that initialization
failed, before continuing. The exit code indicates the initialization
result.

This replaces the use of the libc function `daemon()` by a custom
implementation which is inspired by the glibc implementation, but also
creates a pipe from the child to the parent process for communication.

An additional advantage of having our own `daemon()` implementation is
that no MACOS-specific pragmas are needed anymore to silence a
deprecation warning.
2021-03-04 18:24:00 +01:00
Ethan Heilman
9bd3f35003 build: adds switch for disabling random base addresses in MSVC 2021-02-28 14:49:09 -05:00
Wladimir J. van der Laan
a9335e4f12
Merge #16546: External signer support - Wallet Box edition
f75e0c1edd doc: add external-signer.md (Sjors Provoost)
d4b0107d68 rpc: send: support external signer (Sjors Provoost)
245b4457cf rpc: signerdisplayaddress (Sjors Provoost)
7ebc7c0215 wallet: ExternalSigner: add GetDescriptors method (Sjors Provoost)
fc5da520f5 wallet: add GetExternalSigner() (Sjors Provoost)
259f52cc33 test: external_signer wallet flag is immutable (Sjors Provoost)
2655197e1c rpc: add external_signer option to createwallet (Sjors Provoost)
2700f09c41 rpc: signer: add enumeratesigners to list external signers (Sjors Provoost)
07b7c940a7 rpc: add external signer RPC files (Sjors Provoost)
8ce7767071 wallet: add ExternalSignerScriptPubKeyMan (Sjors Provoost)
157ea7c614 wallet: add external_signer flag (Sjors Provoost)
f3e6ce78fb test: add external signer test (Sjors Provoost)
8cf543f96d wallet: add -signer argument for external signer command (Sjors Provoost)
f7eb7ecc67 test: framework: add skip_if_no_external_signer (Sjors Provoost)
87a97941f6 configure: add --enable-external-signer (Sjors Provoost)

Pull request description:

  Big picture overview in [this gist](https://gist.github.com/Sjors/29d06728c685e6182828c1ce9b74483d).

  This PR lets `bitcoind` call an arbitrary command `-signer=<cmd>`, e.g. a hardware wallet driver,  where it can fetch public keys, ask to display an address, and sign a transaction (using PSBT under the hood).

  It's design to work with https://github.com/bitcoin-core/HWI, which supports multiple hardware wallets. Any command with the same arguments and return values will work. It simplifies the manual procedure described [here](https://github.com/bitcoin-core/HWI/blob/master/docs/bitcoin-core-usage.md).

  Usage is documented in [doc/external-signer.md](
  https://github.com/Sjors/bitcoin/blob/2019/08/hww-box2/doc/external-signer.md), which also describes what protocol a different signer binary should conform to.

  Use `--enable-external-signer` to opt in, requires Boost::Process:

  ```
  Options used to compile and link:
    with wallet     = yes
    with gui / qt   = no
    external signer = yes
  ```

  It adds the following RPC methods:
  * `enumeratesigners`: asks <cmd> for a list of signers (e.g. devices) and their master key fingerprint
  * `signerdisplayaddress <address>`:  asks <cmd> to display an address

  It enhances the following RPC methods:
  * `createwallet`: takes an additional `external_signer` argument and fetches keys from device
  * `send`: automatically sends transaction to device and waits

  Usage TL&DR:
  * clone HWI repo somewhere and launch `bitcoind -signer=../HWI/hwi.py`
  * check if you can see your hardware device: `bitcoin-cli enumeratesigners`
  * create wallet and auto import keys `bitcoin-cli createwallet "hww" true true "" true true true`
  * display address on device: `bitcoin-cli signerdisplayaddress ...`
  * to spend, use `send` RPC and approve transaction on device

  Prerequisites:
  - [x] #21127 load wallet flags before everything else
  - [x] #21182 remove mostly pointless BOOST_PROCESS macro

  Potentially useful followups:
  - GUI support: bitcoin-core/gui#4
  - bumpfee support
  - (automatically) verify (a subset of) keys on the device after import, through message signing

ACKs for top commit:
  laanwj:
    re-ACK f75e0c1edd

Tree-SHA512: 7db8afd54762295c1424c3f01d8c587ec256a72f34bd5256e04b21832dabd5dc212be8ab975ae3b67de75259fd569a561491945750492f417111dc7b6641e77f
2021-02-23 17:56:43 +01:00
fanquake
5e531e6beb
assumptions: check C++17 assumption with MSVC
From my reading of
https://docs.microsoft.com/en-us/cpp/build/reference/zc-cplusplus?view=msvc-160
and
https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/
if we set the `/Zc:__cplusplus` switch in additional options, MSVC will
report the correct value for `__cplusplus`.
2021-02-23 12:51:50 +08:00
Sjors Provoost
87a97941f6
configure: add --enable-external-signer
This option replaces --with-boost-process

This prepares external signer support to be disabled by default.
It adds a configure option to enable this feature and to check
if Boost::Process is present.

This also exposes ENABLE_EXTERNAL_SIGNER to the test suite via test/config.ini
2021-02-21 16:27:10 +01:00
fanquake
060a2a64d4
ci: remove boost thread installation
Adjust fuzzbuzz.yml to only install the Boost components we need.
2021-02-02 12:38:22 +08:00
fanquake
06e1d7d81d
build: don't build or use Boost Thread 2021-02-02 12:38:22 +08:00
Hennadii Stepanov
c5354e4641
Fix MSVC build after gui#176 2021-01-21 23:09:17 +02:00