Merge branch 'dev' into duke
This commit is contained in:
168
.gitlab-ci.yml
168
.gitlab-ci.yml
@@ -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####
|
||||
########################################################################################################################
|
||||
########################################################################################################################
|
||||
88
.travis.yml
88
.travis.yml
@@ -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"
|
||||
Binary file not shown.
17
Brewfile
17
Brewfile
@@ -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"
|
||||
4
COPYING
4
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.
|
||||
|
||||
@@ -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:
|
||||
|
||||
14
Dockerfile
14
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 <kolo@komodoplatform.com>
|
||||
MAINTAINER Duke Leto <duke@leto.net>
|
||||
|
||||
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"]
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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!
|
||||
|
||||
34
Makefile.am
34
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
|
||||
|
||||
71
OLD_WALLETS.md
Normal file
71
OLD_WALLETS.md
Normal file
@@ -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.
|
||||
134
README.md
134
README.md
@@ -1,108 +1,62 @@
|
||||
# HUSH
|
||||
# Hush
|
||||
|
||||
## What is HUSH?
|
||||
## What is Hush?
|
||||
|
||||

|
||||
|
||||
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 <a href="https://git.hush.is/hush">git.hush.is</a> 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: <a href="https://explorer.hush.is">explorer.hush.is</a>
|
||||
|
||||
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 <a href="https://hush.is/twitter">@MyHushTeam</a> on Twitter
|
||||
* Follow <a href="https://hush.is/yt">Hush</a> on YouTube
|
||||
* Join <a href="https://hush.is/reddit">Hush</a> on Reddit
|
||||
|
||||
## License
|
||||
|
||||
For license information see the file [COPYING](COPYING).
|
||||
|
||||
@@ -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)
|
||||
])
|
||||
|
||||
6
build.sh
6
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 $@
|
||||
|
||||
@@ -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])
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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($?) {
|
||||
|
||||
@@ -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=<INSTANCE_IP> ansible_ssh_user=<USERNAME>
|
||||
|
||||
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.
|
||||
@@ -1,2 +0,0 @@
|
||||
[ssh_connection]
|
||||
pipelining = True
|
||||
@@ -1,2 +0,0 @@
|
||||
export PATH=$HOME/venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
export EDITOR=vim
|
||||
@@ -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 }}"
|
||||
@@ -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
|
||||
@@ -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"
|
||||
@@ -1,23 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>Label</key>
|
||||
<string>net.buildbot.worker</string>
|
||||
<key>ProgramArguments</key>
|
||||
<array>
|
||||
<string>{{ buildbot_worker_dir }}/venv/bin/buildbot-worker</string>
|
||||
<string>start</string>
|
||||
<string>{{ buildbot_worker_name }}</string>
|
||||
</array>
|
||||
<key>WorkingDirectory</key>
|
||||
<string>{{ buildbot_worker_dir }}</string>
|
||||
<key>UserName</key>
|
||||
<string>{{ buildbot_worker_user }}</string>
|
||||
<key>KeepAlive</key>
|
||||
<dict>
|
||||
<key>NetworkState</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -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
|
||||
@@ -1 +0,0 @@
|
||||
OS: {{ ansible_distribution }} {{ ansible_distribution_version }}
|
||||
@@ -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)
|
||||
@@ -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 <sysadmin@z.cash>"
|
||||
- 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
|
||||
@@ -1,7 +0,0 @@
|
||||
---
|
||||
buildbot_deps:
|
||||
- python2-pip
|
||||
build_deps:
|
||||
- cmake
|
||||
- multilib/gcc
|
||||
- make
|
||||
@@ -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
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
build_deps:
|
||||
- build-essential # Depends on g++, libc6-dev, make
|
||||
- cmake
|
||||
dist_deps:
|
||||
- python-dev
|
||||
@@ -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
|
||||
@@ -1,10 +0,0 @@
|
||||
---
|
||||
buildbot_deps:
|
||||
- py27-pip
|
||||
build_deps:
|
||||
- cmake
|
||||
- gcc
|
||||
- gmake
|
||||
dist_deps:
|
||||
- bash
|
||||
- pkgconf # Required until b556beda264308e040f8d88aca4f2f386a0183d9 is pulled in
|
||||
@@ -1,6 +0,0 @@
|
||||
---
|
||||
buildbot_deps:
|
||||
- coreutils # For gnproc etc.
|
||||
# Most are already installed
|
||||
build_deps:
|
||||
- cmake
|
||||
@@ -1,4 +0,0 @@
|
||||
---
|
||||
build_deps:
|
||||
- build-essential # Depends on g++, libc6-dev, make
|
||||
- cmake
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -1,16 +1,8 @@
|
||||
Format: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?rev=174
|
||||
Upstream-Name: Zcash
|
||||
Upstream-Contact: Zcash Company <team@z.cash>
|
||||
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.
|
||||
|
||||
@@ -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=<addr>
|
||||
|
||||
# Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6
|
||||
#whitebind=<addr>
|
||||
# Bind to given address and allowlist peers connecting to it. Use [host]:port notation for IPv6
|
||||
#allowbind=<addr>
|
||||
|
||||
##############################################################
|
||||
## 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'.
|
||||
|
||||
@@ -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=<addr>
|
||||
|
||||
# Bind to given address and whitelist peers connecting to it. Use [host]:port notation for IPv6
|
||||
#whitebind=<addr>
|
||||
|
||||
##############################################################
|
||||
## 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=<addr>
|
||||
|
||||
# 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
|
||||
|
||||
@@ -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/
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
20
contrib/fresh_clone_compile_and_run.sh
Normal file
20
contrib/fresh_clone_compile_and_run.sh
Normal file
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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.
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
@@ -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
|
||||
@@ -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
|
||||
65
contrib/init/hushd.conf
Normal file
65
contrib/init/hushd.conf
Normal file
@@ -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
|
||||
|
||||
@@ -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
|
||||
92
contrib/init/hushd.openrc
Normal file
92
contrib/init/hushd.openrc
Normal file
@@ -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
|
||||
}
|
||||
33
contrib/init/hushd.openrcconf
Normal file
33
contrib/init/hushd.openrcconf
Normal file
@@ -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
|
||||
22
contrib/init/hushd.service
Normal file
22
contrib/init/hushd.service
Normal file
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
#
|
||||
|
||||
|
||||
@@ -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
|
||||
#
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
@@ -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'],
|
||||
)
|
||||
@@ -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()
|
||||
@@ -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/)
|
||||
@@ -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
|
||||
gen_base58_test_vectors.py invalid 50 > ../../src/test/data/base58_keys_invalid.json
|
||||
|
||||
@@ -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 <datadir>" >&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
|
||||
|
||||
|
||||
3
contrib/verify-commits/README.md
Normal file
3
contrib/verify-commits/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Verifying Git Commits with GPG
|
||||
|
||||
Yep
|
||||
@@ -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=$(</dev/stdin)
|
||||
VALID=false
|
||||
IFS=$'\n'
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
#!/bin/bash
|
||||
if ! [[ "$2" =~ [git@]?[www.]?github.com[:|/]bitcoin/bitcoin[.git]? ]]; then
|
||||
# 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
|
||||
if ! [[ "$2" =~ [git@]?[www.]?hush.is[:|/]bitcoin/bitcoin[.git]? ]]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
71A3B16735405025D447E8F274810B012346C9A6
|
||||
1F4410F6A89268CE3197A84C57896D2FF8F0B657
|
||||
01CDF4627A3B88AAE4A571C87588242FBE38D3A8
|
||||
AF8BE07C7049F3A26B239D5325B3083201782B2F
|
||||
81291FA67D2C379A006A053FEAB5AF94D9E9ABE7
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
#!/bin/sh
|
||||
#!/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
|
||||
|
||||
DIR=$(dirname "$0")
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env python2
|
||||
# Copyright (c) 2014-2016 The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# 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
|
||||
|
||||
import array
|
||||
|
||||
@@ -12,9 +12,9 @@ For example:
|
||||
|
||||
make HOST=x86_64-w64-mingw32 -j4
|
||||
|
||||
A prefix will be generated that's suitable for plugging into Bitcoin's
|
||||
A prefix will be generated that's suitable for plugging into Hush's
|
||||
configure. In the above example, a dir named `x86_64-w64-mingw32` will be
|
||||
created. To use it for Bitcoin:
|
||||
created. To use it for Hush:
|
||||
|
||||
./configure --prefix=`pwd`/depends/x86_64-w64-mingw32
|
||||
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
# 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
|
||||
define int_vars
|
||||
#Set defaults for vars which may be overridden per-package
|
||||
$(1)_cc=$($($(1)_type)_CC)
|
||||
|
||||
@@ -8,7 +8,7 @@ darwin_CXX=g++-8 -target $(host) -mmacosx-version-min=$(OSX_MIN_VERSION) --sysro
|
||||
darwin_CFLAGS=-pipe
|
||||
darwin_CXXFLAGS=$(darwin_CFLAGS)
|
||||
|
||||
darwin_release_CFLAGS=-O1
|
||||
darwin_release_CFLAGS=-O3
|
||||
darwin_release_CXXFLAGS=$(darwin_release_CFLAGS)
|
||||
|
||||
darwin_debug_CFLAGS=-O1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
linux_CFLAGS=-pipe
|
||||
linux_CXXFLAGS=$(linux_CFLAGS)
|
||||
|
||||
linux_release_CFLAGS=-O1
|
||||
linux_release_CFLAGS=-O3
|
||||
linux_release_CXXFLAGS=$(linux_release_CFLAGS)
|
||||
|
||||
linux_debug_CFLAGS=-O1
|
||||
|
||||
@@ -3,7 +3,7 @@ mingw32_CXX=x86_64-w64-mingw32-g++-posix
|
||||
mingw32_CFLAGS=-pipe -std=c11
|
||||
mingw32_CXXFLAGS=$(mingw32_CFLAGS) -std=c++11
|
||||
|
||||
mingw32_release_CFLAGS=-O1
|
||||
mingw32_release_CFLAGS=-O3
|
||||
mingw32_release_CXXFLAGS=$(mingw32_release_CFLAGS)
|
||||
|
||||
mingw32_debug_CFLAGS=-O1
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
# Hush Packages
|
||||
|
||||
Each recipe consists of 3 main parts: defining identifiers, setting build
|
||||
variables, and defining build commands.
|
||||
|
||||
|
||||
@@ -27,10 +27,6 @@ define $(package)_build_cmds
|
||||
endef
|
||||
endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$($(package)_install) -D ./make/gmock-all.o $($(package)_staging_dir)$(host_prefix)/lib/libgmock.a && \
|
||||
cp -a ./include $($(package)_staging_dir)$(host_prefix)/include
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
package=libgmp
|
||||
|
||||
ifeq ($(host_os),mingw32)
|
||||
$(package)_download_path=https://github.com/joshuayabut/$(package)/archive
|
||||
$(package)_download_path=https://github.com/radix42/$(package)/archive
|
||||
$(package)_file_name=$(package)-$($(package)_git_commit).tar.gz
|
||||
$(package)_download_file=$($(package)_git_commit).tar.gz
|
||||
$(package)_sha256_hash=193836c1acc9dc00fe2521205d7bbe1ba13263f6cbef6f02584bf6f8b34b108f
|
||||
$(package)_git_commit=053c03b1cab347671d936f43ef66b48ab5e380ee
|
||||
$(package)_sha256_hash=67df06ed50f288bd7b1ec6907973684fb7cf1196f2cb368b59d423e42b065e40
|
||||
$(package)_git_commit=42ba95387cdfd67399f7aac52fddb8d6e1258ee6
|
||||
$(package)_dependencies=
|
||||
$(package)_config_opts=--enable-cxx --disable-shared
|
||||
else ifeq ($(build_os),darwin)
|
||||
$(package)_download_path=https://github.com/ca333/$(package)/archive
|
||||
$(package)_download_path=https://git.hush.is/duke/$(package)/archive
|
||||
$(package)_file_name=$(package)-$($(package)_git_commit).tar.gz
|
||||
$(package)_download_file=$($(package)_git_commit).tar.gz
|
||||
$(package)_sha256_hash=59b2c2b5d58fdf5943bfde1fa709e9eb53e7e072c9699d28dc1c2cbb3c8cc32c
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
package=libsnark
|
||||
$(package)_version=0.1
|
||||
$(package)_download_path=https://github.com/MyHush/libsnark/releases/download/v$($(package)_version)-$($(package)_git_commit)/
|
||||
$(package)_file_name=$(package)-$($(package)_git_commit).tar.gz
|
||||
$(package)_download_file=$(package)-$($(package)_git_commit).tar.gz
|
||||
$(package)_sha256_hash=47478adc2ae88c448dc736d59dfe007de6478e41e88d2d4d2ff4135a17ee6f90
|
||||
$(package)_git_commit=3854b20c25e8bc567aab2b558dec84d45f4a3e73
|
||||
|
||||
$(package)_dependencies=libgmp libsodium
|
||||
|
||||
ifeq ($(build_os),darwin)
|
||||
define $(package)_set_vars
|
||||
$(package)_build_env=CC="$($(package)_cc)" CXX="$($(package)_cxx)"
|
||||
$(package)_build_env+=CXXFLAGS="$($(package)_cxxflags) -DBINARY_OUTPUT -DSTATICLIB -DNO_PT_COMPRESSION=1 "
|
||||
endef
|
||||
define $(package)_build_cmds
|
||||
$(MAKE) lib DEPINST=$(host_prefix) CURVE=ALT_BN128 MULTICORE=1 NO_PROCPS=1 NO_GTEST=1 NO_DOCS=1 STATIC=1 NO_SUPERCOP=1 FEATUREFLAGS=-DMONTGOMERY_OUTPUT OPTFLAGS="-O2 -march=x86-64 -g "
|
||||
endef
|
||||
else ifeq ($(host_os),mingw32)
|
||||
define $(package)_build_cmds
|
||||
CXX="x86_64-w64-mingw32-g++-posix" CXXFLAGS="-DBINARY_OUTPUT -DPTW32_STATIC_LIB -DSTATICLIB -DNO_PT_COMPRESSION=1 -fopenmp" $(MAKE) lib DEPINST=$(host_prefix) CURVE=ALT_BN128 MULTICORE=1 NO_PROCPS=1 NO_GTEST=1 NO_DOCS=1 STATIC=1 NO_SUPERCOP=1 FEATUREFLAGS=-DMONTGOMERY_OUTPUT OPTFLAGS="-O2 -march=x86-64 -g "
|
||||
endef
|
||||
else
|
||||
define $(package)_build_cmds
|
||||
CXXFLAGS="-fPIC -DBINARY_OUTPUT -DNO_PT_COMPRESSION=1" $(MAKE) lib DEPINST=$(host_prefix) CURVE=ALT_BN128 MULTICORE=1 NO_PROCPS=1 NO_GTEST=1 NO_DOCS=1 STATIC=1 NO_SUPERCOP=1 FEATUREFLAGS=-DMONTGOMERY_OUTPUT OPTFLAGS="-O2 -march=x86-64 -g "
|
||||
endef
|
||||
endif
|
||||
|
||||
|
||||
define $(package)_stage_cmds
|
||||
$(MAKE) install STATIC=1 DEPINST=$(host_prefix) PREFIX=$($(package)_staging_dir)$(host_prefix) CURVE=ALT_BN128 NO_SUPERCOP=1
|
||||
endef
|
||||
@@ -41,6 +41,6 @@ wallet_packages=bdb
|
||||
ifeq ($(host_os),linux)
|
||||
packages := boost wolfssl libevent zeromq $(zcash_packages) googletest libcurl #googlemock
|
||||
else
|
||||
packages := boost wolfssl libevent zeromq $(zcash_packages) libcurl googletest #googlemock
|
||||
packages := boost wolfssl libevent $(zcash_packages) libcurl googletest #googlemock
|
||||
endif
|
||||
|
||||
|
||||
@@ -1,19 +1,28 @@
|
||||
package=wolfssl
|
||||
$(package)_version=4.5.0
|
||||
$(package)_version=4.6.0
|
||||
$(package)_download_path=https://github.com/wolfSSL/wolfssl/archive
|
||||
$(package)_download_file=v$($(package)_version)-stable.tar.gz
|
||||
$(package)_file_name=wolfssl-$($(package)_version).tar.gz
|
||||
$(package)_sha256_hash=7de62300ce14daa0051bfefc7c4d6302f96cabc768b6ae49eda77523b118250c
|
||||
$(package)_sha256_hash=053aefbb02d0b06b27c5e2df6875b4b587318755b7db9d6aa8d72206b310a848
|
||||
|
||||
define $(package)_set_vars
|
||||
$(package)_config_env=AR="$($(package)_ar)" RANLIB="$($(package)_ranlib)" CC="$($(package)_cc)"
|
||||
$(package)_config_opts=--prefix=$(host_prefix)
|
||||
$(package)_config_opts+=--host=$(host)
|
||||
$(package)_config_opts+=--enable-ecc
|
||||
$(package)_config_opts+=--enable-static
|
||||
$(package)_config_opts+=--enable-debug
|
||||
$(package)_config_opts+=--enable-sha3
|
||||
$(package)_config_opts+=--enable-sha512
|
||||
$(package)_config_opts+=--enable-tls13
|
||||
|
||||
# TODO: enable this in a future version
|
||||
#$(package)_config_opts+=--enable-xchacha # New in 4.6.0
|
||||
|
||||
# TODO: these caused problems
|
||||
#$(package)_config_opts+=--disable-tlsv12
|
||||
#$(package)_config_opts+=--disable-oldtls
|
||||
|
||||
$(package)_config_opts+=--disable-shared
|
||||
$(package)_config_opts+=--disable-examples
|
||||
$(package)_config_opts+=--disable-crypttests
|
||||
@@ -21,9 +30,11 @@ $(package)_config_opts+=--enable-keygen
|
||||
$(package)_config_opts+=--enable-certgen
|
||||
$(package)_config_opts+=--enable-bigcache
|
||||
$(package)_config_opts+=--enable-enckeys
|
||||
# TODO: can we reduce down to only the normal openssl compat, without these options?
|
||||
$(package)_config_opts+=--enable-opensslall
|
||||
$(package)_config_opts+=--enable-opensslextra
|
||||
$(package)_config_opts+=--enable-harden
|
||||
$(package)_config_opts+=C_EXTRA_FLAGS="-DSPEAK_AND_TRANSACT_FREELY"
|
||||
|
||||
endef
|
||||
|
||||
define $(package)_preprocess_cmds
|
||||
@@ -49,4 +60,3 @@ endef
|
||||
#define $(package)_postprocess_cmds
|
||||
# rm -rf bin share
|
||||
#endef
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# Unsupported until further notice
|
||||
ifeq ($(host_os),mingw32)
|
||||
$(package)_version=4.3.1
|
||||
$(package)_download_path=https://github.com/ca333/libzmq/archive
|
||||
$(package)_download_path=https://git.hush.is/duke/libzmq/archive
|
||||
$(package)_download_file=v$($(package)_version).tar.gz
|
||||
$(package)_file_name=libzmq-$($(package)_version).tar.gz
|
||||
$(package)_sha256_hash=cb8ebe5b60dadeb526745610d6237f05a98aba287114d8991dad1fa14f4be354
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
* komodo.conf: contains configuration settings for komodod
|
||||
* komodod.pid: stores the process id of komodod while running
|
||||
# Hush Files
|
||||
|
||||
* HUSH3.conf: contains configuration settings for hushd
|
||||
* hushd.pid: stores the process id of hushd while running
|
||||
* blocks/blk000??.dat: block data (custom, 128 MiB per file)
|
||||
* blocks/rev000??.dat; block undo data (custom)
|
||||
* blocks/index/*; block index (LevelDB)
|
||||
* chainstate/*; block chain state database (LevelDB)
|
||||
* database/*: BDB database environment
|
||||
* db.log: wallet database log file
|
||||
* debug.log: contains debug information and general logging generated by komodod
|
||||
* debug.log: contains debug information and general logging generated by hushd
|
||||
* fee_estimates.dat: stores statistics used to estimate minimum transaction fees and priorities required for confirmation
|
||||
* peers.dat: peer IP address database (custom format)
|
||||
* wallet.dat: personal wallet (BDB) with keys and transactions
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.10.
|
||||
.TH HUSH-CLI "1" "October 2020" "hush-cli v3.5.1" "User Commands"
|
||||
.TH HUSH-CLI "1" "January 2021" "hush-cli v3.6.1" "User Commands"
|
||||
.SH NAME
|
||||
hush-cli \- manual page for hush-cli v3.5.1
|
||||
hush-cli \- manual page for hush-cli v3.6.1
|
||||
.SH DESCRIPTION
|
||||
Hush RPC client version v3.5.1\-dd8ab3df6
|
||||
Hush RPC client version v3.6.1\-cf5736569\-dirty
|
||||
.PP
|
||||
In order to ensure you are adequately protecting your privacy when using Hush,
|
||||
please see <https://myhush.org/security/>.
|
||||
please see <https://hush.is/security/>.
|
||||
.SS "Usage:"
|
||||
.TP
|
||||
hush\-cli [options] <command> [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 <https://myhush.org/security/>.
|
||||
please see <https://hush.is/security/>.
|
||||
|
||||
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 <https://www.opensource.org/licenses/mit-license.php>.
|
||||
|
||||
This product includes software developed by the OpenSSL Project for use in the
|
||||
OpenSSL Toolkit <https://www.openssl.org/> and cryptographic software written
|
||||
by Eric Young.
|
||||
Distributed under the GPLv3 software license, see the accompanying file COPYING
|
||||
or <https://www.gnu.org/licenses/gpl-3.0.en.html>.
|
||||
|
||||
@@ -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] <hex\-tx> [commands]
|
||||
Update hex\-encoded zcash transaction
|
||||
hush\-tx [options] <hex\-tx> [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 <https://myhush.org/security/>.
|
||||
please see <https://hush.is/security/>.
|
||||
|
||||
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 <https://www.opensource.org/licenses/mit-license.php>.
|
||||
|
||||
This product includes software developed by the OpenSSL Project for use in the
|
||||
OpenSSL Toolkit <https://www.openssl.org/> and cryptographic software written
|
||||
by Eric Young.
|
||||
Distributed under the GPLv3 software license, see the accompanying file COPYING
|
||||
or <https://www.gnu.org/licenses/gpl-3.0.en.html>.
|
||||
|
||||
@@ -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 <https://myhush.org/security/>.
|
||||
please see <https://hush.is/security/>.
|
||||
.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<cmd>
|
||||
.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<file>
|
||||
.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<n>
|
||||
.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<file>
|
||||
.IP
|
||||
@@ -85,7 +80,7 @@ leave that many cores free, default: 0)
|
||||
.HP
|
||||
\fB\-pid=\fR<file>
|
||||
.IP
|
||||
Specify pid file (default: komodod.pid)
|
||||
Specify pid file (default: hushd.pid)
|
||||
.HP
|
||||
\fB\-txexpirynotify=\fR<cmd>
|
||||
.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<n>
|
||||
.IP
|
||||
@@ -231,7 +226,7 @@ Support filtering of blocks and transaction with Bloom filters (default:
|
||||
.HP
|
||||
\fB\-port=\fR<port>
|
||||
.IP
|
||||
Listen for connections on <port> (default: 7770 or testnet: 17770)
|
||||
Listen for connections on <port> (default: 55555 or testnet: 55420)
|
||||
.HP
|
||||
\fB\-proxy=\fR<ip:port>
|
||||
.IP
|
||||
@@ -261,8 +256,12 @@ Tor control port password (default: empty)
|
||||
.HP
|
||||
\fB\-tls=\fR<option>
|
||||
.IP
|
||||
Specify TLS usage (default: 1 => enabled and preferred, yet compatible);
|
||||
other options are \fB\-tls\fR=\fI\,0\/\fR to disable TLS and \fB\-tls\fR=\fI\,only\/\fR to enforce it
|
||||
Specify TLS usage (default: 1 => enabled and required); Cannot be turned
|
||||
off.
|
||||
.HP
|
||||
\fB\-tlsvalidate=\fR<0 or 1>
|
||||
.IP
|
||||
Connect to peers only with valid certificates (default: 0)
|
||||
.HP
|
||||
\fB\-tlskeypath=\fR<path>
|
||||
.IP
|
||||
@@ -281,15 +280,15 @@ Full path to a certificate
|
||||
.IP
|
||||
Full path to a trusted certificates directory
|
||||
.HP
|
||||
\fB\-whitebind=\fR<addr>
|
||||
\fB\-allowbind=\fR<addr>
|
||||
.IP
|
||||
Bind to given address and whitelist peers connecting to it. Use
|
||||
Bind to given address and allowlist peers connecting to it. Use
|
||||
[host]:port notation for IPv6
|
||||
.HP
|
||||
\fB\-whitelist=\fR<netmask>
|
||||
\fB\-allowlist=\fR<netmask>
|
||||
.IP
|
||||
Whitelist peers connecting from the given netmask or IP address. Can be
|
||||
specified multiple times. Whitelisted peers cannot be DoS banned and
|
||||
Allowlist peers connecting from the given netmask or IP address. Can be
|
||||
specified multiple times. Allowlisted peers cannot be DoS banned and
|
||||
their transactions are always relayed, even if they are already in the
|
||||
mempool, useful e.g. for a gateway
|
||||
.PP
|
||||
@@ -335,12 +334,12 @@ Keep transactions for at least <n> blocks (default: 10000)
|
||||
.HP
|
||||
\fB\-opretmintxfee=\fR<amt>
|
||||
.IP
|
||||
Minimum fee (in KMD/kB) to allow for OP_RETURN transactions (default:
|
||||
Minimum fee (in HUSH/kB) to allow for OP_RETURN transactions (default:
|
||||
400000)
|
||||
.HP
|
||||
\fB\-paytxfee=\fR<amt>
|
||||
.IP
|
||||
Fee (in KMD/kB) to add to transactions you send (default: 0.00)
|
||||
Fee (in HUSH/kB) to add to transactions you send (default: 0.00)
|
||||
.HP
|
||||
\fB\-rescan\fR
|
||||
.IP
|
||||
@@ -370,7 +369,7 @@ mined will become invalid (default: 200)
|
||||
.HP
|
||||
\fB\-maxtxfee=\fR<amt>
|
||||
.IP
|
||||
Maximum total fees (in KMD) to use in a single wallet transaction;
|
||||
Maximum total fees (in HUSH) to use in a single wallet transaction;
|
||||
setting this too low may abort large transactions (default: 0.10)
|
||||
.HP
|
||||
\fB\-upgradewallet\fR
|
||||
@@ -391,15 +390,15 @@ Make the wallet broadcast transactions (default: 1)
|
||||
Execute command when a wallet transaction changes (%s in cmd is replaced
|
||||
by TxID)
|
||||
.HP
|
||||
\fB\-whitelistaddress=\fR<Raddress>
|
||||
\fB\-allowlistaddress=\fR<Raddress>
|
||||
.IP
|
||||
Enable the wallet filter for notary nodes and add one Raddress to the
|
||||
whitelist of the wallet filter. If \fB\-whitelistaddress=\fR is used, then the
|
||||
allowlist of the wallet filter. If \fB\-allowlistaddress=\fR is used, then the
|
||||
wallet filter is automatically activated. Several Raddresses can be
|
||||
defined using several \fB\-whitelistaddress=\fR (similar to \fB\-addnode\fR). The
|
||||
defined using several \fB\-allowlistaddress=\fR (similar to \fB\-addnode\fR). The
|
||||
wallet filter will filter the utxo to only ones coming from my own
|
||||
Raddress (derived from pubkey) and each Raddress defined using
|
||||
\fB\-whitelistaddress=\fR this option is mostly for Notary Nodes).
|
||||
\fB\-allowlistaddress=\fR this option is mostly for Notary Nodes).
|
||||
.HP
|
||||
\fB\-zapwallettxes=\fR<mode>
|
||||
.IP
|
||||
@@ -433,8 +432,8 @@ Output debugging information (default: 0, supplying <category> is
|
||||
optional). If <category> is not supplied or if <category> = 1, output
|
||||
all debugging information. <category> can be: addrman, alert, bench,
|
||||
coindb, db, deletetx, estimatefee, http, libevent, lock, mempool, net,
|
||||
partitioncheck, pow, proxy, prune, rand, reindex, rpc, selectcoins, tor,
|
||||
zmq, zrpc, zrpcunsafe (implies zrpc).
|
||||
tls, partitioncheck, pow, proxy, prune, rand, reindex, rpc, selectcoins,
|
||||
tor, zmq, zrpc, zrpcunsafe (implies zrpc).
|
||||
.HP
|
||||
\fB\-experimentalfeatures\fR
|
||||
.IP
|
||||
@@ -454,7 +453,7 @@ Prepend debug output with timestamp (default: 1)
|
||||
.HP
|
||||
\fB\-minrelaytxfee=\fR<amt>
|
||||
.IP
|
||||
Fees (in KMD/kB) smaller than this are considered zero fee for relaying
|
||||
Fees (in HUSH/kB) smaller than this are considered zero fee for relaying
|
||||
(default: 0.000001)
|
||||
.HP
|
||||
\fB\-printtoconsole\fR
|
||||
@@ -673,21 +672,16 @@ Starting supply, default is 0
|
||||
.IP
|
||||
Enforce transaction\-rate limit, default 0
|
||||
.SH COPYRIGHT
|
||||
Hush Daemon version v3.5.2-d19cf21f9
|
||||
|
||||
In order to ensure you are adequately protecting your privacy when using Hush,
|
||||
please see <https://myhush.org/security/>.
|
||||
please see <https://hush.is/security/>.
|
||||
|
||||
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 <https://www.opensource.org/licenses/mit-license.php>.
|
||||
|
||||
This product includes software developed by the OpenSSL Project for use in the
|
||||
OpenSSL Toolkit <https://www.openssl.org/> and cryptographic software written
|
||||
by Eric Young.
|
||||
Distributed under the GPLv3 software license, see the accompanying file COPYING
|
||||
or <https://www.gnu.org/licenses/gpl-3.0.en.html>.
|
||||
|
||||
27
doc/overview.md
Normal file
27
doc/overview.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# Hush Overview
|
||||
|
||||
## Mining Algorithm
|
||||
|
||||
Equihash (200,9) (ASIC)
|
||||
|
||||
## Block time
|
||||
|
||||
75 seconds
|
||||
|
||||
## Block size
|
||||
|
||||
4MB
|
||||
|
||||
## P2P
|
||||
|
||||
TLS1.3 via WolfSSL is enforced for all network connections as of v3.6.1
|
||||
|
||||
## RPC
|
||||
|
||||
Inherited many RPC's from Bitcoin and Zcash with many new ones
|
||||
|
||||
## Consensus
|
||||
|
||||
Hush is a mandatory privacy blockchain as of Block 340000 (Nov 2020),
|
||||
which means you can only send to a shielded address, never to a transparent
|
||||
address. This is enforced via consensus rules and sometimes called "z2z".
|
||||
@@ -1,5 +1,4 @@
|
||||
In-memory caches
|
||||
----------------
|
||||
# In-memory caches
|
||||
|
||||
The size of some in-memory caches can be reduced. As caches trade off memory usage for performance, usually reducing these have a negative effect on performance.
|
||||
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
# Notable changes
|
||||
|
||||
(note: this is a temporary file, to be added-to by anybody, and moved to
|
||||
release-notes at release time)
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user