diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index 2a06081f3..000000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,168 +0,0 @@ -stages: -- build -- test -######################################################################################################################## -####START#### PROJECT LEVEL VARIABLES ####START#### -######################################################################################################################## -variables: - PACKAGE_DIR_LINUX: linux64 - PACKAGE_DIR_WINDOWS: win64 - PACKAGE_DIR_MACOS: macos - AGAMA_ARTIFACTS_LINUX: ${PACKAGE_DIR_LINUX}.tar.gz - AGAMA_ARTIFACTS_WINDOWS: ${PACKAGE_DIR_WINDOWS}.zip - AGAMA_ARTIFACTS_MACOS: ${PACKAGE_DIR_MACOS}.tar.gz - AGAMA_ARTIFACTS_LINUX_CHECKSUM: ${AGAMA_ARTIFACTS_LINUX}.md5 - AGAMA_ARTIFACTS_WINDOWS_CHECKSUM: ${AGAMA_ARTIFACTS_WINDOWS}.md5 - AGAMA_ARTIFACTS_MACOS_CHECKSUM: ${AGAMA_ARTIFACTS_MACOS}.md5 - ARTIFACT_EXPIRATION: 1 week - -######################################################################################################################## -####END#### PROJECT LEVEL VARIABLES ####END#### -######################################################################################################################## -######################################################################################################################## -######################################################################################################################## -####START#### Build Stage: compile and package komodo binaries for the Agama Wallet. ####START##### -######################################################################################################################## -######################################################################################################################## -####START#### LINUX ####START#### -######################################################################################################################## -build:ubuntu: - stage: build - image: ca333/komodo-builders:komodo-ubuntu - variables: - DOCKER_DRIVER: overlay2 - cache: - key: ${CI_COMMIT_REF_SLUG} - paths: - - depends/ - script: - - zcutil/build.sh -j$(nproc) - - mkdir ${PACKAGE_DIR_LINUX} - - cp src/komodod - src/komodo-cli - zcutil/fetch-params.sh - ${PACKAGE_DIR_LINUX} - - chmod +x ${PACKAGE_DIR_LINUX}/komodod - - chmod +x ${PACKAGE_DIR_LINUX}/komodo-cli - - tar -czvf ${AGAMA_ARTIFACTS_LINUX} ${PACKAGE_DIR_LINUX} - - md5sum ${AGAMA_ARTIFACTS_LINUX} > ${AGAMA_ARTIFACTS_LINUX_CHECKSUM} - artifacts: - paths: - - ${AGAMA_ARTIFACTS_LINUX} - - ${AGAMA_ARTIFACTS_LINUX_CHECKSUM} - expire_in: 1 week - -######################################################################################################################## -####END#### LINUX ####END#### -######################################################################################################################## -####START#### WINDOWS ####START#### -######################################################################################################################## -build:windows: - stage: build - image: ca333/komodo-builders:komodo-windows - variables: - DOCKER_DRIVER: overlay2 - cache: - key: "${CI_JOB_NAME}${CI_COMMIT_REF_NAME}" - paths: - - depends/built - script: - - zcutil/build-win.sh -j$(nproc) - - mkdir ${PACKAGE_DIR_WINDOWS} - - cp src/komodod.exe - src/komodo-cli.exe - src/komodo-tx.exe - zcutil/wget64.exe - zcutil/fetch-params.bat - ${PACKAGE_DIR_WINDOWS} - - zip -r ${PACKAGE_DIR_WINDOWS}.zip ${PACKAGE_DIR_WINDOWS} - - md5sum ${AGAMA_ARTIFACTS_WINDOWS} > ${AGAMA_ARTIFACTS_WINDOWS_CHECKSUM} - artifacts: - paths: - - ${AGAMA_ARTIFACTS_WINDOWS} - - ${AGAMA_ARTIFACTS_WINDOWS_CHECKSUM} - expire_in: 1 week -######################################################################################################################## -####END#### WINDOWS ####END#### -######################################################################################################################## -####START#### MACOS ####START#### -######################################################################################################################## -build:macos: - stage: build - tags: ["High Sierra"] - cache: - key: "${CI_JOB_NAME}${CI_COMMIT_REF_NAME}" - paths: - - depends/built - allow_failure: true - script: - - zcutil/build-mac.sh -j$(sysctl -n hw.physicalcpu) - - ./makeRelease.sh ${PACKAGE_DIR_MACOS} - - tar -czvf ${AGAMA_ARTIFACTS_MACOS} ${PACKAGE_DIR_MACOS} - - md5sum ${AGAMA_ARTIFACTS_MACOS} > ${AGAMA_ARTIFACTS_MACOS_CHECKSUM} - artifacts: - paths: - - ${AGAMA_ARTIFACTS_MACOS} - - ${AGAMA_ARTIFACTS_MACOS_CHECKSUM} - expire_in: 1 week -######################################################################################################################## -####END#### MACOS ####END#### -######################################################################################################################## -######################################################################################################################## -####END#### Build Stage ####END#### -######################################################################################################################## -######################################################################################################################## -######################################################################################################################## -######################################################################################################################## -####START#### Test stage: Produce code quality and static application security test reports. ####START#### -######################################################################################################################## -######################################################################################################################## -######################################################################################################################## -####START#### Code Quality ####START#### -######################################################################################################################## -code_quality: - image: docker:stable - variables: - DOCKER_DRIVER: overlay2 - allow_failure: true - services: - - docker:stable-dind - script: - - export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/') - - docker run - --env SOURCE_CODE="$PWD" - --volume "$PWD":/code - --volume /var/run/docker.sock:/var/run/docker.sock - "registry.gitlab.com/gitlab-org/security-products/codequality:$SP_VERSION" /code - artifacts: - paths: [gl-code-quality-report.json] -######################################################################################################################## -####END#### Code Quality ####END#### -######################################################################################################################## -######################################################################################################################## -####START#### Static Application Security Tests ####START#### -######################################################################################################################## -sast: - image: docker:stable - variables: - DOCKER_DRIVER: overlay2 - allow_failure: true - services: - - docker:stable-dind - script: - - export SP_VERSION=$(echo "$CI_SERVER_VERSION" | sed 's/^\([0-9]*\)\.\([0-9]*\).*/\1-\2-stable/') - - docker run - --env SAST_CONFIDENCE_LEVEL="${SAST_CONFIDENCE_LEVEL:-3}" - --volume "$PWD:/code" - --volume /var/run/docker.sock:/var/run/docker.sock - "registry.gitlab.com/gitlab-org/security-products/sast:$SP_VERSION" /app/bin/run /code - artifacts: - paths: [gl-sast-report.json] -######################################################################################################################## -####END#### Static Application Security Tests ####END#### -######################################################################################################################## -######################################################################################################################## -######################################################################################################################## -####END#### Test stage ####END#### -######################################################################################################################## -######################################################################################################################## diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 899c78f35..000000000 --- a/.travis.yml +++ /dev/null @@ -1,88 +0,0 @@ -language: cpp - -matrix: - include: - - os: linux - dist: xenial - sudo: required - env: LINUX_DEPLOY="true" OSX_DEPLOY="false" $TRAVIS_OS_NAME="linux" -branches: - only: - - master - - dev - - duke -compiler: - - gcc -before_install: - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo add-apt-repository --yes ppa:ubuntu-sdk-team/ppa; fi - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get update -qq; fi - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install libgnutls28-dev; fi - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo apt-get install build-essential pkg-config libcurl3-gnutls-dev libc6-dev libevent-dev m4 g++-multilib autoconf libtool ncurses-dev unzip git python zlib1g-dev wget bsdmainutils automake libssl-dev libprotobuf-dev protobuf-compiler libdb++-dev ntp ntpdate; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then rm '/usr/local/include/c++'; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install gcc@6; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew link --overwrite gcc@6; fi -script: - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./zcutil/build.sh -j 5; fi - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then tar cvfz hush_linux_$TRAVIS_BRANCH.tar.gz src/komodod src/komodo-cli src/komodo-tx src/hushd src/hush-cli src/hush-tx; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./zcutil/build-mac.sh -j 5; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./makeRelease.sh; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then tar cvfz hush_osx_$TRAVIS_BRANCH.tar.gz src/hushd src/hush-cli src/hust-tx src/komodod src/komodo-cli src/libgcc_s.1.dylib src/libgomp.1.dylib src/libstdc++.6.dylib; fi -notifications: - irc: - channels: - - chat.freenode.net#hush - template: - - "%{repository}/%{branch} (%{commit} - %{author}): %{message}" - - 'Alt Message : %{repository_slug} - (%{commit} - %{author}): %{message}, Build - Time: %{duration}' - - 'Change view : %{compare_url}' - - 'Build details : %{build_url}' -before_deploy: - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then git tag "$TRAVIS_BRANCH-linux-$(date +'%Y%m%d%H%M')-$(git log --format=%h -1)"; fi - - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then git tag "$TRAVIS_BRANCH-osx-$(date +'%Y%m%d%H%M')-$(git log --format=%h -1)"; fi -deploy: - - provider: releases - api_key: - secure: id69KBVsY0p41WFlqd5cGrAIksJAkUempmdrQwHtfqIbB6es7MVfXuxfmTxk7lZNEItSvLGilYtqhBMNVAVjRRPvk90hveGDMkbpjFz3XBbFEFqtrAr2GdIcpGtII2T3T/TG7j11TMtJ6GvBVt4OcatHFVsKBCFDIx0fB0fd1oLrEAwgRdBO2Jq7bMzoLdzGx3mVtdW5dSRBQzG/Z0yvx+R9mQHSvyPGh6oNPD6mvXPzEaCeRW6Y8g8y1SW/6zDJR6sSdOKA0jsHkr/hM8st3Qkr5Cu3roEbL8598uvfBahjxVHVT8+lu/nJnQyrvtWZKu/uUefybqgZl7UpGvZVFxbNwAB/ZNn0pBKIpZlX/kh6rdGF0XrAG7g+Ths6iklh7wDefYP2JeGwHWJ38YcdF8T/VcSdOXz7EiWwEeZO5sGcTRSl5Ql8mcU3YyyB7BTdViYNTHf5VFFJ/baLZG+shZ/0tb1Ntx5mLDbV8vcYXJpUNTJcXbhcUDSF3QuSz04ftkzgpcsODzcTzD6+2sezV1vlOAlxK04C+zzxG96Md/TegvZYYns78RSgrP/UH1qwEbgxTo3xpErGllzntzZfHJ887Goez+DeB9ga7pUBc5AXGpfRhYqJP66wR10zqfWuWYvjAwRBRNySjr3pUvaA3T1iSZ5HLrpKBfcHXJOTg8M= - name: hush_linux-$TRAVIS_BRANCH - prerelease: true - file: hush_linux_$TRAVIS_BRANCH.tar.gz - skip_cleanup: true - on: - repo: MyHush/hush3 - branch: master - condition: $LINUX_DEPLOY = "true" - - provider: releases - api_key: - secure: id69KBVsY0p41WFlqd5cGrAIksJAkUempmdrQwHtfqIbB6es7MVfXuxfmTxk7lZNEItSvLGilYtqhBMNVAVjRRPvk90hveGDMkbpjFz3XBbFEFqtrAr2GdIcpGtII2T3T/TG7j11TMtJ6GvBVt4OcatHFVsKBCFDIx0fB0fd1oLrEAwgRdBO2Jq7bMzoLdzGx3mVtdW5dSRBQzG/Z0yvx+R9mQHSvyPGh6oNPD6mvXPzEaCeRW6Y8g8y1SW/6zDJR6sSdOKA0jsHkr/hM8st3Qkr5Cu3roEbL8598uvfBahjxVHVT8+lu/nJnQyrvtWZKu/uUefybqgZl7UpGvZVFxbNwAB/ZNn0pBKIpZlX/kh6rdGF0XrAG7g+Ths6iklh7wDefYP2JeGwHWJ38YcdF8T/VcSdOXz7EiWwEeZO5sGcTRSl5Ql8mcU3YyyB7BTdViYNTHf5VFFJ/baLZG+shZ/0tb1Ntx5mLDbV8vcYXJpUNTJcXbhcUDSF3QuSz04ftkzgpcsODzcTzD6+2sezV1vlOAlxK04C+zzxG96Md/TegvZYYns78RSgrP/UH1qwEbgxTo3xpErGllzntzZfHJ887Goez+DeB9ga7pUBc5AXGpfRhYqJP66wR10zqfWuWYvjAwRBRNySjr3pUvaA3T1iSZ5HLrpKBfcHXJOTg8M= - name: hush_linux-$TRAVIS_BRANCH - prerelease: true - file: hush_linux_$TRAVIS_BRANCH.tar.gz - skip_cleanup: true - on: - repo: MyHush/hush3 - branch: dev - condition: $LINUX_DEPLOY = "true" - - provider: releases - api_key: - secure: id69KBVsY0p41WFlqd5cGrAIksJAkUempmdrQwHtfqIbB6es7MVfXuxfmTxk7lZNEItSvLGilYtqhBMNVAVjRRPvk90hveGDMkbpjFz3XBbFEFqtrAr2GdIcpGtII2T3T/TG7j11TMtJ6GvBVt4OcatHFVsKBCFDIx0fB0fd1oLrEAwgRdBO2Jq7bMzoLdzGx3mVtdW5dSRBQzG/Z0yvx+R9mQHSvyPGh6oNPD6mvXPzEaCeRW6Y8g8y1SW/6zDJR6sSdOKA0jsHkr/hM8st3Qkr5Cu3roEbL8598uvfBahjxVHVT8+lu/nJnQyrvtWZKu/uUefybqgZl7UpGvZVFxbNwAB/ZNn0pBKIpZlX/kh6rdGF0XrAG7g+Ths6iklh7wDefYP2JeGwHWJ38YcdF8T/VcSdOXz7EiWwEeZO5sGcTRSl5Ql8mcU3YyyB7BTdViYNTHf5VFFJ/baLZG+shZ/0tb1Ntx5mLDbV8vcYXJpUNTJcXbhcUDSF3QuSz04ftkzgpcsODzcTzD6+2sezV1vlOAlxK04C+zzxG96Md/TegvZYYns78RSgrP/UH1qwEbgxTo3xpErGllzntzZfHJ887Goez+DeB9ga7pUBc5AXGpfRhYqJP66wR10zqfWuWYvjAwRBRNySjr3pUvaA3T1iSZ5HLrpKBfcHXJOTg8M= - name: hush_osx-$TRAVIS_BRANCH - prerelease: true - file: hush_osx_$TRAVIS_BRANCH.tar.gz - skip_cleanup: true - on: - repo: MyHush/hush3 - branch: master - condition: $OSX_DEPLOY = "true" - - provider: releases - api_key: - secure: id69KBVsY0p41WFlqd5cGrAIksJAkUempmdrQwHtfqIbB6es7MVfXuxfmTxk7lZNEItSvLGilYtqhBMNVAVjRRPvk90hveGDMkbpjFz3XBbFEFqtrAr2GdIcpGtII2T3T/TG7j11TMtJ6GvBVt4OcatHFVsKBCFDIx0fB0fd1oLrEAwgRdBO2Jq7bMzoLdzGx3mVtdW5dSRBQzG/Z0yvx+R9mQHSvyPGh6oNPD6mvXPzEaCeRW6Y8g8y1SW/6zDJR6sSdOKA0jsHkr/hM8st3Qkr5Cu3roEbL8598uvfBahjxVHVT8+lu/nJnQyrvtWZKu/uUefybqgZl7UpGvZVFxbNwAB/ZNn0pBKIpZlX/kh6rdGF0XrAG7g+Ths6iklh7wDefYP2JeGwHWJ38YcdF8T/VcSdOXz7EiWwEeZO5sGcTRSl5Ql8mcU3YyyB7BTdViYNTHf5VFFJ/baLZG+shZ/0tb1Ntx5mLDbV8vcYXJpUNTJcXbhcUDSF3QuSz04ftkzgpcsODzcTzD6+2sezV1vlOAlxK04C+zzxG96Md/TegvZYYns78RSgrP/UH1qwEbgxTo3xpErGllzntzZfHJ887Goez+DeB9ga7pUBc5AXGpfRhYqJP66wR10zqfWuWYvjAwRBRNySjr3pUvaA3T1iSZ5HLrpKBfcHXJOTg8M= - name: hush_osx-$TRAVIS_BRANCH - prerelease: true - file: hush_osx_$TRAVIS_BRANCH.tar.gz - skip_cleanup: true - on: - repo: MyHush/hush3 - branch: dev - condition: $OSX_DEPLOY = "true" diff --git a/AUTH_KEY.json.enc b/AUTH_KEY.json.enc deleted file mode 100644 index ac619b9cb..000000000 Binary files a/AUTH_KEY.json.enc and /dev/null differ diff --git a/Brewfile b/Brewfile deleted file mode 100644 index 7a048b080..000000000 --- a/Brewfile +++ /dev/null @@ -1,17 +0,0 @@ -tap "discoteq/discoteq" -tap "homebrew/bundle" -tap "homebrew/cask" -tap "homebrew/cask-versions" -tap "homebrew/core" -brew "autoconf" -brew "autogen" -brew "automake" -brew "binutils" -brew "cmake" -brew "coreutils" -brew "gcc@6" -brew "leveldb" -brew "nanomsg" -brew "protobuf" -brew "wget" -brew "discoteq/discoteq/flock" diff --git a/COPYING b/COPYING index 875deb660..e2383446e 100644 --- a/COPYING +++ b/COPYING @@ -19,3 +19,7 @@ open-source licenses. For further details see 'contrib/debian/copyright'. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (https://www.openssl.org/). This product includes cryptographic software written by Eric Young (eay@cryptsoft.com). + +We are open to granting more permissive (such as MIT or Apache 2.0) licenses to Hush +software on a *case-by-case* basis, for an agreed upon price. Please contact +The Hush developers if you are interested. diff --git a/DEVELOPING.md b/DEVELOPING.md index b686910aa..0a10da9f6 100644 --- a/DEVELOPING.md +++ b/DEVELOPING.md @@ -11,6 +11,36 @@ To make it use as many CPU threads as you have: ./build.sh -j$(nproc) # assumes linux ./build.sh -j8 # use a fixed 8 threads, more portable +This is dangerous! You need about 2GB of RAM per thread, plus all the +other programs and Operating System overhead. A good rule of thumb is: + +Divide how many GBs of RAM you have by 2, subtract one. Use that many jobs. + + +## Dealing with dependency changes + +Let's say you change a dependency and want the compile the notice. If your +change is outside of the main Hush source code, in ./src, simply running +`make` will not notice, and sometimes not even `build.sh`. You can always +do a fresh clone or `make clean`, but that will take a lot of time. Those +methods are actually best for Continuous Integration systems, but to help +reduce the time a developer has to wait, here are some PROTIPs. + + +If you are changing how a dependency is built, you should remove the entire directory like this: + + rm -rf depends/work/build/x86_64-unknown-linux-gnu/wolfssl/ + +The above will delete the entire source code of wolfssl dependency on `x86_64` +but it will keep the tar.gz and you will not need to download it again. If +you are testing a change in URL or SHA256, you will want to force it to download +again: + + rm -rf depends/sources/wolfssl*.tar.gz + +Now when you run `build.sh` again, you will be able to test your changes. + + ## Good Hygiene To avoid weird build system issues, it's often good to run: diff --git a/Dockerfile b/Dockerfile index 3177f8964..3ee058477 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,8 @@ +# Copyright (c) 2016-2020 The Hush developers +# Distributed under the GPLv3 software license, see the accompanying +# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html FROM ubuntu:16.04 -MAINTAINER Mihail Fedorov +MAINTAINER Duke Leto RUN apt-get -y update && \ apt-get -y upgrade && \ @@ -17,13 +20,14 @@ WORKDIR /hush RUN cd /hush && \ ./autogen.sh && \ ./configure --with-incompatible-bdb --with-gui || true && \ - ./zcutil/build.sh -j$(nproc) - -# Unknown stuff goes here + ./build.sh -j$(nproc) RUN ln -sf /hush/src/komodod /usr/bin/komodod && \ ln -sf /hush/src/hushd /usr/bin/hushd && \ + ln -sf /hush/src/hush-tx /usr/bin/hush-tx && \ + ln -sf /hush/src/wallet-utility /usr/bin/hush-wallet-utility && \ + ln -sf /hush/src/hush-smart-chain /usr/bin/hush-smart-chain && \ ln -sf /hush/zcutil/docker-entrypoint.sh /usr/bin/entrypoint && \ - ln -sf /hush/zcutil/docker-komodo-cli.sh /usr/bin/hush-cli + ln -sf /hush/zcutil/docker-hush-cli.sh /usr/bin/hush-cli CMD ["entrypoint"] diff --git a/INSTALL.md b/INSTALL.md index 4e2a3325b..0c4095e5c 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -36,7 +36,7 @@ sudo apt-get install build-essential pkg-config libc6-dev m4 g++-multilib \ autoconf libtool ncurses-dev unzip git python zlib1g-dev wget \ bsdmainutils automake curl unzip nano libsodium-dev # pull -git clone https://github.com/MyHush/hush3.git +git clone https://git.hush.is/hush/hush3 cd hush3 # Build ./build.sh -j$(nproc) @@ -61,7 +61,7 @@ Downloading Git source repo, building and running Hush: ```sh # pull -git clone https://github.com/MyHush/hush3.git +git clone https://git.hush.is/hush/hush3 cd hush # Build ./build-win.sh -j$(nproc) diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md index c3bdf6474..d2df1792c 100644 --- a/ISSUE_TEMPLATE.md +++ b/ISSUE_TEMPLATE.md @@ -23,7 +23,7 @@ Tell us what should happen Tell us what happens instead including any noticable error output (any messages displayed on-screen when e.g. a crash occurred) -### The version of Komodo you were using: +### The version of Hush you were using: Run `hushd --version` to find out @@ -41,5 +41,4 @@ Run `hushd --version` to find out This includes the relevant contents of `~/.komodo/HUSH3/debug.log`. You can paste raw text, attach the file directly in the issue or link to the text via a pastebin type site. Please also include any non-standard things you did during compilation (extra flags, dependency version changes etc.) if applicable. -Beware that usernames and IP addresses and other metadata may be in this log file. - +Beware that usernames and IP addresses and other metadata is definitely in this log file! diff --git a/Makefile.am b/Makefile.am index a86c86eed..7b4d44e2d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -34,13 +34,11 @@ COVERAGE_INFO = baseline_filtered_combined.info baseline.info block_test.info \ leveldb_baseline.info test_bitcoin_filtered.info total_coverage.info \ baseline_filtered.info block_test_filtered.info \ leveldb_baseline_filtered.info test_bitcoin_coverage.info test_bitcoin.info -# zcash-gtest.info zcash-gtest_filtered.info zcash-gtest_coverage.info else COVERAGE_INFO = baseline_filtered_combined.info baseline.info block_test.info \ leveldb_baseline.info test_bitcoin_filtered.info total_coverage.info \ baseline_filtered.info \ - leveldb_baseline_filtered.info test_bitcoin_coverage.info test_bitcoin.info \ - #zcash-gtest.info zcash-gtest_filtered.info zcash-gtest_coverage.info + leveldb_baseline_filtered.info test_bitcoin_coverage.info test_bitcoin.info endif dist-hook: @@ -205,17 +203,12 @@ endif test_bitcoin_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info $(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_bitcoin_filtered.info -o $@ -if ! BUILD_DARWIN -zcash-gtest_coverage.info: baseline_filtered_combined.info zcash-gtest_filtered.info - $(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a zcash-gtest_filtered.info -o $@ -endif - if BUILD_DARWIN -total_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info zcash-gtest_filtered.info block_test_filtered.info - $(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_bitcoin_filtered.info -a zcash-gtest_filtered.info -a block_test_filtered.info -o $@ | $(GREP) "\%" | $(AWK) '{ print substr($$3,2,50) "/" $$5 }' > coverage_percent.txt +total_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info block_test_filtered.info + $(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_bitcoin_filtered.info -a block_test_filtered.info -o $@ | $(GREP) "\%" | $(AWK) '{ print substr($$3,2,50) "/" $$5 }' > coverage_percent.txt else -total_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info zcash-gtest_filtered.info block_test_filtered.info - $(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_bitcoin_filtered.info -a zcash-gtest_filtered.info -a block_test_filtered.info -o $@ | $(GREP) "\%" | $(AWK) '{ print substr($$3,2,50) "/" $$5 }' > coverage_percent.txt +total_coverage.info: baseline_filtered_combined.info test_bitcoin_filtered.info block_test_filtered.info + $(LCOV) -a baseline_filtered.info -a leveldb_baseline_filtered.info -a test_bitcoin_filtered.info -a block_test_filtered.info -o $@ | $(GREP) "\%" | $(AWK) '{ print substr($$3,2,50) "/" $$5 }' > coverage_percent.txt endif @@ -223,26 +216,19 @@ test_bitcoin.coverage/.dirstamp: test_bitcoin_coverage.info $(GENHTML) -s $< -o $(@D) @touch $@ -if TARGET_DARWIN -zcash-gtest.coverage/.dirstamp: zcash-gtest_coverage.info - $(GENHTML) -s $< -o $(@D) - @touch $@ -cov-zcash: zcash-gtest.coverage/.dirstamp -endif - total.coverage/.dirstamp: total_coverage.info $(GENHTML) -s $< -o $(@D) @touch $@ if BUILD_DARWIN -cov: test_bitcoin.coverage/.dirstamp cov-zcash total.coverage/.dirstamp +cov: test_bitcoin.coverage/.dirstamp total.coverage/.dirstamp else -cov: test_bitcoin.coverage/.dirstamp cov-zcash total.coverage/.dirstamp +cov: test_bitcoin.coverage/.dirstamp total.coverage/.dirstamp endif endif -dist_bin_SCRIPTS = zcutil/fetch-params.sh +dist_bin_SCRIPTS = dist_noinst_SCRIPTS = autogen.sh zcutil/build-debian-package.sh zcutil/build.sh EXTRA_DIST = $(top_srcdir)/share/genbuild.sh qa/pull-tester/rpc-tests.sh qa/pull-tester/run-bitcoin-cli qa/rpc-tests qa/hush $(DIST_DOCS) $(BIN_CHECKS) @@ -255,4 +241,6 @@ install-exec-hook: DISTCHECK_CONFIGURE_FLAGS = --enable-man clean-local: - rm -rf test_bitcoin.coverage/ zcash-gtest.coverage/ total.coverage/ + rm -rf test_bitcoin.coverage/ total.coverage/ + +# I also heard about a bug in the UNIVAC but it's too big for this comment. -- Duke diff --git a/OLD_WALLETS.md b/OLD_WALLETS.md new file mode 100644 index 000000000..d13f4f0ef --- /dev/null +++ b/OLD_WALLETS.md @@ -0,0 +1,71 @@ +## Claiming Funds From Old Hush Wallets + +Hush migrated to a new mainnet after Block 500,000 on the old Hush blockchain. +Funds in addresses as of Block 500,000 were transported to our new chain. About +31,000 addresses with at least 0.00000001 HUSH were transported to the new Hush +mainnet. + +To claim funds on the new chain, there are few options. + +### Funds on exchanges + +Firstly, no bueno! Not your keys, not your coins. It's best not to store coins +on exchanges. But in this case, you lucked out! There is nothing to do to claim +new coins if you have coins on an exchange that supports the new Hush chain. +The exchange will follow the instructions from the next section and you will +magically have funds on the new chain. Note that old Hush addresses started +with `t1` and now they begin with `R`. + +To see what an old HUSH v2 address looks like on the new chain, this online tool +can be used: https://dexstats.info/addressconverter.php + +or this command line tool: https://git.hush.is/hush/hush3/src/master/contrib/convert_address.py + + +### Using an old wallet.dat + +Backup your old HUSH wallet.dat, and backup any current wallet.dat that is in your + + ~/.komodo/HUSH3/ + +directory. There is no way to lose funds, as long as you have backups!!! Make sure +to make backups. Do not skip this step. + +Make sure any/all GUI wallets are stopped! Also make sure your old Hush node +and new Hush3 node are stopped: + + cd hush3 + ./src/hush-cli stop + +Do not copy wallets or move wallets while your full node is running! This could +corrupt your wallet! + +Now copy your old Hush wallet.dat to + + ~/.komodo/HUSH3/ + +with a command like + + # DO NOT RUN THIS WITHOUT MAKING BACKUPS! + cp ~/.hush/wallet.dat ~/.komodo/HUSH3/ + +The reason this works is that both old HUSH and new HUSH are still Bitcoin Protocol +coins, which both use secp256k1 public keys. Now start your HUSH3 node again, +with this special CLI argument that will clear out transactions from your wallet: + + cd hush3 + ./src/hushd -zapwallettxes + +This will cause a full history rescan, which will take some time. Once it's complete, +you can see your funds with this command: + + ./src/hush-cli getwalletinfo + +NOTE: Do not use this wallet except to send funds to a new wallet! + +### Private Keys + +You can also transport funds one address at a time via private keys. + +Agama Desktop Wallet WIF-to-WIF Tool can convert between old HUSH and new HUSH3 +private keys. \ No newline at end of file diff --git a/README.md b/README.md index a4cbed8c1..5014b8eef 100644 --- a/README.md +++ b/README.md @@ -1,108 +1,62 @@ -# HUSH +# Hush -## What is HUSH? +## What is Hush? ![Logo](doc/hush/hush.png "Logo") -HUSH (originally Zdash) is a source code fork of [ZCash](https://z.cash/) and has -it's own genesis block. It is not a chain fork of another coin. Based on -Bitcoin's code, it intends to offer a far higher standard of privacy through a -sophisticated zero-knowledge proving scheme that preserves confidentiality of -transaction metadata. +Hush implements Extreme Privacy via blockchain tech. We have our own +genesis block. We are not a chain fork (copy) of another coin. We are based on +Bitcoin code, with sophisticated zero-knowledge mathematics added for privacy. +This keeps your transaction metadata private! -This software is the HUSH node and command-line client. It downloads and stores -the entire history of HUSH transactions; depending on the speed of your -computer and network connection, the synchronization process could take a day -or more once the blockchain has reached a significant size. +### This repository -**HUSH is unfinished and highly experimental.** Use at your own risk! +This software is the Hush node and command-line client. It downloads and stores +the entire history of Hush transactions; depending on the speed of your +computer and network connection, it will likely take a few hours at least, but +some people report full nodes syncing in less than 1.5 hours. A competing privacy +coin takes over 24 hours to sync their full nodes because of Sprout Transactions, lulz. -## Telegram +### BANNED BY GITHUB -Please feel free to join us on Telegram : - * Main group: https://hush.is/telegram - * Support group: https://hush.is/telegram_support - * Mining group: https://hush.is/telegram_support +In working on this release, Duke Leto was suspended from Github, which gave Hush developers +the impetus to completely leave that racist and censorship-loving platform. -## Claiming Funds From Old Hush Wallets +Hush now has it's own git.hush.is Gitea instance, +because we will not be silenced by Microsoft. -Hush migrated to a new mainnet after Block 500,000 on the old Hush blockchain. -Funds in addresses as of Block 500,000 were transported to our new chain. About -31,000 addresses with at least 0.00000001 HUSH were transported to the new Hush -mainnet. +All Hush software will be released from git.hush.is and hush.is, downloads from any other +domains should be assumed to be backdoored. -To claim funds on the new chain, there are few options. +**Hush is unfinished and highly experimental.** Use at your own risk! Just like Bitcoin. -### Funds on exchanges - -Firstly, no bueno! Not your keys, not your coins. It's best not to store coins -on exchanges. But in this case, you lucked out! There is nothing to do to claim -new coins if you have coins on an exchange that supports the new Hush chain. -The exchange will follow the instructions from the next section and you will -magically have funds on the new chain. Note that old Hush addresses started -with `t1` and now they begin with `R`. - -To see what an old HUSH v2 address looks like on the new chain, this online tool -can be used: https://dexstats.info/addressconverter.php - -or this command line tool: https://git.hush.is/hush/hush3/src/master/contrib/convert_address.py - - -### Using an old wallet.dat - -Backup your old HUSH wallet.dat, and backup any current wallet.dat that is in your - - ~/.komodo/HUSH3/ - -directory. There is no way to lose funds, as long as you have backups!!! Make sure -to make backups. Do not skip this step. - -Make sure any/all GUI wallets are stopped! Also make sure your old Hush node -and new Hush3 node are stopped: - - cd hush3 - ./src/hush-cli stop - -Do not copy wallets or move wallets while your full node is running! This could -corrupt your wallet! - -Now copy your old Hush wallet.dat to - - ~/.komodo/HUSH3/ - -with a command like - - # DO NOT RUN THIS WITHOUT MAKING BACKUPS! - cp ~/.hush/wallet.dat ~/.komodo/HUSH3/ - -The reason this works is that both old HUSH and new HUSH are still Bitcoin Protocol -coins, which both use secp256k1 public keys. Now start your HUSH3 node again, -with this special CLI argument that will clear out transactions from your wallet: - - cd hush3 - ./src/hushd -zapwallettxes - -This will cause a full history rescan, which will take some time. Once it's complete, -you can see your funds with this command: - - ./src/hush-cli getwalletinfo - -NOTE: Do not use this wallet except to send funds to a new wallet! - -### Private Keys - -You can also transport funds one address at a time via private keys. - -Agama Desktop Wallet WIF-to-WIF Tool can convert between old HUSH and new HUSH3 -private keys. - -Installing ----------- +## Installing See [INSTALL.md](https://git.hush.is/hush/hush3/src/branch/master/INSTALL.md) +### Claiming Funds From Old Hush Wallets -License -------- +If you have an older wallet, then refer to [OLD_WALLETS.md](OLD_WALLETS.md). + +### Official Explorer + +The link for the Official Hush explorer is: explorer.hush.is + +We are looking for alternate explorers to be run on Tor, i2P and other TLDs, if you are interested +please join Telegram and ask questions. + +## Support and Socials + +Please feel free to join us on Telegram for official support: +* Main group: https://hush.is/tg +* Support group: https://hush.is/telegram_support +* Mining group: https://hush.is/telegram_mining + +Other socials: +* Toot us @MyHushTeam on Twitter +* Follow Hush on YouTube +* Join Hush on Reddit + +## License For license information see the file [COPYING](COPYING). diff --git a/build-aux/m4/bitcoin_find_bdb.m4 b/build-aux/m4/bitcoin_find_bdb.m4 index bd5c2af45..ada8ffdbe 100644 --- a/build-aux/m4/bitcoin_find_bdb.m4 +++ b/build-aux/m4/bitcoin_find_bdb.m4 @@ -38,7 +38,7 @@ AC_DEFUN([BITCOIN_FIND_BDB62],[ done if test "x$bdbpath" = "xX"; then AC_MSG_RESULT([no]) - AC_MSG_ERROR([libdb_cxx headers missing, Bitcoin Core requires this library for wallet functionality (--disable-wallet to disable wallet functionality)]) + AC_MSG_ERROR([libdb_cxx headers missing, Hush source code requires this library for wallet functionality (1) (--disable-wallet to disable wallet functionality)]) elif test "x$bdb62path" = "xX"; then BITCOIN_SUBDIR_TO_INCLUDE(BDB_CPPFLAGS,[${bdbpath}],db_cxx) AC_ARG_WITH([incompatible-bdb],[AS_HELP_STRING([--with-incompatible-bdb], [allow using a bdb version other than 6.2])],[ @@ -60,7 +60,7 @@ AC_DEFUN([BITCOIN_FIND_BDB62],[ ]) done if test "x$BDB_LIBS" = "x"; then - AC_MSG_ERROR([libdb_cxx missing, Bitcoin Core requires this library for wallet functionality (--disable-wallet to disable wallet functionality)]) + AC_MSG_ERROR([libdb_cxx missing, Hush source code requires this library for wallet functionality (2) (--disable-wallet to disable wallet functionality)]) fi AC_SUBST(BDB_LIBS) ]) diff --git a/build.sh b/build.sh index 2ae8514c3..1367218b6 100755 --- a/build.sh +++ b/build.sh @@ -1,5 +1,7 @@ #!/bin/bash -# Copyright (c) 2019-2020 The Hush developers +# Copyright (c) 2016-2020 The Hush developers +# Distributed under the GPLv3 software license, see the accompanying +# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html set -eu -o pipefail -./zcutil/build.sh $@ +./zcutil/build.sh --disable-tests $@ diff --git a/configure.ac b/configure.ac index 148b2920a..5f62a6e5e 100644 --- a/configure.ac +++ b/configure.ac @@ -2,12 +2,12 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N) AC_PREREQ([2.60]) define(_CLIENT_VERSION_MAJOR, 3) define(_CLIENT_VERSION_MINOR, 6) -define(_CLIENT_VERSION_REVISION, 0) +define(_CLIENT_VERSION_REVISION, 1) define(_CLIENT_VERSION_BUILD, 50) define(_ZC_BUILD_VAL, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, m4_incr(_CLIENT_VERSION_BUILD), m4_eval(_CLIENT_VERSION_BUILD < 50), 1, m4_eval(_CLIENT_VERSION_BUILD - 24), m4_eval(_CLIENT_VERSION_BUILD == 50), 1, , m4_eval(_CLIENT_VERSION_BUILD - 50))) define(_CLIENT_VERSION_SUFFIX, m4_if(m4_eval(_CLIENT_VERSION_BUILD < 25), 1, _CLIENT_VERSION_REVISION-beta$1, m4_eval(_CLIENT_VERSION_BUILD < 50), 1, _CLIENT_VERSION_REVISION-rc$1, m4_eval(_CLIENT_VERSION_BUILD == 50), 1, _CLIENT_VERSION_REVISION, _CLIENT_VERSION_REVISION-$1))) define(_CLIENT_VERSION_IS_RELEASE, true) -define(_COPYRIGHT_YEAR, 2020) +define(_COPYRIGHT_YEAR, 2021) AC_INIT([Hush],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_SUFFIX(_ZC_BUILD_VAL)],[https://git.hush.is/hush/hush3],[hush]) AC_CONFIG_SRCDIR([src/main.cpp]) AC_CONFIG_HEADERS([src/config/bitcoin-config.h]) diff --git a/contrib/block_time.pl b/contrib/block_time.pl index 17da3c461..a97a742aa 100755 --- a/contrib/block_time.pl +++ b/contrib/block_time.pl @@ -1,6 +1,7 @@ #!/usr/bin/perl -# Copyright 2019-2020 The Hush developers -# Released under the GPLv3 +# Copyright (c) 2016-2020 The Hush developers +# Distributed under the GPLv3 software license, see the accompanying +# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html use warnings; use strict; diff --git a/contrib/checkpoints.pl b/contrib/checkpoints.pl index bf11a8f7f..673c0d007 100755 --- a/contrib/checkpoints.pl +++ b/contrib/checkpoints.pl @@ -1,15 +1,16 @@ #!/usr/bin/perl -# Copyright 2019-2020 The Hush developers -# Released under the GPLv3 +# Copyright 2016-2020 The Hush developers +# Copyright (c) 2016-2020 The Hush developers +# Distributed under the GPLv3 software license, see the accompanying +# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html use warnings; use strict; -# Generate checkpoint data for use in src/main.cpp -# TODO: update when blocktime changes to 75s -my $perday = 576; +# Generate checkpoint data for use in src/chainparams.cpp +my $perday = 1152; my $hush = "./src/hush-cli"; my $gethash = "$hush getblockhash"; -my $stride = shift || 5000; +my $stride = shift || 1000; my $count = 0; my $blocks = qx{$hush getblockcount}; if($?) { diff --git a/contrib/ci-workers/README.md b/contrib/ci-workers/README.md deleted file mode 100644 index 8ce9dc764..000000000 --- a/contrib/ci-workers/README.md +++ /dev/null @@ -1,62 +0,0 @@ -# Zcash CI workers - -This folder contains the Ansible playbooks for configuring a fresh OS -installation for use as a Buildbot worker in Zcash's CI. - -# Criteria for Adding Workers - -a. Don't add workers until users complain about a problem on a platform that - doesn't yet have workers. However, if we anticipate many users will use a - platform, we may pre-emptively add an unsupported worker for it. - -b. Prioritize the platforms that seem to have the most users. - -c. When adding workers, start by adding workers for the "most common" variant of - any distro. Then if users later encounter problems with a sub-variant, we can - consider adding new workers at that point. Example: add Ubuntu Desktop before - Xubuntu, on the assumption the former has a larger population base, and the - latter only materially differs in the GUI. - -# Setting up a latent worker on Amazon EC2 - -1. Add a regular (non-latent) worker to the master.cfg for dev-ci.z.cash, and - deploy the changes. - - This enables the Ansible playbook to run to completion, ending in the worker - connecting to the master. - -2. Start a basic EC2 instance using the template AMI for the target OS. - - Choose the smallest instance size, it won't be used for building Zcash. - -3. Figure out which user to log into the instance with. - - E.g. for the Ubuntu template, use "ubuntu" instead of "root" - - If you get an Ansible error later with a message like "Failed to connect to - the host via ssh: Received message too long 1349281121\r\n", that means the - instance is sending a text string in response to the SSH connection, and the - Ansible protocol is balking. Try manually logging in with the same - credentials to diagnose. - -4. Create `inventory/hosts` containing the following: - - [zcash-ci-worker-unix] - some-name ansible_host= ansible_ssh_user= - -5. Run `ansible-playbook -e buildbot_worker_host_template=templates/host.ec2.j2 -i inventory/hosts unix.yml`, - passing in the worker's Buildbot name and password. - - After a successful run, the worker should be connected to dev-ci.z.cash and - visible in its worker list. - -6. Create an AMI from the instance. This is the worker AMI to put into the - master.cfg for dev-ci.z.cash. - - 16 GB of storage should be sufficient. - -7. SSH into the instance, and edit the worker config to connect to ci.z.cash. - -8. Create an AMI from the instance. This is the worker AMI to put into the - master.cfg for ci.z.cash. - - 16 GB of storage should be sufficient. - -9. Delete the instance (it is no longer needed). - -10. Edit the master.cfg to turn the new worker into a latent (using the new AMI - IDs), add it to the appropriate worker groups, set up new builders etc. - - Deploy this via the normal PR review process. diff --git a/contrib/ci-workers/ansible.cfg b/contrib/ci-workers/ansible.cfg deleted file mode 100644 index c58fea3c0..000000000 --- a/contrib/ci-workers/ansible.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[ssh_connection] -pipelining = True diff --git a/contrib/ci-workers/files/bashrc b/contrib/ci-workers/files/bashrc deleted file mode 100644 index aaad18b92..000000000 --- a/contrib/ci-workers/files/bashrc +++ /dev/null @@ -1,2 +0,0 @@ -export PATH=$HOME/venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin -export EDITOR=vim diff --git a/contrib/ci-workers/grind.yml b/contrib/ci-workers/grind.yml deleted file mode 100644 index ef7e5758e..000000000 --- a/contrib/ci-workers/grind.yml +++ /dev/null @@ -1,27 +0,0 @@ ---- -# Configure a Buildbot worker -- include: unix.yml - -- name: Install grind-specific worker dependencies - hosts: zcash-ci-worker-unix - become: true - - vars_files: - - vars/default.yml - - tasks: - - name: Get dependencies for distribution - include_vars: "{{ item }}" - with_first_found: - - files: - - "vars/{{ ansible_distribution }}-{{ ansible_distribution_version }}.yml" - - "vars/{{ ansible_distribution }}-{{ ansible_distribution_major_version | int }}.yml" - - "vars/{{ ansible_distribution }}.yml" - - "vars/{{ ansible_os_family }}.yml" - skip: true - - - name: Install required packages - package: - name: "{{ item }}" - state: present - with_items: "{{ grind_deps }}" diff --git a/contrib/ci-workers/tasks/install-brew.yml b/contrib/ci-workers/tasks/install-brew.yml deleted file mode 100644 index 5faedad0b..000000000 --- a/contrib/ci-workers/tasks/install-brew.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- -- name: Check if brew is installed - stat: - path: /usr/local/bin/brew - register: brew_check - -- name: Fail if brew is unavailable - fail: - msg: 'brew is not installed! Please install Homebrew: https://docs.brew.sh/Installation.html' - when: not brew_check.stat.exists diff --git a/contrib/ci-workers/tasks/install-pip.yml b/contrib/ci-workers/tasks/install-pip.yml deleted file mode 100644 index 8beff50ef..000000000 --- a/contrib/ci-workers/tasks/install-pip.yml +++ /dev/null @@ -1,8 +0,0 @@ ---- -- name: Fetch pip installer - get_url: - url: https://bootstrap.pypa.io/get-pip.py - dest: /tmp/get-pip.py - -- name: Install pip - command: "{{ ansible_python.executable }} /tmp/get-pip.py" diff --git a/contrib/ci-workers/templates/buildbot-worker.plist.j2 b/contrib/ci-workers/templates/buildbot-worker.plist.j2 deleted file mode 100644 index 225c73b8a..000000000 --- a/contrib/ci-workers/templates/buildbot-worker.plist.j2 +++ /dev/null @@ -1,23 +0,0 @@ - - - - - Label - net.buildbot.worker - ProgramArguments - - {{ buildbot_worker_dir }}/venv/bin/buildbot-worker - start - {{ buildbot_worker_name }} - - WorkingDirectory - {{ buildbot_worker_dir }} - UserName - {{ buildbot_worker_user }} - KeepAlive - - NetworkState - - - - diff --git a/contrib/ci-workers/templates/buildbot-worker.service.j2 b/contrib/ci-workers/templates/buildbot-worker.service.j2 deleted file mode 100644 index 625323be6..000000000 --- a/contrib/ci-workers/templates/buildbot-worker.service.j2 +++ /dev/null @@ -1,17 +0,0 @@ -[Unit] -Description=Buildbot worker -Wants=network.target -After=network.target - -[Service] -Type=forking -PIDFile={{ buildbot_worker_dir }}/{{ buildbot_worker_name }}/twistd.pid -WorkingDirectory={{ buildbot_worker_dir }} -ExecStart={{ buildbot_worker_dir }}/venv/bin/buildbot-worker start {{ buildbot_worker_name }} -ExecReload={{ buildbot_worker_dir }}/venv/bin/buildbot-worker restart {{ buildbot_worker_name }} -ExecStop={{ buildbot_worker_dir }}/venv/bin/buildbot-worker stop {{ buildbot_worker_name }} -Restart=always -User={{ buildbot_worker_user }} - -[Install] -WantedBy=multi-user.target diff --git a/contrib/ci-workers/templates/host.ec2.j2 b/contrib/ci-workers/templates/host.ec2.j2 deleted file mode 100644 index dee692e02..000000000 --- a/contrib/ci-workers/templates/host.ec2.j2 +++ /dev/null @@ -1 +0,0 @@ -OS: {{ ansible_distribution }} {{ ansible_distribution_version }} diff --git a/contrib/ci-workers/templates/host.j2 b/contrib/ci-workers/templates/host.j2 deleted file mode 100644 index 65c4cb709..000000000 --- a/contrib/ci-workers/templates/host.j2 +++ /dev/null @@ -1,3 +0,0 @@ -OS: {{ ansible_distribution }} {{ ansible_distribution_version }} -Memory: {{ ansible_memtotal_mb }} MB -CPU: {{ ansible_processor if ansible_processor is string else ansible_processor[1] }} ({{ ansible_processor_cores }} cores) diff --git a/contrib/ci-workers/unix.yml b/contrib/ci-workers/unix.yml deleted file mode 100644 index cbb693401..000000000 --- a/contrib/ci-workers/unix.yml +++ /dev/null @@ -1,209 +0,0 @@ ---- -- name: Configure a Buildbot worker for Zcash CI - hosts: zcash-ci-worker-unix - become: true - gather_facts: False - - vars_files: - - vars/default.yml - - vars/buildbot.yml - - vars_prompt: - - name: "buildbot_worker_admin" - prompt: "Admin details" - default: "Zcash " - - name: "buildbot_worker_name" - prompt: "Buildbot worker name (provided by ZECC)" - private: no - - name: "buildbot_worker_password" - prompt: "Buildbot worker password (provided by ZECC)" - - pre_tasks: - - name: Install Python 2.7 for Ansible and Buildbot - raw: test -e /usr/bin/python || test -e /usr/bin/python2 || test -e /usr/bin/python2.7 || test -e /usr/local/bin/python2.7 || (test -e /usr/bin/apt && apt -qqy update && apt install -qqy python) || (test -e /usr/bin/dnf && dnf install -qqy python2) || (test -e /usr/sbin/pkg && pkg install -qqy python2) - register: output - changed_when: - - output.stdout != "" - - output.stdout != "\r\n" - - - name: Check if Python is in the configured location - raw: test -e {{ ansible_python_interpreter }} - ignore_errors: true - register: python_check - when: ansible_python_interpreter is defined - - - name: Fail if configured Python is unavailable - fail: - msg: "Python is not accessible at {{ ansible_python_interpreter }} on this host! Please set the inventory variable 'ansible_python_interpreter' to the location of the Python 2.7 binary." - when: ansible_python_interpreter is defined and python_check.rc == 1 - - - name: Check if Python is in the default location - raw: test -e /usr/bin/python - ignore_errors: true - register: python_check - when: ansible_python_interpreter is undefined - - - name: Fail if default Python is unavailable - fail: - msg: Python is not accessible at /usr/bin/python on this host! Please set the inventory variable 'ansible_python_interpreter' to the location of the Python 2.7 binary. - when: ansible_python_interpreter is undefined and python_check.rc == 1 - - - name: Gathering Facts - setup: - tags: deps - - - name: Fail if Python is the wrong version - fail: - msg: "The Python binary at {{ ansible_python.executable }} is version {{ ansible_python_version }}! Please set the inventory variable 'ansible_python_interpreter' to the location of the Python 2.7 binary." - when: ansible_python.version.major != 2 or ansible_python.version.minor != 7 - - tasks: - - name: Get dependencies for distribution - include_vars: "{{ item }}" - with_first_found: - - files: - - "vars/{{ ansible_distribution }}-{{ ansible_distribution_version }}.yml" - - "vars/{{ ansible_distribution }}-{{ ansible_distribution_major_version | int }}.yml" - - "vars/{{ ansible_distribution }}.yml" - - "vars/{{ ansible_os_family }}.yml" - skip: true - tags: deps - - - name: Collate dependencies - set_fact: - package_deps: "{{ buildbot_deps + fetch_deps + conf_deps + build_deps + link_deps + dist_deps }}" - python_modules: "{{ buildbot_modules + rpc_test_modules }}" - tags: deps - - - name: Install Homebrew [MacOSX] - include: tasks/install-brew.yml - when: ansible_distribution == 'MacOSX' - tags: deps - - - name: Update rolling release [Arch Linux] - pacman: - update_cache: yes - upgrade: yes - when: ansible_distribution == 'Archlinux' - tags: deps - - - name: Install required packages - package: - name: "{{ item }}" - state: present - with_items: "{{ package_deps }}" - become_user: "{{ ansible_ssh_user if ansible_distribution == 'MacOSX' else 'root' }}" - tags: deps - - - name: Install pip [CentOS, MacOSX] - include: tasks/install-pip.yml - when: ansible_distribution in ['CentOS', 'MacOSX'] - - - name: Install required Python system modules - pip: - name: "{{ item }}" - state: latest - executable: "{{ '/usr/local/bin/pip' if ansible_distribution == 'MacOSX' else omit }}" - with_items: "{{ system_modules }}" - - - name: Set up the Buildbot worker user - user: - name: "{{ buildbot_worker_user }}" - comment: Buildbot worker - shell: /bin/bash - state: present - - - name: Get absolute path to Buildbot worker home directory - command: echo ~ - register: homedir - become_user: "{{ buildbot_worker_user }}" - - - name: Save absolute path to Buildbot worker home directory - set_fact: - buildbot_worker_dir: "{{ homedir.stdout }}" - - - name: Install required Python modules - pip: - name: "{{ item }}" - state: latest - virtualenv: "~{{ buildbot_worker_user }}/venv" - virtualenv_command: "{{ '/usr/local/bin/virtualenv' if ansible_distribution == 'MacOSX' else omit }}" - with_items: "{{ python_modules }}" - become_user: "{{ buildbot_worker_user }}" - notify: restart buildbot-worker - - - name: Create Buildbot worker - command: > - ~{{ buildbot_worker_user }}/venv/bin/buildbot-worker create-worker ~/{{ buildbot_worker_name }} - {{ buildbot_master_host }}:{{ buildbot_master_port }} - {{ buildbot_worker_name|quote }} {{ buildbot_worker_password|quote }} - args: - creates: "~/{{ buildbot_worker_name }}/buildbot.tac" - become_user: "{{ buildbot_worker_user }}" - - - name: Set admin details for Buildbot worker - copy: - content: "{{ buildbot_worker_admin }}" - dest: "~{{ buildbot_worker_user }}/{{ buildbot_worker_name }}/info/admin" - owner: "{{ buildbot_worker_user }}" - group: "{{ omit if ansible_distribution == 'MacOSX' else buildbot_worker_user }}" - mode: "0644" - - - name: Set host details for Buildbot worker - template: - src: "{{ buildbot_worker_host_template }}" - dest: "~{{ buildbot_worker_user }}/{{ buildbot_worker_name }}/info/host" - owner: "{{ buildbot_worker_user }}" - group: "{{ omit if ansible_distribution == 'MacOSX' else buildbot_worker_user }}" - mode: "0644" - - - name: Install custom bashrc for virtualenv - copy: - src: bashrc - dest: "~{{ buildbot_worker_user }}/.bashrc" - owner: "{{ buildbot_worker_user }}" - group: "{{ omit if ansible_distribution == 'MacOSX' else buildbot_worker_user }}" - mode: "0644" - - - name: Copy Buildbot worker systemd service unit - template: - src: templates/buildbot-worker.service.j2 - dest: "/etc/systemd/system/buildbot-worker.service" - owner: root - group: root - mode: "0644" - when: ansible_distribution != 'MacOSX' - notify: reload systemd - - - name: Copy Buildbot worker launchd service unit - template: - src: templates/buildbot-worker.plist.j2 - dest: "/Library/LaunchDaemons/net.buildbot.worker.plist" - owner: root - group: wheel - mode: "0644" - when: ansible_distribution == 'MacOSX' - - - name: Start Buildbot worker - service: - name: buildbot-worker - state: started - enabled: yes - when: ansible_distribution != 'MacOSX' - - - name: Load Buildbot worker service [MacOSX] - command: launchctl load /Library/LaunchDaemons/net.buildbot.worker.plist - when: ansible_distribution == 'MacOSX' - - - name: Start Buildbot worker [MacOSX] - command: launchctl start net.buildbot.worker - when: ansible_distribution == 'MacOSX' - - handlers: - - name: restart buildbot-worker - service: - name: buildbot-worker - state: restarted - - - name: reload systemd - command: /bin/systemctl daemon-reload diff --git a/contrib/ci-workers/vars/Archlinux.yml b/contrib/ci-workers/vars/Archlinux.yml deleted file mode 100644 index 50e5577c3..000000000 --- a/contrib/ci-workers/vars/Archlinux.yml +++ /dev/null @@ -1,7 +0,0 @@ ---- -buildbot_deps: - - python2-pip -build_deps: - - cmake - - multilib/gcc - - make diff --git a/contrib/ci-workers/vars/CentOS.yml b/contrib/ci-workers/vars/CentOS.yml deleted file mode 100644 index f577af5c0..000000000 --- a/contrib/ci-workers/vars/CentOS.yml +++ /dev/null @@ -1,13 +0,0 @@ ---- -buildbot_deps: [] # Empty to remove python-pip -build_deps: - - bzip2 - - cmake - - gcc - - gcc-c++ - - make - - patch -dist_deps: - - pkgconfig # Required until b556beda264308e040f8d88aca4f2f386a0183d9 is pulled in - - python-devel - - redhat-rpm-config diff --git a/contrib/ci-workers/vars/Debian.yml b/contrib/ci-workers/vars/Debian.yml deleted file mode 100644 index b6a46f0cd..000000000 --- a/contrib/ci-workers/vars/Debian.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -build_deps: - - build-essential # Depends on g++, libc6-dev, make - - cmake -dist_deps: - - python-dev diff --git a/contrib/ci-workers/vars/Fedora.yml b/contrib/ci-workers/vars/Fedora.yml deleted file mode 100644 index 2a7351c69..000000000 --- a/contrib/ci-workers/vars/Fedora.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -build_deps: - - cmake - - gcc - - gcc-c++ - - make - - patch -dist_deps: - - pkgconfig # Required until b556beda264308e040f8d88aca4f2f386a0183d9 is pulled in - - python-devel - - redhat-rpm-config diff --git a/contrib/ci-workers/vars/FreeBSD.yml b/contrib/ci-workers/vars/FreeBSD.yml deleted file mode 100644 index 4b1f01997..000000000 --- a/contrib/ci-workers/vars/FreeBSD.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- -buildbot_deps: - - py27-pip -build_deps: - - cmake - - gcc - - gmake -dist_deps: - - bash - - pkgconf # Required until b556beda264308e040f8d88aca4f2f386a0183d9 is pulled in diff --git a/contrib/ci-workers/vars/MacOSX.yml b/contrib/ci-workers/vars/MacOSX.yml deleted file mode 100644 index 80b1ae608..000000000 --- a/contrib/ci-workers/vars/MacOSX.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -buildbot_deps: - - coreutils # For gnproc etc. -# Most are already installed -build_deps: - - cmake diff --git a/contrib/ci-workers/vars/Ubuntu.yml b/contrib/ci-workers/vars/Ubuntu.yml deleted file mode 100644 index 0d0f584b4..000000000 --- a/contrib/ci-workers/vars/Ubuntu.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -build_deps: - - build-essential # Depends on g++, libc6-dev, make - - cmake diff --git a/contrib/ci-workers/vars/buildbot.yml b/contrib/ci-workers/vars/buildbot.yml deleted file mode 100644 index 38e3fd25a..000000000 --- a/contrib/ci-workers/vars/buildbot.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -buildbot_worker_user: zcbbworker -buildbot_master_host: dev-ci.z.cash -buildbot_master_port: 9899 -buildbot_worker_host_template: templates/host.j2 diff --git a/contrib/ci-workers/vars/default.yml b/contrib/ci-workers/vars/default.yml deleted file mode 100644 index a0b0da9e6..000000000 --- a/contrib/ci-workers/vars/default.yml +++ /dev/null @@ -1,53 +0,0 @@ ---- -# These variables can be overridden in distribution files. - -# Dependencies required to install Buildbot -buildbot_deps: - - python-pip # So we can install Python modules - -# Dependencies required to download files -fetch_deps: - - curl # For depends/ - - git - - wget # For zcutil/fetch-params.sh - -# Dependencies required to configure Zcash -conf_deps: - - autoconf - - automake - - m4 - - pkg-config - -# Dependencies required to compile Zcash -build_deps: - - cmake - - g++ - - gcc - - make - -# Dependencies required to link Zcash -link_deps: - - libtool - -# Additional distribution-specific dependencies -dist_deps: [] - -# Additional grind-specific dependencies -grind_deps: - - lcov - - valgrind - -# Python modules required on the system -system_modules: - - virtualenv - -# Python modules required for a Zcash Buildbot worker -buildbot_modules: - - pip # Needs to be updated first so Buildbot installs - - buildbot-worker - - pyflakes - -# Python modules required to run the Zcash RPC test suite -rpc_test_modules: - - pyblake2 - - pyzmq diff --git a/contrib/debian/copyright b/contrib/debian/copyright index 2f51f4a4c..f2d71c287 100644 --- a/contrib/debian/copyright +++ b/contrib/debian/copyright @@ -1,16 +1,8 @@ -Format: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?rev=174 -Upstream-Name: Zcash -Upstream-Contact: Zcash Company -Source: https://github.com/zcash/zcash - Files: * -Copyright: 2016-2018, The Zcash developers - 2009-2018, Bitcoin Core developers - 2009-2018, Bitcoin Developers -License: Expat -Comment: The Bitcoin Core developers encompasses the current developers listed on bitcoin.org, - as well as the numerous contributors to the project. - The Zcash developers are listed at https://z.cash/team.html. +Copyright: 2016-2020, The Hush developers + 2009-2016, Bitcoin Core developers +License: GPLv3 +Comment: https://hush.is/developers Files: depends/sources/libsodium-*.tar.gz Copyright: 2013-2016 Frank Denis @@ -31,10 +23,6 @@ Copyright: 1990, 2016 Oracle and/or its affiliates; 2000-2005 INRIA, France Telecom License: BDB -Files: depends/sources/openssl-*.tar.gz -Copyright: 1998-2016 The OpenSSL Project and 1995-1998 Eric Young -License: OpenSSL+SSLeay - Files: depends/sources/zeromq-*.tar.gz Copyright: 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007 Free Software Foundation, Inc. diff --git a/contrib/debian/examples/HUSH3.conf b/contrib/debian/examples/HUSH3.conf index 656a43533..f11e309c1 100644 --- a/contrib/debian/examples/HUSH3.conf +++ b/contrib/debian/examples/HUSH3.conf @@ -1,6 +1,4 @@ -## -## komodo.conf configuration file. Lines beginning with # are comments. -## +## HUSH3.conf configuration file. Lines beginning with # are comments. # Network-related settings: @@ -13,8 +11,8 @@ # Bind to given address and always listen on it. Use [host]:port notation for IPv6 #bind= -# Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6 -#whitebind= +# Bind to given address and allowlist peers connecting to it. Use [host]:port notation for IPv6 +#allowbind= ############################################################## ## Quick Primer on addnode vs connect ## @@ -54,10 +52,10 @@ #maxconnections= # -# JSON-RPC options (for controlling a running Komodo/komodod process) +# JSON-RPC options (for controlling a running hushd process) # -# server=1 tells komodod to accept JSON-RPC commands (set as default if not specified) +# server=1 tells node to accept JSON-RPC commands (set as default if not specified) #server=1 # Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. @@ -68,7 +66,7 @@ #rpcuser=Ulysses #rpcpassword=YourSuperGreatPasswordNumber_DO_NOT_USE_THIS_OR_YOU_WILL_GET_ROBBED_385593 -# How many seconds komodo will wait for a complete RPC HTTP request. +# How many seconds node will wait for a complete RPC HTTP request. # after the HTTP connection is established. #rpcclienttimeout=30 @@ -78,8 +76,7 @@ # NOTE: opening up the RPC port to hosts outside your local trusted network is NOT RECOMMENDED, # because the rpcpassword is transmitted over the network unencrypted and also because anyone -# that can authenticate on the RPC port can steal your keys + take over the account running komodod -# For more information see https://github.com/zcash/zcash/issues/1497 +# that can authenticate on the RPC port can steal your keys + take over the account running hushd #rpcallowip=10.1.1.34/255.255.255.0 #rpcallowip=1.2.3.4/24 @@ -88,7 +85,7 @@ # Listen for RPC connections on this TCP port: #rpcport=8232 -# You can use Komodo or komodod to send commands to Komodo/komodod +# You can use hushd to send commands to hushd # running on another host using this option: #rpcconnect=127.0.0.1 @@ -103,13 +100,13 @@ # Miscellaneous options -# Enable attempt to mine komodo. +# Enable attempt to mine HUSH #gen=0 -# Set the number of threads to be used for mining komodo (-1 = all cores). +# Set the number of threads to be used for mining (-1 = all cores). #genproclimit=1 -# Specify a different Equihash solver (e.g. "tromp") to try to mine komodo +# Specify a different Equihash solver (e.g. "tromp") to try to mine # faster when gen=1. #equihashsolver=default @@ -117,7 +114,7 @@ # both prior transactions and several dozen future transactions. #keypool=100 -# Pay an optional transaction fee every time you send komodo. Transactions with fees +# Pay an optional transaction fee every time you send a tx. Transactions with fees # are more likely than free transactions to be included in generated blocks, so may # be validated sooner. This setting does not affect private transactions created with # 'z_sendmany'. diff --git a/contrib/debian/examples/komodo.conf b/contrib/debian/examples/komodo.conf deleted file mode 100644 index 656a43533..000000000 --- a/contrib/debian/examples/komodo.conf +++ /dev/null @@ -1,140 +0,0 @@ -## -## komodo.conf configuration file. Lines beginning with # are comments. -## - -# Network-related settings: - -# Run a regression test network -#regtest=0 - -# Connect via a SOCKS5 proxy -#proxy=127.0.0.1:9050 - -# Bind to given address and always listen on it. Use [host]:port notation for IPv6 -#bind= - -# Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6 -#whitebind= - -############################################################## -## Quick Primer on addnode vs connect ## -## Let's say for instance you use addnode=4.2.2.4 ## -## addnode will connect you to and tell you about the ## -## nodes connected to 4.2.2.4. In addition it will tell ## -## the other nodes connected to it that you exist so ## -## they can connect to you. ## -## connect will not do the above when you 'connect' to it. ## -## It will *only* connect you to 4.2.2.4 and no one else.## -## ## -## So if you're behind a firewall, or have other problems ## -## finding nodes, add some using 'addnode'. ## -## ## -## If you want to stay private, use 'connect' to only ## -## connect to "trusted" nodes. ## -## ## -## If you run multiple nodes on a LAN, there's no need for ## -## all of them to open lots of connections. Instead ## -## 'connect' them all to one node that is port forwarded ## -## and has lots of connections. ## -## Thanks goes to [Noodle] on Freenode. ## -############################################################## - -# Use as many addnode= settings as you like to connect to specific peers -#addnode=69.164.218.197 -#addnode=10.0.0.2:8233 - -# Alternatively use as many connect= settings as you like to connect ONLY to specific peers -#connect=69.164.218.197 -#connect=10.0.0.1:8233 - -# Listening mode, enabled by default except when 'connect' is being used -#listen=1 - -# Maximum number of inbound+outbound connections. -#maxconnections= - -# -# JSON-RPC options (for controlling a running Komodo/komodod process) -# - -# server=1 tells komodod to accept JSON-RPC commands (set as default if not specified) -#server=1 - -# Bind to given address to listen for JSON-RPC connections. Use [host]:port notation for IPv6. -# This option can be specified multiple times (default: bind to all interfaces) -#rpcbind= - -# You must set rpcuser and rpcpassword to secure the JSON-RPC api -#rpcuser=Ulysses -#rpcpassword=YourSuperGreatPasswordNumber_DO_NOT_USE_THIS_OR_YOU_WILL_GET_ROBBED_385593 - -# How many seconds komodo will wait for a complete RPC HTTP request. -# after the HTTP connection is established. -#rpcclienttimeout=30 - -# By default, only RPC connections from localhost are allowed. -# Specify as many rpcallowip= settings as you like to allow connections from other hosts, -# either as a single IPv4/IPv6 or with a subnet specification. - -# NOTE: opening up the RPC port to hosts outside your local trusted network is NOT RECOMMENDED, -# because the rpcpassword is transmitted over the network unencrypted and also because anyone -# that can authenticate on the RPC port can steal your keys + take over the account running komodod -# For more information see https://github.com/zcash/zcash/issues/1497 - -#rpcallowip=10.1.1.34/255.255.255.0 -#rpcallowip=1.2.3.4/24 -#rpcallowip=2001:db8:85a3:0:0:8a2e:370:7334/96 - -# Listen for RPC connections on this TCP port: -#rpcport=8232 - -# You can use Komodo or komodod to send commands to Komodo/komodod -# running on another host using this option: -#rpcconnect=127.0.0.1 - -# Transaction Fee - -# Send transactions as zero-fee transactions if possible (default: 0) -#sendfreetransactions=0 - -# Create transactions that have enough fees (or priority) so they are likely to # begin confirmation within n blocks (default: 1). -# This setting is overridden by the -paytxfee option. -#txconfirmtarget=n - -# Miscellaneous options - -# Enable attempt to mine komodo. -#gen=0 - -# Set the number of threads to be used for mining komodo (-1 = all cores). -#genproclimit=1 - -# Specify a different Equihash solver (e.g. "tromp") to try to mine komodo -# faster when gen=1. -#equihashsolver=default - -# Pre-generate this many public/private key pairs, so wallet backups will be valid for -# both prior transactions and several dozen future transactions. -#keypool=100 - -# Pay an optional transaction fee every time you send komodo. Transactions with fees -# are more likely than free transactions to be included in generated blocks, so may -# be validated sooner. This setting does not affect private transactions created with -# 'z_sendmany'. -#paytxfee=0.00 - -#Rewind the chain to specific block height. This is useful for creating snapshots at a given block height. -#rewind=777777 - -#Stop the chain a specific block height. This is useful for creating snapshots at a given block height. -#stopat=1000000 - -#Set an address to use as change address for all transactions. This value must be set to a 33 byte pubkey. All mined coins will also be sent to this address. -#pubkey=027dc7b5cfb5efca96674b45e9fda18df069d040b9fd9ff32c35df56005e330392 - -#Forfeit all user rewards to miners. Set this to explicitly not claim user rewards. -#exchange=1 - -#Donate all user rewards to a a specific address. This value must be set to a 33 byte pubkey. -#donation=027dc7b5cfb5efca96674b45e9fda18df069d040b9fd9ff32c35df56005e330392 - diff --git a/contrib/devtools/gen-linux-binary-release.sh b/contrib/devtools/gen-linux-binary-release.sh index 21d4d70b9..a8ae359cb 100755 --- a/contrib/devtools/gen-linux-binary-release.sh +++ b/contrib/devtools/gen-linux-binary-release.sh @@ -1,10 +1,9 @@ #!/bin/bash -# Copyright (c) 2019-2020 The Hush developers +# Copyright (c) 2016-2020 The Hush developers # Released under the GPLv3 - #TODO: autodect version number, error handling -FILE="hush-3.5.0-linux-amd64.tar" +FILE="hush-3.6.0-linux-amd64.tar" mkdir build cp sapling*.params build/ diff --git a/contrib/devtools/gen-manpages.sh b/contrib/devtools/gen-manpages.sh index 804caca7c..494f8da68 100755 --- a/contrib/devtools/gen-manpages.sh +++ b/contrib/devtools/gen-manpages.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (c) 2019 The Hush developers +# Copyright (c) 2016-2020 The Hush developers # Released under the GPLv3 TOPDIR=${TOPDIR:-$(git rev-parse --show-toplevel)} @@ -12,12 +12,12 @@ HUSHTX=${HUSHTX:-$SRCDIR/hush-tx} [ ! -x $HUSHD ] && echo "$HUSHD not found or not executable." && exit 1 -#HUSHVER="v3.3.0" -HUSHVER=$(./src/hushd --version|head -n2|tail -n1|cut -d' ' -f4|cut -d- -f1) +HUSHVER="v3.6.1" +#HUSHVER=$(./src/hushd --version|head -n2|tail -n1|cut -d' ' -f4|cut -d- -f1) # Create a footer file with copyright content. -# This gets autodetected fine for komodod if --version-string is not set, -# but has different outcomes for komodo-cli. +# This gets autodetected fine for hushd if --version-string is not set, +# but has different outcomes for hush-cli. echo "[COPYRIGHT]" > footer.h2m $HUSHD --version | sed -n '1!p' >> footer.h2m diff --git a/contrib/devtools/symbol-check.py b/contrib/devtools/symbol-check.py index ea671d774..664895a09 100755 --- a/contrib/devtools/symbol-check.py +++ b/contrib/devtools/symbol-check.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # Copyright (c) 2014 Wladimir J. van der Laan -# Distributed under the MIT software license, see the accompanying +# Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html ''' A script to check that the (Linux) executables produced by gitian only contain diff --git a/contrib/fresh_clone_compile_and_run.sh b/contrib/fresh_clone_compile_and_run.sh new file mode 100644 index 000000000..95c89c5fb --- /dev/null +++ b/contrib/fresh_clone_compile_and_run.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# Copyright (c) 2016-2020 The Hush developers +# Distributed under the GPLv3 software license, see the accompanying +# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html +# OPEN BOUNTY +# Send your CPU and RAM and time it takes to sync a HUSH full node for +# 5 HUSH as thanks for decentralized performance testing +git clone https://git.hush.is/hush/hush3 +cd hush3 +# Build with 2 cores +# You need 2GB of RAM per core, don't use too many +# (GB of RAM)/2 - 1 is the optimal core count for compiling Hush +# `nproc` tells you how many cores you have +JOBS=2 +# Want to fix this parrallel-only build system bug we inherited ? you are a new hush dev +./build.sh -j$JOBS;make -j$JOBS;make -j$JOBS;make -j$JOBS +./src/hushd &> hush.log & +# You can give the entire or parts of this file to Hush developers for debugging, +# but there is a lot of metadata!!! We don't want any more than we need to fix bugz +tail -f hush.log diff --git a/contrib/hush-cli.bash-completion b/contrib/hush-cli.bash-completion index b750e4ae9..90209c0d7 100644 --- a/contrib/hush-cli.bash-completion +++ b/contrib/hush-cli.bash-completion @@ -1,7 +1,7 @@ # bash programmable completion for hush-cli(1) # Copyright (c) 2012-2016 The Bitcoin Core developers -# Copyright (c) 2018 The Hush developers -# Distributed under the MIT software license, see the accompanying +# Copyright (c) 2018-2020 The Hush developers +# Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # call $hush-cli for RPC diff --git a/contrib/hush-tx.bash-completion b/contrib/hush-tx.bash-completion index b49ada489..23fcacf0c 100644 --- a/contrib/hush-tx.bash-completion +++ b/contrib/hush-tx.bash-completion @@ -1,6 +1,6 @@ # bash programmable completion for hush-tx(1) # Copyright (c) 2016 The Bitcoin Core developers -# Distributed under the MIT software license, see the accompanying +# Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html _hush_tx() { diff --git a/contrib/hush_block_subsidy_per_halving b/contrib/hush_block_subsidy_per_halving index 7e7b05b4b..9e58c5e2a 100755 --- a/contrib/hush_block_subsidy_per_halving +++ b/contrib/hush_block_subsidy_per_halving @@ -1,5 +1,5 @@ #!/usr/bin/env perl -# Copyright 2019-2020 The Hush developers +# Copyright 2016-2020 The Hush developers # Released under the GPLv3 use strict; diff --git a/contrib/hush_halvings b/contrib/hush_halvings index 67246bb13..4352cf875 100755 --- a/contrib/hush_halvings +++ b/contrib/hush_halvings @@ -1,5 +1,5 @@ #!/usr/bin/env perl -# Copyright 2019-2020 The Hush developers +# Copyright 2016-2020 The Hush developers # Released under the GPLv3 use strict; diff --git a/contrib/hush_scanner b/contrib/hush_scanner index f43b3994f..7905cce97 100755 --- a/contrib/hush_scanner +++ b/contrib/hush_scanner @@ -1,6 +1,7 @@ #!/usr/bin/env perl -# Copyright (c) 2019 The Hush developers -# Released under the GPLv3 +# Copyright (c) 2016-2020 The Hush developers +# Distributed under the GPLv3 software license, see the accompanying +# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html use strict; use warnings; diff --git a/contrib/hush_supply b/contrib/hush_supply index fcf4460dc..89bb91f87 100755 --- a/contrib/hush_supply +++ b/contrib/hush_supply @@ -1,5 +1,5 @@ #!/usr/bin/env perl -# Copyright 2019-2020 The Hush developers +# Copyright 2016-2020 The Hush developers # Released under the GPLv3 use warnings; use strict; diff --git a/contrib/hush_supply_old b/contrib/hush_supply_old index 674424073..408b53dca 100755 --- a/contrib/hush_supply_old +++ b/contrib/hush_supply_old @@ -1,5 +1,5 @@ #!/usr/bin/env perl -# Copyright 2019-2020 The Hush developers +# Copyright 2016-2020 The Hush developers # Released under the GPLv3 use warnings; use strict; diff --git a/contrib/hushd.bash-completion b/contrib/hushd.bash-completion index 418659a16..bd341a6fd 100644 --- a/contrib/hushd.bash-completion +++ b/contrib/hushd.bash-completion @@ -2,7 +2,7 @@ # Copyright (c) 2012-2017 The Bitcoin Core developers # Copyright (c) 2016-2017 The Zcash developers # Copyright (c) 2018 The Hush developers -# Distributed under the MIT software license, see the accompanying +# Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html _hushd() { diff --git a/contrib/init/README.md b/contrib/init/README.md index 0d19da303..d3142512e 100644 --- a/contrib/init/README.md +++ b/contrib/init/README.md @@ -1,10 +1,12 @@ +# Example System Configs + Sample configuration files for: -SystemD: bitcoind.service -Upstart: bitcoind.conf -OpenRC: bitcoind.openrc - bitcoind.openrcconf -CentOS: bitcoind.init +SystemD: hushd.service +Upstart: hushd.conf +OpenRC: hushd.openrc + hushd.openrcconf +CentOS: hushd.init have been made available to assist packagers in creating node packages here. diff --git a/contrib/init/bitcoind.conf b/contrib/init/bitcoind.conf deleted file mode 100644 index f9554eecd..000000000 --- a/contrib/init/bitcoind.conf +++ /dev/null @@ -1,65 +0,0 @@ -description "Bitcoin Core Daemon" - -start on runlevel [2345] -stop on starting rc RUNLEVEL=[016] - -env BITCOIND_BIN="/usr/bin/bitcoind" -env BITCOIND_USER="bitcoin" -env BITCOIND_GROUP="bitcoin" -env BITCOIND_PIDDIR="/var/run/bitcoind" -# upstart can't handle variables constructed with other variables -env BITCOIND_PIDFILE="/var/run/bitcoind/bitcoind.pid" -env BITCOIND_CONFIGFILE="/etc/bitcoin/bitcoin.conf" -env BITCOIND_DATADIR="/var/lib/bitcoind" - -expect fork - -respawn -respawn limit 5 120 -kill timeout 60 - -pre-start script - # this will catch non-existent config files - # bitcoind will check and exit with this very warning, but it can do so - # long after forking, leaving upstart to think everything started fine. - # since this is a commonly encountered case on install, just check and - # warn here. - if ! grep -qs '^rpcpassword=' "$BITCOIND_CONFIGFILE" ; then - echo "ERROR: You must set a secure rpcpassword to run bitcoind." - echo "The setting must appear in $BITCOIND_CONFIGFILE" - echo - echo "This password is security critical to securing wallets " - echo "and must not be the same as the rpcuser setting." - echo "You can generate a suitable random password using the following" - echo "command from the shell:" - echo - echo "bash -c 'tr -dc a-zA-Z0-9 < /dev/urandom | head -c32 && echo'" - echo - echo "It is also recommended that you also set alertnotify so you are " - echo "notified of problems:" - echo - echo "ie: alertnotify=echo %%s | mail -s \"Bitcoin Alert\"" \ - "admin@foo.com" - echo - exit 1 - fi - - mkdir -p "$BITCOIND_PIDDIR" - chmod 0755 "$BITCOIND_PIDDIR" - chown $BITCOIND_USER:$BITCOIND_GROUP "$BITCOIND_PIDDIR" - chown $BITCOIND_USER:$BITCOIND_GROUP "$BITCOIND_CONFIGFILE" - chmod 0660 "$BITCOIND_CONFIGFILE" -end script - -exec start-stop-daemon \ - --start \ - --pidfile "$BITCOIND_PIDFILE" \ - --chuid $BITCOIND_USER:$BITCOIND_GROUP \ - --exec "$BITCOIND_BIN" \ - -- \ - -pid="$BITCOIND_PIDFILE" \ - -conf="$BITCOIND_CONFIGFILE" \ - -datadir="$BITCOIND_DATADIR" \ - -disablewallet \ - -daemon - diff --git a/contrib/init/bitcoind.openrc b/contrib/init/bitcoind.openrc deleted file mode 100644 index eda1a96fb..000000000 --- a/contrib/init/bitcoind.openrc +++ /dev/null @@ -1,92 +0,0 @@ -#!/sbin/runscript - -# backward compatibility for existing gentoo layout -# -if [ -d "/var/lib/bitcoin/.bitcoin" ]; then - BITCOIND_DEFAULT_DATADIR="/var/lib/bitcoin/.bitcoin" -else - BITCOIND_DEFAULT_DATADIR="/var/lib/bitcoind" -fi - -BITCOIND_CONFIGFILE=${BITCOIND_CONFIGFILE:-/etc/bitcoin/bitcoin.conf} -BITCOIND_PIDDIR=${BITCOIND_PIDDIR:-/var/run/bitcoind} -BITCOIND_PIDFILE=${BITCOIND_PIDFILE:-${BITCOIND_PIDDIR}/bitcoind.pid} -BITCOIND_DATADIR=${BITCOIND_DATADIR:-${BITCOIND_DEFAULT_DATADIR}} -BITCOIND_USER=${BITCOIND_USER:-${BITCOIN_USER:-bitcoin}} -BITCOIND_GROUP=${BITCOIND_GROUP:-bitcoin} -BITCOIND_BIN=${BITCOIND_BIN:-/usr/bin/bitcoind} -BITCOIND_NICE=${BITCOIND_NICE:-${NICELEVEL:-0}} -BITCOIND_OPTS="${BITCOIND_OPTS:-${BITCOIN_OPTS}}" - -name="Bitcoin Core Daemon" -description="Bitcoin cryptocurrency P2P network daemon" - -command="/usr/bin/bitcoind" -command_args="-pid=\"${BITCOIND_PIDFILE}\" \ - -conf=\"${BITCOIND_CONFIGFILE}\" \ - -datadir=\"${BITCOIND_DATADIR}\" \ - -daemon \ - ${BITCOIND_OPTS}" - -required_files="${BITCOIND_CONFIGFILE}" -start_stop_daemon_args="-u ${BITCOIND_USER} \ - -N ${BITCOIND_NICE} -w 2000" -pidfile="${BITCOIND_PIDFILE}" - -# The retry schedule to use when stopping the daemon. Could be either -# a timeout in seconds or multiple signal/timeout pairs (like -# "SIGKILL/180 SIGTERM/300") -retry="${BITCOIND_SIGTERM_TIMEOUT}" - -depend() { - need localmount net -} - -# verify -# 1) that the datadir exists and is writable (or create it) -# 2) that a directory for the pid exists and is writable -# 3) ownership and permissions on the config file -start_pre() { - checkpath \ - -d \ - --mode 0750 \ - --owner "${BITCOIND_USER}:${BITCOIND_GROUP}" \ - "${BITCOIND_DATADIR}" - - checkpath \ - -d \ - --mode 0755 \ - --owner "${BITCOIND_USER}:${BITCOIND_GROUP}" \ - "${BITCOIND_PIDDIR}" - - checkpath -f \ - -o ${BITCOIND_USER}:${BITCOIND_GROUP} \ - -m 0660 \ - ${BITCOIND_CONFIGFILE} - - checkconfig || return 1 -} - -checkconfig() -{ - if ! grep -qs '^rpcpassword=' "${BITCOIND_CONFIGFILE}" ; then - eerror "" - eerror "ERROR: You must set a secure rpcpassword to run bitcoind." - eerror "The setting must appear in ${BITCOIND_CONFIGFILE}" - eerror "" - eerror "This password is security critical to securing wallets " - eerror "and must not be the same as the rpcuser setting." - eerror "You can generate a suitable random password using the following" - eerror "command from the shell:" - eerror "" - eerror "bash -c 'tr -dc a-zA-Z0-9 < /dev/urandom | head -c32 && echo'" - eerror "" - eerror "It is also recommended that you also set alertnotify so you are " - eerror "notified of problems:" - eerror "" - eerror "ie: alertnotify=echo %%s | mail -s \"Bitcoin Alert\"" \ - "admin@foo.com" - eerror "" - return 1 - fi -} diff --git a/contrib/init/bitcoind.openrcconf b/contrib/init/bitcoind.openrcconf deleted file mode 100644 index 0cbff6d30..000000000 --- a/contrib/init/bitcoind.openrcconf +++ /dev/null @@ -1,33 +0,0 @@ -# /etc/conf.d/bitcoind: config file for /etc/init.d/bitcoind - -# Config file location -#BITCOIND_CONFIGFILE="/etc/bitcoin/bitcoin.conf" - -# What directory to write pidfile to? (created and owned by $BITCOIND_USER) -#BITCOIND_PIDDIR="/var/run/bitcoind" - -# What filename to give the pidfile -#BITCOIND_PIDFILE="${BITCOIND_PIDDIR}/bitcoind.pid" - -# Where to write bitcoind data (be mindful that the blockchain is large) -#BITCOIND_DATADIR="/var/lib/bitcoind" - -# User and group to own bitcoind process -#BITCOIND_USER="bitcoin" -#BITCOIND_GROUP="bitcoin" - -# Path to bitcoind executable -#BITCOIND_BIN="/usr/bin/bitcoind" - -# Nice value to run bitcoind under -#BITCOIND_NICE=0 - -# Additional options (avoid -conf and -datadir, use flags above) -BITCOIND_OPTS="-disablewallet" - -# The timeout in seconds OpenRC will wait for bitcoind to terminate -# after a SIGTERM has been raised. -# Note that this will be mapped as argument to start-stop-daemon's -# '--retry' option, which means you can specify a retry schedule -# here. For more information see man 8 start-stop-daemon. -BITCOIND_SIGTERM_TIMEOUT=60 diff --git a/contrib/init/bitcoind.service b/contrib/init/bitcoind.service deleted file mode 100644 index 9132957c3..000000000 --- a/contrib/init/bitcoind.service +++ /dev/null @@ -1,22 +0,0 @@ -[Unit] -Description=Bitcoin's distributed currency daemon -After=network.target - -[Service] -User=bitcoin -Group=bitcoin - -Type=forking -PIDFile=/var/lib/bitcoind/bitcoind.pid -ExecStart=/usr/bin/bitcoind -daemon -pid=/var/lib/bitcoind/bitcoind.pid \ --conf=/etc/bitcoin/bitcoin.conf -datadir=/var/lib/bitcoind -disablewallet - -Restart=always -PrivateTmp=true -TimeoutStopSec=60s -TimeoutStartSec=2s -StartLimitInterval=120s -StartLimitBurst=5 - -[Install] -WantedBy=multi-user.target diff --git a/contrib/init/hushd.conf b/contrib/init/hushd.conf new file mode 100644 index 000000000..649df7796 --- /dev/null +++ b/contrib/init/hushd.conf @@ -0,0 +1,65 @@ +description "Hush Daemon" + +start on runlevel [2345] +stop on starting rc RUNLEVEL=[016] + +env HUSHD_BIN="/usr/bin/hushd" +env HUSHD_USER="hush" +env HUSHD_GROUP="hush" +env HUSHD_PIDDIR="/var/run/hushd" +# upstart can't handle variables constructed with other variables +env HUSHD_PIDFILE="/var/run/hushd/hushd.pid" +env HUSHD_CONFIGFILE="/etc/hush/hush.conf" +env HUSHD_DATADIR="/var/lib/hushd" + +expect fork + +respawn +respawn limit 5 120 +kill timeout 60 + +pre-start script + # this will catch non-existent config files + # hushd will check and exit with this very warning, but it can do so + # long after forking, leaving upstart to think everything started fine. + # since this is a commonly encountered case on install, just check and + # warn here. + if ! grep -qs '^rpcpassword=' "$HUSHD_CONFIGFILE" ; then + echo "ERROR: You must set a secure rpcpassword to run hushd." + echo "The setting must appear in $HUSHD_CONFIGFILE" + echo + echo "This password is security critical to securing wallets " + echo "and must not be the same as the rpcuser setting." + echo "You can generate a suitable random password using the following" + echo "command from the shell:" + echo + echo "bash -c 'tr -dc a-zA-Z0-9 < /dev/urandom | head -c32 && echo'" + echo + echo "It is also recommended that you also set alertnotify so you are " + echo "notified of problems:" + echo + echo "ie: alertnotify=echo %%s | mail -s \"Hush Alert\"" \ + "admin@foo.com" + echo + exit 1 + fi + + mkdir -p "$HUSHD_PIDDIR" + chmod 0755 "$HUSHD_PIDDIR" + chown $HUSHD_USER:$HUSHD_GROUP "$HUSHD_PIDDIR" + chown $HUSHD_USER:$HUSHD_GROUP "$HUSHD_CONFIGFILE" + chmod 0660 "$HUSHD_CONFIGFILE" +end script + +exec start-stop-daemon \ + --start \ + --pidfile "$HUSHD_PIDFILE" \ + --chuid $HUSHD_USER:$HUSHD_GROUP \ + --exec "$HUSHD_BIN" \ + -- \ + -pid="$HUSHD_PIDFILE" \ + -conf="$HUSHD_CONFIGFILE" \ + -datadir="$HUSHD_DATADIR" \ + -disablewallet \ + -daemon + diff --git a/contrib/init/bitcoind.init b/contrib/init/hushd.init similarity index 50% rename from contrib/init/bitcoind.init rename to contrib/init/hushd.init index db5061874..225a5ea2a 100644 --- a/contrib/init/bitcoind.init +++ b/contrib/init/hushd.init @@ -1,36 +1,36 @@ #!/bin/bash # -# bitcoind The bitcoin core server. +# hushd The hush core server. # # # chkconfig: 345 80 20 -# description: bitcoind -# processname: bitcoind +# description: hushd +# processname: hushd # # Source function library. . /etc/init.d/functions -# you can override defaults in /etc/sysconfig/bitcoind, see below -if [ -f /etc/sysconfig/bitcoind ]; then - . /etc/sysconfig/bitcoind +# you can override defaults in /etc/sysconfig/hushd, see below +if [ -f /etc/sysconfig/hushd ]; then + . /etc/sysconfig/hushd fi RETVAL=0 -prog=bitcoind -# you can override the lockfile via BITCOIND_LOCKFILE in /etc/sysconfig/bitcoind -lockfile=${BITCOIND_LOCKFILE-/var/lock/subsys/bitcoind} +prog=hushd +# you can override the lockfile via HUSHD_LOCKFILE in /etc/sysconfig/hushd +lockfile=${HUSHD_LOCKFILE-/var/lock/subsys/hushd} -# bitcoind defaults to /usr/bin/bitcoind, override with BITCOIND_BIN -bitcoind=${BITCOIND_BIN-/usr/bin/bitcoind} +# hushd defaults to /usr/bin/hushd, override with HUSHD_BIN +hushd=${HUSHD_BIN-/usr/bin/hushd} -# bitcoind opts default to -disablewallet, override with BITCOIND_OPTS -bitcoind_opts=${BITCOIND_OPTS--disablewallet} +# hushd opts default to -disablewallet, override with HUSHD_OPTS +hushd_opts=${HUSHD_OPTS--disablewallet} start() { echo -n $"Starting $prog: " - daemon $DAEMONOPTS $bitcoind $bitcoind_opts + daemon $DAEMONOPTS $hushd $hushd_opts RETVAL=$? echo [ $RETVAL -eq 0 ] && touch $lockfile diff --git a/contrib/init/hushd.openrc b/contrib/init/hushd.openrc new file mode 100644 index 000000000..08e04a00f --- /dev/null +++ b/contrib/init/hushd.openrc @@ -0,0 +1,92 @@ +#!/sbin/runscript + +# backward compatibility for existing gentoo layout +# +if [ -d "/var/lib/hush/.hush" ]; then + HUSHD_DEFAULT_DATADIR="/var/lib/hush/.hush" +else + HUSHD_DEFAULT_DATADIR="/var/lib/hushd" +fi + +HUSHD_CONFIGFILE=${HUSHD_CONFIGFILE:-/etc/hush/hush.conf} +HUSHD_PIDDIR=${HUSHD_PIDDIR:-/var/run/hushd} +HUSHD_PIDFILE=${HUSHD_PIDFILE:-${HUSHD_PIDDIR}/hushd.pid} +HUSHD_DATADIR=${HUSHD_DATADIR:-${HUSHD_DEFAULT_DATADIR}} +HUSHD_USER=${HUSHD_USER:-${HUSH_USER:-hush}} +HUSHD_GROUP=${HUSHD_GROUP:-hush} +HUSHD_BIN=${HUSHD_BIN:-/usr/bin/hushd} +HUSHD_NICE=${HUSHD_NICE:-${NICELEVEL:-0}} +HUSHD_OPTS="${HUSHD_OPTS:-${HUSH_OPTS}}" + +name="Hush Full Node Daemon" +description="Hush cryptocurrency P2P network daemon" + +command="/usr/bin/hushd" +command_args="-pid=\"${HUSHD_PIDFILE}\" \ + -conf=\"${HUSHD_CONFIGFILE}\" \ + -datadir=\"${HUSHD_DATADIR}\" \ + -daemon \ + ${HUSHD_OPTS}" + +required_files="${HUSHD_CONFIGFILE}" +start_stop_daemon_args="-u ${HUSHD_USER} \ + -N ${HUSHD_NICE} -w 2000" +pidfile="${HUSHD_PIDFILE}" + +# The retry schedule to use when stopping the daemon. Could be either +# a timeout in seconds or multiple signal/timeout pairs (like +# "SIGKILL/180 SIGTERM/300") +retry="${HUSHD_SIGTERM_TIMEOUT}" + +depend() { + need localmount net +} + +# verify +# 1) that the datadir exists and is writable (or create it) +# 2) that a directory for the pid exists and is writable +# 3) ownership and permissions on the config file +start_pre() { + checkpath \ + -d \ + --mode 0750 \ + --owner "${HUSHD_USER}:${HUSHD_GROUP}" \ + "${HUSHD_DATADIR}" + + checkpath \ + -d \ + --mode 0755 \ + --owner "${HUSHD_USER}:${HUSHD_GROUP}" \ + "${HUSHD_PIDDIR}" + + checkpath -f \ + -o ${HUSHD_USER}:${HUSHD_GROUP} \ + -m 0660 \ + ${HUSHD_CONFIGFILE} + + checkconfig || return 1 +} + +checkconfig() +{ + if ! grep -qs '^rpcpassword=' "${HUSHD_CONFIGFILE}" ; then + eerror "" + eerror "ERROR: You must set a secure rpcpassword to run hushd." + eerror "The setting must appear in ${HUSHD_CONFIGFILE}" + eerror "" + eerror "This password is security critical to securing wallets " + eerror "and must not be the same as the rpcuser setting." + eerror "You can generate a suitable random password using the following" + eerror "command from the shell:" + eerror "" + eerror "bash -c 'tr -dc a-zA-Z0-9 < /dev/urandom | head -c32 && echo'" + eerror "" + eerror "It is also recommended that you also set alertnotify so you are " + eerror "notified of problems:" + eerror "" + eerror "ie: alertnotify=echo %%s | mail -s \"Hush Alert\"" \ + "admin@foo.com" + eerror "" + return 1 + fi +} diff --git a/contrib/init/hushd.openrcconf b/contrib/init/hushd.openrcconf new file mode 100644 index 000000000..b36b81f28 --- /dev/null +++ b/contrib/init/hushd.openrcconf @@ -0,0 +1,33 @@ +# /etc/conf.d/hushd: config file for /etc/init.d/hushd + +# Config file location +#HUSHD_CONFIGFILE="/etc/hush/hush.conf" + +# What directory to write pidfile to? (created and owned by $HUSHD_USER) +#HUSHD_PIDDIR="/var/run/hushd" + +# What filename to give the pidfile +#HUSHD_PIDFILE="${HUSHD_PIDDIR}/hushd.pid" + +# Where to write hushd data (be mindful that the blockchain is large) +#HUSHD_DATADIR="/var/lib/hushd" + +# User and group to own hushd process +#HUSHD_USER="hush" +#HUSHD_GROUP="hush" + +# Path to hushd executable +#HUSHD_BIN="/usr/bin/hushd" + +# Nice value to run hushd under +#HUSHD_NICE=0 + +# Additional options (avoid -conf and -datadir, use flags above) +HUSHD_OPTS="-disablewallet" + +# The timeout in seconds OpenRC will wait for hushd to terminate +# after a SIGTERM has been raised. +# Note that this will be mapped as argument to start-stop-daemon's +# '--retry' option, which means you can specify a retry schedule +# here. For more information see man 8 start-stop-daemon. +HUSHD_SIGTERM_TIMEOUT=60 diff --git a/contrib/init/hushd.service b/contrib/init/hushd.service new file mode 100644 index 000000000..f014f54d4 --- /dev/null +++ b/contrib/init/hushd.service @@ -0,0 +1,22 @@ +[Unit] +Description=Hush: Speak And Transact Freely +After=network.target + +[Service] +User=hush +Group=hush + +Type=forking +PIDFile=/var/lib/hushd/hushd.pid +ExecStart=/usr/bin/hushd -daemon -pid=/var/lib/hushd/hushd.pid \ +-conf=/etc/hush/hush.conf -datadir=/var/lib/hushd -disablewallet + +Restart=always +PrivateTmp=true +TimeoutStopSec=60s +TimeoutStartSec=2s +StartLimitInterval=120s +StartLimitBurst=5 + +[Install] +WantedBy=multi-user.target diff --git a/contrib/komodo-cli.bash-completion b/contrib/komodo-cli.bash-completion deleted file mode 100644 index 784e5c807..000000000 --- a/contrib/komodo-cli.bash-completion +++ /dev/null @@ -1,160 +0,0 @@ -# bash programmable completion for komodo-cli(1) -# Copyright (c) 2012-2016 The Bitcoin Core developers -# Distributed under the MIT software license, see the accompanying -# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html - -# call $komodo-cli for RPC -_komodo_rpc() { - # determine already specified args necessary for RPC - local rpcargs=() - for i in ${COMP_LINE}; do - case "$i" in - -conf=*|-datadir=*|-regtest|-rpc*|-testnet) - rpcargs=( "${rpcargs[@]}" "$i" ) - ;; - esac - done - $komodo_cli "${rpcargs[@]}" "$@" -} - -# Add wallet accounts to COMPREPLY -_komodo_accounts() { - local accounts - # Accounts are deprecated in komodo - #accounts=$(_komodo_rpc listaccounts | awk -F '"' '{ print $2 }') - accounts="\\\"\\\"" - COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W "$accounts" -- "$cur" ) ) -} - -_komodo_cli() { - local cur prev words=() cword - local komodo_cli - - # save and use original argument to invoke komodo-cli for -help, help and RPC - # as komodo-cli might not be in $PATH - komodo_cli="$1" - - COMPREPLY=() - _get_comp_words_by_ref -n = cur prev words cword - - if ((cword > 5)); then - case ${words[cword-5]} in - sendtoaddress) - COMPREPLY=( $( compgen -W "true false" -- "$cur" ) ) - return 0 - ;; - esac - fi - - if ((cword > 4)); then - case ${words[cword-4]} in - importaddress|listtransactions|setban) - COMPREPLY=( $( compgen -W "true false" -- "$cur" ) ) - return 0 - ;; - signrawtransaction) - COMPREPLY=( $( compgen -W "ALL NONE SINGLE ALL|ANYONECANPAY NONE|ANYONECANPAY SINGLE|ANYONECANPAY" -- "$cur" ) ) - return 0 - ;; - esac - fi - - if ((cword > 3)); then - case ${words[cword-3]} in - addmultisigaddress) - _komodo_accounts - return 0 - ;; - getbalance|gettxout|importaddress|importpubkey|importprivkey|listreceivedbyaccount|listreceivedbyaddress|listsinceblock) - COMPREPLY=( $( compgen -W "true false" -- "$cur" ) ) - return 0 - ;; - esac - fi - - if ((cword > 2)); then - case ${words[cword-2]} in - addnode) - COMPREPLY=( $( compgen -W "add remove onetry" -- "$cur" ) ) - return 0 - ;; - setban) - COMPREPLY=( $( compgen -W "add remove" -- "$cur" ) ) - return 0 - ;; - fundrawtransaction|getblock|getblockheader|getmempoolancestors|getmempooldescendants|getrawtransaction|gettransaction|listaccounts|listreceivedbyaccount|listreceivedbyaddress|sendrawtransaction) - COMPREPLY=( $( compgen -W "true false" -- "$cur" ) ) - return 0 - ;; - z_importkey|z_importviewingkey) - COMPREPLY=( $( compgen -W "yes no whenkeyisnew" -- "$cur" ) ) - return 0 - ;; - move|setaccount) - _komodo_accounts - return 0 - ;; - esac - fi - - case "$prev" in - backupwallet|dumpwallet|importwallet|z_exportwallet|z_importwallet) - _filedir - return 0 - ;; - getaddednodeinfo|getrawmempool|lockunspent|setgenerate) - COMPREPLY=( $( compgen -W "true false" -- "$cur" ) ) - return 0 - ;; - getaccountaddress|getaddressesbyaccount|getbalance|getnewaddress|getreceivedbyaccount|listtransactions|move|sendfrom|sendmany) - _komodo_accounts - return 0 - ;; - esac - - case "$cur" in - -conf=*) - cur="${cur#*=}" - _filedir - return 0 - ;; - -datadir=*) - cur="${cur#*=}" - _filedir -d - return 0 - ;; - -*=*) # prevent nonsense completions - return 0 - ;; - *) - local helpopts commands - - # only parse -help if senseful - if [[ -z "$cur" || "$cur" =~ ^- ]]; then - helpopts=$($komodo_cli -help 2>&1 | awk '$1 ~ /^-/ { sub(/=.*/, "="); print $1 }' ) - fi - - # only parse help if senseful - if [[ -z "$cur" || "$cur" =~ ^[a-z] ]]; then - commands=$(_komodo_rpc help 2>/dev/null | awk '$1 ~ /^[a-z]/ { print $1; }') - fi - - COMPREPLY=( $( compgen -W "$helpopts $commands" -- "$cur" ) ) - - # Prevent space if an argument is desired - if [[ $COMPREPLY == *= ]]; then - compopt -o nospace - fi - return 0 - ;; - esac -} && -complete -F _komodo_cli komodo-cli - -# Local variables: -# mode: shell-script -# sh-basic-offset: 4 -# sh-indent-comment: t -# indent-tabs-mode: nil -# End: -# ex: ts=4 sw=4 et filetype=sh diff --git a/contrib/komodo-tx.bash-completion b/contrib/komodo-tx.bash-completion deleted file mode 100644 index aa80cfd6c..000000000 --- a/contrib/komodo-tx.bash-completion +++ /dev/null @@ -1,57 +0,0 @@ -# bash programmable completion for komodo-tx(1) -# Copyright (c) 2016 The Bitcoin Core developers -# Distributed under the MIT software license, see the accompanying -# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html - -_komodo_tx() { - local cur prev words=() cword - local komodo_tx - - # save and use original argument to invoke komodo-tx for -help - # it might not be in $PATH - komodo_tx="$1" - - COMPREPLY=() - _get_comp_words_by_ref -n =: cur prev words cword - - case "$cur" in - load=*:*) - cur="${cur#load=*:}" - _filedir - return 0 - ;; - *=*) # prevent attempts to complete other arguments - return 0 - ;; - esac - - if [[ "$cword" == 1 || ( "$prev" != "-create" && "$prev" == -* ) ]]; then - # only options (or an uncompletable hex-string) allowed - # parse komodo-tx -help for options - local helpopts - helpopts=$($komodo_tx -help | sed -e '/^ -/ p' -e d ) - COMPREPLY=( $( compgen -W "$helpopts" -- "$cur" ) ) - else - # only commands are allowed - # parse -help for commands - local helpcmds - helpcmds=$($komodo_tx -help | sed -e '1,/Commands:/d' -e 's/=.*/=/' -e '/^ [a-z]/ p' -e d ) - COMPREPLY=( $( compgen -W "$helpcmds" -- "$cur" ) ) - fi - - # Prevent space if an argument is desired - if [[ $COMPREPLY == *= ]]; then - compopt -o nospace - fi - - return 0 -} && -complete -F _komodo_tx komodo-tx - -# Local variables: -# mode: shell-script -# sh-basic-offset: 4 -# sh-indent-comment: t -# indent-tabs-mode: nil -# End: -# ex: ts=4 sw=4 et filetype=sh diff --git a/contrib/komodod.bash-completion b/contrib/komodod.bash-completion deleted file mode 100644 index ad73f5fbf..000000000 --- a/contrib/komodod.bash-completion +++ /dev/null @@ -1,57 +0,0 @@ -# bash programmable completion for komodod(1) -# Copyright (c) 2012-2017 The Bitcoin Core developers -# Copyright (c) 2016-2017 The komodo developers -# Distributed under the MIT software license, see the accompanying -# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html - -_komodod() { - local cur prev words=() cword - local komodod - - # save and use original argument to invoke komodod for -help - # it might not be in $PATH - komodod="$1" - - COMPREPLY=() - _get_comp_words_by_ref -n = cur prev words cword - - case "$cur" in - -conf=*|-pid=*|-loadblock=*|-rpccookiefile=*|-wallet=*) - cur="${cur#*=}" - _filedir - return 0 - ;; - -datadir=*|-exportdir=*) - cur="${cur#*=}" - _filedir -d - return 0 - ;; - -*=*) # prevent nonsense completions - return 0 - ;; - *) - - # only parse -help if senseful - if [[ -z "$cur" || "$cur" =~ ^- ]]; then - local helpopts - helpopts=$($komodod -help 2>&1 | awk '$1 ~ /^-/ { sub(/=.*/, "="); print $1 }' ) - COMPREPLY=( $( compgen -W "$helpopts" -- "$cur" ) ) - fi - - # Prevent space if an argument is desired - if [[ $COMPREPLY == *= ]]; then - compopt -o nospace - fi - return 0 - ;; - esac -} && -complete -F _komodod komodod - -# Local variables: -# mode: shell-script -# sh-basic-offset: 4 -# sh-indent-comment: t -# indent-tabs-mode: nil -# End: -# ex: ts=4 sw=4 et filetype=sh diff --git a/contrib/linearize/linearize-data.py b/contrib/linearize/linearize-data.py index 54a460a44..d291d9d06 100755 --- a/contrib/linearize/linearize-data.py +++ b/contrib/linearize/linearize-data.py @@ -3,7 +3,7 @@ # linearize-data.py: Construct a linear, no-fork version of the chain. # # Copyright (c) 2013-2014 The Bitcoin Core developers -# Distributed under the MIT software license, see the accompanying +# Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # diff --git a/contrib/linearize/linearize-hashes.py b/contrib/linearize/linearize-hashes.py index 17afd4e2a..fea69d47a 100755 --- a/contrib/linearize/linearize-hashes.py +++ b/contrib/linearize/linearize-hashes.py @@ -3,7 +3,7 @@ # linearize-hashes.py: List blocks in a linear, no-fork version of the chain. # # Copyright (c) 2013-2014 The Bitcoin Core developers -# Distributed under the MIT software license, see the accompanying +# Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html # diff --git a/contrib/seeds/generate-seeds.py b/contrib/seeds/generate-seeds.py index 1772c07e6..ab9b4c68c 100755 --- a/contrib/seeds/generate-seeds.py +++ b/contrib/seeds/generate-seeds.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # Copyright (c) 2014 Wladimir J. van der Laan -# Distributed under the MIT software license, see the accompanying +# Distributed under the GPLv3 software license, see the accompanying # file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html ''' Script to generate list of seed nodes for chainparams.cpp. diff --git a/contrib/spendfrom/README.md b/contrib/spendfrom/README.md deleted file mode 100644 index c0a9c9ccf..000000000 --- a/contrib/spendfrom/README.md +++ /dev/null @@ -1,35 +0,0 @@ -### SpendFrom ### - -Use the raw transactions API to send coins received on a particular -address (or addresses). - -### Usage: ### -Depends on [jsonrpc](http://json-rpc.org/). - - spendfrom.py --from=FROMADDRESS1[,FROMADDRESS2] --to=TOADDRESS --amount=amount \ - --fee=fee --datadir=/path/to/.bitcoin --testnet --dry_run - -With no arguments, outputs a list of amounts associated with addresses. - -With arguments, sends coins received by the `FROMADDRESS` addresses to the `TOADDRESS`. - -### Notes ### - -- You may explicitly specify how much fee to pay (a fee more than 1% of the amount -will fail, though, to prevent bitcoin-losing accidents). Spendfrom may fail if -it thinks the transaction would never be confirmed (if the amount being sent is -too small, or if the transaction is too many bytes for the fee). - -- If a change output needs to be created, the change will be sent to the last -`FROMADDRESS` (if you specify just one `FROMADDRESS`, change will go back to it). - -- If `--datadir` is not specified, the default datadir is used. - -- The `--dry_run` option will just create and sign the transaction and print -the transaction data (as hexadecimal), instead of broadcasting it. - -- If the transaction is created and broadcast successfully, a transaction id -is printed. - -- If this was a tool for end-users and not programmers, it would have much friendlier -error-handling. diff --git a/contrib/spendfrom/setup.py b/contrib/spendfrom/setup.py deleted file mode 100644 index 01b9768a5..000000000 --- a/contrib/spendfrom/setup.py +++ /dev/null @@ -1,9 +0,0 @@ -from distutils.core import setup -setup(name='btcspendfrom', - version='1.0', - description='Command-line utility for bitcoin "coin control"', - author='Gavin Andresen', - author_email='gavin@bitcoinfoundation.org', - requires=['jsonrpc'], - scripts=['spendfrom.py'], - ) diff --git a/contrib/spendfrom/spendfrom.py b/contrib/spendfrom/spendfrom.py deleted file mode 100755 index 0729234eb..000000000 --- a/contrib/spendfrom/spendfrom.py +++ /dev/null @@ -1,267 +0,0 @@ -#!/usr/bin/env python -# -# Use the raw transactions API to spend bitcoins received on particular addresses, -# and send any change back to that same address. -# -# Example usage: -# spendfrom.py # Lists available funds -# spendfrom.py --from=ADDRESS --to=ADDRESS --amount=11.00 -# -# Assumes it will talk to a bitcoind or Bitcoin-Qt running -# on localhost. -# -# Depends on jsonrpc -# - -from decimal import * -import getpass -import math -import os -import os.path -import platform -import sys -import time -from jsonrpc import ServiceProxy, json - -BASE_FEE=Decimal("0.001") - -def check_json_precision(): - """Make sure json library being used does not lose precision converting BTC values""" - n = Decimal("20000000.00000003") - satoshis = int(json.loads(json.dumps(float(n)))*1.0e8) - if satoshis != 2000000000000003: - raise RuntimeError("JSON encode/decode loses precision") - -def determine_db_dir(): - """Return the default location of the bitcoin data directory""" - if platform.system() == "Darwin": - return os.path.expanduser("~/Library/Application Support/Bitcoin/") - elif platform.system() == "Windows": - return os.path.join(os.environ['APPDATA'], "Bitcoin") - return os.path.expanduser("~/.bitcoin") - -def read_bitcoin_config(dbdir): - """Read the bitcoin.conf file from dbdir, returns dictionary of settings""" - from ConfigParser import SafeConfigParser - - class FakeSecHead(object): - def __init__(self, fp): - self.fp = fp - self.sechead = '[all]\n' - def readline(self): - if self.sechead: - try: return self.sechead - finally: self.sechead = None - else: - s = self.fp.readline() - if s.find('#') != -1: - s = s[0:s.find('#')].strip() +"\n" - return s - - config_parser = SafeConfigParser() - config_parser.readfp(FakeSecHead(open(os.path.join(dbdir, "bitcoin.conf")))) - return dict(config_parser.items("all")) - -def connect_JSON(config): - """Connect to a bitcoin JSON-RPC server""" - testnet = config.get('testnet', '0') - testnet = (int(testnet) > 0) # 0/1 in config file, convert to True/False - if not 'rpcport' in config: - config['rpcport'] = 18232 if testnet else 8232 - connect = "http://%s:%s@127.0.0.1:%s"%(config['rpcuser'], config['rpcpassword'], config['rpcport']) - try: - result = ServiceProxy(connect) - # ServiceProxy is lazy-connect, so send an RPC command mostly to catch connection errors, - # but also make sure the bitcoind we're talking to is/isn't testnet: - if result.getmininginfo()['testnet'] != testnet: - sys.stderr.write("RPC server at "+connect+" testnet setting mismatch\n") - sys.exit(1) - return result - except: - sys.stderr.write("Error connecting to RPC server at "+connect+"\n") - sys.exit(1) - -def unlock_wallet(bitcoind): - info = bitcoind.getinfo() - if 'unlocked_until' not in info: - return True # wallet is not encrypted - t = int(info['unlocked_until']) - if t <= time.time(): - try: - passphrase = getpass.getpass("Wallet is locked; enter passphrase: ") - bitcoind.walletpassphrase(passphrase, 5) - except: - sys.stderr.write("Wrong passphrase\n") - - info = bitcoind.getinfo() - return int(info['unlocked_until']) > time.time() - -def list_available(bitcoind): - address_summary = dict() - - address_to_account = dict() - for info in bitcoind.listreceivedbyaddress(0): - address_to_account[info["address"]] = info["account"] - - unspent = bitcoind.listunspent(0) - for output in unspent: - # listunspent doesn't give addresses, so: - rawtx = bitcoind.getrawtransaction(output['txid'], 1) - vout = rawtx["vout"][output['vout']] - pk = vout["scriptPubKey"] - - # This code only deals with ordinary pay-to-bitcoin-address - # or pay-to-script-hash outputs right now; anything exotic is ignored. - if pk["type"] != "pubkeyhash" and pk["type"] != "scripthash": - continue - - address = pk["addresses"][0] - if address in address_summary: - address_summary[address]["total"] += vout["value"] - address_summary[address]["outputs"].append(output) - else: - address_summary[address] = { - "total" : vout["value"], - "outputs" : [output], - "account" : address_to_account.get(address, "") - } - - return address_summary - -def select_coins(needed, inputs): - # Feel free to improve this, this is good enough for my simple needs: - outputs = [] - have = Decimal("0.0") - n = 0 - while have < needed and n < len(inputs): - outputs.append({ "txid":inputs[n]["txid"], "vout":inputs[n]["vout"]}) - have += inputs[n]["amount"] - n += 1 - return (outputs, have-needed) - -def create_tx(bitcoind, fromaddresses, toaddress, amount, fee): - all_coins = list_available(bitcoind) - - total_available = Decimal("0.0") - needed = amount+fee - potential_inputs = [] - for addr in fromaddresses: - if addr not in all_coins: - continue - potential_inputs.extend(all_coins[addr]["outputs"]) - total_available += all_coins[addr]["total"] - - if total_available < needed: - sys.stderr.write("Error, only %f BTC available, need %f\n"%(total_available, needed)); - sys.exit(1) - - # - # Note: - # Python's json/jsonrpc modules have inconsistent support for Decimal numbers. - # Instead of wrestling with getting json.dumps() (used by jsonrpc) to encode - # Decimals, I'm casting amounts to float before sending them to bitcoind. - # - outputs = { toaddress : float(amount) } - (inputs, change_amount) = select_coins(needed, potential_inputs) - if change_amount > BASE_FEE: # don't bother with zero or tiny change - change_address = fromaddresses[-1] - if change_address in outputs: - outputs[change_address] += float(change_amount) - else: - outputs[change_address] = float(change_amount) - - rawtx = bitcoind.createrawtransaction(inputs, outputs) - signed_rawtx = bitcoind.signrawtransaction(rawtx) - if not signed_rawtx["complete"]: - sys.stderr.write("signrawtransaction failed\n") - sys.exit(1) - txdata = signed_rawtx["hex"] - - return txdata - -def compute_amount_in(bitcoind, txinfo): - result = Decimal("0.0") - for vin in txinfo['vin']: - in_info = bitcoind.getrawtransaction(vin['txid'], 1) - vout = in_info['vout'][vin['vout']] - result = result + vout['value'] - return result - -def compute_amount_out(txinfo): - result = Decimal("0.0") - for vout in txinfo['vout']: - result = result + vout['value'] - return result - -def sanity_test_fee(bitcoind, txdata_hex, max_fee): - class FeeError(RuntimeError): - pass - try: - txinfo = bitcoind.decoderawtransaction(txdata_hex) - total_in = compute_amount_in(bitcoind, txinfo) - total_out = compute_amount_out(txinfo) - if total_in-total_out > max_fee: - raise FeeError("Rejecting transaction, unreasonable fee of "+str(total_in-total_out)) - - tx_size = len(txdata_hex)/2 - kb = tx_size/1000 # integer division rounds down - if kb > 1 and fee < BASE_FEE: - raise FeeError("Rejecting no-fee transaction, larger than 1000 bytes") - if total_in < 0.01 and fee < BASE_FEE: - raise FeeError("Rejecting no-fee, tiny-amount transaction") - # Exercise for the reader: compute transaction priority, and - # warn if this is a very-low-priority transaction - - except FeeError as err: - sys.stderr.write((str(err)+"\n")) - sys.exit(1) - -def main(): - import optparse - - parser = optparse.OptionParser(usage="%prog [options]") - parser.add_option("--from", dest="fromaddresses", default=None, - help="addresses to get bitcoins from") - parser.add_option("--to", dest="to", default=None, - help="address to get send bitcoins to") - parser.add_option("--amount", dest="amount", default=None, - help="amount to send") - parser.add_option("--fee", dest="fee", default="0.0", - help="fee to include") - parser.add_option("--datadir", dest="datadir", default=determine_db_dir(), - help="location of bitcoin.conf file with RPC username/password (default: %default)") - parser.add_option("--testnet", dest="testnet", default=False, action="store_true", - help="Use the test network") - parser.add_option("--dry_run", dest="dry_run", default=False, action="store_true", - help="Don't broadcast the transaction, just create and print the transaction data") - - (options, args) = parser.parse_args() - - check_json_precision() - config = read_bitcoin_config(options.datadir) - if options.testnet: config['testnet'] = True - bitcoind = connect_JSON(config) - - if options.amount is None: - address_summary = list_available(bitcoind) - for address,info in address_summary.iteritems(): - n_transactions = len(info['outputs']) - if n_transactions > 1: - print("%s %.8f %s (%d transactions)"%(address, info['total'], info['account'], n_transactions)) - else: - print("%s %.8f %s"%(address, info['total'], info['account'])) - else: - fee = Decimal(options.fee) - amount = Decimal(options.amount) - while unlock_wallet(bitcoind) == False: - pass # Keep asking for passphrase until they get it right - txdata = create_tx(bitcoind, options.fromaddresses.split(","), options.to, amount, fee) - sanity_test_fee(bitcoind, txdata, amount*Decimal("0.01")) - if options.dry_run: - print(txdata) - else: - txid = bitcoind.sendrawtransaction(txdata) - print(txid) - -if __name__ == '__main__': - main() diff --git a/contrib/test-patches/README.md b/contrib/test-patches/README.md deleted file mode 100644 index def40b0d6..000000000 --- a/contrib/test-patches/README.md +++ /dev/null @@ -1,7 +0,0 @@ -### Test Patches ### - -These patches are applied when the automated pull-tester -tests each pull and when master is tested using jenkins. -You can find more information about the tests run at -[http://jenkins.bluematt.me/pull-tester/files/ -](http://jenkins.bluematt.me/pull-tester/files/) \ No newline at end of file diff --git a/contrib/testgen/README.md b/contrib/testgen/README.md index 83624f443..903e4ed6d 100644 --- a/contrib/testgen/README.md +++ b/contrib/testgen/README.md @@ -1,8 +1,8 @@ ### TestGen ### -Utilities to generate test vectors for the data-driven Bitcoin tests. +Utilities to generate test vectors for the data-driven Hush 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 \ No newline at end of file + gen_base58_test_vectors.py invalid 50 > ../../src/test/data/base58_keys_invalid.json diff --git a/contrib/tidy_datadir.sh b/contrib/tidy_datadir.sh index 5d6d82644..6e5300394 100755 --- a/contrib/tidy_datadir.sh +++ b/contrib/tidy_datadir.sh @@ -1,10 +1,13 @@ #!/bin/bash +# Copyright (c) 2018-2020 The Hush developers +# Distributed under the GPLv3 software license, see the accompanying +# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html if [ -d "$1" ]; then cd "$1" else echo "Usage: $0 " >&2 - echo "Removes obsolete Bitcoin database files" >&2 + echo "Removes obsolete Hush database files" >&2 exit 1 fi @@ -16,22 +19,22 @@ if [ -f wallet.dat -a -f peers.dat -a -f chainstate/CURRENT -a -f blocks/index/C case $LEVEL in 0) - echo "Error: no Bitcoin datadir detected." + echo "Error: no Hush datadir detected." exit 1 ;; 1) - echo "Detected old Bitcoin datadir (before 0.7)." + echo "Detected old Hush datadir (before 0.7)." echo "Nothing to do." exit 0 ;; 2) - echo "Detected Bitcoin 0.7 datadir." + echo "Detected Hush 0.7 datadir." ;; 3) - echo "Detected Bitcoin pre-0.8 datadir." + echo "Detected Hush pre-0.8 datadir." ;; 4) - echo "Detected Bitcoin 0.8 datadir." + echo "Detected Hush 0.8 datadir." ;; esac diff --git a/contrib/verify-commits/README.md b/contrib/verify-commits/README.md new file mode 100644 index 000000000..1de380514 --- /dev/null +++ b/contrib/verify-commits/README.md @@ -0,0 +1,3 @@ +# Verifying Git Commits with GPG + +Yep diff --git a/contrib/verify-commits/gpg.sh b/contrib/verify-commits/gpg.sh index 6b5137e7b..947dca43c 100755 --- a/contrib/verify-commits/gpg.sh +++ b/contrib/verify-commits/gpg.sh @@ -1,4 +1,7 @@ #!/bin/sh +# Copyright (c) 2016-2020 The Hush developers +# Distributed under the GPLv3 software license, see the accompanying +# file COPYING or https://www.gnu.org/licenses/gpl-3.0.en.html INPUT=$(. +please see . .SS "Usage:" .TP hush\-cli [options] [params] @@ -71,21 +71,16 @@ Timeout in seconds during HTTP requests, or 0 for no timeout. (default: Read extra arguments from standard input, one per line until EOF/Ctrl\-D (recommended for sensitive information such as passphrases) .SH COPYRIGHT -Hush Daemon version v3.5.1-dd8ab3df6 In order to ensure you are adequately protecting your privacy when using Hush, -please see . +please see . -Copyright (C) 2009-2020 The Bitcoin Core Developers -Copyright (C) 2015-2020 The Zcash Developers -Copyright (C) 2015-2020 jl777 and SuperNET developers -Copyright (C) 2018-2020 The Hush developers +Copyright (C) 2016-2021 Duke Leto and The Hush Developers +Copyright (C) 2016-2020 jl777 and SuperNET developers +Copyright (C) 2016-2018 The Zcash developers +Copyright (C) 2009-2014 The Bitcoin Core developers -This is experimental software!!! +This is experimental Free Software! Fuck Yeah!!!!! -Distributed under the MIT software license, see the accompanying file COPYING -or . - -This product includes software developed by the OpenSSL Project for use in the -OpenSSL Toolkit and cryptographic software written -by Eric Young. +Distributed under the GPLv3 software license, see the accompanying file COPYING +or . diff --git a/doc/man/hush-tx.1 b/doc/man/hush-tx.1 index 382d54642..178d7eb09 100644 --- a/doc/man/hush-tx.1 +++ b/doc/man/hush-tx.1 @@ -1,16 +1,16 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.10. -.TH HUSH-TX "1" "October 2020" "hush-tx v3.5.2" "User Commands" +.TH HUSH-TX "1" "January 2021" "hush-tx v3.6.1" "User Commands" .SH NAME -hush-tx \- manual page for hush-tx v3.5.2 +hush-tx \- manual page for hush-tx v3.6.1 .SH DESCRIPTION -Hush komodo\-tx utility version v3.5.2\-d19cf21f9 +hush\-tx utility version v3.6.1\-cf5736569\-dirty .SS "Usage:" .TP -komodo\-tx [options] [commands] -Update hex\-encoded zcash transaction +hush\-tx [options] [commands] +Update hex\-encoded Hush transaction .TP -komodo\-tx [options] \fB\-create\fR [commands] -Create hex\-encoded zcash transaction +hush\-tx [options] \fB\-create\fR [commands] +Create hex\-encoded Hush transaction .SH OPTIONS .HP \-? @@ -84,21 +84,16 @@ set=NAME:JSON\-STRING .IP Set register NAME to given JSON\-STRING .SH COPYRIGHT -Hush Daemon version v3.5.2-d19cf21f9 In order to ensure you are adequately protecting your privacy when using Hush, -please see . +please see . -Copyright (C) 2009-2020 The Bitcoin Core Developers -Copyright (C) 2015-2020 The Zcash Developers -Copyright (C) 2015-2020 jl777 and SuperNET developers -Copyright (C) 2018-2020 The Hush developers +Copyright (C) 2016-2021 Duke Leto and The Hush Developers +Copyright (C) 2016-2020 jl777 and SuperNET developers +Copyright (C) 2016-2018 The Zcash developers +Copyright (C) 2009-2014 The Bitcoin Core developers -This is experimental software!!! +This is experimental Free Software! Fuck Yeah!!!!! -Distributed under the MIT software license, see the accompanying file COPYING -or . - -This product includes software developed by the OpenSSL Project for use in the -OpenSSL Toolkit and cryptographic software written -by Eric Young. +Distributed under the GPLv3 software license, see the accompanying file COPYING +or . diff --git a/doc/man/hushd.1 b/doc/man/hushd.1 index fe90b937e..2d5e5d2e5 100644 --- a/doc/man/hushd.1 +++ b/doc/man/hushd.1 @@ -1,27 +1,22 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.10. -.TH HUSHD "1" "October 2020" "hushd v3.5.2" "User Commands" +.TH HUSHD "1" "January 2021" "hushd v3.6.1" "User Commands" .SH NAME -hushd \- manual page for hushd v3.5.2 +hushd \- manual page for hushd v3.6.1 .SH DESCRIPTION -Found binary: ./komodod -Hush Daemon version v3.5.2\-d19cf21f9 +Hush Daemon version v3.6.1\-cf5736569\-dirty .PP In order to ensure you are adequately protecting your privacy when using Hush, -please see . +please see . .SS "Usage:" .TP -komodod [options] -Start Hush\-flavored Komodo Daemon +hushd [options] +Start a Hush Daemon .SH OPTIONS .HP \-? .IP This help message .HP -\fB\-alerts\fR -.IP -Receive and display P2P network alerts (default: 1) -.HP \fB\-alertnotify=\fR .IP Execute command when a relevant alert is received or we see a really @@ -46,7 +41,7 @@ Full node client name, default 'MagicBean' .HP \fB\-conf=\fR .IP -Specify configuration file (default: komodo.conf) +Specify configuration file (default: HUSH3.conf) .HP \fB\-daemon\fR .IP @@ -62,7 +57,7 @@ Specify directory to be used when exporting data .HP \fB\-dbcache=\fR .IP -Set database cache size in megabytes (4 to 16384, default: 450) +Set database cache size in megabytes (4 to 16384, default: 512) .HP \fB\-loadblock=\fR .IP @@ -85,7 +80,7 @@ leave that many cores free, default: 0) .HP \fB\-pid=\fR .IP -Specify pid file (default: komodod.pid) +Specify pid file (default: hushd.pid) .HP \fB\-txexpirynotify=\fR .IP @@ -197,7 +192,7 @@ Accept connections from outside (default: 1 if no \fB\-proxy\fR or \fB\-connect\ .HP \fB\-listenonion\fR .IP -Automatically create Tor hidden service (default: 1) +Automatically create Tor hidden service (default: 0) .HP \fB\-maxconnections=\fR .IP @@ -231,7 +226,7 @@ Support filtering of blocks and transaction with Bloom filters (default: .HP \fB\-port=\fR .IP -Listen for connections on (default: 7770 or testnet: 17770) +Listen for connections on (default: 55555 or testnet: 55420) .HP \fB\-proxy=\fR .IP @@ -261,8 +256,12 @@ Tor control port password (default: empty) .HP \fB\-tls=\fR