Skip to content

Commit

Permalink
Rename executables to bitcoinz (#42)
Browse files Browse the repository at this point in the history
  • Loading branch information
egyptianbman authored Jun 10, 2018
1 parent 7959b28 commit 1a36126
Show file tree
Hide file tree
Showing 62 changed files with 445 additions and 439 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ RUN apt-get update \
RUN mkdir -p /bitcoinz/data

# Copy binaries from build container
COPY --from=build /usr/local/src/src/zcashd /usr/local/bin
COPY --from=build /usr/local/src/src/zcash-cli /usr/local/bin
COPY --from=build /usr/local/src/src/bitcoinzd /usr/local/bin
COPY --from=build /usr/local/src/src/bitcoinz-cli /usr/local/bin
COPY --from=build /usr/local/src/src/zcash-gtest /usr/local/bin
COPY --from=build /usr/local/src/src/zcash-tx /usr/local/bin
COPY --from=build /usr/local/src/src/bitcoinz-tx /usr/local/bin
COPY contrib/docker/cli /usr/local/bin

RUN chmod +x /usr/local/bin/cli
Expand All @@ -60,4 +60,4 @@ COPY --from=build /root/.zcash-params /bitcoinz/.zcash-params
RUN chown -R bitcoinz: /bitcoinz
USER bitcoinz
WORKDIR /bitcoinz
CMD ["zcashd", "--datadir=/bitcoinz/data"]
CMD ["bitcoinzd", "-datadir=/bitcoinz/data"]
6 changes: 3 additions & 3 deletions INSTALL
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Building Zcash
Building BitcoinZ

See the Zcash github wiki (https://github.com/zcash/zcash/wiki) for instructions on building zcashd,
See the BitcoinZ github wiki (https://github.com/btcz/bitcoinz/wiki) for instructions on building bitcoinzd,
the intended-for-services, no-graphical-interface, reference
implementation of Zcash.
implementation of BitcoinZ.
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ endif
dist_bin_SCRIPTS = zcutil/fetch-params.sh
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/zcash $(DIST_DOCS) $(BIN_CHECKS)
EXTRA_DIST = $(top_srcdir)/share/genbuild.sh qa/pull-tester/rpc-tests.sh qa/pull-tester/run-bitcoin-cli qa/rpc-tests qa/bitcoinz $(DIST_DOCS) $(BIN_CHECKS)

install-exec-hook:
mv $(DESTDIR)$(bindir)/fetch-params.sh $(DESTDIR)$(bindir)/zcash-fetch-params
Expand Down
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,23 @@ cd bitcoinz/
# fetch key
./zcutil/fetch-params.sh
# Run
./src/zcashd
./src/bitcoinzd
# Test getting information about the network
cd src/
./zcash-cli getmininginfo
./bitcoinz-cli getmininginfo
# Test creating new transparent address
./zcash-cli getnewaddress
./bitcoinz-cli getnewaddress
# Test creating new private address
./zcash-cli z_getnewaddress
./bitcoinz-cli z_getnewaddress
# Test checking transparent balance
./zcash-cli getbalance
./bitcoinz-cli getbalance
# Test checking total balance
./zcash-cli z_gettotalbalance
./bitcoinz-cli z_gettotalbalance
# Check all available wallet commands
./zcash-cli help
./bitcoinz-cli help
# Get more info about a single wallet command
./zcash-cli help "The-command-you-want-to-learn-more-about"
./zcash-cli help "getbalance"
./bitcoinz-cli help "The-command-you-want-to-learn-more-about"
./bitcoinz-cli help "getbalance"
```

### Docker
Expand Down Expand Up @@ -74,16 +74,16 @@ $ docker run -d --name bitcoinz-node \
Verify bitcoinz-node is running
```
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
31868a91456d btcz/bitcoinz "zcashd --datadir=..." 2 hours ago Up 2 hours 127.0.0.1:1979->1979/tcp, 0.0.0.0:1989->1989/tcp bitcoinz-node
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
31868a91456d btcz/bitcoinz "bitcoinzd --datadir=..." 2 hours ago Up 2 hours 127.0.0.1:1979->1979/tcp, 0.0.0.0:1989->1989/tcp bitcoinz-node
```

Follow the logs
```
docker logs -f bitcoinz-node
```

The cli command is a wrapper to zcash-cli that works with an already running Docker container
The cli command is a wrapper to bitcoinz-cli that works with an already running Docker container
```
docker exec -it bitcoinz-node cli help
```
Expand Down
18 changes: 9 additions & 9 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 1)
define(_CLIENT_VERSION_MINOR, 2)
define(_CLIENT_VERSION_REVISION, 1)
define(_CLIENT_VERSION_MINOR, 3)
define(_CLIENT_VERSION_REVISION, 0)
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, 2018)
AC_INIT([Zcash],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_SUFFIX(_ZC_BUILD_VAL)],[https://github.com/zcash/zcash/issues],[zcash])
AC_INIT([BitcoinZ],[_CLIENT_VERSION_MAJOR._CLIENT_VERSION_MINOR._CLIENT_VERSION_SUFFIX(_ZC_BUILD_VAL)],[https://github.com/btcz/bitcoinz/issues],[BitcoinZ])
AC_CONFIG_SRCDIR([src/main.cpp])
AC_CONFIG_HEADERS([src/config/bitcoin-config.h])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([build-aux/m4])

BITCOIN_DAEMON_NAME=zcashd
BITCOIN_CLI_NAME=zcash-cli
BITCOIN_TX_NAME=zcash-tx
BITCOIN_DAEMON_NAME=bitcoinzd
BITCOIN_CLI_NAME=bitcoinz-cli
BITCOIN_TX_NAME=bitcoinz-tx

dnl Unless the user specified ARFLAGS, force it to be cr
AC_ARG_VAR(ARFLAGS, [Flags for the archiver, defaults to <cr> if not set])
Expand Down Expand Up @@ -212,7 +212,7 @@ CPPFLAGS="$CPPFLAGS -DHAVE_BUILD_INFO -D__STDC_FORMAT_MACROS"

AC_ARG_WITH([utils],
[AS_HELP_STRING([--with-utils],
[build zcash-cli zcash-tx (default=yes)])],
[build bitcoinz-cli bitcoinz-tx (default=yes)])],
[build_bitcoin_utils=$withval],
[build_bitcoin_utils=yes])

Expand Down Expand Up @@ -715,7 +715,7 @@ else
LIBSNARK_DEPINST="$prefix"
fi

# Additional Zcash flags
# Additional BitcoinZ flags
AX_CHECK_COMPILE_FLAG([-fwrapv],[CXXFLAGS="$CXXFLAGS -fwrapv"])
AX_CHECK_COMPILE_FLAG([-fno-strict-aliasing],[CXXFLAGS="$CXXFLAGS -fno-strict-aliasing"])
AX_CHECK_COMPILE_FLAG([-Wno-builtin-declaration-mismatch],[CXXFLAGS="$CXXFLAGS -Wno-builtin-declaration-mismatch"],,[[$CXXFLAG_WERROR]])
Expand All @@ -726,7 +726,7 @@ AC_MSG_CHECKING([whether to build bitcoind])
AM_CONDITIONAL([BUILD_BITCOIND], [test x$build_bitcoind = xyes])
AC_MSG_RESULT($build_bitcoind)

AC_MSG_CHECKING([whether to build utils (zcash-cli zcash-tx)])
AC_MSG_CHECKING([whether to build utils (bitcoinz-cli bitcoinz-tx)])
AM_CONDITIONAL([BUILD_BITCOIN_UTILS], [test x$build_bitcoin_utils = xyes])
AC_MSG_RESULT($build_bitcoin_utils)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# bash programmable completion for zcash-cli(1)
# Copyright (c) 2012-2016 The Bitcoin Core developers
# bash programmable completion for bitcoinz-cli(1)
# Copyright (c) 2017-2018 The BitcoinZ Community
# Copyright (c) 2016-2017 The Zcash developers
# Copyright (c) 2012-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.

# call $zcash-cli for RPC
_zcash_rpc() {
# call $bitcoinz-cli for RPC
_bitcoinz_rpc() {
# determine already specified args necessary for RPC
local rpcargs=()
for i in ${COMP_LINE}; do
Expand All @@ -14,25 +16,25 @@ _zcash_rpc() {
;;
esac
done
$zcash_cli "${rpcargs[@]}" "$@"
$bitcoinz_cli "${rpcargs[@]}" "$@"
}

# Add wallet accounts to COMPREPLY
_zcash_accounts() {
_bitcoinz_accounts() {
local accounts
# Accounts are deprecated in Zcash
#accounts=$(_zcash_rpc listaccounts | awk -F '"' '{ print $2 }')
# Accounts are deprecated in BitcoinZ
#accounts=$(_bitcoinz_rpc listaccounts | awk -F '"' '{ print $2 }')
accounts="\\\"\\\""
COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W "$accounts" -- "$cur" ) )
}

_zcash_cli() {
_bitcoinz_cli() {
local cur prev words=() cword
local zcash_cli
local bitcoinz_cli

# save and use original argument to invoke zcash-cli for -help, help and RPC
# as zcash-cli might not be in $PATH
zcash_cli="$1"
# save and use original argument to invoke bitcoinz-cli for -help, help and RPC
# as bitcoinz-cli might not be in $PATH
bitcoinz_cli="$1"

COMPREPLY=()
_get_comp_words_by_ref -n = cur prev words cword
Expand Down Expand Up @@ -62,7 +64,7 @@ _zcash_cli() {
if ((cword > 3)); then
case ${words[cword-3]} in
addmultisigaddress)
_zcash_accounts
_bitcoinz_accounts
return 0
;;
getbalance|gettxout|importaddress|importpubkey|importprivkey|listreceivedbyaccount|listreceivedbyaddress|listsinceblock)
Expand Down Expand Up @@ -91,7 +93,7 @@ _zcash_cli() {
return 0
;;
move|setaccount)
_zcash_accounts
_bitcoinz_accounts
return 0
;;
esac
Expand All @@ -107,7 +109,7 @@ _zcash_cli() {
return 0
;;
getaccountaddress|getaddressesbyaccount|getbalance|getnewaddress|getreceivedbyaccount|listtransactions|move|sendfrom|sendmany)
_zcash_accounts
_bitcoinz_accounts
return 0
;;
esac
Expand All @@ -131,12 +133,12 @@ _zcash_cli() {

# only parse -help if senseful
if [[ -z "$cur" || "$cur" =~ ^- ]]; then
helpopts=$($zcash_cli -help 2>&1 | awk '$1 ~ /^-/ { sub(/=.*/, "="); print $1 }' )
helpopts=$($bitcoinz_cli -help 2>&1 | awk '$1 ~ /^-/ { sub(/=.*/, "="); print $1 }' )
fi

# only parse help if senseful
if [[ -z "$cur" || "$cur" =~ ^[a-z] ]]; then
commands=$(_zcash_rpc help 2>/dev/null | awk '$1 ~ /^[a-z]/ { print $1; }')
commands=$(_bitcoinz_rpc help 2>/dev/null | awk '$1 ~ /^[a-z]/ { print $1; }')
fi

COMPREPLY=( $( compgen -W "$helpopts $commands" -- "$cur" ) )
Expand All @@ -149,7 +151,7 @@ _zcash_cli() {
;;
esac
} &&
complete -F _zcash_cli zcash-cli
complete -F _bitcoinz_cli bitcoinz-cli

# Local variables:
# mode: shell-script
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
# bash programmable completion for zcash-tx(1)
# Copyright (c) 2016 The Bitcoin Core developers
# bash programmable completion for bitcoinz-tx(1)
# Copyright (c) 2017-2018 The BitcoinZ Community
# Copyright (c) 2016-2017 The Zcash developers
# Copyright (c) 2012-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.

_zcash_tx() {
_bitcoinz_tx() {
local cur prev words=() cword
local zcash_tx
local bitcoinz_tx

# save and use original argument to invoke zcash-tx for -help
# save and use original argument to invoke bitcoinz-tx for -help
# it might not be in $PATH
zcash_tx="$1"
bitcoinz_tx="$1"

COMPREPLY=()
_get_comp_words_by_ref -n =: cur prev words cword
Expand All @@ -27,15 +29,15 @@ _zcash_tx() {

if [[ "$cword" == 1 || ( "$prev" != "-create" && "$prev" == -* ) ]]; then
# only options (or an uncompletable hex-string) allowed
# parse zcash-tx -help for options
# parse bitcoinz-tx -help for options
local helpopts
helpopts=$($zcash_tx -help | sed -e '/^ -/ p' -e d )
helpopts=$($bitcoinz_tx -help | sed -e '/^ -/ p' -e d )
COMPREPLY=( $( compgen -W "$helpopts" -- "$cur" ) )
else
# only commands are allowed
# parse -help for commands
local helpcmds
helpcmds=$($zcash_tx -help | sed -e '1,/Commands:/d' -e 's/=.*/=/' -e '/^ [a-z]/ p' -e d )
helpcmds=$($bitcoinz_tx -help | sed -e '1,/Commands:/d' -e 's/=.*/=/' -e '/^ [a-z]/ p' -e d )
COMPREPLY=( $( compgen -W "$helpcmds" -- "$cur" ) )
fi

Expand All @@ -46,7 +48,7 @@ _zcash_tx() {

return 0
} &&
complete -F _zcash_tx zcash-tx
complete -F _bitcoinz_tx bitcoinz-tx

# Local variables:
# mode: shell-script
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# bash programmable completion for zcashd(1)
# Copyright (c) 2012-2017 The Bitcoin Core developers
# bash programmable completion for bitcoinzd(1)
# Copyright (c) 2017-2018 The BitcoinZ Community
# Copyright (c) 2016-2017 The Zcash developers
# Copyright (c) 2012-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.

_zcashd() {
_bitcoinzd() {
local cur prev words=() cword
local zcashd
local bitcoinzd

# save and use original argument to invoke zcashd for -help
# save and use original argument to invoke bitcoinzd for -help
# it might not be in $PATH
zcashd="$1"
bitcoinzd="$1"

COMPREPLY=()
_get_comp_words_by_ref -n = cur prev words cword
Expand All @@ -34,7 +35,7 @@ _zcashd() {
# only parse -help if senseful
if [[ -z "$cur" || "$cur" =~ ^- ]]; then
local helpopts
helpopts=$($zcashd -help 2>&1 | awk '$1 ~ /^-/ { sub(/=.*/, "="); print $1 }' )
helpopts=$($bitcoinzd -help 2>&1 | awk '$1 ~ /^-/ { sub(/=.*/, "="); print $1 }' )
COMPREPLY=( $( compgen -W "$helpopts" -- "$cur" ) )
fi

Expand All @@ -46,7 +47,7 @@ _zcashd() {
;;
esac
} &&
complete -F _zcashd zcashd
complete -F _bitcoinzd bitcoinzd

# Local variables:
# mode: shell-script
Expand Down
4 changes: 2 additions & 2 deletions contrib/debian/bitcoinz.install
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
usr/bin/zcashd
usr/bin/zcash-cli
usr/bin/bitcoinzd
usr/bin/bitcoinz-cli
usr/bin/zcash-fetch-params
4 changes: 2 additions & 2 deletions contrib/debian/bitcoinz.manpages
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
DEBIAN/manpages/zcash-cli.1
DEBIAN/manpages/zcashd.1
DEBIAN/manpages/bitcoinz-cli.1
DEBIAN/manpages/bitcoinzd.1
6 changes: 3 additions & 3 deletions contrib/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
bitcoinz (1.2.1) stable; urgency=medium
bitcoinz (1.3.0) stable; urgency=medium

* 1.2.1 release.
* 1.3.0 release.

-- BitcoinZ team <[email protected]> Wed, 16 May 2018 2:08:00 +0100
-- The BitcoinZ Community <[email protected]> Sat, 10 June 2018 00:15:00 +0100
11 changes: 5 additions & 6 deletions contrib/debian/control
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
Source: bitcoinz
Section: utils
Priority: optional
Maintainer: BitcoinZ team <[email protected]>
Maintainer: The BitcoinZ Community <[email protected]>
Homepage: https://btcz.rocks
Build-Depends: autoconf, automake, bsdmainutils, build-essential,
git, g++-multilib, libc6-dev, libtool,
m4, ncurses-dev, pkg-config, python,
unzip, wget, zlib1g-dev
Vcs-Git: https://github.com/bitcoinz-pod/bitcoinz.git
Vcs-Browser: https://github.com/bitcoinz-pod
Vcs-Git: https://github.com/btcz/bitcoinz.git
Vcs-Browser: https://github.com/btcz

Package: bitcoinz
Version: 1.2.1
Version: 1.3.0
Depends: ${shlibs:Depends}
Architecture: all
Description: Community coin.
BitcoinZ is based on Bitcoin's & Zcash code.
Description: BitcoinZ is a decentralized community project based on the Bitcoin and Zcash codebase.
Loading

0 comments on commit 1a36126

Please sign in to comment.