Commit Graph

177 Commits

Author SHA1 Message Date
MarcoFalke
ddcc518cbd
Merge bitcoin/bitcoin#23828: scripted-diff: Rename libbitcoin_server.a to libbitcoin_node.a
172096e9dd scripted-diff: Rename libbitcoin_server.a to libbitcoin_node.a (Russell Yanofsky)

Pull request description:

  Goal along with namespacing PR #23497 is to make code organization more obvious and have `src/node/` code in `node::` namespace in `libbitcoin_node.a` library

ACKs for top commit:
  MarcoFalke:
    cr ACK 172096e9dd

Tree-SHA512: a2e787eeaa3ab769b0f5376473072cae584d237aa8b67b677bea833bb36b0134a0eca17eb01722389639473b8463f4953bc3a5e4801a6b2c8965ac1075cba005
2022-01-06 14:59:17 +01:00
Hennadii Stepanov
f47dda2c58
scripted-diff: Bump copyright headers
-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./
-END VERIFY SCRIPT-

Commits of previous years:
* 2020: fa0074e2d8
* 2019: aaaaad6ac9
2021-12-30 19:36:57 +02:00
Russell Yanofsky
172096e9dd scripted-diff: Rename libbitcoin_server.a to libbitcoin_node.a
Goal along with namespacing PR #23497 is to have src/node/ code in
node:: namespace in libbitcoin_node.a library

-BEGIN VERIFY SCRIPT-
bash -c ' # Bash shell needed for brace expansion {a,b}
git mv build_msvc/libbitcoin_{server,node}
git mv build_msvc/libbitcoin_node/libbitcoin_{server,node}.vcxproj.in
ren() { git grep -l "$1" src build_msvc | xargs sed -i "s/$1/$2/g"; }
ren LIBBITCOIN_{SERVER,NODE}
ren libbitcoin_{server,node}
'
-END VERIFY SCRIPT-
2021-12-20 10:53:01 -05:00
Hennadii Stepanov
06aca8aacb
doc: Update build_msvc/README.md for Qt 5.15.2 2021-12-03 14:07:12 +08:00
MarcoFalke
fa44237d76
doc: Fix typos in endif header comments 2021-11-16 09:56:45 +01:00
W. J. van der Laan
c82284cfdc
Merge bitcoin/bitcoin#23345: build: Drop unneeded dependencies for bitcoin-wallet tool
4fe7cf1677 build: Drop unneeded dependencies for bitcoin-wallet tool (Hennadii Stepanov)

Pull request description:

  `bitcoin-wallet` is an offline tool, and its code does not depend on networking stuff (ZMQ, UPnP, NAT-PMP, and LIBBITCOIN_SERVER).

  Also `bitcoin-wallet`  does not interacts with the chainstate, therefore dependency on LevelDB is not needed.

ACKs for top commit:
  laanwj:
    Code review ACK 4fe7cf1677

Tree-SHA512: 97342d9cdf8670806efe16dc7885a85ec92f3c1ae0819a4c3cc147938fc8642089e303c4432cb1395fc75b852c1af6a6a13fc58e29e027c23f75219fd3bd8cb4
2021-11-15 16:29:46 +01:00
CallMeMisterOwl
410f99faed build_msvc/bitcoin_config.h is generated using build_msvc/msvc-autogen.py 2021-11-14 15:00:29 +01:00
Hennadii Stepanov
4fe7cf1677
build: Drop unneeded dependencies for bitcoin-wallet tool 2021-11-13 21:24:51 +02:00
fanquake
c1fb30633b
Merge bitcoin/bitcoin#23114: Add minisketch subtree and integrate into build/test
29173d6c6c ubsan: add minisketch exceptions (Cory Fields)
54b5e1aeab Add thin Minisketch wrapper to pick best implementation (Pieter Wuille)
ee9dc71c1b Add basic minisketch tests (Pieter Wuille)
0659f12b13 Add minisketch dependency (Gleb Naumenko)
0eb7928ab8 Add MSVC build configuration for libminisketch (Pieter Wuille)
8bc166d5b1 build: add minisketch build file and include it (Cory Fields)
b2904ceb85 build: add configure checks for minisketch (Cory Fields)
b6487dc4ef Squashed 'src/minisketch/' content from commit 89629eb2c7 (fanquake)

Pull request description:

  This takes over #21859, which has [recently switched](https://github.com/bitcoin/bitcoin/pull/21859#issuecomment-921899200) to my integration branch. A few more build issues came up (and have been fixed) since, and after discussing with sipa it was decided I would open a PR to shepherd any final changes through.

  > This adds a `src/minisketch` subtree, taken from the master branch of https://github.com/sipa/minisketch, to prepare for Erlay implementation (see #21515). It gets configured for just supporting 32-bit fields (the only ones we're interested in in the context of Erlay), and some code on top is added:
  > * A very basic unit test (just to make sure compilation & running works; actual correctness checking is done through minisketch's own tests).
  > * A wrapper in `minisketchwrapper.{cpp,h}` that runs a benchmark to determine which field implementation to use.

  Only changes since my last update to the branch in the previous PR have been rebasing on master and fixing an issue with a header in an introduced file.

ACKs for top commit:
  naumenkogs:
    ACK 29173d6c6c

Tree-SHA512: 1217d3228db1dd0de12c2919314e1c3626c18a416cf6291fec99d37e34fb6eec8e28d9e9fb935f8590273b8836cbadac313a15f05b4fd9f9d3024c8ce2c80d02
2021-11-12 10:00:49 +08:00
Aaron Clauson
bb1c84082c
Remove the build_msvc/testconsensus project
The testconsensus project is not integral to the Bitcoin Core code. It was originally added as a quick and dirty demo of how to do a consensus check with the msvc build. There are better examples.

PR #23438 made a change that caused a compiler error with the buildmsvc/testconsensus code. Rather than leave it hanging around to incur potential bitrot, or furhter PR build failures, it should be removed.
2021-11-06 21:32:34 +00:00
MarcoFalke
e77d9679fd
Merge bitcoin/bitcoin#23006: multiprocess: Add new bitcoin-gui, bitcoin-qt, bitcoin-wallet init implementations
d5f985e51f multiprocess: Add new bitcoin-gui, bitcoin-qt, bitcoin-wallet init implementations (Russell Yanofsky)

Pull request description:

  Add separate `interfaces::Init` subclasses for `bitcoin-wallet`,  `bitcoin-gui`, and `bitcoin-qt` binaries instead of sharing `bitcoind` and `bitcoin-node` init subclasses in different binaries. After this, the new init subclasses can be customized in #10102, so node and wallet code is dropped from the `bitcoin-gui` binary and wallet code is dropped from into the `bitcoin-node` binary.

  ---

  This PR is part of the [process separation project](https://github.com/bitcoin/bitcoin/projects/10).

ACKs for top commit:
  lsilva01:
    reACK d5f985e
  hebasto:
    re-ACK d5f985e51f, only suggested changes since my [previous](https://github.com/bitcoin/bitcoin/pull/23006#pullrequestreview-787537444) review.

Tree-SHA512: 6784210bd9ce3a6fbc66852680d0e9bc513c072dc538aeb7f48cb6a41580d3f567ccef04f975ee767a714a4b05d4d87273e94a79abda1b9c25d5ac4bbe752006
2021-10-26 15:54:52 +01:00
Pieter Wuille
0eb7928ab8
Add MSVC build configuration for libminisketch 2021-10-21 09:38:45 +08:00
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
Russell Yanofsky
d5f985e51f multiprocess: Add new bitcoin-gui, bitcoin-qt, bitcoin-wallet init implementations
Add separate init implementations instead of sharing existing bitcoind
and bitcoin-node ones, so they can start to be differentiated in
upcoming commits with node and wallet code no longer linked into the
bitcoin-gui binary and wallet code no longer linked into the
bitcoin-node binary.
2021-09-16 13:17:01 -05: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
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
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