Skip to content

Commit

Permalink
Merge branch 'auxpow'
Browse files Browse the repository at this point in the history
  • Loading branch information
domob1812 committed Oct 5, 2020
2 parents b3a7bfc + 68224b2 commit 4f11049
Show file tree
Hide file tree
Showing 176 changed files with 18,285 additions and 3,274 deletions.
10 changes: 2 additions & 8 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,19 @@ environment:
QT_DOWNLOAD_HASH: '9a8c6eb20967873785057fdcd329a657c7f922b0af08c5fde105cc597dd37e21'
QT_LOCAL_PATH: 'C:\Qt5.9.8_x64_static_vs2019'
VCPKG_INSTALL_PATH: 'C:\tools\vcpkg\installed'
VCPKG_COMMIT_ID: 'f3f329a048eaff759c1992c458f2e12351486bc7'
VCPKG_COMMIT_ID: '13590753fec479c5b0a3d48dd553dde8d49615fc'
install:
# Disable zmq test for now since python zmq library on Windows would cause Access violation sometimes.
# - cmd: pip install zmq
# Powershell block below is to install the c++ dependencies via vcpkg. The pseudo code is:
# a. Checkout the vcpkg source (including port files) for the specific checkout and build the vcpkg binary,
# b. Install the missing packages.
# b. Install the missing packages using the vcpkg manifest.
- ps: |
$env:PACKAGES = Get-Content -Path build_msvc\vcpkg-packages.txt
Write-Host "vcpkg installing packages: $env:PACKAGES"
cd c:\tools\vcpkg
$env:GIT_REDIRECT_STDERR = '2>&1' # git is writing non-errors to STDERR when doing git pull. Send to STDOUT instead.
git pull origin master > $null
git -c advice.detachedHead=false checkout $env:VCPKG_COMMIT_ID
.\bootstrap-vcpkg.bat > $null
Add-Content "C:\tools\vcpkg\triplets\$env:PLATFORM-windows-static.cmake" "set(VCPKG_BUILD_TYPE release)"
.\vcpkg install --triplet $env:PLATFORM-windows-static $env:PACKAGES.split() > $null
Write-Host "vcpkg packages installed successfully."
.\vcpkg integrate install
cd "$env:APPVEYOR_BUILD_FOLDER"
before_build:
# Powershell block below is to download and extract the Qt static libraries. The pseudo code is:
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
- set -o errexit; source ./ci/lint/06_script.sh

- stage: test
name: 'ARM [GOAL: install] [buster] [unit tests, functional tests]'
name: 'ARM [GOAL: install] [buster] [unit tests, no functional tests]'
arch: arm64 # Can disable QEMU_USER_CMD and run the tests natively without qemu
env: >-
FILE_ENV="./ci/test/00_setup_env_arm.sh"
Expand Down
2 changes: 1 addition & 1 deletion .tx/config
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[main]
host = https://www.transifex.com

[bitcoin.qt-translation-020x]
[bitcoin.qt-translation-021x]
file_filter = src/qt/locale/bitcoin_<lang>.ts
source_file = src/qt/locale/bitcoin_en.ts
source_lang = en
1 change: 1 addition & 0 deletions build_msvc/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ libtest_util/libtest_util.vcxproj
*/Win32
libbitcoin_qt/QtGeneratedFiles/*
test_bitcoin-qt/QtGeneratedFiles/*
vcpkg_installed
28 changes: 7 additions & 21 deletions build_msvc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ 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.
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](https://github.com/bitcoin/bitcoin/blob/master/doc/build-windows.md).

Expand All @@ -12,10 +12,9 @@ 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.

```
vcpkg install --triplet x64-windows-static berkeleydb boost-filesystem boost-multi-index boost-signals2 boost-test boost-thread libevent[thread] zeromq double-conversion
vcpkg integrate install
py -3 build_msvc\msvc-autogen.py
msbuild /m build_msvc\bitcoin.sln /p:Platform=x64 /p:Configuration=Release /t:build
cd build_msvc
py -3 msvc-autogen.py
msbuild /m bitcoin.sln /p:Platform=x64 /p:Configuration=Release /t:build
```

Dependencies
Expand All @@ -28,14 +27,7 @@ Options for installing the dependencies in a Visual Studio compatible manner are
- 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](https://www.nuget.org/) packages with the understanding that any binary files have been compiled by an untrusted third party.

The [external dependencies](https://github.com/bitcoin/bitcoin/blob/master/doc/dependencies.md) required for building are:

- Berkeley DB
- Boost
- DoubleConversion
- libevent
- Qt5
- ZeroMQ
The [external dependencies](https://github.com/bitcoin/bitcoin/blob/master/doc/dependencies.md) 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
---------------------
Expand All @@ -52,20 +44,14 @@ Building
The instructions below use `vcpkg` to install the dependencies.

- Install [`vcpkg`](https://github.com/Microsoft/vcpkg).
- Install the required packages (replace x64 with x86 as required). The list of required packages can be found in the `build_msvc\vcpkg-packages.txt` file. The PowerShell command below will work if run from the repository root directory and `vcpkg` is in the path. Alternatively the contents of the packages text file can be pasted in place of the `Get-Content` cmdlet.

```
PS >.\vcpkg install --triplet x64-windows-static $(Get-Content -Path build_msvc\vcpkg-packages.txt).split()
PS >.\vcpkg integrate install
```

- 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.
- 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:

Expand All @@ -79,7 +65,7 @@ msbuild /m bitcoin.sln /p:Platform=x64 /p:Configuration=Release /p:PlatformTools
msbuild /m bitcoin.sln /p:Platform=x64 /p:Configuration=Release /t:build
```

- Alternatively open the `build_msvc\bitcoin.sln` file in Visual Studio.
- Alternatively open the `build_msvc/bitcoin.sln` file in Visual Studio.

AppVeyor
---------------------
Expand Down
9 changes: 9 additions & 0 deletions build_msvc/common.init.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@
<UseNativeEnvironment>true</UseNativeEnvironment>
</PropertyGroup>

<PropertyGroup Label="Vcpkg">
<VcpkgEnabled>true</VcpkgEnabled>
<VcpkgEnableManifest>true</VcpkgEnableManifest>
<VcpkgManifestInstall>true</VcpkgManifestInstall>
<VcpkgUseStatic>true</VcpkgUseStatic>
<VcpkgAutoLink>true</VcpkgAutoLink>
<VcpkgConfiguration>$(Configuration)</VcpkgConfiguration>
</PropertyGroup>

<PropertyGroup Condition="'$(WindowsTargetPlatformVersion)'=='' and !Exists('$(WindowsSdkDir)\DesignTime\CommonConfiguration\Neutral\Windows.props')">
<WindowsTargetPlatformVersion_10 Condition="'$(WindowsTargetPlatformVersion_10)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0@ProductVersion)</WindowsTargetPlatformVersion_10>
<WindowsTargetPlatformVersion_10 Condition="'$(WindowsTargetPlatformVersion_10)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0@ProductVersion)</WindowsTargetPlatformVersion_10>
Expand Down
1 change: 0 additions & 1 deletion build_msvc/vcpkg-packages.txt

This file was deleted.

19 changes: 19 additions & 0 deletions build_msvc/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "bitcoin-core",
"version-string": "1",
"dependencies": [
"berkeleydb",
"boost-filesystem",
"boost-multi-index",
"boost-process",
"boost-signals2",
"boost-test",
"boost-thread",
"double-conversion",
{
"name": "libevent",
"features": ["thread"]
},
"zeromq"
]
}
6 changes: 5 additions & 1 deletion ci/lint/06_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@
export LC_ALL=C

if [ "$TRAVIS_EVENT_TYPE" = "pull_request" ]; then
test/lint/commit-script-check.sh $TRAVIS_COMMIT_RANGE
# TRAVIS_BRANCH will be present in a Travis environment. For builds triggered
# by a pull request this is the name of the branch targeted by the pull request.
# https://docs.travis-ci.com/user/environment-variables/
COMMIT_RANGE="$TRAVIS_BRANCH..HEAD"
test/lint/commit-script-check.sh $COMMIT_RANGE
fi

test/lint/git-subtree-check.sh src/crypto/ctaes
Expand Down
2 changes: 1 addition & 1 deletion ci/test/00_setup_env_arm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export CONTAINER_NAME=ci_arm_linux
export DOCKER_NAME_TAG="debian:buster"
export USE_BUSY_BOX=true
export RUN_UNIT_TESTS=true
export RUN_FUNCTIONAL_TESTS=true
export RUN_FUNCTIONAL_TESTS=false
export GOAL="install"
# -Wno-psabi is to disable ABI warnings: "note: parameter passing for argument of type ... changed in GCC 7.1"
# This could be removed once the ABI change warning does not show up by default
Expand Down
8 changes: 8 additions & 0 deletions contrib/linearize/example-linearize.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ port=8332
#regtest default
#port=18443

#signet default
#port=38332

# bootstrap.dat hashlist settings (linearize-hashes)
max_height=313000

Expand All @@ -33,6 +36,11 @@ input=/home/example/.bitcoin/blocks
#genesis=0f9188f13cb7b2c71f2a335e3a4fc328bf5beb436012afca590b1a11466e2206
#input=/home/example/.bitcoin/regtest/blocks

# signet
#netmagic=0a03cf40
#genesis=00000008819873e925422c1ff0f99f7cc9bbb232af63a077a480a3633bee1ef6
#input=/home/example/.bitcoin/signet/blocks

# "output" option causes blockchain files to be written to the given location,
# with "output_file" ignored. If not used, "output_file" is used instead.
# output=/home/example/blockchain_directory
Expand Down
6 changes: 6 additions & 0 deletions doc/release-notes-15367.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Configuration option changes
----------------------------

- The `startupnotify` option is used to specify a command to
execute when Bitcoin Core has finished with its startup
sequence. (#15367)
5 changes: 3 additions & 2 deletions doc/release-notes-16378.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
RPC
---
- A new `send` RPC with similar syntax to `walletcreatefundedpsbt`, including
support for coin selection and a custom fee rate. Using the new `send` method
is encouraged: `sendmany` and `sendtoaddress` may be deprecated in a future release.
support for coin selection and a custom fee rate. The `send` RPC is experimental
and may change in subsequent releases. Using it is encouraged once it's no
longer experimental: `sendmany` and `sendtoaddress` may be deprecated in a future release.
4 changes: 4 additions & 0 deletions doc/release-notes-18309.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Command-line options
-----------------------------

The same ZeroMQ notification (e.g. `-zmqpubhashtx=address`) can now be specified multiple times to publish the same notification to different ZeroMQ sockets.
6 changes: 5 additions & 1 deletion doc/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,8 @@ Updated settings

- Netmasks that contain 1-bits after 0-bits (the 1-bits are not contiguous on
the left side, e.g. 255.0.255.255) are no longer accepted. They are invalid
according to RFC 4632.
according to RFC 4632. Netmasks are used in the `-rpcallowip` and `-whitelist`
configuration options and in the `setban` RPC. (#19628)

Changes to Wallet or GUI related settings can be found in the GUI or Wallet section below.

Expand Down Expand Up @@ -190,6 +191,9 @@ Wallet
introduced unbroadcast set. See the "P2P and network changes" section for
more information on the unbroadcast set. (#18038)

- The `sendtoaddress` and `sendmany` RPCs accept an optional `verbose=True`
argument to also return the fee reason about the sent tx. (#19501)

- The wallet can create a transaction without change even when the keypool is
empty. Previously it failed. (#17219)

Expand Down
9 changes: 5 additions & 4 deletions doc/tor.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,12 @@ config file): *Needed for Tor version 0.2.7.0 and older versions of Tor only. Fo
versions of Tor see [Section 3](#3-automatically-listen-on-tor).*

HiddenServiceDir /var/lib/tor/bitcoin-service/
HiddenServicePort 8333 127.0.0.1:8333
HiddenServicePort 18333 127.0.0.1:18333
HiddenServicePort 8333 127.0.0.1:8334
HiddenServicePort 18333 127.0.0.1:18334

The directory can be different of course, but (both) port numbers should be equal to
your bitcoind's P2P listen port (8333 by default).
The directory can be different of course, but virtual port numbers should be equal to
your bitcoind's P2P listen port (8333 by default), and target addresses and ports
should be equal to binding address and port for inbound Tor connections (127.0.0.1:8334 by default).

-externalip=X You can tell bitcoin about its publicly reachable address using
this option, and this can be a .onion address. Given the above
Expand Down
2 changes: 2 additions & 0 deletions doc/zmq.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ Currently, the following notifications are supported:

The socket type is PUB and the address must be a valid ZeroMQ socket
address. The same address can be used in more than one notification.
The same notification can be specified more than once.

The option to set the PUB socket's outbound message high water mark
(SNDHWM) may be set individually for each notification:
Expand All @@ -82,6 +83,7 @@ The high water mark value must be an integer greater than or equal to 0.
For instance:

$ bitcoind -zmqpubhashtx=tcp://127.0.0.1:28332 \
-zmqpubhashtx=tcp://192.168.1.2:28332 \
-zmqpubrawtx=ipc:///tmp/bitcoind.tx.raw \
-zmqpubhashtxhwm=10000

Expand Down
5 changes: 3 additions & 2 deletions src/Makefile.qt_locale.include
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ QT_TS = \
qt/locale/bitcoin_fi.ts \
qt/locale/bitcoin_fil.ts \
qt/locale/bitcoin_fr.ts \
qt/locale/bitcoin_gl_ES.ts \
qt/locale/bitcoin_he.ts \
qt/locale/bitcoin_hi.ts \
qt/locale/bitcoin_hr.ts \
Expand Down Expand Up @@ -71,7 +72,6 @@ QT_TS = \
qt/locale/bitcoin_ta.ts \
qt/locale/bitcoin_te.ts \
qt/locale/bitcoin_th.ts \
qt/locale/bitcoin_tr.ts \
qt/locale/bitcoin_uk.ts \
qt/locale/bitcoin_ur.ts \
qt/locale/bitcoin_uz@Cyrl.ts \
Expand All @@ -82,4 +82,5 @@ QT_TS = \
qt/locale/bitcoin_zh.ts \
qt/locale/bitcoin_zh_CN.ts \
qt/locale/bitcoin_zh_HK.ts \
qt/locale/bitcoin_zh_TW.ts
qt/locale/bitcoin_zh_TW.ts \
qt/locale/bitcoin_zu.ts
3 changes: 2 additions & 1 deletion src/bench/checkblock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ static void DeserializeAndCheckBlockTest(benchmark::Bench& bench)
char a = '\0';
stream.write(&a, 1); // Prevent compaction

const auto chainParams = CreateChainParams(CBaseChainParams::MAIN);
ArgsManager bench_args;
const auto chainParams = CreateChainParams(bench_args, CBaseChainParams::MAIN);

bench.unit("block").run([&] {
CBlock block; // Note that CBlock caches its checked state, so we need to recreate it here
Expand Down
4 changes: 3 additions & 1 deletion src/bitcoin-cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ static void SetupCliArgs(ArgsManager& argsman)

const auto defaultBaseParams = CreateBaseChainParams(CBaseChainParams::MAIN);
const auto testnetBaseParams = CreateBaseChainParams(CBaseChainParams::TESTNET);
const auto signetBaseParams = CreateBaseChainParams(CBaseChainParams::SIGNET);
const auto regtestBaseParams = CreateBaseChainParams(CBaseChainParams::REGTEST);

argsman.AddArg("-version", "Print version and exit", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
Expand All @@ -66,7 +67,7 @@ static void SetupCliArgs(ArgsManager& argsman)
argsman.AddArg("-rpcconnect=<ip>", strprintf("Send commands to node running on <ip> (default: %s)", DEFAULT_RPCCONNECT), ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
argsman.AddArg("-rpccookiefile=<loc>", "Location of the auth cookie. Relative paths will be prefixed by a net-specific datadir location. (default: data dir)", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
argsman.AddArg("-rpcpassword=<pw>", "Password for JSON-RPC connections", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
argsman.AddArg("-rpcport=<port>", strprintf("Connect to JSON-RPC on <port> (default: %u, testnet: %u, regtest: %u)", defaultBaseParams->RPCPort(), testnetBaseParams->RPCPort(), regtestBaseParams->RPCPort()), ArgsManager::ALLOW_ANY | ArgsManager::NETWORK_ONLY, OptionsCategory::OPTIONS);
argsman.AddArg("-rpcport=<port>", strprintf("Connect to JSON-RPC on <port> (default: %u, testnet: %u, signet: %u, regtest: %u)", defaultBaseParams->RPCPort(), testnetBaseParams->RPCPort(), signetBaseParams->RPCPort(), regtestBaseParams->RPCPort()), ArgsManager::ALLOW_ANY | ArgsManager::NETWORK_ONLY, OptionsCategory::OPTIONS);
argsman.AddArg("-rpcuser=<user>", "Username for JSON-RPC connections", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
argsman.AddArg("-rpcwait", "Wait for RPC server to start", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
argsman.AddArg("-rpcwallet=<walletname>", "Send RPC for non-default wallet on RPC server (needs to exactly match corresponding -wallet option passed to namecoind). This changes the RPC endpoint used, e.g. http://127.0.0.1:8332/wallet/<walletname>", ArgsManager::ALLOW_ANY, OptionsCategory::OPTIONS);
Expand Down Expand Up @@ -595,6 +596,7 @@ static UniValue CallRPC(BaseRequestHandler* rh, const std::string& strMethod, co
assert(output_headers);
evhttp_add_header(output_headers, "Host", host.c_str());
evhttp_add_header(output_headers, "Connection", "close");
evhttp_add_header(output_headers, "Content-Type", "application/json");
evhttp_add_header(output_headers, "Authorization", (std::string("Basic ") + EncodeBase64(strRPCUserColonPass)).c_str());

// Attach request data
Expand Down
2 changes: 1 addition & 1 deletion src/bitcoin-tx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,7 @@ static void MutateTxSign(CMutableTransaction& tx, const std::string& flagStr)

const int nOut = prevOut["vout"].get_int();
if (nOut < 0)
throw std::runtime_error("vout must be positive");
throw std::runtime_error("vout cannot be negative");

COutPoint out(txid, nOut);
std::vector<unsigned char> pkData(ParseHexUV(prevOut["scriptPubKey"], "scriptPubKey"));
Expand Down
Loading

0 comments on commit 4f11049

Please sign in to comment.