dogecoin/build_msvc
Wladimir J. van der Laan 3caee16946
Merge #19953: Implement BIP 340-342 validation (Schnorr/taproot/tapscript)
0e2a5e448f tests: dumping and minimizing of script assets data (Pieter Wuille)
4567ba034c tests: add generic qa-asset-based script verification unit test (Pieter Wuille)
f06e6d0345 tests: functional tests for Schnorr/Taproot/Tapscript (Pieter Wuille)
3c226639eb tests: add BIP340 Schnorr signature support to test framework (Pieter Wuille)
206fb180ec --- [TAPROOT] Tests --- (Pieter Wuille)
d7ff237f29 Activate Taproot/Tapscript on regtest (BIP 341, BIP 342) (Pieter Wuille)
e9a021d7e6 Make Taproot spends standard + policy limits (Pieter Wuille)
865d2c37e2 --- [TAPROOT] Regtest activation and policy --- (Pieter Wuille)
72422ce396 Implement Tapscript script validation rules (BIP 342) (Johnson Lau)
330de894a9 Use ScriptExecutionData to pass through annex hash (Pieter Wuille)
8bbed4b7ac Implement Taproot validation (BIP 341) (Pieter Wuille)
0664f5fe1f Support for Schnorr signatures and integration in SignatureCheckers (BIP 340) (Pieter Wuille)
5de246ca81 Implement Taproot signature hashing (BIP 341) (Johnson Lau)
9eb590894f Add TaggedHash function (BIP 340) (Pieter Wuille)
450d2b2371 --- [TAPROOT] BIP340/341/342 consensus rules --- (Pieter Wuille)
5d62e3a68b refactor: keep spent outputs in PrecomputedTransactionData (Pieter Wuille)
8bd2b4e784 refactor: rename scriptPubKey in VerifyWitnessProgram to exec_script (Pieter Wuille)
107b57df9f scripted-diff: put ECDSA in name of signature functions (Pieter Wuille)
f8c099e220 --- [TAPROOT] Refactors --- (Pieter Wuille)

Pull request description:

  This is an implementation of the Schnorr/taproot consensus rules proposed by BIPs [340](https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki), [341](https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki), and [342](https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki).

  See the list of commits [below](https://github.com/bitcoin/bitcoin/pull/19953#issuecomment-691815830). No signing or wallet support of any kind is included, as testing is done entirely through the Python test framework.

  This is a successor to https://github.com/bitcoin/bitcoin/pull/17977 (see discussion following [this comment](https://github.com/bitcoin/bitcoin/pull/17977#issuecomment-682285983)), and will have further changes squashed/rebased. The history of this PR can be found in #19997.

ACKs for top commit:
  instagibbs:
    reACK 0e2a5e448f
  benthecarman:
    reACK 0e2a5e4
  kallewoof:
    reACK 0e2a5e448f
  jonasnick:
    ACK 0e2a5e448f almost only looked at bip340/libsecp related code
  jonatack:
    ACK 0e2a5e448f modulo the last four commits (tests) that I plan to finish reviewing tomorrow
  fjahr:
    reACK 0e2a5e448f
  achow101:
    ACK 0e2a5e448f

Tree-SHA512: 1b00314450a2938a22bccbb4e177230cf08bd365d72055f9d526891f334b364c997e260c10bc19ca78440b6767712c9feea7faad9a1045dd51a5b96f7ca8146e
2020-10-15 10:22:35 +02:00
..
bench_bitcoin Added libtest_util library to msvc build configuration. 2019-11-23 15:49:16 +00:00
bitcoin-cli [MSVC] Copy build output to src/ automatically after build 2019-07-01 19:16:19 +09:00
bitcoin-qt Ignore msvc linker warning and update to msvc build instructions. 2020-01-09 09:19:36 +00:00
bitcoin-tx [MSVC] Copy build output to src/ automatically after build 2019-07-01 19:16:19 +09:00
bitcoin-wallet [MSVC] Copy build output to src/ automatically after build 2019-07-01 19:16:19 +09:00
bitcoind [MSVC] Copy build output to src/ automatically after build 2019-07-01 19:16:19 +09:00
libbitcoin_cli [MSVC] Copy build output to src/ automatically after build 2019-07-01 19:16:19 +09:00
libbitcoin_common [MSVC] Copy build output to src/ automatically after build 2019-07-01 19:16:19 +09:00
libbitcoin_crypto [MSVC] Copy build output to src/ automatically after build 2019-07-01 19:16:19 +09:00
libbitcoin_qt [gui] PSBT Operations Dialog (sign & broadcast) 2020-06-19 02:20:04 -07:00
libbitcoin_server [MSVC] Copy build output to src/ automatically after build 2019-07-01 19:16:19 +09:00
libbitcoin_util Drop unintended bitcoin-tx dependency on libevent 2020-04-02 08:28:11 -04:00
libbitcoin_wallet [MSVC] Copy build output to src/ automatically after build 2019-07-01 19:16:19 +09:00
libbitcoin_wallet_tool [MSVC] Copy build output to src/ automatically after build 2019-07-01 19:16:19 +09:00
libbitcoin_zmq [MSVC] Copy build output to src/ automatically after build 2019-07-01 19:16:19 +09:00
libbitcoinconsensus [MSVC] Copy build output to src/ automatically after build 2019-07-01 19:16:19 +09:00
libleveldb build: Disable msvc warning 4722 for leveldb build 2020-01-28 17:01:48 +01:00
libsecp256k1 Support for Schnorr signatures and integration in SignatureCheckers (BIP 340) 2020-10-12 17:15:40 -07:00
libtest_util Added libtest_util library to msvc build configuration. 2019-11-23 15:49:16 +00:00
libunivalue [MSVC] Copy build output to src/ automatically after build 2019-07-01 19:16:19 +09:00
msbuild/tasks [MSVC]: Create the config.ini as part of bitcoind build 2019-06-21 16:23:35 +09:00
test_bitcoin build: Fix appveyor test_bitcoin build of *.raw 2020-01-29 16:57:41 -05:00
test_bitcoin-qt Ignore msvc linker warning and update to msvc build instructions. 2020-01-09 09:19:36 +00:00
testconsensus scripted-diff: Bump copyright headers 2020-04-16 13:33:09 -04:00
.gitignore Update msvc build to use new vcpkg manifest 2020-09-29 13:48:28 +01:00
bitcoin.sln Included test_bitcoin-qt in msvc build. 2019-12-13 12:07:32 +00:00
bitcoin_config.h [build] msvc: add boost::process 2020-07-31 13:38:09 +02:00
common.init.vcxproj Update msvc build to use new vcpkg manifest 2020-09-29 13:48:28 +01:00
common.qt.init.vcxproj Updated appveyor config: 2019-11-06 22:02:16 +00:00
common.vcxproj [MSVC] Copy build output to src/ automatically after build 2019-07-01 19:16:19 +09:00
libsecp256k1_config.h Update MSVC build config for libsecp256k1 2020-06-09 13:41:38 -07:00
msvc-autogen.py scripted-diff: Add missed copyright headers 2020-01-04 20:18:28 +02:00
README.md Update msvc build to use new vcpkg manifest 2020-09-29 13:48:28 +01:00
vcpkg.json Add sqlite to travis and depends 2020-10-14 11:18:13 -04:00

Building Bitcoin Core with Visual Studio

Introduction

Solution and project files to build the Bitcoin Core applications msbuild or Visual Studio can be found in the build_msvc directory. The build has been tested with Visual Studio 2017 and 2019.

Building with Visual Studio is an alternative to the Linux based cross-compiler build.

Quick Start

The minimal steps required to build Bitcoin Core with the msbuild toolchain are below. More detailed instructions are contained in the following sections.

cd build_msvc
py -3 msvc-autogen.py
msbuild /m bitcoin.sln /p:Platform=x64 /p:Configuration=Release /t:build

Dependencies

A number of open source libraries are required in order to be able to build Bitcoin Core.

Options for installing the dependencies in a Visual Studio compatible manner are:

  • Use Microsoft's vcpkg to download the source packages and build locally. This is the recommended approach.
  • Download the source code, build each dependency, add the required include paths, link libraries and binary tools to the Visual Studio project files.
  • Use nuget packages with the understanding that any binary files have been compiled by an untrusted third party.

The external dependencies required for building are listed in the build_msvc/vcpkg.json file. The msbuild project files are configured to automatically install the vcpkg dependencies.

Qt

In order to build the Bitcoin Core a static build of Qt is required. The runtime library version (e.g. v141, v142) and platform type (x86 or x64) must also match.

Some prebuilt x64 versions of Qt can be downloaded from here. Please be aware these downloads are NOT officially sanctioned by Bitcoin Core and are provided for developer convenience only. They should NOT be used for builds that will be used in a production environment or with real funds.

To determine which Qt prebuilt version to download open the .appveyor.yml file and note the QT_DOWNLOAD_URL. When extracting the zip file the destination path must be set to C:\. This is due to the way that Qt includes, libraries and tools use internal paths.

To build Bitcoin Core without Qt unload or disable the bitcoin-qt, libbitcoin_qt and test_bitcoin-qt projects.

Building

The instructions below use vcpkg to install the dependencies.

  • Install vcpkg.

  • Use Python to generate *.vcxproj from Makefile

PS >py -3 msvc-autogen.py
  • An optional step is to adjust the settings in the build_msvc directory and the common.init.vcxproj file. This project file contains settings that are common to all projects such as the runtime library version and target Windows SDK version. The Qt directories can also be set.

  • To build from the command line with the Visual Studio 2017 toolchain use:

msbuild /m bitcoin.sln /p:Platform=x64 /p:Configuration=Release /p:PlatformToolset=v141 /t:build
  • To build from the command line with the Visual Studio 2019 toolchain use:
msbuild /m bitcoin.sln /p:Platform=x64 /p:Configuration=Release /t:build
  • Alternatively open the build_msvc/bitcoin.sln file in Visual Studio.

AppVeyor

The .appveyor.yml in the root directory is suitable to perform builds on AppVeyor Continuous Integration servers. The simplest way to perform an AppVeyor build is to fork Bitcoin Core and then configure a new AppVeyor Project pointing to the forked repository.

For safety reasons the Bitcoin Core .appveyor.yml file has the artifact options disabled. The build will be performed but no executable files will be available. To enable artifacts on a forked repository uncomment the lines shown below:

    #- 7z a bitcoin-%APPVEYOR_BUILD_VERSION%.zip %APPVEYOR_BUILD_FOLDER%\build_msvc\%platform%\%configuration%\*.exe
    #- path: bitcoin-%APPVEYOR_BUILD_VERSION%.zip