diff --git a/.clonemachine b/.clonemachine
index d072649b11..1b92b46635 100644
--- a/.clonemachine
+++ b/.clonemachine
@@ -14,3 +14,5 @@ appropriated_files:
removed_files:
- contrib/gitian-descriptors/gitian-osx-signer.yml
- doc/translation_process.md
+- .appveyor.yml
+- test/lint/lint-qt.sh
diff --git a/.gitignore b/.gitignore
index ce8fc78e5a..091bd741e4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,6 +5,7 @@ src/unite
src/unit-e
src/unit-e-cli
src/unit-e-tx
+src/unite-wallet
src/test/test_unite
src/test/test_unite_fuzzy
@@ -51,6 +52,7 @@ src/univalue/gen
*.a
*.pb.cc
*.pb.h
+*.dat
*.log
*.trs
@@ -101,3 +103,9 @@ conftest.err
conftest.cpp
conftest
conftest.nm
+
+# Output from running db4 installation
+db4/
+
+# clang-check
+*.plist
diff --git a/.python-version b/.python-version
new file mode 100644
index 0000000000..7bcbb3808b
--- /dev/null
+++ b/.python-version
@@ -0,0 +1 @@
+3.4.9
diff --git a/.travis.yml b/.travis.yml
index 9a9f1ae816..fe2aa6f9e6 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,7 +1,7 @@
branches:
only:
- master
-dist: trusty
+dist: trusty # there is a xenial in 0.18.0
os: linux
language: minimal
cache:
@@ -18,10 +18,11 @@ git:
env:
global:
- MAKEJOBS=-j3
- - RUN_TESTS=false
+ - RUN_UNIT_TESTS=true
+ - RUN_FUNCTIONAL_TESTS=true
+ - RUN_FUZZ_TESTS=false
- RUN_BENCH=false # Set to true for any one job that has debug enabled, to quickly check bench is not crashing or hitting assertions
- DOCKER_NAME_TAG=ubuntu:18.04
- - LC_ALL=C.UTF-8
- BOOST_TEST_RANDOM=1$TRAVIS_BUILD_ID
- CCACHE_SIZE=100M
- CCACHE_TEMPDIR=/tmp/.ccache-temp
@@ -38,13 +39,16 @@ install:
before_script:
- set -o errexit; source .travis/test_05_before_script.sh
script:
- - set -o errexit; source .travis/test_06_script.sh
+ - if [ $SECONDS -gt 1200 ]; then set +o errexit; echo "Travis early exit to cache current state"; false; else set -o errexit; source .travis/test_06_script_a.sh; fi
+ - if [ $SECONDS -gt 1800 ]; then set +o errexit; echo "Travis early exit to cache current state"; false; else set -o errexit; source .travis/test_06_script_b.sh; fi
after_script:
- - echo $TRAVIS_COMMIT_RANGE
- - echo $TRAVIS_COMMIT_LOG
+ - echo $TRAVIS_COMMIT_RANGE
+ - echo $TRAVIS_COMMIT_LOG
jobs:
include:
+
- stage: lint
+ name: 'lint'
env:
cache: false
language: python
@@ -55,56 +59,66 @@ jobs:
- set -o errexit; source .travis/lint_05_before_script.sh
script:
- set -o errexit; source .travis/lint_06_script.sh
+
- stage: test
- name: "ARM"
+ name: 'ARM [GOAL: install] [no unit or functional tests]'
env: >-
HOST=arm-linux-gnueabihf
- PACKAGES="g++-arm-linux-gnueabihf"
+ PACKAGES="python3 g++-arm-linux-gnueabihf"
+ RUN_UNIT_TESTS=false
+ RUN_FUNCTIONAL_TESTS=false
DEP_OPTS="NO_USB=1"
GOAL="install"
- UNITE_CONFIG="--enable-glibc-back-compat --enable-reduce-exports"
+ # -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
+ UNITE_CONFIG="--enable-glibc-back-compat --enable-reduce-exports CXXFLAGS=-Wno-psabi"
+
- stage: test
- name: "Win32 (unit tests)"
+ name: 'Win32 [GOAL: deploy] [unit tests]'
env: >-
HOST=i686-w64-mingw32
DPKG_ADD_ARCH="i386"
PACKAGES="python3 nsis g++-mingw-w64-i686 wine-binfmt wine32"
- RUN_TESTS=true
- GOAL="install"
+ RUN_FUNCTIONAL_TESTS=false
+ GOAL="deploy"
UNITE_CONFIG="--enable-reduce-exports --enable-usbdevice"
+
- stage: test
- name: "32-bit + dash (unit and functional tests)"
+ name: '32-bit + dash [GOAL: install] [unit and functional tests]'
env: >-
HOST=i686-pc-linux-gnu
DPKG_ADD_ARCH="i386"
PACKAGES="g++-multilib python3-zmq libudev-dev:i386"
- RUN_TESTS=true
GOAL="install"
UNITE_CONFIG="--enable-zmq --enable-glibc-back-compat --enable-reduce-exports LDFLAGS=-static-libstdc++ --enable-usbdevice"
CONFIG_SHELL="/bin/dash"
+
- stage: test
- name: "x86_64 Linux (unit and functional tests)"
+ name: 'x86_64 Linux [GOAL: install] [trusty] [no depends, only system libs]'
env: >-
HOST=x86_64-unknown-linux-gnu
PACKAGES="python3-zmq libssl1.0-dev libevent-dev bsdmainutils libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-test-dev libboost-thread-dev libdb5.3++-dev libminiupnpc-dev libzmq3-dev libudev-dev libhidapi-dev libusb-1.0-0-dev"
NO_DEPENDS=1
- RUN_TESTS=true
GOAL="install"
UNITE_CONFIG="--enable-zmq --with-incompatible-bdb --enable-glibc-back-compat --enable-reduce-exports CPPFLAGS=-DDEBUG_LOCKORDER --enable-usbdevice"
+
- stage: test
- name: "x86_64 Linux, No wallet (unit tests)"
+ name: 'x86_64 Linux [GOAL: install] [trusty] [no wallet, unit tests]'
env: >-
HOST=x86_64-unknown-linux-gnu
- PACKAGES="python3"
+ PACKAGES="python3-zmq"
DEP_OPTS="NO_WALLET=1 NO_USB=1"
- RUN_TESTS=true
+ RUN_FUNCTIONAL_TESTS=false
GOAL="install"
UNITE_CONFIG="--enable-glibc-back-compat --enable-reduce-exports"
+
- stage: test
- name: "Cross-Mac"
+ name: 'macOS 10.10 [GOAL: deploy] [no tests]'
env: >-
HOST=x86_64-apple-darwin14
PACKAGES="cmake imagemagick libcap-dev librsvg2-bin libz-dev libbz2-dev libtiff-tools python-dev python3-setuptools-git"
OSX_SDK=10.11
- GOAL="all deploy"
+ RUN_UNIT_TESTS=false
+ RUN_FUNCTIONAL_TESTS=false
+ GOAL="deploy"
UNITE_CONFIG="--enable-reduce-exports --enable-werror --enable-usbdevice"
diff --git a/.travis/lint_04_install.sh b/.travis/lint_04_install.sh
index 667ee67166..9a22773e57 100755
--- a/.travis/lint_04_install.sh
+++ b/.travis/lint_04_install.sh
@@ -1,5 +1,15 @@
#!/usr/bin/env bash
+#
+# Copyright (c) 2018 The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
export LC_ALL=C
-travis_retry pip install flake8==3.5.0 pytest-mock
+travis_retry pip install codespell==1.13.0
+travis_retry pip install flake8==3.5.0
+travis_retry pip install vulture==0.29
+
+SHELLCHECK_VERSION=v0.6.0
+curl -s "https://storage.googleapis.com/shellcheck/shellcheck-${SHELLCHECK_VERSION}.linux.x86_64.tar.xz" | tar --xz -xf - --directory /tmp/
+export PATH="/tmp/shellcheck-${SHELLCHECK_VERSION}:${PATH}"
diff --git a/.travis/lint_05_before_script.sh b/.travis/lint_05_before_script.sh
index 4d7250355b..28bcbb47f7 100755
--- a/.travis/lint_05_before_script.sh
+++ b/.travis/lint_05_before_script.sh
@@ -5,3 +5,5 @@
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
export LC_ALL=C
+
+git fetch --unshallow
diff --git a/.travis/lint_06_script.sh b/.travis/lint_06_script.sh
index 35a9a1779b..885bcfe05a 100755
--- a/.travis/lint_06_script.sh
+++ b/.travis/lint_06_script.sh
@@ -22,3 +22,9 @@ test/lint/check-doc.py
test/lint/check-rpc-mappings.py .
echo "* Running remaining lint scripts"
test/lint/lint-all.sh
+
+if [ "$TRAVIS_REPO_SLUG" = "unite/unite" -a "$TRAVIS_EVENT_TYPE" = "cron" ]; then
+ git log --merges --before="2 days ago" -1 --format='%H' > ./contrib/verify-commits/trusted-sha512-root-commit
+ while read -r LINE; do travis_retry gpg --keyserver hkp://subset.pool.sks-keyservers.net --recv-keys $LINE; done < contrib/verify-commits/trusted-keys &&
+ travis_wait 50 contrib/verify-commits/verify-commits.py --clean-merge=2;
+fi
diff --git a/.travis/test_03_before_install.sh b/.travis/test_03_before_install.sh
index 5a88502472..3c9fcf3f98 100755
--- a/.travis/test_03_before_install.sh
+++ b/.travis/test_03_before_install.sh
@@ -4,9 +4,11 @@
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-export LC_ALL=C
+export LC_ALL=C.UTF-8
PATH=$(echo $PATH | tr ':' "\n" | sed '/\/opt\/python/d' | tr "\n" ":" | sed "s|::|:|g")
+# Add llvm-symbolizer directory to PATH. Needed to get symbolized stack traces from the sanitizers.
+PATH=$PATH:/usr/lib/llvm-6.0/bin/
export PATH
BEGIN_FOLD () {
@@ -18,5 +20,8 @@ BEGIN_FOLD () {
END_FOLD () {
RET=$?
echo "travis_fold:end:${CURRENT_FOLD_NAME}"
- return $RET
+ if [ $RET != 0 ]; then
+ echo "${CURRENT_FOLD_NAME} failed with status code ${RET}"
+ fi
}
+
diff --git a/.travis/test_04_install.sh b/.travis/test_04_install.sh
index 63d78352a7..ab583ad18a 100755
--- a/.travis/test_04_install.sh
+++ b/.travis/test_04_install.sh
@@ -6,15 +6,27 @@
export LC_ALL=C.UTF-8
-travis_retry docker pull $DOCKER_NAME_TAG
-env | grep -E '^(CCACHE_|WINEDEBUG|LC_ALL|BOOST_TEST_RANDOM|CONFIG_SHELL)' | tee /tmp/env
+travis_retry docker pull "$DOCKER_NAME_TAG"
+
+export DIR_FUZZ_IN=${TRAVIS_BUILD_DIR}/qa-assets
+git clone https://github.com/bitcoin-core/qa-assets ${DIR_FUZZ_IN}
+export DIR_FUZZ_IN=${DIR_FUZZ_IN}/fuzz_seed_corpus/
+
+mkdir -p "${TRAVIS_BUILD_DIR}/sanitizer-output/"
+export ASAN_OPTIONS=""
+export LSAN_OPTIONS="suppressions=${TRAVIS_BUILD_DIR}/test/sanitizer_suppressions/lsan"
+export TSAN_OPTIONS="suppressions=${TRAVIS_BUILD_DIR}/test/sanitizer_suppressions/tsan:log_path=${TRAVIS_BUILD_DIR}/sanitizer-output/tsan"
+export UBSAN_OPTIONS="suppressions=${TRAVIS_BUILD_DIR}/test/sanitizer_suppressions/ubsan:print_stacktrace=1:halt_on_error=1"
+env | grep -E '^(UNITE_CONFIG|CCACHE_|WINEDEBUG|LC_ALL|BOOST_TEST_RANDOM|CONFIG_SHELL|(ASAN|LSAN|TSAN|UBSAN)_OPTIONS)' | tee /tmp/env
if [[ $HOST = *-mingw32 ]]; then
DOCKER_ADMIN="--cap-add SYS_ADMIN"
+elif [[ $UNITE_CONFIG = *--with-sanitizers=*address* ]]; then # If ran with (ASan + LSan), Docker needs access to ptrace (https://github.com/google/sanitizers/issues/764)
+ DOCKER_ADMIN="--cap-add SYS_PTRACE"
fi
DOCKER_ID=$(docker run $DOCKER_ADMIN -idt --mount type=bind,src=$TRAVIS_BUILD_DIR,dst=$TRAVIS_BUILD_DIR --mount type=bind,src=$CCACHE_DIR,dst=$CCACHE_DIR -w $TRAVIS_BUILD_DIR --env-file /tmp/env $DOCKER_NAME_TAG)
DOCKER_EXEC () {
- docker exec $DOCKER_ID bash -c "cd $PWD && $*";
+ docker exec $DOCKER_ID bash -c "cd $PWD && $*"
}
if [ -n "$DPKG_ADD_ARCH" ]; then
@@ -22,4 +34,5 @@ if [ -n "$DPKG_ADD_ARCH" ]; then
fi
travis_retry DOCKER_EXEC apt-get update
-travis_retry DOCKER_EXEC apt-get install --no-install-recommends --no-upgrade -qq $PACKAGES $DOCKER_PACKAGES
\ No newline at end of file
+travis_retry DOCKER_EXEC apt-get install --no-install-recommends --no-upgrade -qq $PACKAGES $DOCKER_PACKAGES
+
diff --git a/.travis/test_05_before_script.sh b/.travis/test_05_before_script.sh
index 0a788fd321..fac150dfd2 100755
--- a/.travis/test_05_before_script.sh
+++ b/.travis/test_05_before_script.sh
@@ -4,24 +4,22 @@
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-export LC_ALL=C
+export LC_ALL=C.UTF-8
-DOCKER_EXEC echo \> \$HOME/.unite # Make sure default datadir does not exist and is never read by creating a dummy file
+DOCKER_EXEC echo \> \$HOME/.unit-e # Make sure default datadir does not exist and is never read by creating a dummy file
mkdir -p depends/SDKs depends/sdk-sources
if [ -n "$OSX_SDK" -a ! -f depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then
curl --location --fail $SDK_URL/MacOSX${OSX_SDK}.sdk.tar.gz -o depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz
fi
-
if [ -n "$OSX_SDK" -a -f depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz ]; then
tar -C depends/SDKs -xf depends/sdk-sources/MacOSX${OSX_SDK}.sdk.tar.gz
fi
-
if [[ $HOST = *-mingw32 ]]; then
DOCKER_EXEC update-alternatives --set $HOST-g++ \$\(which $HOST-g++-posix\)
fi
-
if [ -z "$NO_DEPENDS" ]; then
DOCKER_EXEC CONFIG_SHELL= make $MAKEJOBS -C depends HOST=$HOST $DEP_OPTS
fi
+
diff --git a/.travis/test_06_script_a.sh b/.travis/test_06_script_a.sh
new file mode 100755
index 0000000000..cd429ea210
--- /dev/null
+++ b/.travis/test_06_script_a.sh
@@ -0,0 +1,50 @@
+#!/usr/bin/env bash
+#
+# Copyright (c) 2018 The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+export LC_ALL=C.UTF-8
+
+TRAVIS_COMMIT_LOG=$(git log --format=fuller -1)
+export TRAVIS_COMMIT_LOG
+
+OUTDIR=$BASE_OUTDIR/$TRAVIS_PULL_REQUEST/$TRAVIS_JOB_NUMBER-$HOST
+UNITE_CONFIG_ALL="--disable-dependency-tracking --prefix=$TRAVIS_BUILD_DIR/depends/$HOST --bindir=$OUTDIR/bin --libdir=$OUTDIR/lib"
+if [ -z "$NO_DEPENDS" ]; then
+ DOCKER_EXEC ccache --max-size=$CCACHE_SIZE
+fi
+
+BEGIN_FOLD autogen
+if [ -n "$CONFIG_SHELL" ]; then
+ DOCKER_EXEC "$CONFIG_SHELL" -c "./autogen.sh"
+else
+ DOCKER_EXEC ./autogen.sh
+fi
+END_FOLD
+
+mkdir build
+cd build || (echo "could not enter build directory"; exit 1)
+
+BEGIN_FOLD configure
+DOCKER_EXEC ../configure --cache-file=config.cache $UNITE_CONFIG_ALL $UNITE_CONFIG || ( cat config.log && false)
+END_FOLD
+
+BEGIN_FOLD distdir
+DOCKER_EXEC make distdir VERSION=$HOST
+END_FOLD
+
+cd "unite-$HOST" || (echo "could not enter distdir unite-$HOST"; exit 1)
+
+BEGIN_FOLD configure
+DOCKER_EXEC ./configure --cache-file=../config.cache $UNITE_CONFIG_ALL $UNITE_CONFIG || ( cat config.log && false)
+END_FOLD
+
+set -o errtrace
+trap 'DOCKER_EXEC "cat ${TRAVIS_BUILD_DIR}/sanitizer-output/* 2> /dev/null"' ERR
+
+BEGIN_FOLD build
+DOCKER_EXEC make $MAKEJOBS $GOAL || ( echo "Build failure. Verbose build follows." && DOCKER_EXEC make $GOAL V=1 ; false )
+END_FOLD
+
+cd ${TRAVIS_BUILD_DIR} || (echo "could not enter travis build dir $TRAVIS_BUILD_DIR"; exit 1)
diff --git a/.travis/test_06_script_b.sh b/.travis/test_06_script_b.sh
new file mode 100755
index 0000000000..6616a07212
--- /dev/null
+++ b/.travis/test_06_script_b.sh
@@ -0,0 +1,27 @@
+#!/usr/bin/env bash
+#
+# Copyright (c) 2018 The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+export LC_ALL=C.UTF-8
+
+cd "build/unite-$HOST" || (echo "could not enter distdir build/unite-$HOST"; exit 1)
+
+if [ "$RUN_UNIT_TESTS" = "true" ]; then
+ BEGIN_FOLD unit-tests
+ DOCKER_EXEC LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/depends/$HOST/lib make $MAKEJOBS check VERBOSE=1
+ END_FOLD
+fi
+
+if [ "$RUN_FUNCTIONAL_TESTS" = "true" ]; then
+ BEGIN_FOLD functional-tests
+ DOCKER_EXEC test/functional/test_runner.py --ci --combinedlogslen=4000 --coverage --quiet --failfast
+ END_FOLD
+fi
+
+if [ "$RUN_FUZZ_TESTS" = "true" ]; then
+ BEGIN_FOLD fuzz-tests
+ DOCKER_EXEC test/fuzz/test_runner.py -l DEBUG ${DIR_FUZZ_IN}
+ END_FOLD
+fi
diff --git a/Makefile.am b/Makefile.am
index a1f6f514a5..f99128632e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -18,6 +18,8 @@ endif
UNIT_E_BIN=$(top_builddir)/src/$(UNITE_DAEMON_NAME)$(EXEEXT)
UNITE_CLI_BIN=$(top_builddir)/src/$(UNITE_CLI_NAME)$(EXEEXT)
+UNITE_TX_BIN=$(top_builddir)/src/$(UNITE_TX_NAME)$(EXEEXT)
+UNITE_WALLET_BIN=$(top_builddir)/src/$(UNITE_WALLET_TOOL_NAME)$(EXEEXT)
UNITE_WIN_INSTALLER=$(PACKAGE)-$(PACKAGE_VERSION)-win$(WINDOWS_BITS)-setup$(EXEEXT)
empty :=
@@ -53,6 +55,8 @@ $(UNITE_WIN_INSTALLER): all-recursive
$(MKDIR_P) $(top_builddir)/release
STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(UNIT_E_BIN) $(top_builddir)/release
STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(UNITE_CLI_BIN) $(top_builddir)/release
+ STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(UNITE_TX_BIN) $(top_builddir)/release
+ STRIPPROG="$(STRIP)" $(INSTALL_STRIP_PROGRAM) $(UNITE_WALLET_BIN) $(top_builddir)/release
@test -f $(MAKENSIS) && $(MAKENSIS) -V2 $(top_builddir)/share/setup.nsi || \
( echo error: could not build $@ && exit 1 )
@echo built $@
@@ -67,8 +71,14 @@ $(UNIT_E_BIN): FORCE
$(UNITE_CLI_BIN): FORCE
$(MAKE) -C src $(@F)
+$(UNITE_TX_BIN): FORCE
+ $(MAKE) -C src $(@F)
+
+$(UNITE_WALLET_BIN): FORCE
+ $(MAKE) -C src $(@F)
+
if USE_LCOV
-LCOV_FILTER_PATTERN=-p "/usr/include/" -p "src/leveldb/" -p "src/bench/" -p "src/univalue" -p "src/crypto/ctaes" -p "src/secp256k1"
+LCOV_FILTER_PATTERN=-p "/usr/include/" -p "/usr/lib/" -p "src/leveldb/" -p "src/bench/" -p "src/univalue" -p "src/crypto/ctaes" -p "src/secp256k1"
baseline.info:
$(LCOV) -c -i -d $(abs_builddir)/src -o $@
@@ -115,7 +125,11 @@ endif
dist_noinst_SCRIPTS = autogen.sh
-EXTRA_DIST = $(DIST_SHARE) test/functional/test_runner.py test/functional $(DIST_CONTRIB) $(DIST_DOCS) $(WINDOWS_PACKAGING) $(OSX_PACKAGING) $(BIN_CHECKS)
+EXTRA_DIST = $(DIST_SHARE) $(DIST_CONTRIB) $(DIST_DOCS) $(WINDOWS_PACKAGING) $(OSX_PACKAGING) $(BIN_CHECKS)
+
+EXTRA_DIST += \
+ test/functional \
+ test/fuzz
EXTRA_DIST += \
test/util/unite-util-test.py \
@@ -194,5 +208,5 @@ clean-docs:
clean-local: clean-docs
rm -rf coverage_percent.txt test_unite.coverage/ total.coverage/ test/tmp/ cache/ $(OSX_APP)
- rm -rf test/functional/__pycache__ test/functional/test_framework/__pycache__ test/cache
+ rm -rf test/functional/__pycache__ test/functional/test_framework/__pycache__ test/cache share/rpcauth/__pycache__
diff --git a/build_msvc/.gitignore b/build_msvc/.gitignore
new file mode 100644
index 0000000000..d5aa22c05e
--- /dev/null
+++ b/build_msvc/.gitignore
@@ -0,0 +1,11 @@
+# Build directories
+Debug/*
+Release/*
+.vs
+packages/*
+*/Obj
+*/Debug
+*/Release
+*/x64
+*.vcxproj.user
+*.vcxproj
diff --git a/build_msvc/README.md b/build_msvc/README.md
new file mode 100644
index 0000000000..24d688fb90
--- /dev/null
+++ b/build_msvc/README.md
@@ -0,0 +1,49 @@
+Building unit-e with Visual Studio
+========================================
+
+Introduction
+---------------------
+Solution and project files to build the unit-e applications (except Qt dependent ones) with Visual Studio 2017 can be found in the build_msvc directory.
+
+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).
+
+Dependencies
+---------------------
+A number of [open source libraries](https://github.com/bitcoin/bitcoin/blob/master/doc/dependencies.md) are required in order to be able to build Unit-e.
+
+Options for installing the dependencies in a Visual Studio compatible manner are:
+
+- Use Microsoft's [vcpkg](https://docs.microsoft.com/en-us/cpp/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](https://www.nuget.org/) packages with the understanding that any binary files have been compiled by an untrusted third party.
+
+The external dependencies required for the Visual Studio build are (see the [dependencies doc](https://github.com/bitcoin/bitcoin/blob/master/doc/dependencies.md) for versions):
+
+- Berkeley DB,
+- OpenSSL,
+- Boost,
+- libevent,
+- ZeroMQ
+
+Additional dependencies required from the [bitcoin-core](https://github.com/bitcoin-core) github repository are:
+- SECP256K1,
+- LevelDB
+
+Building
+---------------------
+The instructions below use `vcpkg` to install the dependencies.
+
+- Clone `vcpkg` from the [github repository](https://github.com/Microsoft/vcpkg) and install as per the instructions in the main README.md.
+- Install the required packages (replace x64 with x86 as required):
+
+```
+ PS >.\vcpkg install --triplet x64-windows-static boost-filesystem boost-signals2 boost-test libevent openssl zeromq berkeleydb secp256k1 leveldb
+```
+
+- Use Python to generate *.vcxproj from Makefile
+
+```
+ PS >python msvc-autogen.py
+```
+
+- Build in Visual Studio.
diff --git a/build_msvc/bench_unite/bench_unite.vcxproj b/build_msvc/bench_unite/bench_unite.vcxproj
new file mode 100644
index 0000000000..13617bdc54
--- /dev/null
+++ b/build_msvc/bench_unite/bench_unite.vcxproj
@@ -0,0 +1,219 @@
+
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {2b384fa8-9ee1-4544-93cb-0d733c25e8ce}
+
+
+ {7c87e378-df58-482e-aa2f-1bc129bc19ce}
+
+
+ {6190199c-6cf4-4dad-bfbd-93fa72a760c1}
+
+
+ {460fee33-1fe1-483f-b3bf-931ff8e969a5}
+
+
+ {b53a5535-ee9d-4c6f-9a26-f79ee3bc3754}
+
+
+ {93b86837-b543-48a5-a89b-7c87abb77df2}
+
+
+ {792d487f-f14c-49fc-a9de-3fc150f31c3f}
+
+
+ {5724ba7d-a09a-4ba8-800b-c4c1561b3d69}
+
+
+ {bb493552-3b8c-4a8c-bf69-a6e7a51d2ea6}
+
+
+ {18430fef-6b61-4c53-b396-718e02850f1b}
+
+
+
+ 15.0
+ {1125654E-E1B2-4431-8B5C-62EA9A2FEECB}
+ Win32Proj
+ bench_unite
+ x86-windows-static
+ x64-windows-static
+
+
+
+ Application
+ true
+ v141
+ Unicode
+
+
+ Application
+ false
+ v141
+ true
+ Unicode
+
+
+ Application
+ true
+ v141
+ Unicode
+
+
+ Application
+ false
+ v141
+ true
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ false
+ static
+
+
+ true
+ static
+
+
+ true
+ static
+
+
+ false
+ static
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ NOMINMAX;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+ crypt32.lib;Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ NOMINMAX;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreadedDebug
+
+
+ Console
+ true
+ crypt32.lib;Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ NOMINMAX;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreadedDebug
+
+
+ Console
+ true
+ crypt32.lib;Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ NOMINMAX;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+ crypt32.lib;Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
+
+
+
+
+ There was an error executing the raw bench header generation task.
+
+
+
+
+
+
+
+
+
diff --git a/build_msvc/common.init.vcxproj b/build_msvc/common.init.vcxproj
new file mode 100644
index 0000000000..c3c0f665c2
--- /dev/null
+++ b/build_msvc/common.init.vcxproj
@@ -0,0 +1,14 @@
+
+
+
+ $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0@ProductVersion)
+ $(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0@ProductVersion)
+
+ $(WindowsTargetPlatformVersion_10).0
+
+ $(WindowsTargetPlatformVersion_10)
+
+
+ Win32
+
+
\ No newline at end of file
diff --git a/build_msvc/common.vcxproj b/build_msvc/common.vcxproj
new file mode 100644
index 0000000000..148b4fa592
--- /dev/null
+++ b/build_msvc/common.vcxproj
@@ -0,0 +1,30 @@
+
+
+
+
+
+ CopyUnitEConfig;
+ CopySecp256k1Config;
+ $(BuildDependsOn);
+
+
+
+
+
+
+
+
+
+
+ /utf-8 %(AdditionalOptions)
+ 4018;4244;4267;4715;4805;
+ true
+ _WIN32_WINNT=0x0601;%(PreprocessorDefinitions)
+ ..\..\src;..\..\src\univalue\include;..\..\src\secp256k1\include;..\..\src\leveldb\include;..\..\src\leveldb\helpers\memenv;%(AdditionalIncludeDirectories)
+
+
+
diff --git a/build_msvc/libleveldb/libleveldb.vcxproj b/build_msvc/libleveldb/libleveldb.vcxproj
new file mode 100644
index 0000000000..545508001e
--- /dev/null
+++ b/build_msvc/libleveldb/libleveldb.vcxproj
@@ -0,0 +1,202 @@
+
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 15.0
+ {18430FEF-6B61-4C53-B396-718E02850F1B}
+ Win32Proj
+ libunivalue
+
+
+
+ StaticLibrary
+ true
+ v141
+ Unicode
+
+
+ StaticLibrary
+ false
+ v141
+ true
+ Unicode
+
+
+ StaticLibrary
+ true
+ v141
+ Unicode
+
+
+ StaticLibrary
+ false
+ v141
+ true
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+ true
+
+
+ false
+
+
+ false
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ _CRT_NONSTDC_NO_DEPRECATE;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;NOMINMAX;LEVELDB_PLATFORM_WINDOWS;LEVELDB_ATOMIC_PRESENT;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src\leveldb;..\..\src\leveldb\include;
+ MultiThreadedDebug
+
+
+ Console
+ true
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ _CRT_NONSTDC_NO_DEPRECATE;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;NOMINMAX;LEVELDB_PLATFORM_WINDOWS;LEVELDB_ATOMIC_PRESENT;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src\leveldb;..\..\src\leveldb\include;
+ MultiThreadedDebug
+
+
+ Console
+ true
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ _CRT_NONSTDC_NO_DEPRECATE;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;NOMINMAX;LEVELDB_PLATFORM_WINDOWS;LEVELDB_ATOMIC_PRESENT;WIN32;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src\leveldb;..\..\src\leveldb\include;
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ _CRT_NONSTDC_NO_DEPRECATE;_SCL_SECURE_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;NOMINMAX;LEVELDB_PLATFORM_WINDOWS;LEVELDB_ATOMIC_PRESENT;WIN32;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src\leveldb;..\..\src\leveldb\include;
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
+
+ false
+
+
+
diff --git a/build_msvc/libsecp256k1/libsecp256k1.vcxproj b/build_msvc/libsecp256k1/libsecp256k1.vcxproj
new file mode 100644
index 0000000000..b4c9ec28ee
--- /dev/null
+++ b/build_msvc/libsecp256k1/libsecp256k1.vcxproj
@@ -0,0 +1,157 @@
+
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+
+
+
+ 15.0
+ {BB493552-3B8C-4A8C-BF69-A6E7A51D2EA6}
+ Win32Proj
+ libunivalue
+
+
+
+ StaticLibrary
+ true
+ v141
+ Unicode
+
+
+ StaticLibrary
+ false
+ v141
+ true
+ Unicode
+
+
+ StaticLibrary
+ true
+ v141
+ Unicode
+
+
+ StaticLibrary
+ false
+ v141
+ true
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+ true
+
+
+ false
+
+
+ false
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ ENABLE_MODULE_ECDH;ENABLE_MODULE_RECOVERY;HAVE_CONFIG_H;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src\secp256k1;
+ MultiThreadedDebug
+
+
+ Console
+ true
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ ENABLE_MODULE_ECDH;ENABLE_MODULE_RECOVERY;HAVE_CONFIG_H;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src\secp256k1;
+ MultiThreadedDebug
+
+
+ Console
+ true
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ ENABLE_MODULE_ECDH;ENABLE_MODULE_RECOVERY;HAVE_CONFIG_H;WIN32;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src\secp256k1;
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ ENABLE_MODULE_ECDH;ENABLE_MODULE_RECOVERY;HAVE_CONFIG_H;WIN32;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src\secp256k1;
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
diff --git a/build_msvc/libsecp256k1_config.h b/build_msvc/libsecp256k1_config.h
new file mode 100644
index 0000000000..8880695dea
--- /dev/null
+++ b/build_msvc/libsecp256k1_config.h
@@ -0,0 +1,29 @@
+/**********************************************************************
+ * Copyright (c) 2013, 2014 Pieter Wuille *
+ * Distributed under the MIT software license, see the accompanying *
+ * file COPYING or http://www.opensource.org/licenses/mit-license.php.*
+ **********************************************************************/
+
+#ifndef UNITE_LIBSECP256K1_CONFIG_H
+#define UNITE_LIBSECP256K1_CONFIG_H
+
+#undef USE_ASM_X86_64
+#undef USE_ENDOMORPHISM
+#undef USE_FIELD_10X26
+#undef USE_FIELD_5X52
+#undef USE_FIELD_INV_BUILTIN
+#undef USE_FIELD_INV_NUM
+#undef USE_NUM_GMP
+#undef USE_NUM_NONE
+#undef USE_SCALAR_4X64
+#undef USE_SCALAR_8X32
+#undef USE_SCALAR_INV_BUILTIN
+#undef USE_SCALAR_INV_NUM
+
+#define USE_NUM_NONE 1
+#define USE_FIELD_INV_BUILTIN 1
+#define USE_SCALAR_INV_BUILTIN 1
+#define USE_FIELD_10X26 1
+#define USE_SCALAR_8X32 1
+
+#endif /* UNITE_LIBSECP256K1_CONFIG_H */
diff --git a/build_msvc/libunite_cli/libunite_cli.vcxproj.in b/build_msvc/libunite_cli/libunite_cli.vcxproj.in
new file mode 100644
index 0000000000..023b589775
--- /dev/null
+++ b/build_msvc/libunite_cli/libunite_cli.vcxproj.in
@@ -0,0 +1,158 @@
+
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+@SOURCE_FILES@
+
+
+
+
+
+ 15.0
+ {0667528C-D734-4009-ADF9-C0D6C4A5A5A6}
+ Win32Proj
+ libunite_cli
+ x86-windows-static
+ x64-windows-static
+
+
+
+ StaticLibrary
+ true
+ v141
+ Unicode
+
+
+ StaticLibrary
+ false
+ v141
+ true
+ Unicode
+
+
+ StaticLibrary
+ true
+ v141
+ Unicode
+
+
+ StaticLibrary
+ false
+ v141
+ true
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ false
+
+
+ true
+
+
+ true
+
+
+ false
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ _SCL_SECURE_NO_WARNINGS;WIN32;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ _SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreadedDebug
+
+
+ Console
+ true
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ _SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreadedDebug
+
+
+ Console
+ true
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ _SCL_SECURE_NO_WARNINGS;WIN32;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
diff --git a/build_msvc/libunite_common/libunite_common.vcxproj.in b/build_msvc/libunite_common/libunite_common.vcxproj.in
new file mode 100644
index 0000000000..93f63f6f3e
--- /dev/null
+++ b/build_msvc/libunite_common/libunite_common.vcxproj.in
@@ -0,0 +1,170 @@
+
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+ 15.0
+ {7C87E378-DF58-482E-AA2F-1BC129BC19CE}
+ Win32Proj
+ libunite_common
+ x86-windows-static
+ x64-windows-static
+
+
+
+ StaticLibrary
+ true
+ v141
+ Unicode
+
+
+ StaticLibrary
+ false
+ v141
+ true
+ Unicode
+
+
+ StaticLibrary
+ true
+ v141
+ Unicode
+
+
+ StaticLibrary
+ false
+ v141
+ true
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+ true
+
+
+ false
+
+
+ false
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ WIN32;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ false
+ MultiThreadedDebug
+
+
+ Console
+ true
+
+
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ WIN32;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ false
+ MultiThreadedDebug
+
+
+ Console
+ true
+
+
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ WIN32;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;WIN32;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ false
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ WIN32;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ false
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
+
+@SOURCE_FILES@
+
+
+
+
+
+
diff --git a/build_msvc/libunite_crypto/libunite_crypto.vcxproj.in b/build_msvc/libunite_crypto/libunite_crypto.vcxproj.in
new file mode 100644
index 0000000000..626ed768fe
--- /dev/null
+++ b/build_msvc/libunite_crypto/libunite_crypto.vcxproj.in
@@ -0,0 +1,153 @@
+
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+ 15.0
+ {6190199C-6CF4-4DAD-BFBD-93FA72A760C1}
+ Win32Proj
+ libunite_crypto
+
+
+
+ StaticLibrary
+ true
+ v141
+ Unicode
+
+
+ StaticLibrary
+ false
+ v141
+ true
+ Unicode
+
+
+ StaticLibrary
+ true
+ v141
+ Unicode
+
+
+ StaticLibrary
+ false
+ v141
+ true
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+ true
+
+
+ false
+
+
+ false
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ _DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreadedDebug
+
+
+ Console
+ true
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreadedDebug
+
+
+ Console
+ true
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ WIN32;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ _CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+
+
+
+@SOURCE_FILES@
+
+
+
diff --git a/build_msvc/libunite_qt/libunite_qt.vcxproj b/build_msvc/libunite_qt/libunite_qt.vcxproj
new file mode 100644
index 0000000000..c4c94d1d96
--- /dev/null
+++ b/build_msvc/libunite_qt/libunite_qt.vcxproj
@@ -0,0 +1,976 @@
+
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+ 15.0
+ x86-windows-static
+ x64-windows-static
+ {2B4ABFF8-D1FD-4845-88C9-1F3C0A6512BF}
+
+
+
+ "$(QTDIR)\bincc.exe" -name unite "%(Fullpath)" -o .\GeneratedFiles\qrc_unite.cpp
+ Qt rcc generation for %(Identity)
+ .\GeneratedFiles\qrc_unite.cpp
+ (QTDIR)\bincc.exe
+
+
+ "$(QTDIR)\bincc.exe" -name unite_locale "%(Fullpath)" -o .\GeneratedFiles\qrc_unite_locale.cpp
+ Qt rcc generation for %(Identity)
+ .\GeneratedFiles\qrc_unite_locale.cpp
+ (QTDIR)\bincc.exe
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ Document
+ F:\Dependencies\protobuf-cpp-3.4.1\protobuf-3.4.1\cmake\build\vs\Debug\protoc.exe --proto_path=%(RootDir)%(Directory) %(Fullpath) --cpp_out=.\GeneratedFiles
+ ProtoBuf source generation %(RootDir)%(Directory) %(Filename)
+ .\GeneratedFiles\%(Filename).pb.h;.\GeneratedFiles\(%Filename).pb.cc
+ F:\Dependencies\protobuf-cpp-3.4.1\protobuf-3.4.1\cmake\build\vs\Debug\protoc.exe
+ false
+ F:\deps\protobuf\protobuf-3.4.1\cmake\build\vs\Debug\protoc.exe --proto_path=%(RootDir)%(Directory) %(Fullpath) --cpp_out=.\GeneratedFiles
+ F:\deps\protobuf\protobuf-3.4.1\cmake\build\vs\Debug\protoc.exe
+
+
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+
+
+
+
+
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+ true
+
+
+
+
+
+
+ "$(QTDIR)\bin\moc.exe" "%(Fullpath)" -o .\GeneratedFiles\%(Filename).moc $(MOC_DEF)
+ Qt moc generation for %(Identity)
+ .\GeneratedFiles\%(Filename).moc
+ (QTDIR)\bin\moc.exe
+
+
+ "$(QTDIR)\bin\moc.exe" "%(Fullpath)" -o .\GeneratedFiles\%(Filename).moc $(MOC_DEF)
+ Qt moc generation for %(Identity)
+ .\GeneratedFiles\%(Filename).moc
+ (QTDIR)\bin\moc.exe
+
+
+ "$(QTDIR)\bin\moc.exe" "%(Fullpath)" -o .\GeneratedFiles\%(Filename).moc $(MOC_DEF)
+ Qt moc generation for %(Identity)
+ .\GeneratedFiles\%(Filename).moc
+ (QTDIR)\bin\moc.exe
+
+
+ "$(QTDIR)\bin\moc.exe" "%(Fullpath)" -o .\GeneratedFiles\%(Filename).moc $(MOC_DEF)
+ Qt moc generation for %(Identity)
+ .\GeneratedFiles\%(Filename).moc
+ (QTDIR)\bin\moc.exe
+
+
+ "$(QTDIR)\bin\moc.exe" "%(Fullpath)" -o .\GeneratedFiles\%(Filename).moc $(MOC_DEF)
+ Qt moc generation for %(Identity)
+ .\GeneratedFiles\%(Filename).moc
+ (QTDIR)\bin\moc.exe
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ StaticLibrary
+ true
+ v141
+ Unicode
+
+
+ StaticLibrary
+ false
+ v141
+ true
+ Unicode
+
+
+ StaticLibrary
+ true
+ v141
+ Unicode
+
+
+ StaticLibrary
+ false
+ v141
+ true
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ false
+ static
+ ClCompile
+
+
+ true
+ static
+ ClCompile
+
+
+ true
+ static
+ ClCompile
+
+
+ false
+ static
+ ClCompile
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ true
+ false
+ _X86_;WIN32;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ .\GeneratedFiles;..\..\src;..\..\src\univalue\include;.\QtGenerated\mocheaders
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ _X86_;WIN32;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ .\GeneratedFiles;..\..\src;..\..\src\univalue\include;.\QtGenerated\mocheaders
+ MultiThreadedDebug
+
+
+ Console
+ true
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ WIN32;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ .\GeneratedFiles;..\..\src;..\..\src\univalue\include;.\QtGenerated\mocheaders
+ MultiThreadedDebug
+
+
+ Console
+ true
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ WIN32;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ .\GeneratedFiles;..\..\src;..\..\src\univalue\include;.\QtGenerated\mocheaders
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
+
+ There was an error executing the Qt headers moc code generation tasks.
+
+
+
+
+
+
+
+
+ There was an error executing the Qt forms code generation tasks.
+
+
+
+
+
+
+
+
+ There was an error executing the Qt local code generation tasks.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/build_msvc/libunite_server/libunite_server.vcxproj.in b/build_msvc/libunite_server/libunite_server.vcxproj.in
new file mode 100644
index 0000000000..16739070cd
--- /dev/null
+++ b/build_msvc/libunite_server/libunite_server.vcxproj.in
@@ -0,0 +1,162 @@
+
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+ 15.0
+ {460FEE33-1FE1-483F-B3BF-931FF8E969A5}
+ Win32Proj
+ libunite_server
+ x86-windows-static
+ x64-windows-static
+
+
+
+ StaticLibrary
+ true
+ v141
+ Unicode
+
+
+ StaticLibrary
+ false
+ v141
+ true
+ Unicode
+
+
+ StaticLibrary
+ true
+ v141
+ Unicode
+
+
+ StaticLibrary
+ false
+ v141
+ true
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+ true
+
+
+ false
+
+
+ false
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ WIN32;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreadedDebug
+
+
+ Console
+ true
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ WIN32;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreadedDebug
+ false
+
+
+ Console
+ true
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ WIN32;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ WIN32;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+
+
+
+@SOURCE_FILES@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build_msvc/libunite_util/libunite_util.vcxproj.in b/build_msvc/libunite_util/libunite_util.vcxproj.in
new file mode 100644
index 0000000000..4e4b421b8d
--- /dev/null
+++ b/build_msvc/libunite_util/libunite_util.vcxproj.in
@@ -0,0 +1,176 @@
+
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+ 15.0
+ {B53A5535-EE9D-4C6F-9A26-F79EE3BC3754}
+ Win32Proj
+ libunite_util
+ libunite_util
+ x86-windows-static
+ x64-windows-static
+
+
+
+ StaticLibrary
+ true
+ v141
+ Unicode
+
+
+ StaticLibrary
+ false
+ v141
+ true
+ Unicode
+
+
+ StaticLibrary
+ true
+ v141
+ Unicode
+
+
+ StaticLibrary
+ false
+ v141
+ true
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+ true
+
+
+ false
+
+
+ false
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ HAVE_CONFIG_H;WIN32;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreadedDebug
+
+
+ Console
+ true
+
+
+
+
+ false
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ HAVE_CONFIG_H;WIN32;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreadedDebug
+
+
+ Console
+ true
+
+
+
+
+ false
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ HAVE_CONFIG_H;WIN32;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;WIN32;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
+ false
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ HAVE_CONFIG_H;WIN32;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
+ false
+
+
+
+@SOURCE_FILES@
+
+
+
diff --git a/build_msvc/libunite_wallet/libunite_wallet.vcxproj.in b/build_msvc/libunite_wallet/libunite_wallet.vcxproj.in
new file mode 100644
index 0000000000..855fd3b77b
--- /dev/null
+++ b/build_msvc/libunite_wallet/libunite_wallet.vcxproj.in
@@ -0,0 +1,162 @@
+
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+@SOURCE_FILES@
+
+
+
+
+
+ 15.0
+ {93B86837-B543-48A5-A89B-7C87ABB77DF2}
+ Win32Proj
+ libunite_wallet
+ x86-windows-static
+ x64-windows-static
+
+
+
+ StaticLibrary
+ true
+ v141
+ Unicode
+
+
+ StaticLibrary
+ false
+ v141
+ true
+ Unicode
+
+
+ StaticLibrary
+ true
+ v141
+ Unicode
+
+
+ StaticLibrary
+ false
+ v141
+ true
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+ true
+
+
+ false
+
+
+ false
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreadedDebug
+ /bigobj %(AdditionalOptions)
+
+
+ Console
+ true
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreadedDebug
+ /bigobj %(AdditionalOptions)
+
+
+ Console
+ true
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreaded
+ /bigobj %(AdditionalOptions)
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreaded
+ /bigobj %(AdditionalOptions)
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
diff --git a/build_msvc/libunite_wallet_tool/libunite_wallet_tool.vcxproj.in b/build_msvc/libunite_wallet_tool/libunite_wallet_tool.vcxproj.in
new file mode 100644
index 0000000000..93c0917870
--- /dev/null
+++ b/build_msvc/libunite_wallet_tool/libunite_wallet_tool.vcxproj.in
@@ -0,0 +1,162 @@
+
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+@SOURCE_FILES@
+
+
+
+
+
+ 15.0
+ {F91AC55E-6F5E-4C58-9AC5-B40DB7DEEF93}
+ Win32Proj
+ libunite_zmq
+ x86-windows-static
+ x64-windows-static
+
+
+
+ StaticLibrary
+ true
+ v141
+ Unicode
+
+
+ StaticLibrary
+ false
+ v141
+ true
+ Unicode
+
+
+ StaticLibrary
+ true
+ v141
+ Unicode
+
+
+ StaticLibrary
+ false
+ v141
+ true
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+ true
+
+
+ false
+
+
+ false
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ NOMINMAX;ZMQ_STATIC;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreadedDebug
+ false
+
+
+ Console
+ true
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ NOMINMAX;ZMQ_STATIC;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreadedDebug
+ false
+
+
+ Console
+ true
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ NOMINMAX;ZMQ_STATIC;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreaded
+ false
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ NOMINMAX;ZMQ_STATIC;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreaded
+ false
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
diff --git a/build_msvc/libunite_zmq/libunite_zmq.vcxproj.in b/build_msvc/libunite_zmq/libunite_zmq.vcxproj.in
new file mode 100644
index 0000000000..8525532972
--- /dev/null
+++ b/build_msvc/libunite_zmq/libunite_zmq.vcxproj.in
@@ -0,0 +1,162 @@
+
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+@SOURCE_FILES@
+
+
+
+
+
+ 15.0
+ {792D487F-F14C-49FC-A9DE-3FC150F31C3F}
+ Win32Proj
+ libunite_zmq
+ x86-windows-static
+ x64-windows-static
+
+
+
+ StaticLibrary
+ true
+ v141
+ Unicode
+
+
+ StaticLibrary
+ false
+ v141
+ true
+ Unicode
+
+
+ StaticLibrary
+ true
+ v141
+ Unicode
+
+
+ StaticLibrary
+ false
+ v141
+ true
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+ true
+
+
+ false
+
+
+ false
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ NOMINMAX;ZMQ_STATIC;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreadedDebug
+ false
+
+
+ Console
+ true
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ NOMINMAX;ZMQ_STATIC;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreadedDebug
+ false
+
+
+ Console
+ true
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ NOMINMAX;ZMQ_STATIC;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreaded
+ false
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ NOMINMAX;ZMQ_STATIC;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreaded
+ false
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
diff --git a/build_msvc/libuniteconsensus/libuniteconsensus.vcxproj b/build_msvc/libuniteconsensus/libuniteconsensus.vcxproj
new file mode 100644
index 0000000000..bfca2b8c81
--- /dev/null
+++ b/build_msvc/libuniteconsensus/libuniteconsensus.vcxproj
@@ -0,0 +1,195 @@
+
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 15.0
+ {2B384FA8-9EE1-4544-93CB-0D733C25E8CE}
+ Win32Proj
+ unit-e
+ libunite_consensus
+ x86-windows-static
+ x64-windows-static
+
+
+
+ StaticLibrary
+ true
+ v141
+ Unicode
+
+
+ StaticLibrary
+ false
+ v141
+ true
+ Unicode
+
+
+ StaticLibrary
+ true
+ v141
+ Unicode
+
+
+ StaticLibrary
+ false
+ v141
+ true
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+ true
+
+
+
+
+ true
+
+
+
+
+ true
+
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ false
+ Sync
+ false
+ MultiThreadedDebug
+
+
+ Console
+ true
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ false
+ Sync
+ false
+ MultiThreadedDebug
+
+
+ Console
+ true
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ WIN32;_CONSOLE;%(PreprocessorDefinitions)
+ false
+ Sync
+ false
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ WIN32;_CONSOLE;%(PreprocessorDefinitions)
+ false
+ Sync
+ false
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
\ No newline at end of file
diff --git a/build_msvc/libunivalue/libunivalue.vcxproj b/build_msvc/libunivalue/libunivalue.vcxproj
new file mode 100644
index 0000000000..c3799b6408
--- /dev/null
+++ b/build_msvc/libunivalue/libunivalue.vcxproj
@@ -0,0 +1,160 @@
+
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+
+
+
+
+
+
+ 15.0
+ {5724BA7D-A09A-4BA8-800B-C4C1561B3D69}
+ Win32Proj
+ libunivalue
+
+
+
+ StaticLibrary
+ true
+ v141
+ Unicode
+
+
+ StaticLibrary
+ false
+ v141
+ true
+ Unicode
+
+
+ StaticLibrary
+ true
+ v141
+ Unicode
+
+
+ StaticLibrary
+ false
+ v141
+ true
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+ true
+
+
+ false
+
+
+ false
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src\univalue\include;
+ MultiThreadedDebug
+
+
+ Console
+ true
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ _DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src\univalue\include;
+ MultiThreadedDebug
+
+
+ Console
+ true
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ WIN32;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src\univalue\include;
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ _CONSOLE;%(PreprocessorDefinitions)
+ true
+ ..\..\src\univalue\include;
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
diff --git a/build_msvc/msbuild/tasks/hexdump.targets b/build_msvc/msbuild/tasks/hexdump.targets
new file mode 100644
index 0000000000..12868a9874
--- /dev/null
+++ b/build_msvc/msbuild/tasks/hexdump.targets
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ outFileInfo.LastWriteTime)
+ {
+ using (Stream inStm = File.OpenRead(RawFilePath))
+ {
+ using (StreamWriter sw = new StreamWriter(HeaderFilePath))
+ {
+ sw.WriteLine(SourceHeader);
+ int count = 0;
+ int rawChar = inStm.ReadByte();
+ while(rawChar != -1)
+ {
+ sw.Write("0x{0:x2}, ", rawChar);
+ count++;
+ if(count % 8 == 0)
+ {
+ sw.WriteLine();
+ }
+ rawChar = inStm.ReadByte();
+ }
+ sw.WriteLine(SourceFooter);
+ }
+ }
+ }
+}
+]]>
+
+
+
+
\ No newline at end of file
diff --git a/build_msvc/msvc-autogen.py b/build_msvc/msvc-autogen.py
new file mode 100644
index 0000000000..2c3a16ecba
--- /dev/null
+++ b/build_msvc/msvc-autogen.py
@@ -0,0 +1,64 @@
+#!/usr/bin/env python3
+
+import os
+import re
+
+SOURCE_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', 'src'))
+
+libs = [
+ 'libunite_cli',
+ 'libunite_common',
+ 'libunite_crypto',
+ 'libunite_server',
+ 'libunite_util',
+ 'libunite_wallet_tool',
+ 'libunite_wallet',
+ 'libunite_zmq',
+]
+
+ignore_list = [
+]
+
+lib_sources = {}
+
+
+def parse_makefile(makefile):
+ with open(makefile, 'r', encoding='utf-8') as file:
+ current_lib = ''
+ for line in file.read().splitlines():
+ if current_lib:
+ source = line.split()[0]
+ if source.endswith('.cpp') and not source.startswith('$') and source not in ignore_list:
+ source_filename = source.replace('/', '\\')
+ object_filename = source.replace('/', '_')[:-4] + ".obj"
+ lib_sources[current_lib].append((source_filename, object_filename))
+ if not line.endswith('\\'):
+ current_lib = ''
+ continue
+ for lib in libs:
+ _lib = lib.replace('-', '_')
+ if re.search(_lib + '.*_SOURCES \\= \\\\', line):
+ current_lib = lib
+ lib_sources[current_lib] = []
+ break
+
+
+def main():
+ for makefile_name in os.listdir(SOURCE_DIR):
+ if 'Makefile' in makefile_name:
+ parse_makefile(os.path.join(SOURCE_DIR, makefile_name))
+ for key, value in lib_sources.items():
+ vcxproj_filename = os.path.abspath(os.path.join(os.path.dirname(__file__), key, key + '.vcxproj'))
+ content = ''
+ for source_filename, object_filename in value:
+ content += ' \n'
+ content += ' $(IntDir)' + object_filename + '\n'
+ content += ' \n'
+ with open(vcxproj_filename + '.in', 'r', encoding='utf-8') as vcxproj_in_file:
+ with open(vcxproj_filename, 'w', encoding='utf-8') as vcxproj_file:
+ vcxproj_file.write(vcxproj_in_file.read().replace(
+ '@SOURCE_FILES@\n', content))
+
+
+if __name__ == '__main__':
+ main()
diff --git a/build_msvc/test_unite-qt/test_unite-qt.vcxproj b/build_msvc/test_unite-qt/test_unite-qt.vcxproj
new file mode 100644
index 0000000000..d94a597fd3
--- /dev/null
+++ b/build_msvc/test_unite-qt/test_unite-qt.vcxproj
@@ -0,0 +1,146 @@
+
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+ 15.0
+ {51201D5E-D939-4854-AE9D-008F03FF518E}
+ Win32Proj
+ test_uniteqt
+
+
+
+ Application
+ true
+ v141
+ Unicode
+
+
+ Application
+ false
+ v141
+ true
+ Unicode
+
+
+ Application
+ true
+ v141
+ Unicode
+
+
+ Application
+ false
+ v141
+ true
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ false
+
+
+ true
+
+
+ true
+
+
+ false
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ WIN32;_CONSOLE;%(PreprocessorDefinitions)
+ true
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+
+
+ Console
+ true
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ _DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+
+
+ Console
+ true
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ _CONSOLE;%(PreprocessorDefinitions)
+ true
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
diff --git a/build_msvc/test_unite/test_unite.vcxproj b/build_msvc/test_unite/test_unite.vcxproj
new file mode 100644
index 0000000000..7871877585
--- /dev/null
+++ b/build_msvc/test_unite/test_unite.vcxproj
@@ -0,0 +1,211 @@
+
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {2b384fa8-9ee1-4544-93cb-0d733c25e8ce}
+
+
+ {0667528c-d734-4009-adf9-c0d6c4a5a5a6}
+
+
+ {7c87e378-df58-482e-aa2f-1bc129bc19ce}
+
+
+ {6190199c-6cf4-4dad-bfbd-93fa72a760c1}
+
+
+ {460fee33-1fe1-483f-b3bf-931ff8e969a5}
+
+
+ {b53a5535-ee9d-4c6f-9a26-f79ee3bc3754}
+
+
+ {93b86837-b543-48a5-a89b-7c87abb77df2}
+
+
+ {792d487f-f14c-49fc-a9de-3fc150f31c3f}
+
+
+ {5724ba7d-a09a-4ba8-800b-c4c1561b3d69}
+
+
+ {bb493552-3b8c-4a8c-bf69-a6e7a51d2ea6}
+
+
+ {18430fef-6b61-4c53-b396-718e02850f1b}
+
+
+
+ 15.0
+ {A56B73DB-D46D-4882-8374-1FE3FFA08F07}
+ Win32Proj
+ test_unite
+ x86-windows-static
+ x64-windows-static
+
+
+
+ Application
+ true
+ v141
+ Unicode
+
+
+ Application
+ false
+ v141
+ true
+ Unicode
+
+
+ Application
+ true
+ v141
+ Unicode
+
+
+ Application
+ false
+ v141
+ true
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+ true
+
+
+ false
+
+
+ false
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ _CRT_SECURE_NO_WARNINGS;NOMINMAX;WIN32;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreadedDebug
+
+
+ Console
+ true
+ false
+ boost_test_exec_monitor-vc140-mt-gd.lib;crypt32.lib;Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ _CRT_SECURE_NO_WARNINGS;NOMINMAX;WIN32;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreadedDebug
+
+
+ Console
+ true
+ boost_test_exec_monitor-vc140-mt-gd.lib;crypt32.lib;Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ _CRT_SECURE_NO_WARNINGS;NOMINMAX;WIN32;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+ boost_test_exec_monitor-vc140-mt.lib;crypt32.lib;Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ _CRT_SECURE_NO_WARNINGS;NOMINMAX;WIN32;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+ boost_test_exec_monitor-vc140-mt.lib;crypt32.lib;Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
+
+
+
+
+ There was an error executing the JSON test header generation task.
+
+
+
+
+
+
+
+
+
diff --git a/build_msvc/testconsensus/testconsensus.cpp b/build_msvc/testconsensus/testconsensus.cpp
new file mode 100644
index 0000000000..752e012a5e
--- /dev/null
+++ b/build_msvc/testconsensus/testconsensus.cpp
@@ -0,0 +1,50 @@
+#include
+
+// unite includes.
+#include <..\src\script\uniteconsensus.h>
+#include <..\src\primitives\transaction.h>
+#include <..\src\script\script.h>
+#include <..\src\streams.h>
+#include <..\src\version.h>
+
+CMutableTransaction BuildSpendingTransaction(const CScript& scriptSig, const CScriptWitness& scriptWitness, int nValue = 0)
+{
+ CMutableTransaction txSpend;
+ txSpend.nVersion = 1;
+ txSpend.nLockTime = 0;
+ txSpend.vin.resize(1);
+ txSpend.vout.resize(1);
+ txSpend.vin[0].scriptWitness = scriptWitness;
+ txSpend.vin[0].prevout.hash = uint256();
+ txSpend.vin[0].prevout.n = 0;
+ txSpend.vin[0].scriptSig = scriptSig;
+ txSpend.vin[0].nSequence = CTxIn::SEQUENCE_FINAL;
+ txSpend.vout[0].scriptPubKey = CScript();
+ txSpend.vout[0].nValue = nValue;
+
+ return txSpend;
+}
+
+int main()
+{
+ std::cout << "uniteconsensus version: " << uniteconsensus_version() << std::endl;
+
+ CScript pubKeyScript;
+ pubKeyScript << OP_1 << OP_0 << OP_1;
+
+ int amount = 0; // 600000000;
+
+ CScript scriptSig;
+ CScriptWitness scriptWitness;
+ CTransaction vanillaSpendTx = BuildSpendingTransaction(scriptSig, scriptWitness, amount);
+ CDataStream stream(SER_NETWORK, PROTOCOL_VERSION);
+ stream << vanillaSpendTx;
+
+ uniteconsensus_error err;
+ auto op0Result = uniteconsensus_verify_script_with_amount(pubKeyScript.data(), pubKeyScript.size(), amount, (const unsigned char*)&stream[0], stream.size(), 0, uniteconsensus_SCRIPT_FLAGS_VERIFY_ALL, &err);
+ std::cout << "Op0 result: " << op0Result << ", error code " << err << std::endl;
+
+ getchar();
+
+ return 0;
+}
diff --git a/build_msvc/testconsensus/testconsensus.vcxproj b/build_msvc/testconsensus/testconsensus.vcxproj
new file mode 100644
index 0000000000..40e8c31199
--- /dev/null
+++ b/build_msvc/testconsensus/testconsensus.vcxproj
@@ -0,0 +1,172 @@
+
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+ 15.0
+ {E78473E9-B850-456C-9120-276301E04C06}
+ Win32Proj
+ testconsensus
+ test_libuniteconsensus
+ x86-windows-static
+ x64-windows-static
+
+
+
+ Application
+ true
+ v141
+ Unicode
+
+
+ Application
+ false
+ v141
+ true
+ Unicode
+
+
+ Application
+ true
+ v141
+ Unicode
+
+
+ Application
+ false
+ v141
+ true
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+ static
+
+
+ true
+ static
+
+
+ false
+ static
+
+
+ false
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ HAVE_CONFIG_H;WIN32;_SCL_SECURE_NO_WARNINGS;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreadedDebug
+
+
+ Console
+ true
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreadedDebug
+
+
+ Console
+ true
+ true
+ kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ HAVE_CONFIG_H;WIN32;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+
+
+
+
+
+
+
+ {2b384fa8-9ee1-4544-93cb-0d733c25e8ce}
+
+
+ {b53a5535-ee9d-4c6f-9a26-f79ee3bc3754}
+
+
+ {bb493552-3b8c-4a8c-bf69-a6e7a51d2ea6}
+
+
+
+
diff --git a/build_msvc/unit-e-cli/unit-e-cli.vcxproj b/build_msvc/unit-e-cli/unit-e-cli.vcxproj
new file mode 100644
index 0000000000..3ff77ead8d
--- /dev/null
+++ b/build_msvc/unit-e-cli/unit-e-cli.vcxproj
@@ -0,0 +1,176 @@
+
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+
+
+
+
+
+
+
+ {0667528c-d734-4009-adf9-c0d6c4a5a5a6}
+
+
+ {6190199c-6cf4-4dad-bfbd-93fa72a760c1}
+
+
+ {b53a5535-ee9d-4c6f-9a26-f79ee3bc3754}
+
+
+ {5724ba7d-a09a-4ba8-800b-c4c1561b3d69}
+
+
+
+ 15.0
+ {0B2D7431-F876-4A58-87BF-F748338CD3BF}
+ Win32Proj
+ unitecli
+ x86-windows-static
+ x64-windows-static
+
+
+
+ Application
+ true
+ v141
+ Unicode
+
+
+ Application
+ false
+ v141
+ true
+ Unicode
+
+
+ Application
+ true
+ v141
+ Unicode
+
+
+ Application
+ false
+ v141
+ true
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ false
+
+
+ true
+
+
+ true
+
+
+ false
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+ crypt32.lib;Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreadedDebug
+
+
+ Console
+ true
+ crypt32.lib;Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreadedDebug
+
+
+ Console
+ true
+ crypt32.lib;Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+ crypt32.lib;Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
+
+
+
+
diff --git a/build_msvc/unit-e-tx/unit-e-tx.vcxproj b/build_msvc/unit-e-tx/unit-e-tx.vcxproj
new file mode 100644
index 0000000000..0d6cc864ba
--- /dev/null
+++ b/build_msvc/unit-e-tx/unit-e-tx.vcxproj
@@ -0,0 +1,179 @@
+
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+
+
+
+
+ {2b384fa8-9ee1-4544-93cb-0d733c25e8ce}
+
+
+ {7c87e378-df58-482e-aa2f-1bc129bc19ce}
+
+
+ {6190199c-6cf4-4dad-bfbd-93fa72a760c1}
+
+
+ {b53a5535-ee9d-4c6f-9a26-f79ee3bc3754}
+
+
+ {5724ba7d-a09a-4ba8-800b-c4c1561b3d69}
+
+
+ {bb493552-3b8c-4a8c-bf69-a6e7a51d2ea6}
+
+
+
+ 15.0
+ {D3022AF6-AD33-4CE3-B358-87CB6A1B29CF}
+ Win32Proj
+ unitetx
+ x86-windows-static
+ x64-windows-static
+
+
+
+ Application
+ true
+ v141
+ Unicode
+
+
+ Application
+ false
+ v141
+ true
+ Unicode
+
+
+ Application
+ true
+ v141
+ Unicode
+
+
+ Application
+ false
+ v141
+ true
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ false
+
+
+ true
+
+
+ true
+
+
+ false
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;WIN32;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+ crypt32.lib;Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreadedDebug
+
+
+ Console
+ true
+ crypt32.lib;Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreadedDebug
+
+
+ Console
+ true
+ crypt32.lib;Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;WIN32;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+ crypt32.lib;Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
+
+
+
+
diff --git a/build_msvc/unit-e/unit-e.vcxproj b/build_msvc/unit-e/unit-e.vcxproj
new file mode 100644
index 0000000000..adacc8030e
--- /dev/null
+++ b/build_msvc/unit-e/unit-e.vcxproj
@@ -0,0 +1,187 @@
+
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+ 15.0
+ {D4513DDF-6013-44DC-ADCC-12EAF6D1F038}
+ Win32Proj
+ unit-e
+ x86-windows-static
+ x64-windows-static
+
+
+
+ Application
+ true
+ v141
+ Unicode
+
+
+ Application
+ false
+ v141
+ true
+ Unicode
+
+
+ Application
+ true
+ v141
+ Unicode
+
+
+ Application
+ false
+ v141
+ true
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ WIN32;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreadedDebug
+
+
+ Console
+ true
+ crypt32.lib;Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
+ false
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ WIN32;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreadedDebug
+
+
+ Console
+ true
+ crypt32.lib;Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
+ false
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ WIN32;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+
+
+ crypt32.lib;Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
+ false
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ WIN32;HAVE_CONFIG_H;_SCL_SECURE_NO_WARNINGS;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+
+
+ crypt32.lib;Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
+ false
+
+
+
+
+
+
+
+ {2b384fa8-9ee1-4544-93cb-0d733c25e8ce}
+
+
+ {7c87e378-df58-482e-aa2f-1bc129bc19ce}
+
+
+ {6190199c-6cf4-4dad-bfbd-93fa72a760c1}
+
+
+ {460fee33-1fe1-483f-b3bf-931ff8e969a5}
+
+
+ {b53a5535-ee9d-4c6f-9a26-f79ee3bc3754}
+
+
+ {93b86837-b543-48a5-a89b-7c87abb77df2}
+
+
+ {792d487f-f14c-49fc-a9de-3fc150f31c3f}
+
+
+ {5724ba7d-a09a-4ba8-800b-c4c1561b3d69}
+
+
+ {bb493552-3b8c-4a8c-bf69-a6e7a51d2ea6}
+
+
+ {18430fef-6b61-4c53-b396-718e02850f1b}
+
+
+
+
diff --git a/build_msvc/unite-wallet/unite-wallet.vcxproj b/build_msvc/unite-wallet/unite-wallet.vcxproj
new file mode 100644
index 0000000000..4b2a9f5ee5
--- /dev/null
+++ b/build_msvc/unite-wallet/unite-wallet.vcxproj
@@ -0,0 +1,197 @@
+
+
+
+
+
+ Debug
+ Win32
+
+
+ Release
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ x64
+
+
+
+
+
+
+
+ {2b384fa8-9ee1-4544-93cb-0d733c25e8ce}
+
+
+ {0667528c-d734-4009-adf9-c0d6c4a5a5a6}
+
+
+ {7c87e378-df58-482e-aa2f-1bc129bc19ce}
+
+
+ {6190199c-6cf4-4dad-bfbd-93fa72a760c1}
+
+
+ {460fee33-1fe1-483f-b3bf-931ff8e969a5}
+
+
+ {b53a5535-ee9d-4c6f-9a26-f79ee3bc3754}
+
+
+ {93b86837-b543-48a5-a89b-7c87abb77df2}
+
+
+ {792d487f-f14c-49fc-a9de-3fc150f31c3f}
+
+
+ {5724ba7d-a09a-4ba8-800b-c4c1561b3d69}
+
+
+ {f91ac55e-6f5e-4c58-9ac5-b40db7deef93}
+
+
+ {bb493552-3b8c-4a8c-bf69-a6e7a51d2ea6}
+
+
+ {18430fef-6b61-4c53-b396-718e02850f1b}
+
+
+
+ 15.0
+ {84DE8790-EDE3-4483-81AC-C32F15E861F4}
+ Win32Proj
+ unitetx
+ x86-windows-static
+ x64-windows-static
+
+
+
+ Application
+ true
+ v141
+ Unicode
+
+
+ Application
+ false
+ v141
+ true
+ Unicode
+
+
+ Application
+ true
+ v141
+ Unicode
+
+
+ Application
+ false
+ v141
+ true
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ false
+
+
+ true
+
+
+ true
+
+
+ false
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;WIN32;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+ crypt32.lib;Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreadedDebug
+
+
+ Console
+ true
+ crypt32.lib;Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
+
+
+
+
+ NotUsing
+ Level3
+ Disabled
+ HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreadedDebug
+
+
+ Console
+ true
+ crypt32.lib;Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
+
+
+
+
+ NotUsing
+ Level3
+ MaxSpeed
+ true
+ true
+ HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;WIN32;_CONSOLE;%(PreprocessorDefinitions)
+ true
+ MultiThreaded
+
+
+ Console
+ true
+ true
+ true
+ crypt32.lib;Iphlpapi.lib;ws2_32.lib;Shlwapi.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies)
+
+
+
+
diff --git a/build_msvc/unite.sln b/build_msvc/unite.sln
new file mode 100644
index 0000000000..f31fb88fef
--- /dev/null
+++ b/build_msvc/unite.sln
@@ -0,0 +1,213 @@
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.27130.2027
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libunite_consensus", "libuniteconsensus\libuniteconsensus.vcxproj", "{2B384FA8-9EE1-4544-93CB-0D733C25E8CE}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_libuniteconsensus", "testconsensus\testconsensus.vcxproj", "{E78473E9-B850-456C-9120-276301E04C06}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unit-e", "unit-e\unit-e.vcxproj", "{D4513DDF-6013-44DC-ADCC-12EAF6D1F038}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libunite_util", "libunite_util\libunite_util.vcxproj", "{B53A5535-EE9D-4C6F-9A26-F79EE3BC3754}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libunite_common", "libunite_common\libunite_common.vcxproj", "{7C87E378-DF58-482E-AA2F-1BC129BC19CE}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libunite_crypto", "libunite_crypto\libunite_crypto.vcxproj", "{6190199C-6CF4-4DAD-BFBD-93FA72A760C1}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libunite_server", "libunite_server\libunite_server.vcxproj", "{460FEE33-1FE1-483F-B3BF-931FF8E969A5}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libunivalue", "libunivalue\libunivalue.vcxproj", "{5724BA7D-A09A-4BA8-800B-C4C1561B3D69}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libunite_wallet", "libunite_wallet\libunite_wallet.vcxproj", "{93B86837-B543-48A5-A89B-7C87ABB77DF2}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libunite_zmq", "libunite_zmq\libunite_zmq.vcxproj", "{792D487F-F14C-49FC-A9DE-3FC150F31C3F}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_unite", "test_unite\test_unite.vcxproj", "{A56B73DB-D46D-4882-8374-1FE3FFA08F07}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libunite_cli", "libunite_cli\libunite_cli.vcxproj", "{0667528C-D734-4009-ADF9-C0D6C4A5A5A6}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unit-e-cli", "unit-e-cli\unit-e-cli.vcxproj", "{0B2D7431-F876-4A58-87BF-F748338CD3BF}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bench_unite", "bench_unite\bench_unite.vcxproj", "{1125654E-E1B2-4431-8B5C-62EA9A2FEECB}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unit-e-tx", "unit-e-tx\unit-e-tx.vcxproj", "{D3022AF6-AD33-4CE3-B358-87CB6A1B29CF}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unite-wallet", "unite-wallet\unite-wallet.vcxproj", "{84DE8790-EDE3-4483-81AC-C32F15E861F4}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libunite_wallet_tool", "libunite_wallet_tool\libunite_wallet_tool.vcxproj", "{F91AC55E-6F5E-4C58-9AC5-B40DB7DEEF93}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libsecp256k1", "libsecp256k1\libsecp256k1.vcxproj", "{BB493552-3B8C-4A8C-BF69-A6E7A51D2EA6}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libleveldb", "libleveldb\libleveldb.vcxproj", "{18430FEF-6B61-4C53-B396-718E02850F1B}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {2B384FA8-9EE1-4544-93CB-0D733C25E8CE}.Debug|x64.ActiveCfg = Debug|x64
+ {2B384FA8-9EE1-4544-93CB-0D733C25E8CE}.Debug|x64.Build.0 = Debug|x64
+ {2B384FA8-9EE1-4544-93CB-0D733C25E8CE}.Debug|x86.ActiveCfg = Debug|Win32
+ {2B384FA8-9EE1-4544-93CB-0D733C25E8CE}.Debug|x86.Build.0 = Debug|Win32
+ {2B384FA8-9EE1-4544-93CB-0D733C25E8CE}.Release|x64.ActiveCfg = Release|x64
+ {2B384FA8-9EE1-4544-93CB-0D733C25E8CE}.Release|x64.Build.0 = Release|x64
+ {2B384FA8-9EE1-4544-93CB-0D733C25E8CE}.Release|x86.ActiveCfg = Release|Win32
+ {2B384FA8-9EE1-4544-93CB-0D733C25E8CE}.Release|x86.Build.0 = Release|Win32
+ {E78473E9-B850-456C-9120-276301E04C06}.Debug|x64.ActiveCfg = Debug|x64
+ {E78473E9-B850-456C-9120-276301E04C06}.Debug|x64.Build.0 = Debug|x64
+ {E78473E9-B850-456C-9120-276301E04C06}.Debug|x86.ActiveCfg = Debug|Win32
+ {E78473E9-B850-456C-9120-276301E04C06}.Debug|x86.Build.0 = Debug|Win32
+ {E78473E9-B850-456C-9120-276301E04C06}.Release|x64.ActiveCfg = Release|x64
+ {E78473E9-B850-456C-9120-276301E04C06}.Release|x64.Build.0 = Release|x64
+ {E78473E9-B850-456C-9120-276301E04C06}.Release|x86.ActiveCfg = Release|Win32
+ {E78473E9-B850-456C-9120-276301E04C06}.Release|x86.Build.0 = Release|Win32
+ {D4513DDF-6013-44DC-ADCC-12EAF6D1F038}.Debug|x64.ActiveCfg = Debug|x64
+ {D4513DDF-6013-44DC-ADCC-12EAF6D1F038}.Debug|x64.Build.0 = Debug|x64
+ {D4513DDF-6013-44DC-ADCC-12EAF6D1F038}.Debug|x86.ActiveCfg = Debug|Win32
+ {D4513DDF-6013-44DC-ADCC-12EAF6D1F038}.Debug|x86.Build.0 = Debug|Win32
+ {D4513DDF-6013-44DC-ADCC-12EAF6D1F038}.Release|x64.ActiveCfg = Release|x64
+ {D4513DDF-6013-44DC-ADCC-12EAF6D1F038}.Release|x64.Build.0 = Release|x64
+ {D4513DDF-6013-44DC-ADCC-12EAF6D1F038}.Release|x86.ActiveCfg = Release|Win32
+ {D4513DDF-6013-44DC-ADCC-12EAF6D1F038}.Release|x86.Build.0 = Release|Win32
+ {B53A5535-EE9D-4C6F-9A26-F79EE3BC3754}.Debug|x64.ActiveCfg = Debug|x64
+ {B53A5535-EE9D-4C6F-9A26-F79EE3BC3754}.Debug|x64.Build.0 = Debug|x64
+ {B53A5535-EE9D-4C6F-9A26-F79EE3BC3754}.Debug|x86.ActiveCfg = Debug|Win32
+ {B53A5535-EE9D-4C6F-9A26-F79EE3BC3754}.Debug|x86.Build.0 = Debug|Win32
+ {B53A5535-EE9D-4C6F-9A26-F79EE3BC3754}.Release|x64.ActiveCfg = Release|x64
+ {B53A5535-EE9D-4C6F-9A26-F79EE3BC3754}.Release|x64.Build.0 = Release|x64
+ {B53A5535-EE9D-4C6F-9A26-F79EE3BC3754}.Release|x86.ActiveCfg = Release|Win32
+ {B53A5535-EE9D-4C6F-9A26-F79EE3BC3754}.Release|x86.Build.0 = Release|Win32
+ {7C87E378-DF58-482E-AA2F-1BC129BC19CE}.Debug|x64.ActiveCfg = Debug|x64
+ {7C87E378-DF58-482E-AA2F-1BC129BC19CE}.Debug|x64.Build.0 = Debug|x64
+ {7C87E378-DF58-482E-AA2F-1BC129BC19CE}.Debug|x86.ActiveCfg = Debug|Win32
+ {7C87E378-DF58-482E-AA2F-1BC129BC19CE}.Debug|x86.Build.0 = Debug|Win32
+ {7C87E378-DF58-482E-AA2F-1BC129BC19CE}.Release|x64.ActiveCfg = Release|x64
+ {7C87E378-DF58-482E-AA2F-1BC129BC19CE}.Release|x64.Build.0 = Release|x64
+ {7C87E378-DF58-482E-AA2F-1BC129BC19CE}.Release|x86.ActiveCfg = Release|Win32
+ {7C87E378-DF58-482E-AA2F-1BC129BC19CE}.Release|x86.Build.0 = Release|Win32
+ {6190199C-6CF4-4DAD-BFBD-93FA72A760C1}.Debug|x64.ActiveCfg = Debug|x64
+ {6190199C-6CF4-4DAD-BFBD-93FA72A760C1}.Debug|x64.Build.0 = Debug|x64
+ {6190199C-6CF4-4DAD-BFBD-93FA72A760C1}.Debug|x86.ActiveCfg = Debug|Win32
+ {6190199C-6CF4-4DAD-BFBD-93FA72A760C1}.Debug|x86.Build.0 = Debug|Win32
+ {6190199C-6CF4-4DAD-BFBD-93FA72A760C1}.Release|x64.ActiveCfg = Release|x64
+ {6190199C-6CF4-4DAD-BFBD-93FA72A760C1}.Release|x64.Build.0 = Release|x64
+ {6190199C-6CF4-4DAD-BFBD-93FA72A760C1}.Release|x86.ActiveCfg = Release|Win32
+ {6190199C-6CF4-4DAD-BFBD-93FA72A760C1}.Release|x86.Build.0 = Release|Win32
+ {460FEE33-1FE1-483F-B3BF-931FF8E969A5}.Debug|x64.ActiveCfg = Debug|x64
+ {460FEE33-1FE1-483F-B3BF-931FF8E969A5}.Debug|x64.Build.0 = Debug|x64
+ {460FEE33-1FE1-483F-B3BF-931FF8E969A5}.Debug|x86.ActiveCfg = Debug|Win32
+ {460FEE33-1FE1-483F-B3BF-931FF8E969A5}.Debug|x86.Build.0 = Debug|Win32
+ {460FEE33-1FE1-483F-B3BF-931FF8E969A5}.Release|x64.ActiveCfg = Release|x64
+ {460FEE33-1FE1-483F-B3BF-931FF8E969A5}.Release|x64.Build.0 = Release|x64
+ {460FEE33-1FE1-483F-B3BF-931FF8E969A5}.Release|x86.ActiveCfg = Release|Win32
+ {460FEE33-1FE1-483F-B3BF-931FF8E969A5}.Release|x86.Build.0 = Release|Win32
+ {5724BA7D-A09A-4BA8-800B-C4C1561B3D69}.Debug|x64.ActiveCfg = Debug|x64
+ {5724BA7D-A09A-4BA8-800B-C4C1561B3D69}.Debug|x64.Build.0 = Debug|x64
+ {5724BA7D-A09A-4BA8-800B-C4C1561B3D69}.Debug|x86.ActiveCfg = Debug|Win32
+ {5724BA7D-A09A-4BA8-800B-C4C1561B3D69}.Debug|x86.Build.0 = Debug|Win32
+ {5724BA7D-A09A-4BA8-800B-C4C1561B3D69}.Release|x64.ActiveCfg = Release|x64
+ {5724BA7D-A09A-4BA8-800B-C4C1561B3D69}.Release|x64.Build.0 = Release|x64
+ {5724BA7D-A09A-4BA8-800B-C4C1561B3D69}.Release|x86.ActiveCfg = Release|Win32
+ {5724BA7D-A09A-4BA8-800B-C4C1561B3D69}.Release|x86.Build.0 = Release|Win32
+ {93B86837-B543-48A5-A89B-7C87ABB77DF2}.Debug|x64.ActiveCfg = Debug|x64
+ {93B86837-B543-48A5-A89B-7C87ABB77DF2}.Debug|x64.Build.0 = Debug|x64
+ {93B86837-B543-48A5-A89B-7C87ABB77DF2}.Debug|x86.ActiveCfg = Debug|Win32
+ {93B86837-B543-48A5-A89B-7C87ABB77DF2}.Debug|x86.Build.0 = Debug|Win32
+ {93B86837-B543-48A5-A89B-7C87ABB77DF2}.Release|x64.ActiveCfg = Release|x64
+ {93B86837-B543-48A5-A89B-7C87ABB77DF2}.Release|x64.Build.0 = Release|x64
+ {93B86837-B543-48A5-A89B-7C87ABB77DF2}.Release|x86.ActiveCfg = Release|Win32
+ {93B86837-B543-48A5-A89B-7C87ABB77DF2}.Release|x86.Build.0 = Release|Win32
+ {792D487F-F14C-49FC-A9DE-3FC150F31C3F}.Debug|x64.ActiveCfg = Debug|x64
+ {792D487F-F14C-49FC-A9DE-3FC150F31C3F}.Debug|x64.Build.0 = Debug|x64
+ {792D487F-F14C-49FC-A9DE-3FC150F31C3F}.Debug|x86.ActiveCfg = Debug|Win32
+ {792D487F-F14C-49FC-A9DE-3FC150F31C3F}.Debug|x86.Build.0 = Debug|Win32
+ {792D487F-F14C-49FC-A9DE-3FC150F31C3F}.Release|x64.ActiveCfg = Release|x64
+ {792D487F-F14C-49FC-A9DE-3FC150F31C3F}.Release|x64.Build.0 = Release|x64
+ {792D487F-F14C-49FC-A9DE-3FC150F31C3F}.Release|x86.ActiveCfg = Release|Win32
+ {792D487F-F14C-49FC-A9DE-3FC150F31C3F}.Release|x86.Build.0 = Release|Win32
+ {A56B73DB-D46D-4882-8374-1FE3FFA08F07}.Debug|x64.ActiveCfg = Debug|x64
+ {A56B73DB-D46D-4882-8374-1FE3FFA08F07}.Debug|x64.Build.0 = Debug|x64
+ {A56B73DB-D46D-4882-8374-1FE3FFA08F07}.Debug|x86.ActiveCfg = Debug|Win32
+ {A56B73DB-D46D-4882-8374-1FE3FFA08F07}.Debug|x86.Build.0 = Debug|Win32
+ {A56B73DB-D46D-4882-8374-1FE3FFA08F07}.Release|x64.ActiveCfg = Release|x64
+ {A56B73DB-D46D-4882-8374-1FE3FFA08F07}.Release|x64.Build.0 = Release|x64
+ {A56B73DB-D46D-4882-8374-1FE3FFA08F07}.Release|x86.ActiveCfg = Release|Win32
+ {A56B73DB-D46D-4882-8374-1FE3FFA08F07}.Release|x86.Build.0 = Release|Win32
+ {0667528C-D734-4009-ADF9-C0D6C4A5A5A6}.Debug|x64.ActiveCfg = Debug|x64
+ {0667528C-D734-4009-ADF9-C0D6C4A5A5A6}.Debug|x64.Build.0 = Debug|x64
+ {0667528C-D734-4009-ADF9-C0D6C4A5A5A6}.Debug|x86.ActiveCfg = Debug|Win32
+ {0667528C-D734-4009-ADF9-C0D6C4A5A5A6}.Debug|x86.Build.0 = Debug|Win32
+ {0667528C-D734-4009-ADF9-C0D6C4A5A5A6}.Release|x64.ActiveCfg = Release|x64
+ {0667528C-D734-4009-ADF9-C0D6C4A5A5A6}.Release|x64.Build.0 = Release|x64
+ {0667528C-D734-4009-ADF9-C0D6C4A5A5A6}.Release|x86.ActiveCfg = Release|Win32
+ {0667528C-D734-4009-ADF9-C0D6C4A5A5A6}.Release|x86.Build.0 = Release|Win32
+ {0B2D7431-F876-4A58-87BF-F748338CD3BF}.Debug|x64.ActiveCfg = Debug|x64
+ {0B2D7431-F876-4A58-87BF-F748338CD3BF}.Debug|x64.Build.0 = Debug|x64
+ {0B2D7431-F876-4A58-87BF-F748338CD3BF}.Debug|x86.ActiveCfg = Debug|Win32
+ {0B2D7431-F876-4A58-87BF-F748338CD3BF}.Debug|x86.Build.0 = Debug|Win32
+ {0B2D7431-F876-4A58-87BF-F748338CD3BF}.Release|x64.ActiveCfg = Release|x64
+ {0B2D7431-F876-4A58-87BF-F748338CD3BF}.Release|x64.Build.0 = Release|x64
+ {0B2D7431-F876-4A58-87BF-F748338CD3BF}.Release|x86.ActiveCfg = Release|Win32
+ {0B2D7431-F876-4A58-87BF-F748338CD3BF}.Release|x86.Build.0 = Release|Win32
+ {1125654E-E1B2-4431-8B5C-62EA9A2FEECB}.Debug|x64.ActiveCfg = Debug|x64
+ {1125654E-E1B2-4431-8B5C-62EA9A2FEECB}.Debug|x64.Build.0 = Debug|x64
+ {1125654E-E1B2-4431-8B5C-62EA9A2FEECB}.Debug|x86.ActiveCfg = Debug|Win32
+ {1125654E-E1B2-4431-8B5C-62EA9A2FEECB}.Debug|x86.Build.0 = Debug|Win32
+ {1125654E-E1B2-4431-8B5C-62EA9A2FEECB}.Release|x64.ActiveCfg = Release|x64
+ {1125654E-E1B2-4431-8B5C-62EA9A2FEECB}.Release|x64.Build.0 = Release|x64
+ {1125654E-E1B2-4431-8B5C-62EA9A2FEECB}.Release|x86.ActiveCfg = Release|Win32
+ {1125654E-E1B2-4431-8B5C-62EA9A2FEECB}.Release|x86.Build.0 = Release|Win32
+ {D3022AF6-AD33-4CE3-B358-87CB6A1B29CF}.Debug|x64.ActiveCfg = Debug|x64
+ {D3022AF6-AD33-4CE3-B358-87CB6A1B29CF}.Debug|x64.Build.0 = Debug|x64
+ {D3022AF6-AD33-4CE3-B358-87CB6A1B29CF}.Debug|x86.ActiveCfg = Debug|Win32
+ {D3022AF6-AD33-4CE3-B358-87CB6A1B29CF}.Debug|x86.Build.0 = Debug|Win32
+ {D3022AF6-AD33-4CE3-B358-87CB6A1B29CF}.Release|x64.ActiveCfg = Release|x64
+ {D3022AF6-AD33-4CE3-B358-87CB6A1B29CF}.Release|x64.Build.0 = Release|x64
+ {D3022AF6-AD33-4CE3-B358-87CB6A1B29CF}.Release|x86.ActiveCfg = Release|Win32
+ {D3022AF6-AD33-4CE3-B358-87CB6A1B29CF}.Release|x86.Build.0 = Release|Win32
+ {84DE8790-EDE3-4483-81AC-C32F15E861F4}.Debug|x64.ActiveCfg = Debug|x64
+ {84DE8790-EDE3-4483-81AC-C32F15E861F4}.Debug|x64.Build.0 = Debug|x64
+ {84DE8790-EDE3-4483-81AC-C32F15E861F4}.Debug|x86.ActiveCfg = Debug|Win32
+ {84DE8790-EDE3-4483-81AC-C32F15E861F4}.Debug|x86.Build.0 = Debug|Win32
+ {84DE8790-EDE3-4483-81AC-C32F15E861F4}.Release|x64.ActiveCfg = Release|x64
+ {84DE8790-EDE3-4483-81AC-C32F15E861F4}.Release|x64.Build.0 = Release|x64
+ {84DE8790-EDE3-4483-81AC-C32F15E861F4}.Release|x86.ActiveCfg = Release|Win32
+ {84DE8790-EDE3-4483-81AC-C32F15E861F4}.Release|x86.Build.0 = Release|Win32
+ {F91AC55E-6F5E-4C58-9AC5-B40DB7DEEF93}.Debug|x64.ActiveCfg = Debug|x64
+ {F91AC55E-6F5E-4C58-9AC5-B40DB7DEEF93}.Debug|x64.Build.0 = Debug|x64
+ {F91AC55E-6F5E-4C58-9AC5-B40DB7DEEF93}.Debug|x86.ActiveCfg = Debug|Win32
+ {F91AC55E-6F5E-4C58-9AC5-B40DB7DEEF93}.Debug|x86.Build.0 = Debug|Win32
+ {F91AC55E-6F5E-4C58-9AC5-B40DB7DEEF93}.Release|x64.ActiveCfg = Release|x64
+ {F91AC55E-6F5E-4C58-9AC5-B40DB7DEEF93}.Release|x64.Build.0 = Release|x64
+ {F91AC55E-6F5E-4C58-9AC5-B40DB7DEEF93}.Release|x86.ActiveCfg = Release|Win32
+ {F91AC55E-6F5E-4C58-9AC5-B40DB7DEEF93}.Release|x86.Build.0 = Release|Win32
+ {BB493552-3B8C-4A8C-BF69-A6E7A51D2EA6}.Debug|x64.ActiveCfg = Debug|x64
+ {BB493552-3B8C-4A8C-BF69-A6E7A51D2EA6}.Debug|x64.Build.0 = Debug|x64
+ {BB493552-3B8C-4A8C-BF69-A6E7A51D2EA6}.Debug|x86.ActiveCfg = Debug|Win32
+ {BB493552-3B8C-4A8C-BF69-A6E7A51D2EA6}.Debug|x86.Build.0 = Debug|Win32
+ {BB493552-3B8C-4A8C-BF69-A6E7A51D2EA6}.Release|x64.ActiveCfg = Release|x64
+ {BB493552-3B8C-4A8C-BF69-A6E7A51D2EA6}.Release|x64.Build.0 = Release|x64
+ {BB493552-3B8C-4A8C-BF69-A6E7A51D2EA6}.Release|x86.ActiveCfg = Release|Win32
+ {BB493552-3B8C-4A8C-BF69-A6E7A51D2EA6}.Release|x86.Build.0 = Release|Win32
+ {18430FEF-6B61-4C53-B396-718E02850F1B}.Debug|x64.ActiveCfg = Debug|x64
+ {18430FEF-6B61-4C53-B396-718E02850F1B}.Debug|x64.Build.0 = Debug|x64
+ {18430FEF-6B61-4C53-B396-718E02850F1B}.Debug|x86.ActiveCfg = Debug|Win32
+ {18430FEF-6B61-4C53-B396-718E02850F1B}.Debug|x86.Build.0 = Debug|Win32
+ {18430FEF-6B61-4C53-B396-718E02850F1B}.Release|x64.ActiveCfg = Release|x64
+ {18430FEF-6B61-4C53-B396-718E02850F1B}.Release|x64.Build.0 = Release|x64
+ {18430FEF-6B61-4C53-B396-718E02850F1B}.Release|x86.ActiveCfg = Release|Win32
+ {18430FEF-6B61-4C53-B396-718E02850F1B}.Release|x86.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {4ABD1207-9A90-4EC9-A8EB-203638A2605D}
+ SolutionGuid = {2FB733C9-24CB-4BA5-A26B-F43DAD7996B7}
+ SolutionGuid = {D0CAE2D0-8DB1-4A0B-80EE-800AA6C64323}
+ SolutionGuid = {DA7D16A6-E5F0-45B3-B194-C3FE64F1BFCD}
+ EndGlobalSection
+EndGlobal
diff --git a/build_msvc/unite_config.h b/build_msvc/unite_config.h
new file mode 100644
index 0000000000..5b62e1558c
--- /dev/null
+++ b/build_msvc/unite_config.h
@@ -0,0 +1,424 @@
+#ifndef UNITE_UNITE_CONFIG_H
+#define UNITE_UNITE_CONFIG_H
+
+/* Define if building universal (internal helper macro) */
+/* #undef AC_APPLE_UNIVERSAL_BUILD */
+
+/* Version Build */
+#define CLIENT_VERSION_BUILD 0
+
+/* Version is release */
+#define CLIENT_VERSION_IS_RELEASE false
+
+/* Major version */
+#define CLIENT_VERSION_MAJOR 1
+
+/* Minor version */
+#define CLIENT_VERSION_MINOR 17
+
+/* Build revision */
+#define CLIENT_VERSION_REVISION 99
+
+/* Copyright holder(s) before %s replacement */
+#define COPYRIGHT_HOLDERS "The %s developers"
+
+/* Copyright holder(s) */
+#define COPYRIGHT_HOLDERS_FINAL "The Bitcoin Core developers"
+
+/* Replacement for %s in copyright holders string */
+#define COPYRIGHT_HOLDERS_SUBSTITUTION "unit-e"
+
+/* Copyright year */
+#define COPYRIGHT_YEAR 2018
+
+/* Define to 1 to enable wallet functions */
+#define ENABLE_WALLET 1
+
+/* Define to 1 to enable ZMQ functions */
+#define ENABLE_ZMQ 1
+
+/* parameter and return value type for __fdelt_chk */
+/* #undef FDELT_TYPE */
+
+/* define if the Boost library is available */
+#define HAVE_BOOST /**/
+
+/* define if the Boost::Chrono library is available */
+#define HAVE_BOOST_CHRONO /**/
+
+/* define if the Boost::Filesystem library is available */
+#define HAVE_BOOST_FILESYSTEM /**/
+
+/* define if the Boost::PROGRAM_OPTIONS library is available */
+#define HAVE_BOOST_PROGRAM_OPTIONS /**/
+
+/* define if the Boost::System library is available */
+#define HAVE_BOOST_SYSTEM /**/
+
+/* define if the Boost::Thread library is available */
+#define HAVE_BOOST_THREAD /**/
+
+/* define if the Boost::Unit_Test_Framework library is available */
+#define HAVE_BOOST_UNIT_TEST_FRAMEWORK /**/
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_BYTESWAP_H */
+
+/* Define this symbol if the consensus lib has been built */
+#define HAVE_CONSENSUS_LIB 1
+
+/* define if the compiler supports basic C++11 syntax */
+#define HAVE_CXX11 1
+
+/* Define to 1 if you have the declaration of `be16toh', and to 0 if you
+ don't. */
+#define HAVE_DECL_BE16TOH 0
+
+/* Define to 1 if you have the declaration of `be32toh', and to 0 if you
+ don't. */
+#define HAVE_DECL_BE32TOH 0
+
+/* Define to 1 if you have the declaration of `be64toh', and to 0 if you
+ don't. */
+#define HAVE_DECL_BE64TOH 0
+
+/* Define to 1 if you have the declaration of `bswap_16', and to 0 if you
+ don't. */
+#define HAVE_DECL_BSWAP_16 0
+
+/* Define to 1 if you have the declaration of `bswap_32', and to 0 if you
+ don't. */
+#define HAVE_DECL_BSWAP_32 0
+
+/* Define to 1 if you have the declaration of `bswap_64', and to 0 if you
+ don't. */
+#define HAVE_DECL_BSWAP_64 0
+
+/* Define to 1 if you have the declaration of `daemon', and to 0 if you don't.
+ */
+#define HAVE_DECL_DAEMON 0
+
+/* Define to 1 if you have the declaration of `EVP_MD_CTX_new', and to 0 if
+ you don't. */
+//#define HAVE_DECL_EVP_MD_CTX_NEW 1
+
+/* Define to 1 if you have the declaration of `htobe16', and to 0 if you
+ don't. */
+#define HAVE_DECL_HTOBE16 0
+
+/* Define to 1 if you have the declaration of `htobe32', and to 0 if you
+ don't. */
+#define HAVE_DECL_HTOBE32 0
+
+/* Define to 1 if you have the declaration of `htobe64', and to 0 if you
+ don't. */
+#define HAVE_DECL_HTOBE64 0
+
+/* Define to 1 if you have the declaration of `htole16', and to 0 if you
+ don't. */
+#define HAVE_DECL_HTOLE16 0
+
+/* Define to 1 if you have the declaration of `htole32', and to 0 if you
+ don't. */
+#define HAVE_DECL_HTOLE32 0
+
+/* Define to 1 if you have the declaration of `htole64', and to 0 if you
+ don't. */
+#define HAVE_DECL_HTOLE64 0
+
+/* Define to 1 if you have the declaration of `le16toh', and to 0 if you
+ don't. */
+#define HAVE_DECL_LE16TOH 0
+
+/* Define to 1 if you have the declaration of `le32toh', and to 0 if you
+ don't. */
+#define HAVE_DECL_LE32TOH 0
+
+/* Define to 1 if you have the declaration of `le64toh', and to 0 if you
+ don't. */
+#define HAVE_DECL_LE64TOH 0
+
+/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
+ don't. */
+#define HAVE_DECL_STRERROR_R 0
+
+/* Define to 1 if you have the declaration of `strnlen', and to 0 if you
+ don't. */
+#define HAVE_DECL_STRNLEN 1
+
+/* Define to 1 if you have the declaration of `__builtin_clz', and to 0 if you
+ don't. */
+//#define HAVE_DECL___BUILTIN_CLZ 1
+
+/* Define to 1 if you have the declaration of `__builtin_clzl', and to 0 if
+ you don't. */
+//#define HAVE_DECL___BUILTIN_CLZL 1
+
+/* Define to 1 if you have the declaration of `__builtin_clzll', and to 0 if
+ you don't. */
+//#define HAVE_DECL___BUILTIN_CLZLL 1
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_DLFCN_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_ENDIAN_H */
+
+/* Define to 1 if the system has the `dllexport' function attribute */
+#define HAVE_FUNC_ATTRIBUTE_DLLEXPORT 1
+
+/* Define to 1 if the system has the `dllimport' function attribute */
+#define HAVE_FUNC_ATTRIBUTE_DLLIMPORT 1
+
+/* Define to 1 if the system has the `visibility' function attribute */
+#define HAVE_FUNC_ATTRIBUTE_VISIBILITY 1
+
+/* Define this symbol if the BSD getentropy system call is available */
+/* #undef HAVE_GETENTROPY */
+
+/* Define this symbol if the BSD getentropy system call is available with
+ sys/random.h */
+/* #undef HAVE_GETENTROPY_RAND */
+
+/* Define to 1 if you have the header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the `advapi32' library (-ladvapi32). */
+#define HAVE_LIBADVAPI32 1
+
+/* Define to 1 if you have the `comctl32' library (-lcomctl32). */
+#define HAVE_LIBCOMCTL32 1
+
+/* Define to 1 if you have the `comdlg32' library (-lcomdlg32). */
+#define HAVE_LIBCOMDLG32 1
+
+/* Define to 1 if you have the `crypt32' library (-lcrypt32). */
+#define HAVE_LIBCRYPT32 1
+
+/* Define to 1 if you have the `gdi32' library (-lgdi32). */
+#define HAVE_LIBGDI32 1
+
+/* Define to 1 if you have the `imm32' library (-limm32). */
+#define HAVE_LIBIMM32 1
+
+/* Define to 1 if you have the `iphlpapi' library (-liphlpapi). */
+#define HAVE_LIBIPHLPAPI 1
+
+/* Define to 1 if you have the `kernel32' library (-lkernel32). */
+#define HAVE_LIBKERNEL32 1
+
+/* Define to 1 if you have the `mingwthrd' library (-lmingwthrd). */
+#define HAVE_LIBMINGWTHRD 1
+
+/* Define to 1 if you have the `mswsock' library (-lmswsock). */
+#define HAVE_LIBMSWSOCK 1
+
+/* Define to 1 if you have the `ole32' library (-lole32). */
+#define HAVE_LIBOLE32 1
+
+/* Define to 1 if you have the `oleaut32' library (-loleaut32). */
+#define HAVE_LIBOLEAUT32 1
+
+/* Define to 1 if you have the `rpcrt4' library (-lrpcrt4). */
+#define HAVE_LIBRPCRT4 1
+
+/* Define to 1 if you have the `rt' library (-lrt). */
+/* #undef HAVE_LIBRT */
+
+/* Define to 1 if you have the `shell32' library (-lshell32). */
+#define HAVE_LIBSHELL32 1
+
+/* Define to 1 if you have the `shlwapi' library (-lshlwapi). */
+#define HAVE_LIBSHLWAPI 1
+
+/* Define to 1 if you have the `ssp' library (-lssp). */
+#define HAVE_LIBSSP 1
+
+/* Define to 1 if you have the `user32' library (-luser32). */
+#define HAVE_LIBUSER32 1
+
+/* Define to 1 if you have the `uuid' library (-luuid). */
+#define HAVE_LIBUUID 1
+
+/* Define to 1 if you have the `winmm' library (-lwinmm). */
+#define HAVE_LIBWINMM 1
+
+/* Define to 1 if you have the `winspool' library (-lwinspool). */
+#define HAVE_LIBWINSPOOL 1
+
+/* Define to 1 if you have the `ws2_32' library (-lws2_32). */
+#define HAVE_LIBWS2_32 1
+
+/* Define to 1 if you have the `z ' library (-lz ). */
+#define HAVE_LIBZ_ 1
+
+/* Define this symbol if you have malloc_info */
+/* #undef HAVE_MALLOC_INFO */
+
+/* Define this symbol if you have mallopt with M_ARENA_MAX */
+/* #undef HAVE_MALLOPT_ARENA_MAX */
+
+/* Define to 1 if you have the header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_MINIUPNPC_MINIUPNPC_H 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_MINIUPNPC_MINIWGET_H 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_MINIUPNPC_UPNPCOMMANDS_H 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_MINIUPNPC_UPNPERRORS_H 1
+
+/* Define this symbol if you have MSG_DONTWAIT */
+/* #undef HAVE_MSG_DONTWAIT */
+
+/* Define this symbol if you have MSG_NOSIGNAL */
+/* #undef HAVE_MSG_NOSIGNAL */
+
+/* Define if you have POSIX threads libraries and header files. */
+//#define HAVE_PTHREAD 1
+
+/* Have PTHREAD_PRIO_INHERIT. */
+//#define HAVE_PTHREAD_PRIO_INHERIT 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_STDIO_H 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the `strerror_r' function. */
+/* #undef HAVE_STRERROR_R */
+
+/* Define to 1 if you have the header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_STRING_H 1
+
+/* Define this symbol if the BSD sysctl(KERN_ARND) is available */
+/* #undef HAVE_SYSCTL_ARND */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_SYS_ENDIAN_H */
+
+/* Define this symbol if the Linux getrandom system call is available */
+/* #undef HAVE_SYS_GETRANDOM */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_SYS_PRCTL_H */
+
+/* Define to 1 if you have the header file. */
+/* #undef HAVE_SYS_SELECT_H */
+
+/* Define to 1 if you have the header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the header file. */
+//#define HAVE_UNISTD_H 1
+
+/* Define if the visibility attribute is supported. */
+#define HAVE_VISIBILITY_ATTRIBUTE 1
+
+/* Define this symbol if boost sleep works */
+/* #undef HAVE_WORKING_BOOST_SLEEP */
+
+/* Define this symbol if boost sleep_for works */
+#define HAVE_WORKING_BOOST_SLEEP_FOR 1
+
+/* Define to the sub-directory where libtool stores uninstalled libraries. */
+#define LT_OBJDIR ".libs/"
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT "https://github.com/bitcoin/bitcoin/issues"
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME "unit-e"
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING "unit-e 0.17.99"
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME "unite"
+
+/* Define to the home page for this package. */
+#define PACKAGE_URL "https://bitcoincore.org/"
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION "0.17.99"
+
+/* Define to necessary symbol if this constant uses a non-standard name on
+ your system. */
+/* #undef PTHREAD_CREATE_JOINABLE */
+
+/* Define this symbol if the qt platform is cocoa */
+/* #undef QT_QPA_PLATFORM_COCOA */
+
+/* Define this symbol if the minimal qt platform exists */
+#define QT_QPA_PLATFORM_MINIMAL 1
+
+/* Define this symbol if the qt platform is windows */
+#define QT_QPA_PLATFORM_WINDOWS 1
+
+/* Define this symbol if the qt platform is xcb */
+/* #undef QT_QPA_PLATFORM_XCB */
+
+/* Define this symbol if qt plugins are static */
+#define QT_STATICPLUGIN 1
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Define to 1 if strerror_r returns char *. */
+/* #undef STRERROR_R_CHAR_P */
+
+/* Define this symbol to build in assembly routines */
+//#define USE_ASM 1
+
+/* Define this symbol if coverage is enabled */
+/* #undef USE_COVERAGE */
+
+/* Define if dbus support should be compiled in */
+/* #undef USE_DBUS */
+
+/* Define if QR support should be compiled in */
+//#define USE_QRCODE 1
+
+/* UPnP support not compiled if undefined, otherwise value (0 or 1) determines
+ default state */
+//#define USE_UPNP 0
+
+/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
+ significant byte first (like Motorola and SPARC, unlike Intel). */
+#if defined AC_APPLE_UNIVERSAL_BUILD
+# if defined __BIG_ENDIAN__
+# define WORDS_BIGENDIAN 1
+# endif
+#else
+# ifndef WORDS_BIGENDIAN
+/* # undef WORDS_BIGENDIAN */
+# endif
+#endif
+
+/* Enable large inode numbers on Mac OS X 10.5. */
+#ifndef _DARWIN_USE_64_BIT_INODE
+# define _DARWIN_USE_64_BIT_INODE 1
+#endif
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+#define _FILE_OFFSET_BITS 64
+
+/* Define for large files, on AIX-style hosts. */
+/* #undef _LARGE_FILES */
+
+#endif //UNITE_UNITE_CONFIG_H
diff --git a/configure.ac b/configure.ac
index 6c6767b845..e7f8fb7ec8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4,11 +4,12 @@ define(_CLIENT_VERSION_MAJOR, 0)
define(_CLIENT_VERSION_MINOR, 1)
define(_CLIENT_VERSION_REVISION, 0)
define(_CLIENT_VERSION_BUILD, 0)
+define(_CLIENT_VERSION_RC, 0)
define(_CLIENT_VERSION_IS_RELEASE, false)
define(_COPYRIGHT_YEAR, 2019)
define(_COPYRIGHT_HOLDERS,[The %s developers])
define(_COPYRIGHT_HOLDERS_SUBSTITUTION,[[Unit-e]])
-AC_INIT([unit-e],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_REVISION],[https://github.com/dtr-org/unit-e/issues],[unit-e],[https://unit-e.io/])
+AC_INIT([unit-e],m4_join([.], _CLIENT_VERSION_MAJOR, _CLIENT_VERSION_MINOR, _CLIENT_VERSION_REVISION, m4_if(_CLIENT_VERSION_BUILD, [0], [], _CLIENT_VERSION_BUILD))m4_if(_CLIENT_VERSION_RC, [0], [], [rc]_CLIENT_VERSION_RC),[https://github.com/dtr-org/unit-e/issues],[unit-e],[https://unit-e.io/])
AC_CONFIG_SRCDIR([src/validation.cpp])
AC_CONFIG_HEADERS([src/config/unite-config.h])
AC_CONFIG_AUX_DIR([build-aux])
@@ -17,6 +18,7 @@ AC_CONFIG_MACRO_DIR([build-aux/m4])
UNITE_DAEMON_NAME=unit-e
UNITE_CLI_NAME=unit-e-cli
UNITE_TX_NAME=unit-e-tx
+UNITE_WALLET_TOOL_NAME=unite-wallet
dnl Unless the user specified ARFLAGS, force it to be cr
AC_ARG_VAR(ARFLAGS, [Flags for the archiver, defaults to if not set])
@@ -100,7 +102,6 @@ AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"])
AC_ARG_VAR(PYTHONPATH, Augments the default search path for python module files)
-# Enable wallet
AC_ARG_ENABLE([wallet],
[AS_HELP_STRING([--disable-wallet],
[disable wallet (enabled by default)])],
@@ -124,6 +125,17 @@ AC_ARG_ENABLE(tests,
[use_tests=$enableval],
[use_tests=yes])
+AC_ARG_ENABLE(gui-tests,
+ AS_HELP_STRING([--disable-gui-tests],[do not compile GUI tests (default is to compile if GUI and tests enabled)]),
+ [use_gui_tests=$enableval],
+ [use_gui_tests=$use_tests])
+
+AC_ARG_WITH([rapidcheck],
+ [AS_HELP_STRING([--with-rapidcheck],
+ [enable RapidCheck property based tests (default is yes if librapidcheck is found)])],
+ [use_rapidcheck=$withval],
+ [use_rapidcheck=auto])
+
AC_ARG_ENABLE(bench,
AS_HELP_STRING([--disable-bench],[do not compile benchmarks (default is to compile)]),
[use_bench=$enableval],
@@ -134,6 +146,17 @@ AC_ARG_ENABLE([extended-functional-tests],
[use_extended_functional_tests=$enableval],
[use_extended_functional_tests=no])
+AC_ARG_ENABLE([fuzz],
+ AS_HELP_STRING([--enable-fuzz],[enable building of fuzz targets (default no)]),
+ [enable_fuzz=$enableval],
+ [enable_fuzz=no])
+
+AC_ARG_WITH([qrencode],
+ [AS_HELP_STRING([--with-qrencode],
+ [enable QR code support (default is yes if qt is enabled and libqrencode is found)])],
+ [use_qr=$withval],
+ [use_qr=auto])
+
AC_ARG_ENABLE([hardening],
[AS_HELP_STRING([--disable-hardening],
[do not attempt to harden the resulting executables (default is to harden when possible)])],
@@ -277,7 +300,14 @@ if test x$use_sanitizers != x; then
AX_CHECK_LINK_FLAG(
[[-fsanitize=$use_sanitizers]],
[[SANITIZER_LDFLAGS=-fsanitize=$use_sanitizers]],
- [AC_MSG_ERROR([linker did not accept requested flags, you are missing required libraries])])
+ [AC_MSG_ERROR([linker did not accept requested flags, you are missing required libraries])],
+ [],
+ [AC_LANG_PROGRAM([[
+ #include
+ #include
+ extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { return 0; }
+ __attribute__((weak)) // allow for libFuzzer linking
+ ]],[[]])])
fi
ERROR_CXXFLAGS=
@@ -297,6 +327,7 @@ if test "x$CXXFLAGS_overridden" = "xno"; then
AX_CHECK_COMPILE_FLAG([-Wformat-security],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wformat-security"],,[[$CXXFLAG_WERROR]])
AX_CHECK_COMPILE_FLAG([-Wthread-safety-analysis],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wthread-safety-analysis"],,[[$CXXFLAG_WERROR]])
AX_CHECK_COMPILE_FLAG([-Wrange-loop-analysis],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wrange-loop-analysis"],,[[$CXXFLAG_WERROR]])
+ AX_CHECK_COMPILE_FLAG([-Wredundant-decls],[WARN_CXXFLAGS="$WARN_CXXFLAGS -Wredundant-decls"],,[[$CXXFLAG_WERROR]])
## Some compilers (gcc) ignore unknown -Wno-* options, but warn about all
## unknown options if any other warning is produced. Test the -Wfoo case, and
@@ -390,10 +421,28 @@ CPPFLAGS="$CPPFLAGS -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS"
AC_ARG_WITH([utils],
[AS_HELP_STRING([--with-utils],
- [build unit-e-cli unit-e-tx (default=yes)])],
+ [build unit-e-cli unit-e-tx unite-wallet (default=yes)])],
[build_unite_utils=$withval],
[build_unite_utils=yes])
+AC_ARG_ENABLE([util-cli],
+ [AS_HELP_STRING([--enable-util-cli],
+ [build unit-e-cli])],
+ [build_unit_e_cli=$enableval],
+ [build_unit_e_cli=$build_unite_utils])
+
+AC_ARG_ENABLE([util-tx],
+ [AS_HELP_STRING([--enable-util-tx],
+ [build unit-e-tx])],
+ [build_unit_e_tx=$enableval],
+ [build_unit_e_tx=$build_unite_utils])
+
+AC_ARG_ENABLE([util-wallet],
+ [AS_HELP_STRING([--enable-util-wallet],
+ [build unite-wallet])],
+ [build_unite_wallet=$enableval],
+ [build_unite_wallet=$build_unite_utils])
+
AC_ARG_WITH([libs],
[AS_HELP_STRING([--with-libs],
[build libraries (default=yes)])],
@@ -448,7 +497,7 @@ case $host in
AC_MSG_ERROR("windres not found")
fi
- CPPFLAGS="$CPPFLAGS -D_MT -DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB"
+ CPPFLAGS="$CPPFLAGS -D_MT -DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB -D_WIN32_WINNT=0x0601"
LEVELDB_TARGET_FLAGS="-DOS_WINDOWS"
if test "x$CXXFLAGS_overridden" = "xno"; then
CXXFLAGS="$CXXFLAGS -w"
@@ -474,17 +523,6 @@ case $host in
LEVELDB_TARGET_FLAGS="-DOS_MACOSX"
if test x$cross_compiling != xyes; then
BUILD_OS=darwin
- AC_CHECK_PROG([PORT],port, port)
- if test x$PORT = xport; then
- dnl add default macports paths
- CPPFLAGS="$CPPFLAGS -isystem /opt/local/include"
- LIBS="$LIBS -L/opt/local/lib"
- if test -d /opt/local/include/db48; then
- CPPFLAGS="$CPPFLAGS -I/opt/local/include/db48"
- LIBS="$LIBS -L/opt/local/lib/db48"
- fi
- fi
-
AC_PATH_PROGS([RSVG_CONVERT], [rsvg-convert rsvg],rsvg-convert)
AC_CHECK_PROG([BREW],brew, brew)
if test x$BREW = xbrew; then
@@ -716,6 +754,10 @@ fi
AC_CHECK_HEADERS([endian.h sys/endian.h byteswap.h stdio.h stdlib.h unistd.h strings.h sys/types.h sys/stat.h sys/select.h sys/prctl.h])
+AC_CHECK_DECLS([getifaddrs, freeifaddrs],,,
+ [#include
+ #include ]
+)
AC_CHECK_DECLS([strnlen])
# Check for daemon(3), unrelated to --with-daemon (although used by it)
@@ -860,7 +902,7 @@ if test x$use_upnp != xno; then
)
fi
-if test x$build_unite_utils$build_unit_e$use_tests$use_bench = xnononono; then
+if test x$build_unite_wallet$build_unit_e_cli$build_unit_e_tx$build_unit_e$use_tests$use_bench = xnononononono; then
use_boost=no
else
use_boost=yes
@@ -1044,7 +1086,7 @@ if test x$use_pkgconfig = xyes; then
[
PKG_CHECK_MODULES([SSL], [libssl],, [AC_MSG_ERROR(openssl not found.)])
PKG_CHECK_MODULES([CRYPTO], [libcrypto],,[AC_MSG_ERROR(libcrypto not found.)])
- if test x$build_unite_utils$build_unit_e$use_tests != xnonono; then
+ if test x$build_unit_e_cli$build_unit_e$use_tests != xnonono; then
PKG_CHECK_MODULES([EVENT], [libevent],, [AC_MSG_ERROR(libevent not found.)])
if test x$TARGET_OS != xwindows; then
PKG_CHECK_MODULES([EVENT_PTHREADS], [libevent_pthreads],, [AC_MSG_ERROR(libevent_pthreads not found.)])
@@ -1069,7 +1111,7 @@ else
AC_CHECK_HEADER([openssl/ssl.h],, AC_MSG_ERROR(libssl headers missing),)
AC_CHECK_LIB([ssl], [main],SSL_LIBS=-lssl, AC_MSG_ERROR(libssl missing))
- if test x$build_unite_utils$build_unit_e$use_tests != xnonono; then
+ if test x$build_unit_e_cli$build_unit_e$use_tests != xnonono; then
AC_CHECK_HEADER([event2/event.h],, AC_MSG_ERROR(libevent headers missing),)
AC_CHECK_LIB([event],[main],EVENT_LIBS=-levent,AC_MSG_ERROR(libevent missing))
if test x$TARGET_OS != xwindows; then
@@ -1108,11 +1150,27 @@ AC_CHECK_DECLS([EVP_MD_CTX_new],,,[AC_INCLUDES_DEFAULT
])
CXXFLAGS="${save_CXXFLAGS}"
+dnl RapidCheck Property Based Testing
+
+enable_property_tests=no
+if test "x$use_rapidcheck" = xauto; then
+ AC_CHECK_HEADERS([rapidcheck.h], [enable_property_tests=yes])
+elif test "x$use_rapidcheck" != xno; then
+ enable_property_tests=yes
+fi
+
+RAPIDCHECK_LIBS=
+if test "x$enable_property_tests" = xyes; then
+ RAPIDCHECK_LIBS=-lrapidcheck
+fi
+AC_SUBST(RAPIDCHECK_LIBS)
+AM_CONDITIONAL([ENABLE_PROPERTY_TESTS], [test x$enable_property_tests = xyes])
+
dnl univalue check
need_bundled_univalue=yes
-if test x$build_unite_utils$build_unit_e$use_tests$use_bench = xnononono; then
+if test x$build_unite_wallet$build_unit_e_cli$build_unit_e_tx$build_unit_e$use_tests$use_bench = xnononononono; then
need_bundled_univalue=no
else
@@ -1160,9 +1218,21 @@ AC_MSG_CHECKING([whether to build unit-e])
AM_CONDITIONAL([BUILD_UNIT_E], [test x$build_unit_e = xyes])
AC_MSG_RESULT($build_unit_e)
-AC_MSG_CHECKING([whether to build utils (unit-e-cli unit-e-tx)])
-AM_CONDITIONAL([BUILD_UNITE_UTILS], [test x$build_unite_utils = xyes])
-AC_MSG_RESULT($build_unite_utils)
+AC_MSG_CHECKING([whether to build unit-e])
+AM_CONDITIONAL([BUILD_UNIT_E], [test x$build_unit_e = xyes])
+AC_MSG_RESULT($build_unit_e)
+
+AC_MSG_CHECKING([whether to build unit-e-cli])
+AM_CONDITIONAL([BUILD_UNITE_CLI], [test x$build_unit_e_cli = xyes])
+AC_MSG_RESULT($build_unit_e_cli)
+
+AC_MSG_CHECKING([whether to build unit-e-tx])
+AM_CONDITIONAL([BUILD_UNITE_TX], [test x$build_unit_e_tx = xyes])
+AC_MSG_RESULT($build_unit_e_tx)
+
+AC_MSG_CHECKING([whether to build unite-wallet])
+AM_CONDITIONAL([BUILD_UNITE_WALLET], [test x$build_unite_wallet = xyes])
+AC_MSG_RESULT($build_unite_wallet)
AC_MSG_CHECKING([whether to build libraries])
AM_CONDITIONAL([BUILD_UNITE_LIBS], [test x$build_unite_libs = xyes])
@@ -1292,7 +1362,7 @@ else
AC_MSG_RESULT([no])
fi
-if test x$build_unite_utils$build_unite_libs$build_unit_e$use_bench$use_tests = xnonononono; then
+if test x$build_unite_wallet$build_unit_e_cli$build_unit_e_tx$build_unite_libs$build_unit_e$use_bench$use_tests = xnonononononono; then
AC_MSG_ERROR([No targets! Please specify at least one of: --with-utils --with-libs --with-daemon --enable-bench or --enable-tests])
fi
@@ -1302,6 +1372,7 @@ AM_CONDITIONAL([TARGET_WINDOWS], [test x$TARGET_OS = xwindows])
AM_CONDITIONAL([ENABLE_USBDEVICE],[test x$enable_usbdevice = xyes])
AM_CONDITIONAL([ENABLE_WALLET],[test x$enable_wallet = xyes])
AM_CONDITIONAL([ENABLE_TESTS],[test x$BUILD_TEST = xyes])
+AM_CONDITIONAL([ENABLE_FUZZ],[test x$enable_fuzz = xyes])
AM_CONDITIONAL([ENABLE_BENCH],[test x$use_bench = xyes])
AM_CONDITIONAL([USE_LCOV],[test x$use_lcov = xyes])
AM_CONDITIONAL([GLIBC_BACK_COMPAT],[test x$use_glibc_compat = xyes])
@@ -1334,6 +1405,7 @@ AC_SUBST(COPYRIGHT_HOLDERS_FINAL, "_COPYRIGHT_HOLDERS_FINAL")
AC_SUBST(UNITE_DAEMON_NAME)
AC_SUBST(UNITE_CLI_NAME)
AC_SUBST(UNITE_TX_NAME)
+AC_SUBST(UNITE_WALLET_TOOL_NAME)
AC_SUBST(RELDFLAGS)
AC_SUBST(DEBUG_CPPFLAGS)
@@ -1436,6 +1508,9 @@ if test x$enable_wallet != xno; then
fi
echo " with zmq = $use_zmq"
echo " with test = $use_tests"
+if test x$use_tests != xno; then
+ echo " with fuzz = $enable_fuzz"
+fi
echo " with bench = $use_bench"
echo " with upnp = $use_upnp"
echo " use asm = $use_asm"
diff --git a/contrib/base58_fixup.py b/contrib/base58_fixup.py
new file mode 100755
index 0000000000..b762d98512
--- /dev/null
+++ b/contrib/base58_fixup.py
@@ -0,0 +1,154 @@
+#!/usr/bin/env python3
+
+"""
+Usage: base58_fixup [-i] [ ...]
+
+Searches the files for strings containing base58-check- and bech32-encoded addresses
+and replaces their prefixes based on the given map.
+"""
+
+import sys
+import base58
+import re
+import codecs
+
+
+base58_prefixes = {
+ b'\x00': b'\x6F',
+ b'\x05': b'\xC4',
+ b'\x80': b'\xEF',
+ b'\x04\x88\xad\xe4': b'\x04\x35\x83\x94',
+ b'\x04\x88\xb2\x1e': b'\x04\x35\x87\xCF',
+}
+
+bech32_hrps = {
+ 'ue': 'tue',
+ 'bcrt': 'uert',
+}
+
+def fixup_base58_prefix(string):
+ base58_old = string
+ bytes_old = base58.b58decode_check(base58_old)
+
+ for k, v in base58_prefixes.items():
+ if bytes_old[0:len(k)] == k:
+ bytes_new = v + bytes_old[len(k):]
+ break
+ else:
+ print('Failed to decode %s' % string, file=sys.stderr)
+ return string
+ return codecs.decode(base58.b58encode_check(bytes_new), 'ascii')
+
+
+def fixup_bech32_prefix(string):
+ bech32_old = string
+ hrp, data = bech32_decode(bech32_old)
+ if not hrp and not data:
+ raise ValueError()
+ if hrp not in bech32_hrps:
+ return string
+ return bech32_encode(bech32_hrps[hrp], data)
+
+
+def fixup_prefix(string):
+ try:
+ return fixup_base58_prefix(string)
+ except ValueError:
+ # Checksum error: not a base58 value
+ pass
+ try:
+ return fixup_bech32_prefix(string)
+ except ValueError:
+ pass
+ return None
+
+
+def process_args():
+ args = sys.argv[1:]
+ in_place = ('-i' in args)
+ infiles = [x for x in args if not x.startswith('-')]
+ return infiles, in_place
+
+
+def main():
+ infiles, in_place = process_args()
+
+ for infile in infiles:
+ with open(infile, 'r') as f:
+ text = f.read()
+
+ replacements = 0
+ for match in list(re.findall('\\b[%s]+\\b' % (str(base58.alphabet) + CHARSET), text)) + \
+ list(re.findall('\\b[%s]+\\b' % (str(base58.alphabet) + CHARSET), text)):
+ replacement = fixup_prefix(match)
+ if replacement:
+ text = text.replace(match, replacement)
+ replacements += 1
+
+ if in_place:
+ with open(infile, 'w') as f:
+ f.write(text)
+ print('Processes %s: made %d replacements.' % (infile, replacements), file=sys.stdout)
+ else:
+ sys.stdout.write(text)
+
+"""Reference implementation for Bech32 and segwit addresses."""
+
+
+CHARSET = "qpzry9x8gf2tvdw0s3jn54khce6mua7l"
+
+
+def bech32_polymod(values):
+ """Internal function that computes the Bech32 checksum."""
+ generator = [0x3b6a57b2, 0x26508e6d, 0x1ea119fa, 0x3d4233dd, 0x2a1462b3]
+ chk = 1
+ for value in values:
+ top = chk >> 25
+ chk = (chk & 0x1ffffff) << 5 ^ value
+ for i in range(5):
+ chk ^= generator[i] if ((top >> i) & 1) else 0
+ return chk
+
+
+def bech32_hrp_expand(hrp):
+ """Expand the HRP into values for checksum computation."""
+ return [ord(x) >> 5 for x in hrp] + [0] + [ord(x) & 31 for x in hrp]
+
+
+def bech32_verify_checksum(hrp, data):
+ """Verify a checksum given HRP and converted data characters."""
+ return bech32_polymod(bech32_hrp_expand(hrp) + data) == 1
+
+
+def bech32_create_checksum(hrp, data):
+ """Compute the checksum values given HRP and data."""
+ values = bech32_hrp_expand(hrp) + data
+ polymod = bech32_polymod(values + [0, 0, 0, 0, 0, 0]) ^ 1
+ return [(polymod >> 5 * (5 - i)) & 31 for i in range(6)]
+
+
+def bech32_encode(hrp, data):
+ """Compute a Bech32 string given HRP and data values."""
+ combined = data + bech32_create_checksum(hrp, data)
+ return hrp + '1' + ''.join([CHARSET[d] for d in combined])
+
+
+def bech32_decode(bech):
+ """Validate a Bech32 string, and determine HRP and data."""
+ if ((any(ord(x) < 33 or ord(x) > 126 for x in bech)) or
+ (bech.lower() != bech and bech.upper() != bech)):
+ return (None, None)
+ bech = bech.lower()
+ pos = bech.rfind('1')
+ if pos < 1 or pos + 7 > len(bech) or len(bech) > 90:
+ return (None, None)
+ if not all(x in CHARSET for x in bech[pos+1:]):
+ return (None, None)
+ hrp = bech[:pos]
+ data = [CHARSET.find(x) for x in bech[pos+1:]]
+ if not bech32_verify_checksum(hrp, data):
+ return (None, None)
+ return (hrp, data[:-6])
+
+if __name__ == '__main__':
+ main()
\ No newline at end of file
diff --git a/contrib/devtools/README.md b/contrib/devtools/README.md
index 87f2d4daa3..81fdb5cbe7 100644
--- a/contrib/devtools/README.md
+++ b/contrib/devtools/README.md
@@ -119,7 +119,25 @@ Configuring the github-merge tool for the unite repository is done in the follow
git config githubmerge.repository dtr-org/unit-e
git config githubmerge.testcmd "make -j4 check" (adapt to whatever you want to use for testing)
- git config --global user.signingkey mykeyid (if you want to GPG sign)
+ git config --global user.signingkey mykeyid
+
+Authentication (optional)
+--------------------------
+
+The API request limit for unauthenticated requests is quite low, but the
+limit for authenticated requests is much higher. If you start running
+into rate limiting errors it can be useful to set an authentication token
+so that the script can authenticate requests.
+
+- First, go to [Personal access tokens](https://github.com/settings/tokens).
+- Click 'Generate new token'.
+- Fill in an arbitrary token description. No further privileges are needed.
+- Click the `Generate token` button at the bottom of the form.
+- Copy the generated token (should be a hexadecimal string)
+
+Then do:
+
+ git config --global user.ghtoken "pasted token"
Create and verify timestamps of merge commits
---------------------------------------------
diff --git a/contrib/devtools/clang-format-diff.py b/contrib/devtools/clang-format-diff.py
index 77e845a9b4..f322b3a880 100755
--- a/contrib/devtools/clang-format-diff.py
+++ b/contrib/devtools/clang-format-diff.py
@@ -109,7 +109,7 @@ def main():
match = re.search('^\+\+\+\ (.*?/){%s}(\S*)' % args.p, line)
if match:
filename = match.group(2)
- if filename == None:
+ if filename is None:
continue
if args.regex is not None:
diff --git a/contrib/devtools/gen-manpages.sh b/contrib/devtools/gen-manpages.sh
index c91c1b11ce..bff270fea0 100755
--- a/contrib/devtools/gen-manpages.sh
+++ b/contrib/devtools/gen-manpages.sh
@@ -7,9 +7,10 @@ BUILDDIR=${BUILDDIR:-$TOPDIR}
BINDIR=${BINDIR:-$BUILDDIR/src}
MANDIR=${MANDIR:-$TOPDIR/doc/man}
-UNIT_E=${UNIT_E:-$SRCDIR/unit-e}
-UNIT_E_CLI=${UNIT_E_CLI:-$SRCDIR/unit-e-cli}
-UNIT_E_TX=${UNIT_E_TX:-$SRCDIR/unit-e-tx}
+UNIT_E=${UNIT_E:-$BINDIR/unit-e}
+UNIT_E_CLI=${UNIT_E_CLI:-$BINDIR/unit-e-cli}
+UNIT_E_TX=${UNIT_E_TX:-$BINDIR/unit-e-tx}
+WALLET_TOOL=${WALLET_TOOL:-$BINDIR/unite-wallet}
[ ! -x $UNIT_E ] && echo "$UNIT_E not found or not executable." && exit 1
@@ -22,7 +23,7 @@ BTCVER=($($UNIT_E_CLI --version | head -n1 | awk -F'[ -]' '{ print $6, $7 }'))
echo "[COPYRIGHT]" > footer.h2m
$UNIT_E --version | sed -n '1!p' >> footer.h2m
-for cmd in $UNIT_E $UNIT_E_CLI $UNIT_E_TX; do
+for cmd in $UNIT_E $UNIT_E_CLI $UNIT_E_TX $WALLET_TOOL; do
cmdname="${cmd##*/}"
help2man -N --version-string=${BTCVER[0]} --include=footer.h2m -o ${MANDIR}/${cmdname}.1 ${cmd}
sed -i'.orig' -e "s/\\\-${BTCVER[1]}//g" ${MANDIR}/${cmdname}.1
diff --git a/contrib/devtools/github-merge.py b/contrib/devtools/github-merge.py
index 8700003bae..165d7ebc13 100755
--- a/contrib/devtools/github-merge.py
+++ b/contrib/devtools/github-merge.py
@@ -14,7 +14,6 @@
# In case of a clean merge that is accepted by the user, the local branch with
# name $BRANCH is overwritten with the merged result, and optionally pushed.
-from __future__ import division,print_function,unicode_literals
import os
from sys import stdin,stdout,stderr
import argparse
@@ -23,10 +22,8 @@
import sys
import json
import codecs
-try:
- from urllib.request import Request,urlopen
-except:
- from urllib2 import Request,urlopen
+from urllib.request import Request, urlopen
+from urllib.error import HTTPError
# External tools (can be overridden using environment)
GIT = os.getenv('GIT','git')
@@ -50,17 +47,24 @@ def git_config_get(option, default=None):
except subprocess.CalledProcessError:
return default
-def retrieve_pr_info(repo,pull):
+def retrieve_pr_info(repo,pull,ghtoken):
'''
Retrieve pull request information from github.
Return None if no title can be found, or an error happens.
'''
try:
req = Request("https://api.github.com/repos/"+repo+"/pulls/"+pull)
+ if ghtoken is not None:
+ req.add_header('Authorization', 'token ' + ghtoken)
result = urlopen(req)
reader = codecs.getreader('utf-8')
obj = json.load(reader(result))
return obj
+ except HTTPError as e:
+ error_message = e.read()
+ print('Warning: unable to retrieve pull information from github: %s' % e)
+ print('Detailed error: %s' % error_message)
+ return None
except Exception as e:
print('Warning: unable to retrieve pull information from github: %s' % e)
return None
@@ -138,6 +142,7 @@ def parse_arguments():
In addition, you can set the following git configuration variables:
githubmerge.repository (mandatory),
user.signingkey (mandatory),
+ user.ghtoken (default: none).
githubmerge.host (default: git@github.com),
githubmerge.branch (no default),
githubmerge.testcmd (default: none).
@@ -156,6 +161,7 @@ def main():
host = git_config_get('githubmerge.host','git@github.com')
opt_branch = git_config_get('githubmerge.branch',None)
testcmd = git_config_get('githubmerge.testcmd')
+ ghtoken = git_config_get('user.ghtoken')
signingkey = git_config_get('user.signingkey')
if repo is None:
print("ERROR: No repository configured. Use this command to set:", file=stderr)
@@ -166,14 +172,17 @@ def main():
print("git config --global user.signingkey ",file=stderr)
sys.exit(1)
- host_repo = host+":"+repo # shortcut for push/pull target
+ if host.startswith(('https:','http:')):
+ host_repo = host+"/"+repo+".git"
+ else:
+ host_repo = host+":"+repo
# Extract settings from command line
args = parse_arguments()
pull = str(args.pull[0])
# Receive pull information from github
- info = retrieve_pr_info(repo,pull)
+ info = retrieve_pr_info(repo,pull,ghtoken)
if info is None:
sys.exit(1)
title = info['title'].strip()
diff --git a/contrib/devtools/security-check.py b/contrib/devtools/security-check.py
index c417e4f8ea..e17f526818 100755
--- a/contrib/devtools/security-check.py
+++ b/contrib/devtools/security-check.py
@@ -86,7 +86,7 @@ def check_ELF_RELRO(executable):
# This does not affect security: the permission flags of the GNU_RELRO program header are ignored, the PT_LOAD header determines the effective permissions.
# However, the dynamic linker need to write to this area so these are RW.
# Glibc itself takes care of mprotecting this area R after relocations are finished.
- # See also http://permalink.gmane.org/gmane.comp.gnu.binutils/71347
+ # See also https://marc.info/?l=binutils&m=1498883354122353
if typ == 'GNU_RELRO':
have_gnu_relro = True
diff --git a/contrib/devtools/split-debug.sh.in b/contrib/devtools/split-debug.sh.in
index deda49cc54..92b72b1446 100644
--- a/contrib/devtools/split-debug.sh.in
+++ b/contrib/devtools/split-debug.sh.in
@@ -1,5 +1,5 @@
#!/bin/sh
-
+set -e
if [ $# -ne 3 ];
then echo "usage: $0 "
fi
diff --git a/contrib/devtools/symbol-check.py b/contrib/devtools/symbol-check.py
index 829211e55a..ea5d7c6433 100755
--- a/contrib/devtools/symbol-check.py
+++ b/contrib/devtools/symbol-check.py
@@ -36,17 +36,18 @@
# (glibc) GLIBC_2_19
#
MAX_VERSIONS = {
-'GCC': (4,8,0),
-'CXXABI': (1,3,7),
-'GLIBCXX': (3,4,18),
-'GLIBC': (2,19)
+'GCC': (4,8,0),
+'CXXABI': (1,3,7),
+'GLIBCXX': (3,4,18),
+'GLIBC': (2,19),
+'LIBATOMIC': (1,0)
}
# See here for a description of _IO_stdin_used:
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=634261#109
# Ignore symbols that are exported as part of every executable
IGNORE_EXPORTS = {
-'_edata', '_end', '_init', '__bss_start', '_fini', '_IO_stdin_used', 'stdin', 'stdout', 'stderr'
+'_edata', '_end', '__end__', '_init', '__bss_start', '__bss_start__', '_bss_end__', '__bss_end__', '_fini', '_IO_stdin_used', 'stdin', 'stdout', 'stderr'
}
READELF_CMD = os.getenv('READELF', '/usr/bin/readelf')
CPPFILT_CMD = os.getenv('CPPFILT', '/usr/bin/c++filt')
@@ -59,10 +60,17 @@
'libanl.so.1', # DNS resolve
'libm.so.6', # math library
'librt.so.1', # real-time (clock)
+'libatomic.so.1',
'ld-linux-x86-64.so.2', # 64-bit dynamic linker
'ld-linux.so.2', # 32-bit dynamic linker
}
-
+ARCH_MIN_GLIBC_VER = {
+'80386': (2,1),
+'X86-64': (2,2,5),
+'ARM': (2,4),
+'AArch64':(2,17),
+'RISC-V': (2,27)
+}
class CPPFilt(object):
'''
Demangle C++ symbol names.
@@ -87,23 +95,25 @@ def read_symbols(executable, imports=True):
Parse an ELF executable and return a list of (symbol,version) tuples
for dynamic, imported symbols.
'''
- p = subprocess.Popen([READELF_CMD, '--dyn-syms', '-W', executable], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE, universal_newlines=True)
+ p = subprocess.Popen([READELF_CMD, '--dyn-syms', '-W', '-h', executable], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE, universal_newlines=True)
(stdout, stderr) = p.communicate()
if p.returncode:
raise IOError('Could not read symbols for %s: %s' % (executable, stderr.strip()))
syms = []
for line in stdout.splitlines():
line = line.split()
+ if 'Machine:' in line:
+ arch = line[-1]
if len(line)>7 and re.match('[0-9]+:$', line[0]):
(sym, _, version) = line[7].partition('@')
is_import = line[6] == 'UND'
if version.startswith('@'):
version = version[1:]
if is_import == imports:
- syms.append((sym, version))
+ syms.append((sym, version, arch))
return syms
-def check_version(max_versions, version):
+def check_version(max_versions, version, arch):
if '_' in version:
(lib, _, ver) = version.rpartition('_')
else:
@@ -112,7 +122,7 @@ def check_version(max_versions, version):
ver = tuple([int(x) for x in ver.split('.')])
if not lib in max_versions:
return False
- return ver <= max_versions[lib]
+ return ver <= max_versions[lib] or lib == 'GLIBC' and ver <= ARCH_MIN_GLIBC_VER[arch]
def read_libraries(filename):
p = subprocess.Popen([READELF_CMD, '-d', '-W', filename], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE, universal_newlines=True)
@@ -135,16 +145,17 @@ def read_libraries(filename):
retval = 0
for filename in sys.argv[1:]:
# Check imported symbols
- for sym,version in read_symbols(filename, True):
- if version and not check_version(MAX_VERSIONS, version):
+ for sym,version,arch in read_symbols(filename, True):
+ if version and not check_version(MAX_VERSIONS, version, arch):
print('%s: symbol %s from unsupported version %s' % (filename, cppfilt(sym), version))
retval = 1
# Check exported symbols
- for sym,version in read_symbols(filename, False):
- if sym in IGNORE_EXPORTS:
- continue
- print('%s: export of symbol %s not allowed' % (filename, cppfilt(sym)))
- retval = 1
+ if arch != 'RISC-V':
+ for sym,version,arch in read_symbols(filename, False):
+ if sym in IGNORE_EXPORTS:
+ continue
+ print('%s: export of symbol %s not allowed' % (filename, cppfilt(sym)))
+ retval = 1
# Check dependency libraries
for library_name in read_libraries(filename):
if library_name not in ALLOWED_LIBRARIES:
diff --git a/contrib/devtools/update-translations.py b/contrib/devtools/update-translations.py
index 617c83497c..9bb62aa5cd 100755
--- a/contrib/devtools/update-translations.py
+++ b/contrib/devtools/update-translations.py
@@ -125,7 +125,7 @@ def escape_cdata(text):
return text
def contains_unite_addr(text, errors):
- if text != None and ADDRESS_REGEXP.search(text) != None:
+ if text is not None and ADDRESS_REGEXP.search(text) is not None:
errors.append('Translation "%s" contains a Unit-e address. This will be removed.' % (text))
return True
return False
diff --git a/contrib/gitian-descriptors/gitian-linux.yml b/contrib/gitian-descriptors/gitian-linux.yml
index 7e273e4a22..f40c6ff8ef 100644
--- a/contrib/gitian-descriptors/gitian-linux.yml
+++ b/contrib/gitian-descriptors/gitian-linux.yml
@@ -8,15 +8,19 @@ architectures:
packages:
- "curl"
- "g++-aarch64-linux-gnu"
-- "g++-7-aarch64-linux-gnu"
-- "gcc-7-aarch64-linux-gnu"
+- "g++-8-aarch64-linux-gnu"
+- "gcc-8-aarch64-linux-gnu"
- "binutils-aarch64-linux-gnu"
- "g++-arm-linux-gnueabihf"
-- "g++-7-arm-linux-gnueabihf"
-- "gcc-7-arm-linux-gnueabihf"
+- "g++-8-arm-linux-gnueabihf"
+- "gcc-8-arm-linux-gnueabihf"
- "binutils-arm-linux-gnueabihf"
-- "g++-7-multilib"
-- "gcc-7-multilib"
+- "g++-riscv64-linux-gnu"
+- "g++-8-riscv64-linux-gnu"
+- "gcc-8-riscv64-linux-gnu"
+- "binutils-riscv64-linux-gnu"
+- "g++-8-multilib"
+- "gcc-8-multilib"
- "binutils-gold"
- "git"
- "pkg-config"
@@ -32,6 +36,7 @@ remotes:
"dir": "unit-e"
files: []
script: |
+ set -e -o pipefail
WRAP_DIR=$HOME/wrapped
HOSTS="i686-pc-linux-gnu x86_64-linux-gnu arm-linux-gnueabihf aarch64-linux-gnu"
@@ -70,12 +75,15 @@ script: |
function create_per-host_faketime_wrappers {
for i in $HOSTS; do
for prog in ${FAKETIME_HOST_PROGS}; do
- echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${i}-${prog}
- echo "REAL=\`which -a ${i}-${prog} | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
- echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
- echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog}
- echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog}
- chmod +x ${WRAP_DIR}/${i}-${prog}
+ if which ${i}-${prog}-8
+ then
+ echo '#!/usr/bin/env bash' > ${WRAP_DIR}/${i}-${prog}
+ echo "REAL=\`which -a ${i}-${prog}-8 | grep -v ${WRAP_DIR}/${i}-${prog} | head -1\`" >> ${WRAP_DIR}/${i}-${prog}
+ echo 'export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/faketime/libfaketime.so.1' >> ${WRAP_DIR}/${i}-${prog}
+ echo "export FAKETIME=\"$1\"" >> ${WRAP_DIR}/${i}-${prog}
+ echo "\$REAL \$@" >> $WRAP_DIR/${i}-${prog}
+ chmod +x ${WRAP_DIR}/${i}-${prog}
+ fi
done
done
}
@@ -101,7 +109,7 @@ script: |
rm -f ${WRAP_DIR}/${prog}
cat << EOF > ${WRAP_DIR}/${prog}
#!/usr/bin/env bash
- REAL="`which -a ${prog} | grep -v ${WRAP_DIR}/${prog} | head -1`"
+ REAL="`which -a ${prog}-8 | grep -v ${WRAP_DIR}/${prog} | head -1`"
for var in "\$@"
do
if [ "\$var" = "-m32" ]; then
@@ -167,24 +175,15 @@ script: |
CONFIG_SITE=${BASEPREFIX}/${i}/share/config.site ./configure --prefix=/ --disable-ccache --disable-maintainer-mode --disable-dependency-tracking ${CONFIGFLAGS} CFLAGS="${HOST_CFLAGS}" CXXFLAGS="${HOST_CXXFLAGS}" LDFLAGS="${HOST_LDFLAGS}"
make ${MAKEOPTS}
make ${MAKEOPTS} -C src check-security
-
- #TODO: This is a quick hack that disables symbol checking for arm.
- # Instead, we should investigate why these are popping up.
- # For aarch64, we'll need to bump up the min GLIBC version, as the abi
- # support wasn't introduced until 2.17.
- case $i in
- aarch64-*) : ;;
- arm-*) : ;;
- *) make ${MAKEOPTS} -C src check-symbols ;;
- esac
-
+ make ${MAKEOPTS} -C src check-symbols
make install DESTDIR=${INSTALLPATH}
cd installed
find . -name "lib*.la" -delete
find . -name "lib*.a" -delete
rm -rf ${DISTNAME}/lib/pkgconfig
- find ${DISTNAME}/bin -type f -executable -exec ../contrib/devtools/split-debug.sh {} {} {}.dbg \;
- find ${DISTNAME}/lib -type f -exec ../contrib/devtools/split-debug.sh {} {} {}.dbg \;
+ find ${DISTNAME}/bin -type f -executable -print0 | xargs -0 -n1 -I{} ../contrib/devtools/split-debug.sh {} {} {}.dbg
+ find ${DISTNAME}/lib -type f -print0 | xargs -0 -n1 -I{} ../contrib/devtools/split-debug.sh {} {} {}.dbg
+ cp ../doc/README.md ${DISTNAME}/
find ${DISTNAME} -not -name "*.dbg" | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-${i}.tar.gz
find ${DISTNAME} -name "*.dbg" | sort | tar --no-recursion --mode='u+rw,go+r-w,a+X' --owner=0 --group=0 -c -T - | gzip -9n > ${OUTDIR}/${DISTNAME}-${i}-debug.tar.gz
cd ../../
diff --git a/contrib/gitian-descriptors/gitian-osx.yml b/contrib/gitian-descriptors/gitian-osx.yml
index 28718b8911..01cfd9fb1c 100644
--- a/contrib/gitian-descriptors/gitian-osx.yml
+++ b/contrib/gitian-descriptors/gitian-osx.yml
@@ -33,6 +33,8 @@ remotes:
files:
- "MacOSX10.11.sdk.tar.gz"
script: |
+ set -e -o pipefail
+
WRAP_DIR=$HOME/wrapped
HOSTS="x86_64-apple-darwin14"
CONFIGFLAGS="--enable-reduce-exports --disable-bench GENISOIMAGE=$WRAP_DIR/genisoimage"
diff --git a/contrib/gitian-descriptors/gitian-win-signer.yml b/contrib/gitian-descriptors/gitian-win-signer.yml
index 72d735ada5..15f678cf83 100644
--- a/contrib/gitian-descriptors/gitian-win-signer.yml
+++ b/contrib/gitian-descriptors/gitian-win-signer.yml
@@ -17,6 +17,8 @@ files:
- "unit-e-win-unsigned.tar.gz"
- "unit-e-win-signatures.tar.gz"
script: |
+ set -e -o pipefail
+
BUILD_DIR=`pwd`
SIGDIR=${BUILD_DIR}/signature/win
UNSIGNED_DIR=${BUILD_DIR}/unsigned
diff --git a/contrib/gitian-descriptors/gitian-win.yml b/contrib/gitian-descriptors/gitian-win.yml
index 7b38ca6703..af6ed2a8f5 100644
--- a/contrib/gitian-descriptors/gitian-win.yml
+++ b/contrib/gitian-descriptors/gitian-win.yml
@@ -27,6 +27,8 @@ remotes:
"dir": "unit-e"
files: []
script: |
+ set -e -o pipefail
+
WRAP_DIR=$HOME/wrapped
HOSTS="i686-w64-mingw32 x86_64-w64-mingw32"
CONFIGFLAGS="--enable-reduce-exports --disable-bench"
diff --git a/contrib/init/unit-e.init b/contrib/init/unit-e.init
deleted file mode 100644
index 5ca38c3222..0000000000
--- a/contrib/init/unit-e.init
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/bin/bash
-#
-# unit-e The unit-e server.
-#
-#
-# chkconfig: 345 80 20
-# description: unit-e
-# processname: unit-e
-#
-
-# Source function library.
-. /etc/init.d/functions
-
-# you can override defaults in /etc/sysconfig/unit-e, see below
-if [ -f /etc/sysconfig/unit-e ]; then
- . /etc/sysconfig/unit-e
-fi
-
-RETVAL=0
-
-prog=unit-e
-# you can override the lockfile via UNIT_E_LOCKFILE in /etc/sysconfig/unit-e
-lockfile=${UNIT_E_LOCKFILE-/var/lock/subsys/unit-e}
-
-# unit-e defaults to /usr/bin/unit-e, override with UNIT_E_BIN
-unit-e=${UNIT_E_BIN-/usr/bin/unit-e}
-
-# unit-e opts default to -disablewallet, override with UNIT_E_OPTS
-unit_e_opts=${UNIT_E_OPTS--disablewallet}
-
-start() {
- echo -n $"Starting $prog: "
- daemon $DAEMONOPTS $unit-e $unit_e_opts
- RETVAL=$?
- echo
- [ $RETVAL -eq 0 ] && touch $lockfile
- return $RETVAL
-}
-
-stop() {
- echo -n $"Stopping $prog: "
- killproc $prog
- RETVAL=$?
- echo
- [ $RETVAL -eq 0 ] && rm -f $lockfile
- return $RETVAL
-}
-
-case "$1" in
- start)
- start
- ;;
- stop)
- stop
- ;;
- status)
- status $prog
- ;;
- restart)
- stop
- start
- ;;
- *)
- echo "Usage: service $prog {start|stop|status|restart}"
- exit 1
- ;;
-esac
diff --git a/contrib/init/unit-e.service b/contrib/init/unit-e.service
deleted file mode 100644
index eb6698ee3d..0000000000
--- a/contrib/init/unit-e.service
+++ /dev/null
@@ -1,25 +0,0 @@
-# It is not recommended to modify this file in-place, because it will
-# be overwritten during package upgrades. If you want to add further
-# options or overwrite existing ones then use
-# $ systemctl edit unit-e.service
-# See "man systemd.service" for details.
-
-# Note that almost all daemon options could be specified in
-# /etc/unite/unit-e.conf
-
-[Unit]
-Description=Unit-e daemon
-After=network.target
-
-[Service]
-ExecStart=/usr/bin/unit-e -daemon -conf=/etc/unite/unit-e.conf -pid=/run/unit-e/unit-e.pid
-# Creates /run/unit-e owned by unite
-RuntimeDirectory=unit-e
-User=unite
-Type=forking
-PIDFile=/run/unit-e/unit-e.pid
-Restart=on-failure
-PrivateTmp=true
-
-[Install]
-WantedBy=multi-user.target
diff --git a/contrib/install_db4.sh b/contrib/install_db4.sh
index c36cd80b9f..7f4c222e69 100755
--- a/contrib/install_db4.sh
+++ b/contrib/install_db4.sh
@@ -6,7 +6,7 @@ export LC_ALL=C
set -e
if [ -z "${1}" ]; then
- echo "Usage: ./install_db4.sh [ ...]"
+ echo "Usage: $0 [ ...]"
echo
echo "Must specify a single argument: the directory in which db4 will be built."
echo "This is probably \`pwd\` if you're at the root of the unite repository."
@@ -51,7 +51,7 @@ http_get() {
if [ -f "${2}" ]; then
echo "File ${2} already exists; not downloading again"
elif check_exists curl; then
- curl --insecure "${1}" -o "${2}"
+ curl --insecure --retry 5 "${1}" -o "${2}"
else
wget --no-check-certificate "${1}" -O "${2}"
fi
diff --git a/contrib/linearize/linearize-data.py b/contrib/linearize/linearize-data.py
index b6ead4a166..56c1fbfc92 100755
--- a/contrib/linearize/linearize-data.py
+++ b/contrib/linearize/linearize-data.py
@@ -7,7 +7,6 @@
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
-from __future__ import print_function, division
import struct
import re
import os
diff --git a/contrib/linearize/linearize-hashes.py b/contrib/linearize/linearize-hashes.py
index d9d366f97b..689aa92a5d 100755
--- a/contrib/linearize/linearize-hashes.py
+++ b/contrib/linearize/linearize-hashes.py
@@ -7,11 +7,7 @@
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
-from __future__ import print_function
-try: # Python 3
- import http.client as httplib
-except ImportError: # Python 2
- import httplib
+from http.client import HTTPConnection
import json
import re
import base64
@@ -31,7 +27,7 @@ def __init__(self, host, port, username, password):
authpair = "%s:%s" % (username, password)
authpair = authpair.encode('utf-8')
self.authhdr = b"Basic " + base64.b64encode(authpair)
- self.conn = httplib.HTTPConnection(host, port=port, timeout=30)
+ self.conn = HTTPConnection(host, port=port, timeout=30)
def execute(self, obj):
try:
diff --git a/contrib/qos/tc.sh b/contrib/qos/tc.sh
index 2afbac2553..f3ebce5a7b 100644
--- a/contrib/qos/tc.sh
+++ b/contrib/qos/tc.sh
@@ -1,4 +1,5 @@
#!/usr/bin/env bash
+#
# Copyright (c) 2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
diff --git a/contrib/testgen/README.md b/contrib/testgen/README.md
index d9f54ab871..732088626c 100644
--- a/contrib/testgen/README.md
+++ b/contrib/testgen/README.md
@@ -4,6 +4,5 @@ Utilities to generate test vectors for the data-driven Unit-e tests.
Usage:
- gen_base58_test_vectors.py valid 50 > ../../src/test/data/base58_keys_valid.json
- gen_base58_test_vectors.py invalid 50 > ../../src/test/data/base58_keys_invalid.json
-
+ PYTHONPATH=../../test/functional/test_framework ./gen_key_io_test_vectors.py valid 50 > ../../src/test/data/key_io_keys_valid.json
+ PYTHONPATH=../../test/functional/test_framework ./gen_key_io_test_vectors.py invalid 50 > ../../src/test/data/key_io_keys_invalid.json
diff --git a/contrib/testgen/gen_base58_test_vectors.py b/contrib/testgen/gen_base58_test_vectors.py
deleted file mode 100755
index c76de5ce75..0000000000
--- a/contrib/testgen/gen_base58_test_vectors.py
+++ /dev/null
@@ -1,132 +0,0 @@
-#!/usr/bin/env python3
-# Copyright (c) 2012-2018 The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or http://www.opensource.org/licenses/mit-license.php.
-'''
-Generate valid and invalid base58 address and private key test vectors.
-
-Usage:
- gen_base58_test_vectors.py valid 50 > ../../src/test/data/base58_keys_valid.json
- gen_base58_test_vectors.py invalid 50 > ../../src/test/data/base58_keys_invalid.json
-'''
-# 2012 Wladimir J. van der Laan
-# Released under MIT License
-import os
-from itertools import islice
-from base58 import b58encode_chk, b58decode_chk, b58chars
-import random
-from binascii import b2a_hex
-
-# key types
-PUBKEY_ADDRESS = 0
-SCRIPT_ADDRESS = 5
-PUBKEY_ADDRESS_TEST = 111
-SCRIPT_ADDRESS_TEST = 196
-PRIVKEY = 128
-PRIVKEY_TEST = 239
-
-metadata_keys = ['isPrivkey', 'isTestnet', 'addrType', 'isCompressed']
-# templates for valid sequences
-templates = [
- # prefix, payload_size, suffix, metadata
- # None = N/A
- ((PUBKEY_ADDRESS,), 20, (), (False, False, 'pubkey', None)),
- ((SCRIPT_ADDRESS,), 20, (), (False, False, 'script', None)),
- ((PUBKEY_ADDRESS_TEST,), 20, (), (False, True, 'pubkey', None)),
- ((SCRIPT_ADDRESS_TEST,), 20, (), (False, True, 'script', None)),
- ((PRIVKEY,), 32, (), (True, False, None, False)),
- ((PRIVKEY,), 32, (1,), (True, False, None, True)),
- ((PRIVKEY_TEST,), 32, (), (True, True, None, False)),
- ((PRIVKEY_TEST,), 32, (1,), (True, True, None, True))
-]
-
-def is_valid(v):
- '''Check vector v for validity'''
- result = b58decode_chk(v)
- if result is None:
- return False
- for template in templates:
- prefix = bytearray(template[0])
- suffix = bytearray(template[2])
- if result.startswith(prefix) and result.endswith(suffix):
- if (len(result) - len(prefix) - len(suffix)) == template[1]:
- return True
- return False
-
-def gen_valid_vectors():
- '''Generate valid test vectors'''
- while True:
- for template in templates:
- prefix = bytearray(template[0])
- payload = bytearray(os.urandom(template[1]))
- suffix = bytearray(template[2])
- rv = b58encode_chk(prefix + payload + suffix)
- assert is_valid(rv)
- metadata = {x: y for x, y in zip(metadata_keys,template[3]) if y is not None}
- hexrepr = b2a_hex(payload)
- if isinstance(hexrepr, bytes):
- hexrepr = hexrepr.decode('utf8')
- yield (rv, hexrepr, metadata)
-
-def gen_invalid_vector(template, corrupt_prefix, randomize_payload_size, corrupt_suffix):
- '''Generate possibly invalid vector'''
- if corrupt_prefix:
- prefix = os.urandom(1)
- else:
- prefix = bytearray(template[0])
-
- if randomize_payload_size:
- payload = os.urandom(max(int(random.expovariate(0.5)), 50))
- else:
- payload = os.urandom(template[1])
-
- if corrupt_suffix:
- suffix = os.urandom(len(template[2]))
- else:
- suffix = bytearray(template[2])
-
- return b58encode_chk(prefix + payload + suffix)
-
-def randbool(p = 0.5):
- '''Return True with P(p)'''
- return random.random() < p
-
-def gen_invalid_vectors():
- '''Generate invalid test vectors'''
- # start with some manual edge-cases
- yield "",
- yield "x",
- while True:
- # kinds of invalid vectors:
- # invalid prefix
- # invalid payload length
- # invalid (randomized) suffix (add random data)
- # corrupt checksum
- for template in templates:
- val = gen_invalid_vector(template, randbool(0.2), randbool(0.2), randbool(0.2))
- if random.randint(0,10)<1: # line corruption
- if randbool(): # add random character to end
- val += random.choice(b58chars)
- else: # replace random character in the middle
- n = random.randint(0, len(val))
- val = val[0:n] + random.choice(b58chars) + val[n+1:]
- if not is_valid(val):
- yield val,
-
-if __name__ == '__main__':
- import sys
- import json
- iters = {'valid':gen_valid_vectors, 'invalid':gen_invalid_vectors}
- try:
- uiter = iters[sys.argv[1]]
- except IndexError:
- uiter = gen_valid_vectors
- try:
- count = int(sys.argv[2])
- except IndexError:
- count = 0
-
- data = list(islice(uiter(), count))
- json.dump(data, sys.stdout, sort_keys=True, indent=4)
- sys.stdout.write('\n')
-
diff --git a/contrib/testgen/gen_key_io_test_vectors.py b/contrib/testgen/gen_key_io_test_vectors.py
new file mode 100755
index 0000000000..a00acb1f41
--- /dev/null
+++ b/contrib/testgen/gen_key_io_test_vectors.py
@@ -0,0 +1,249 @@
+#!/usr/bin/env python3
+# Copyright (c) 2012-2018 The Bitcoin Core developers
+# Distributed under the MIT software license, see the accompanying
+# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+'''
+Generate valid and invalid base58 address and private key test vectors.
+
+Usage:
+ PYTHONPATH=../../test/functional/test_framework ./gen_key_io_test_vectors.py valid 50 > ../../src/test/data/key_io_valid.json
+ PYTHONPATH=../../test/functional/test_framework ./gen_key_io_test_vectors.py invalid 50 > ../../src/test/data/key_io_invalid.json
+'''
+# 2012 Wladimir J. van der Laan
+# Released under MIT License
+import os
+from itertools import islice
+from base58 import b58encode_chk, b58decode_chk, b58chars
+import random
+from binascii import b2a_hex
+from segwit_addr import bech32_encode, decode, convertbits, CHARSET
+
+# key types
+PUBKEY_ADDRESS = 0
+SCRIPT_ADDRESS = 5
+PUBKEY_ADDRESS_TEST = 111
+SCRIPT_ADDRESS_TEST = 196
+PUBKEY_ADDRESS_REGTEST = 111
+SCRIPT_ADDRESS_REGTEST = 196
+PRIVKEY = 128
+PRIVKEY_TEST = 239
+PRIVKEY_REGTEST = 239
+
+# script
+OP_0 = 0x00
+OP_1 = 0x51
+OP_2 = 0x52
+OP_16 = 0x60
+OP_DUP = 0x76
+OP_EQUAL = 0x87
+OP_EQUALVERIFY = 0x88
+OP_HASH160 = 0xa9
+OP_CHECKSIG = 0xac
+pubkey_prefix = (OP_DUP, OP_HASH160, 20)
+pubkey_suffix = (OP_EQUALVERIFY, OP_CHECKSIG)
+script_prefix = (OP_HASH160, 20)
+script_suffix = (OP_EQUAL,)
+p2wpkh_prefix = (OP_0, 20)
+p2wsh_prefix = (OP_0, 32)
+
+metadata_keys = ['isPrivkey', 'chain', 'isCompressed', 'tryCaseFlip']
+# templates for valid sequences
+templates = [
+ # prefix, payload_size, suffix, metadata, output_prefix, output_suffix
+ # None = N/A
+ ((PUBKEY_ADDRESS,), 20, (), (False, 'main', None, None), pubkey_prefix, pubkey_suffix),
+ ((SCRIPT_ADDRESS,), 20, (), (False, 'main', None, None), script_prefix, script_suffix),
+ ((PUBKEY_ADDRESS_TEST,), 20, (), (False, 'test', None, None), pubkey_prefix, pubkey_suffix),
+ ((SCRIPT_ADDRESS_TEST,), 20, (), (False, 'test', None, None), script_prefix, script_suffix),
+ ((PUBKEY_ADDRESS_REGTEST,), 20, (), (False, 'regtest', None, None), pubkey_prefix, pubkey_suffix),
+ ((SCRIPT_ADDRESS_REGTEST,), 20, (), (False, 'regtest', None, None), script_prefix, script_suffix),
+ ((PRIVKEY,), 32, (), (True, 'main', False, None), (), ()),
+ ((PRIVKEY,), 32, (1,), (True, 'main', True, None), (), ()),
+ ((PRIVKEY_TEST,), 32, (), (True, 'test', False, None), (), ()),
+ ((PRIVKEY_TEST,), 32, (1,), (True, 'test', True, None), (), ()),
+ ((PRIVKEY_REGTEST,), 32, (), (True, 'regtest', False, None), (), ()),
+ ((PRIVKEY_REGTEST,), 32, (1,), (True, 'regtest', True, None), (), ())
+]
+# templates for valid bech32 sequences
+bech32_templates = [
+ # hrp, version, witprog_size, metadata, output_prefix
+ ('bc', 0, 20, (False, 'main', None, True), p2wpkh_prefix),
+ ('bc', 0, 32, (False, 'main', None, True), p2wsh_prefix),
+ ('bc', 1, 2, (False, 'main', None, True), (OP_1, 2)),
+ ('tb', 0, 20, (False, 'test', None, True), p2wpkh_prefix),
+ ('tb', 0, 32, (False, 'test', None, True), p2wsh_prefix),
+ ('tb', 2, 16, (False, 'test', None, True), (OP_2, 16)),
+ ('bcrt', 0, 20, (False, 'regtest', None, True), p2wpkh_prefix),
+ ('bcrt', 0, 32, (False, 'regtest', None, True), p2wsh_prefix),
+ ('bcrt', 16, 40, (False, 'regtest', None, True), (OP_16, 40))
+]
+# templates for invalid bech32 sequences
+bech32_ng_templates = [
+ # hrp, version, witprog_size, invalid_bech32, invalid_checksum, invalid_char
+ ('tc', 0, 20, False, False, False),
+ ('tb', 17, 32, False, False, False),
+ ('bcrt', 3, 1, False, False, False),
+ ('bc', 15, 41, False, False, False),
+ ('tb', 0, 16, False, False, False),
+ ('bcrt', 0, 32, True, False, False),
+ ('bc', 0, 16, True, False, False),
+ ('tb', 0, 32, False, True, False),
+ ('bcrt', 0, 20, False, False, True)
+]
+
+def is_valid(v):
+ '''Check vector v for validity'''
+ if len(set(v) - set(b58chars)) > 0:
+ return is_valid_bech32(v)
+ result = b58decode_chk(v)
+ if result is None:
+ return is_valid_bech32(v)
+ for template in templates:
+ prefix = bytearray(template[0])
+ suffix = bytearray(template[2])
+ if result.startswith(prefix) and result.endswith(suffix):
+ if (len(result) - len(prefix) - len(suffix)) == template[1]:
+ return True
+ return is_valid_bech32(v)
+
+def is_valid_bech32(v):
+ '''Check vector v for bech32 validity'''
+ for hrp in ['bc', 'tb', 'bcrt']:
+ if decode(hrp, v) != (None, None):
+ return True
+ return False
+
+def gen_valid_base58_vector(template):
+ '''Generate valid base58 vector'''
+ prefix = bytearray(template[0])
+ payload = bytearray(os.urandom(template[1]))
+ suffix = bytearray(template[2])
+ dst_prefix = bytearray(template[4])
+ dst_suffix = bytearray(template[5])
+ rv = b58encode_chk(prefix + payload + suffix)
+ return rv, dst_prefix + payload + dst_suffix
+
+def gen_valid_bech32_vector(template):
+ '''Generate valid bech32 vector'''
+ hrp = template[0]
+ witver = template[1]
+ witprog = bytearray(os.urandom(template[2]))
+ dst_prefix = bytearray(template[4])
+ rv = bech32_encode(hrp, [witver] + convertbits(witprog, 8, 5))
+ return rv, dst_prefix + witprog
+
+def gen_valid_vectors():
+ '''Generate valid test vectors'''
+ glist = [gen_valid_base58_vector, gen_valid_bech32_vector]
+ tlist = [templates, bech32_templates]
+ while True:
+ for template, valid_vector_generator in [(t, g) for g, l in zip(glist, tlist) for t in l]:
+ rv, payload = valid_vector_generator(template)
+ assert is_valid(rv)
+ metadata = {x: y for x, y in zip(metadata_keys,template[3]) if y is not None}
+ hexrepr = b2a_hex(payload)
+ if isinstance(hexrepr, bytes):
+ hexrepr = hexrepr.decode('utf8')
+ yield (rv, hexrepr, metadata)
+
+def gen_invalid_base58_vector(template):
+ '''Generate possibly invalid vector'''
+ # kinds of invalid vectors:
+ # invalid prefix
+ # invalid payload length
+ # invalid (randomized) suffix (add random data)
+ # corrupt checksum
+ corrupt_prefix = randbool(0.2)
+ randomize_payload_size = randbool(0.2)
+ corrupt_suffix = randbool(0.2)
+
+ if corrupt_prefix:
+ prefix = os.urandom(1)
+ else:
+ prefix = bytearray(template[0])
+
+ if randomize_payload_size:
+ payload = os.urandom(max(int(random.expovariate(0.5)), 50))
+ else:
+ payload = os.urandom(template[1])
+
+ if corrupt_suffix:
+ suffix = os.urandom(len(template[2]))
+ else:
+ suffix = bytearray(template[2])
+
+ val = b58encode_chk(prefix + payload + suffix)
+ if random.randint(0,10)<1: # line corruption
+ if randbool(): # add random character to end
+ val += random.choice(b58chars)
+ else: # replace random character in the middle
+ n = random.randint(0, len(val))
+ val = val[0:n] + random.choice(b58chars) + val[n+1:]
+
+ return val
+
+def gen_invalid_bech32_vector(template):
+ '''Generate possibly invalid bech32 vector'''
+ no_data = randbool(0.1)
+ to_upper = randbool(0.1)
+ hrp = template[0]
+ witver = template[1]
+ witprog = bytearray(os.urandom(template[2]))
+
+ if no_data:
+ rv = bech32_encode(hrp, [])
+ else:
+ data = [witver] + convertbits(witprog, 8, 5)
+ if template[3] and not no_data:
+ if template[2] % 5 in {2, 4}:
+ data[-1] |= 1
+ else:
+ data.append(0)
+ rv = bech32_encode(hrp, data)
+
+ if template[4]:
+ i = len(rv) - random.randrange(1, 7)
+ rv = rv[:i] + random.choice(CHARSET.replace(rv[i], '')) + rv[i + 1:]
+ if template[5]:
+ i = len(hrp) + 1 + random.randrange(0, len(rv) - len(hrp) - 4)
+ rv = rv[:i] + rv[i:i + 4].upper() + rv[i + 4:]
+
+ if to_upper:
+ rv = rv.swapcase()
+
+ return rv
+
+def randbool(p = 0.5):
+ '''Return True with P(p)'''
+ return random.random() < p
+
+def gen_invalid_vectors():
+ '''Generate invalid test vectors'''
+ # start with some manual edge-cases
+ yield "",
+ yield "x",
+ glist = [gen_invalid_base58_vector, gen_invalid_bech32_vector]
+ tlist = [templates, bech32_ng_templates]
+ while True:
+ for template, invalid_vector_generator in [(t, g) for g, l in zip(glist, tlist) for t in l]:
+ val = invalid_vector_generator(template)
+ if not is_valid(val):
+ yield val,
+
+if __name__ == '__main__':
+ import sys
+ import json
+ iters = {'valid':gen_valid_vectors, 'invalid':gen_invalid_vectors}
+ try:
+ uiter = iters[sys.argv[1]]
+ except IndexError:
+ uiter = gen_valid_vectors
+ try:
+ count = int(sys.argv[2])
+ except IndexError:
+ count = 0
+
+ data = list(islice(uiter(), count))
+ json.dump(data, sys.stdout, sort_keys=True, indent=4)
+ sys.stdout.write('\n')
+
diff --git a/contrib/unit-e-cli.bash-completion b/contrib/unit-e-cli.bash-completion
index 4c4af83fab..31dc7827e1 100644
--- a/contrib/unit-e-cli.bash-completion
+++ b/contrib/unit-e-cli.bash-completion
@@ -50,7 +50,7 @@ _unit_e_cli() {
COMPREPLY=( $( compgen -W "true false" -- "$cur" ) )
return 0
;;
- signrawtransaction)
+ signrawtransactionwithkey|signrawtransactionwithwallet)
COMPREPLY=( $( compgen -W "ALL NONE SINGLE ALL|ANYONECANPAY NONE|ANYONECANPAY SINGLE|ANYONECANPAY" -- "$cur" ) )
return 0
;;
diff --git a/contrib/verify-commits/README.md b/contrib/verify-commits/README.md
index c16ab68503..ebbc6c97ad 100644
--- a/contrib/verify-commits/README.md
+++ b/contrib/verify-commits/README.md
@@ -3,7 +3,7 @@ Tooling for verification of PGP signed commits
This is an incomplete work in progress, but currently includes a pre-push hook
script (`pre-push-hook.sh`) for maintainers to ensure that their own commits
-are PGP signed (nearly always merge commits), as well as a script to verify
+are PGP signed (nearly always merge commits), as well as a Python 3 script to verify
commits against a trusted keys list.
@@ -17,9 +17,11 @@ be backdoored. Instead, you need to use a trusted version of verify-commits
prior to checkout to make sure you're checking out only code signed by trusted
keys:
- git fetch origin && \
- ./contrib/verify-commits/verify-commits.py origin/master && \
- git checkout origin/master
+ ```sh
+ git fetch origin && \
+ ./contrib/verify-commits/verify-commits.py origin/master && \
+ git checkout origin/master
+ ```
Note that the above isn't a good UI/UX yet, and needs significant improvements
to make it more convenient and reduce the chance of errors; pull-reqs
@@ -33,6 +35,14 @@ Configuration files
* `trusted-keys`: This file should contain a \n-delimited list of all PGP fingerprints of authorized commit signers (primary, not subkeys).
* `allow-revsig-commits`: This file should contain a \n-delimited list of git commit hashes. See next section for more info.
+Import trusted keys
+-------------------
+In order to check the commit signatures, you must add the trusted PGP keys to your machine. [GnuPG](https://gnupg.org/) may be used to import the trusted keys by running the following command:
+
+```sh
+gpg --recv-keys $( 2:
print("Commit {} is an octopus merge".format(current_commit), file=sys.stderr)
sys.exit(1)
# Check that the merge commit is clean
- commit_time = int(subprocess.check_output([GIT, 'show', '-s', '--format=format:%ct', current_commit], universal_newlines=True).splitlines()[0])
+ commit_time = int(subprocess.check_output([GIT, 'show', '-s', '--format=format:%ct', current_commit]).decode('utf8').splitlines()[0])
check_merge = commit_time > time.time() - args.clean_merge * 24 * 60 * 60 # Only check commits in clean_merge days
allow_unclean = current_commit in unclean_merge_allowed
if len(parents) == 2 and check_merge and not allow_unclean:
- current_tree = subprocess.check_output([GIT, 'show', '--format=%T', current_commit], universal_newlines=True).splitlines()[0]
+ current_tree = subprocess.check_output([GIT, 'show', '--format=%T', current_commit]).decode('utf8').splitlines()[0]
subprocess.call([GIT, 'checkout', '--force', '--quiet', parents[0]])
- subprocess.call([GIT, 'merge', '--no-ff', '--quiet', parents[1]], stdout=subprocess.DEVNULL)
- recreated_tree = subprocess.check_output([GIT, 'show', '--format=format:%T', 'HEAD'], universal_newlines=True).splitlines()[0]
+ subprocess.call([GIT, 'merge', '--no-ff', '--quiet', '--no-gpg-sign', parents[1]], stdout=subprocess.DEVNULL)
+ recreated_tree = subprocess.check_output([GIT, 'show', '--format=format:%T', 'HEAD']).decode('utf8').splitlines()[0]
if current_tree != recreated_tree:
print("Merge commit {} is not clean".format(current_commit), file=sys.stderr)
subprocess.call([GIT, 'diff', current_commit])
diff --git a/contrib/windeploy/win-codesign.cert b/contrib/windeploy/win-codesign.cert
index 200b30a3f0..5bc5dc5809 100644
--- a/contrib/windeploy/win-codesign.cert
+++ b/contrib/windeploy/win-codesign.cert
@@ -1,99 +1,100 @@
-----BEGIN CERTIFICATE-----
-MIIFTTCCBDWgAwIBAgIRALlW05RLwG2hMQMX5d/o5J8wDQYJKoZIhvcNAQELBQAw
-fTELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G
-A1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxIzAhBgNV
-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glVyn7URnHoSVAaoRXxrKdsbwcCtp8
+Z359LukoTBh+xHsxQXGaSynsCz1XUNLK3f2eBVHlRHjdAd6xdZgNVCT98E7j4viD
+vXK6yz067vBeF5Jobchh+abxKgoLpbn0nu6YMgWFnuv5gynTxix9vTp3Los3QqBq
+gu07SqqUEKThDfgXxbZaeTMYkuO1dfih6Y4KJR7kHvGfWocj/5+kUZ77OYARzdu1
+xKeogG/lU9Tg46LC0lsa+jImLWpXcBw8pFguo/NbSwfcMlnzh6cabVg=
-----END CERTIFICATE-----
diff --git a/contrib/zmq/zmq_sub.py b/contrib/zmq/zmq_sub.py
index 99b0d5ca9f..8dd31c4213 100644
--- a/contrib/zmq/zmq_sub.py
+++ b/contrib/zmq/zmq_sub.py
@@ -42,6 +42,7 @@ def __init__(self):
self.zmqContext = zmq.asyncio.Context()
self.zmqSubSocket = self.zmqContext.socket(zmq.SUB)
+ self.zmqSubSocket.setsockopt(zmq.RCVHWM, 0)
self.zmqSubSocket.setsockopt_string(zmq.SUBSCRIBE, "hashblock")
self.zmqSubSocket.setsockopt_string(zmq.SUBSCRIBE, "hashtx")
self.zmqSubSocket.setsockopt_string(zmq.SUBSCRIBE, "rawblock")
diff --git a/contrib/zmq/zmq_sub3.4.py b/contrib/zmq/zmq_sub3.4.py
index d9936af740..946a102162 100644
--- a/contrib/zmq/zmq_sub3.4.py
+++ b/contrib/zmq/zmq_sub3.4.py
@@ -46,6 +46,7 @@ def __init__(self):
self.zmqContext = zmq.asyncio.Context()
self.zmqSubSocket = self.zmqContext.socket(zmq.SUB)
+ self.zmqSubSocket.setsockopt(zmq.RCVHWM, 0)
self.zmqSubSocket.setsockopt_string(zmq.SUBSCRIBE, "hashblock")
self.zmqSubSocket.setsockopt_string(zmq.SUBSCRIBE, "hashtx")
self.zmqSubSocket.setsockopt_string(zmq.SUBSCRIBE, "rawblock")
diff --git a/depends/Makefile b/depends/Makefile
index 8a135aafc2..1081123d84 100644
--- a/depends/Makefile
+++ b/depends/Makefile
@@ -4,6 +4,7 @@ SOURCES_PATH ?= $(BASEDIR)/sources
WORK_PATH = $(BASEDIR)/work
BASE_CACHE ?= $(BASEDIR)/built
SDK_PATH ?= $(BASEDIR)/SDKs
+RAPIDCHECK ?=
NO_WALLET ?=
NO_UPNP ?=
NO_USB ?=
@@ -14,7 +15,7 @@ HOST ?= $(BUILD)
PATCHES_PATH = $(BASEDIR)/patches
BASEDIR = $(CURDIR)
HASH_LENGTH:=11
-DOWNLOAD_CONNECT_TIMEOUT:=10
+DOWNLOAD_CONNECT_TIMEOUT:=30
DOWNLOAD_RETRIES:=3
HOST_ID_SALT ?= salt
BUILD_ID_SALT ?= salt
@@ -93,9 +94,15 @@ wallet_packages_$(NO_WALLET) = $(wallet_packages)
upnp_packages_$(NO_UPNP) = $(upnp_packages)
usb_packages_$(NO_USB) = $(usb_packages)
+rapidcheck_packages_$(RAPIDCHECK) = $(rapidcheck_packages)
+
packages += $($(host_arch)_$(host_os)_packages) $($(host_os)_packages) $(wallet_packages_) $(upnp_packages_) $(usb_packages_)
native_packages += $($(host_arch)_$(host_os)_native_packages) $($(host_os)_native_packages)
+ifeq ($(rapidcheck_packages_),)
+packages += $(rapidcheck_packages)
+endif
+
all_packages = $(packages) $(native_packages)
meta_depends = Makefile funcs.mk builders/default.mk hosts/default.mk hosts/$(host_os).mk builders/$(build_os).mk
diff --git a/depends/README.md b/depends/README.md
index 74785cd006..34b7a68c07 100644
--- a/depends/README.md
+++ b/depends/README.md
@@ -30,29 +30,38 @@ Common `host-platform-triplets` for cross compilation are:
No other options are needed, the paths are automatically configured.
-Install the required dependencies: Ubuntu & Debian
---------------------------------------------------
+### Install the required dependencies: Ubuntu & Debian
-For macOS cross compilation:
+#### For macOS cross compilation
sudo apt-get install curl librsvg2-bin libtiff-tools bsdmainutils cmake imagemagick libcap-dev libz-dev libbz2-dev python-setuptools
-For Win32/Win64 cross compilation:
+#### For Win32/Win64 cross compilation
- see [build-windows.md](../doc/build-windows.md#cross-compilation-for-ubuntu-and-windows-subsystem-for-linux)
-For linux (including i386, ARM) cross compilation:
+#### For linux (including i386, ARM) cross compilation
- sudo apt-get install curl g++-aarch64-linux-gnu g++-4.8-aarch64-linux-gnu gcc-4.8-aarch64-linux-gnu binutils-aarch64-linux-gnu g++-arm-linux-gnueabihf g++-4.8-arm-linux-gnueabihf gcc-4.8-arm-linux-gnueabihf binutils-arm-linux-gnueabihf g++-4.8-multilib gcc-4.8-multilib binutils-gold bsdmainutils
+Common linux dependencies:
+
+ sudo apt-get install make automake cmake curl g++-multilib libtool binutils-gold bsdmainutils pkg-config python3
+
+For linux ARM cross compilation:
+
+ sudo apt-get install g++-arm-linux-gnueabihf binutils-arm-linux-gnueabihf
+
+For linux AARCH64 cross compilation:
+
+ sudo apt-get install g++-aarch64-linux-gnu binutils-aarch64-linux-gnu
For linux RISC-V 64-bit cross compilation (there are no packages for 32-bit):
- sudo apt-get install curl g++-riscv64-linux-gnu binutils-riscv64-linux-gnu
+ sudo apt-get install g++-riscv64-linux-gnu binutils-riscv64-linux-gnu
-RISC-V known issue: gcc-7.3.0 and gcc-7.3.1 result in a broken `test_unite` executable (see https://github.com/unite/unite/pull/13543),
+RISC-V known issue: gcc-7.3.0 and gcc-7.3.1 result in a broken `test_unite` executable (see https://github.com/bitcoin/bitcoin/pull/13543),
this is apparently fixed in gcc-8.1.0.
-Dependency Options:
+### Dependency Options
The following can be set when running make: make FOO=bar
SOURCES_PATH: downloaded sources will be placed here
@@ -62,13 +71,14 @@ The following can be set when running make: make FOO=bar
NO_WALLET: Don't download/build/cache libs needed to enable the wallet
NO_UPNP: Don't download/build/cache packages needed for enabling upnp
DEBUG: disable some optimizations and enable more runtime checking
+ RAPIDCHECK: build rapidcheck (experimental)
HOST_ID_SALT: Optional salt to use when generating host package ids
BUILD_ID_SALT: Optional salt to use when generating build package ids
If some packages are not built, for example `make NO_WALLET=1`, the appropriate
options will be passed to unite's configure. In this case, `--disable-wallet`.
-Additional targets:
+### Additional targets
download: run 'make download' to fetch all sources without building them
download-osx: run 'make download-osx' to fetch all sources needed for macOS builds
diff --git a/depends/config.site.in b/depends/config.site.in
index 564c07806a..7a7a8c0f8b 100644
--- a/depends/config.site.in
+++ b/depends/config.site.in
@@ -35,9 +35,12 @@ fi
CPPFLAGS="-I$depends_prefix/include/ $CPPFLAGS"
LDFLAGS="-L$depends_prefix/lib $LDFLAGS"
-CC="@CC@"
-CXX="@CXX@"
-OBJC="${CC}"
+if test -n "@CC@" -a -z "${CC}"; then
+ CC="@CC@"
+fi
+if test -n "@CXX@" -a -z "${CXX}"; then
+ CXX="@CXX@"
+fi
PYTHONPATH=$depends_prefix/native/lib/python/dist-packages:$PYTHONPATH
if test -n "@AR@"; then
diff --git a/depends/packages/bdb.mk b/depends/packages/bdb.mk
index 6c9876c2c7..3cd2e28858 100644
--- a/depends/packages/bdb.mk
+++ b/depends/packages/bdb.mk
@@ -10,6 +10,7 @@ $(package)_config_opts=--disable-shared --enable-cxx --disable-replication
$(package)_config_opts_mingw32=--enable-mingw
$(package)_config_opts_linux=--with-pic
$(package)_cxxflags=-std=c++11
+$(package)_cppflags_mingw32=-DUNICODE -D_UNICODE
endef
define $(package)_preprocess_cmds
diff --git a/depends/packages/expat.mk b/depends/packages/expat.mk
index acbc60eea3..8d06882cdb 100644
--- a/depends/packages/expat.mk
+++ b/depends/packages/expat.mk
@@ -1,11 +1,11 @@
package=expat
-$(package)_version=2.2.5
-$(package)_download_path=https://github.com/libexpat/libexpat/releases/download/R_2_2_5/
+$(package)_version=2.2.6
+$(package)_download_path=https://github.com/libexpat/libexpat/releases/download/R_2_2_6/
$(package)_file_name=$(package)-$($(package)_version).tar.bz2
-$(package)_sha256_hash=d9dc32efba7e74f788fcc4f212a43216fc37cf5f23f4c2339664d473353aedf6
+$(package)_sha256_hash=17b43c2716d521369f82fc2dc70f359860e90fa440bea65b3b85f0b246ea81f2
define $(package)_set_vars
-$(package)_config_opts=--disable-static
+$(package)_config_opts=--disable-static --without-docbook
endef
define $(package)_config_cmds
diff --git a/depends/packages/rapidcheck.mk b/depends/packages/rapidcheck.mk
new file mode 100644
index 0000000000..19cf1cae2e
--- /dev/null
+++ b/depends/packages/rapidcheck.mk
@@ -0,0 +1,18 @@
+package=rapidcheck
+$(package)_version=10fc0cb
+$(package)_download_path=https://github.com/MarcoFalke/rapidcheck/archive
+$(package)_file_name=$(package)-$($(package)_version).tar.gz
+$(package)_sha256_hash=9640926223c00af45bce4c7df8b756b5458a89b2ba74cfe3e404467f13ce26df
+
+define $(package)_config_cmds
+ cmake -DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=true .
+endef
+
+define $(package)_build_cmds
+ $(MAKE) && \
+ mkdir -p $($(package)_staging_dir)$(host_prefix)/include && \
+ cp -a include/* $($(package)_staging_dir)$(host_prefix)/include/ && \
+ cp -a extras/boost_test/include/rapidcheck/* $($(package)_staging_dir)$(host_prefix)/include/rapidcheck/ && \
+ mkdir -p $($(package)_staging_dir)$(host_prefix)/lib && \
+ cp -a librapidcheck.a $($(package)_staging_dir)$(host_prefix)/lib/
+endef
diff --git a/depends/patches/zeromq/0001-fix-build-with-older-mingw64.patch b/depends/patches/zeromq/0001-fix-build-with-older-mingw64.patch
index a6c508fb8a..b911ac5672 100644
--- a/depends/patches/zeromq/0001-fix-build-with-older-mingw64.patch
+++ b/depends/patches/zeromq/0001-fix-build-with-older-mingw64.patch
@@ -1,6 +1,6 @@
-From 1a159c128c69a42d90819375c06a39994f3fbfc1 Mon Sep 17 00:00:00 2001
-From: Cory Fields
-Date: Tue, 28 Nov 2017 20:33:25 -0500
+From f6866b0f166ad168618aae64c7fbee8775d3eb23 Mon Sep 17 00:00:00 2001
+From: mruddy <6440430+mruddy@users.noreply.github.com>
+Date: Sat, 30 Jun 2018 09:44:58 -0400
Subject: [PATCH] fix build with older mingw64
---
@@ -8,10 +8,10 @@ Subject: [PATCH] fix build with older mingw64
1 file changed, 7 insertions(+)
diff --git a/src/windows.hpp b/src/windows.hpp
-index 99e889d..e69038e 100644
+index 6c3839fd..2c32ec79 100644
--- a/src/windows.hpp
+++ b/src/windows.hpp
-@@ -55,6 +55,13 @@
+@@ -58,6 +58,13 @@
#include
#include
#include
@@ -23,8 +23,8 @@ index 99e889d..e69038e 100644
+#include
+#endif
#include
-
+
#if !defined __MINGW32__
---
-2.7.4
+--
+2.17.1
diff --git a/depends/patches/zeromq/0002-disable-pthread_set_name_np.patch b/depends/patches/zeromq/0002-disable-pthread_set_name_np.patch
index d220b54f3e..022e311977 100644
--- a/depends/patches/zeromq/0002-disable-pthread_set_name_np.patch
+++ b/depends/patches/zeromq/0002-disable-pthread_set_name_np.patch
@@ -1,6 +1,6 @@
-From 6e6b47d5ab381c3df3b30bb0b0a6cf210dfb1eba Mon Sep 17 00:00:00 2001
-From: Cory Fields
-Date: Mon, 5 Mar 2018 14:22:05 -0500
+From c9bbdd6581d07acfe8971e4bcebe278a3676cf03 Mon Sep 17 00:00:00 2001
+From: mruddy <6440430+mruddy@users.noreply.github.com>
+Date: Sat, 30 Jun 2018 09:57:18 -0400
Subject: [PATCH] disable pthread_set_name_np
pthread_set_name_np adds a Glibc requirement on >= 2.12.
@@ -9,21 +9,21 @@ pthread_set_name_np adds a Glibc requirement on >= 2.12.
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/thread.cpp b/src/thread.cpp
-index 4fc59c3e..c3fdfd46 100644
+index a1086b0c..9943f354 100644
--- a/src/thread.cpp
+++ b/src/thread.cpp
-@@ -220,7 +220,7 @@ void zmq::thread_t::setThreadName(const char *name_)
+@@ -307,7 +307,7 @@ void zmq::thread_t::setThreadName (const char *name_)
*/
if (!name_)
return;
-
+#if 0
#if defined(ZMQ_HAVE_PTHREAD_SETNAME_1)
- int rc = pthread_setname_np(name_);
- if(rc) return;
-@@ -233,6 +233,8 @@ void zmq::thread_t::setThreadName(const char *name_)
+ int rc = pthread_setname_np (name_);
+ if (rc)
+@@ -323,6 +323,8 @@ void zmq::thread_t::setThreadName (const char *name_)
#elif defined(ZMQ_HAVE_PTHREAD_SET_NAME)
- pthread_set_name_np(descriptor, name_);
+ pthread_set_name_np (descriptor, name_);
#endif
+#endif
+ return;
@@ -31,5 +31,5 @@ index 4fc59c3e..c3fdfd46 100644
#endif
--
-2.11.1
+2.17.1
diff --git a/doc/JSON-RPC-interface.md b/doc/JSON-RPC-interface.md
new file mode 100644
index 0000000000..6e86c87e68
--- /dev/null
+++ b/doc/JSON-RPC-interface.md
@@ -0,0 +1,129 @@
+# JSON-RPC Interface
+
+The headless daemon `unit-e` has the JSON-RPC API enabled by default, the GUI
+`unite-qt` has it disabled by default. This can be changed with the `-server`
+option. In the GUI it is possible to execute RPC methods in the Debug Console
+Dialog.
+
+## Versioning
+
+The RPC interface might change from one major version of unit-e to the
+next. This makes the RPC interface implicitly versioned on the major version.
+The version tuple can be retrieved by e.g. the `getnetworkinfo` RPC in
+`version`.
+
+Usually deprecated features can be re-enabled during the grace-period of one
+major version via the `-deprecatedrpc=` command line option. The release notes
+of a new major release come with detailed instructions on what RPC features
+were deprecated and how to re-enable them temporarily.
+
+## Security
+
+The RPC interface allows other programs to control unit-e,
+including the ability to spend funds from your wallets, affect consensus
+verification, read private data, and otherwise perform operations that
+can cause loss of money, data, or privacy. This section suggests how
+you should use and configure unit-e to reduce the risk that its
+RPC interface will be abused.
+
+- **Securing the executable:** Anyone with physical or remote access to
+ the computer, container, or virtual machine running unit-e can
+ compromise either the whole program or just the RPC interface. This
+ includes being able to record any passphrases you enter for unlocking
+ your encrypted wallets or changing settings so that your unit-e
+ program tells you that certain transactions have multiple
+ confirmations even when they aren't part of the best block chain. For
+ this reason, you should not use unit-e for security sensitive
+ operations on systems you do not exclusively control, such as shared
+ computers or virtual private servers.
+
+- **Securing local network access:** By default, the RPC interface can
+ only be accessed by a client running on the same computer and only
+ after the client provides a valid authentication credential (username
+ and passphrase). Any program on your computer with access to the file
+ system and local network can obtain this level of access.
+ Additionally, other programs on your computer can attempt to provide
+ an RPC interface on the same port as used by unit-e in order to
+ trick you into revealing your authentication credentials. For this
+ reason, it is important to only use unit-e for
+ security-sensitive operations on a computer whose other programs you
+ trust.
+
+- **Securing remote network access:** You may optionally allow other
+ computers to remotely control unit-e by setting the `rpcallowip`
+ and `rpcbind` configuration parameters. These settings are only meant
+ for enabling connections over secure private networks or connections
+ that have been otherwise secured (e.g. using a VPN or port forwarding
+ with SSH or stunnel). **Do not enable RPC connections over the public
+ Internet.** Although unit-e's RPC interface does use
+ authentication, it does not use encryption, so your login credentials
+ are sent as clear text that can be read by anyone on your network
+ path. Additionally, the RPC interface has not been hardened to
+ withstand arbitrary Internet traffic, so changing the above settings
+ to expose it to the Internet (even using something like a Tor hidden
+ service) could expose you to unconsidered vulnerabilities. See
+ `unit-e -help` for more information about these settings and other
+ settings described in this document.
+
+ Related, if you use unit-e inside a Docker container, you may
+ need to expose the RPC port to the host system. The default way to
+ do this in Docker also exposes the port to the public Internet.
+ Instead, expose it only on the host system's localhost, for example:
+ `-p 127.0.0.1:7181:7181`
+
+- **Secure authentication:** By default, unit-e generates unique
+ login credentials each time it restarts and puts them into a file
+ readable only by the user that started unit-e, allowing any of
+ that user's RPC clients with read access to the file to login
+ automatically. The file is `.cookie` in the unit-e
+ configuration directory, and using these credentials is the preferred
+ RPC authentication method. If you need to generate static login
+ credentials for your programs, you can use the script in the
+ `share/rpcauth` directory in the unit-e source tree. As a final
+ fallback, you can directly use manually-chosen `rpcuser` and
+ `rpcpassword` configuration parameters---but you must ensure that you
+ choose a strong and unique passphrase (and still don't use insecure
+ networks, as mentioned above).
+
+- **Secure string handling:** The RPC interface does not guarantee any
+ escaping of data beyond what's necessary to encode it as JSON,
+ although it does usually provide serialized data using a hex
+ representation of the bytes. If you use RPC data in your programs or
+ provide its data to other programs, you must ensure any problem
+ strings are properly escaped. For example, multiple websites have
+ been manipulated because they displayed decoded hex strings that
+ included HTML `