Skip to content

Commit

Permalink
Merge pull request #64 from ZencashOfficial/development
Browse files Browse the repository at this point in the history
v2.0.10 - TLS integration
  • Loading branch information
LukasBures authored Sep 18, 2017
2 parents e96a14a + af80a3f commit 4211b89
Show file tree
Hide file tree
Showing 88 changed files with 2,223 additions and 835 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This issue tracker is only for technical issues related to Zen.

General Zen questions and/or support requests and are best directed to the [Slack](https://zencash.slack.com).

For reporting security vulnerabilities or for sensitive discussions with our security team, please post a message in #developers within the above Slack, or email admin@zensystem.io with information.
For reporting security vulnerabilities or for sensitive discussions with our security team, please post a message in #developers within the above Slack, or email info@zensystem.io with information.

### Describe the issue
Please provide a general summary of the issue you're experiencing
Expand Down
45 changes: 37 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Zen 2.0.9-4
Zen 2.0.10
==============

What is Zen?
Expand All @@ -13,23 +13,30 @@ A globally accessible and anonymous blockchain for censorship-resistant communic
autoconf libtool ncurses-dev unzip git python \
zlib1g-dev wget bsdmainutils automake
```
1. Centos:
2. Centos:
```{r, engine='bash')
sudo yum install epel-release
sudo yum group install 'Development Tools'
sudo yum install lbzip2 \
ncurses-dev unzip python \
zlib1g-dev wget bsdmainutils
```
1. Windows
3. Windows
```{r, engine='bash'}
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 mingw-w64
```
4. Arm
```{r, engine='bash'}
sudo apt-get install \
build-essential pkg-config libc6-dev m4 g++-multilib-arm-linux-gnueabihf \
autoconf libtool ncurses-dev unzip git python \
zlib1g-dev wget bsdmainutils automake
```
1. Install for linux
* Install for linux
```{r, engine='bash'}
# Build
./zcutil/build.sh -j$(nproc)
Expand All @@ -39,14 +46,34 @@ A globally accessible and anonymous blockchain for censorship-resistant communic
./src/zend
```

1. Install for Windows (Cross-Compiled, building on Windows is not supported yet)
* Install for Windows (Cross-Compiled, building on Windows is not supported yet)

```./zcutil/build-win.sh -j$(nproc)```
```
./zcutil/build-win.sh -j$(nproc)
```

* Install for aarch64(ARM64)

```
mkdir -p ~/bin
cd ~/bin
ln -s /usr/bin/ar aarch64-unknown-linux-gnu-ar
ln -s /usr/bin/g++ aarch64-unknown-linux-gnu-g++
ln -s /usr/bin/gcc aarch64-unknown-linux-gnu-gcc
ln -s /usr/bin/nm aarch64-unknown-linux-gnu-nm
ln -s /usr/bin/ranlib aarch64-unknown-linux-gnu-ranlib
ln -s /usr/bin/strip aarch64-unknown-linux-gnu-strip
PATH=$PATH:~/bin
cd ~/zen/
./zcutil.build-arm.sh --disable-rust -j$(nproc)
```
Instructions to redeem pre block 110,000 ZCL
-------------
Copy and paste your wallet.dat from ~/.zclassic/ to ~/.zen. That's it
1. Linux:
Copy and paste your wallet.dat from ~/.zclassic/ to ~/.zen. That's it!

2. Windows:
Copy and paste your wallet.dat from %APPDATA%/Zclassic/ to %APPDATA%/Zen. That's it!

About
--------------
Expand Down Expand Up @@ -91,7 +118,9 @@ Building
--------

Build Zen along with most dependencies from source by running
./zcutil/build.sh. Linux, MacOS, and Windows x64 are supported.
./zcutil/build.sh for Linux.
./zcutil/build-win.sh for Windows
./zcutil/build-mac.sh for MacOS.

License
-------
Expand Down
5 changes: 2 additions & 3 deletions code_of_conduct.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,12 @@ is deemed necessary and appropriate to the circumstances. Maintainers are
obligated to maintain confidentiality with regard to the reporter of an
incident.

You may send reports to [our Conduct email](mailto:[email protected]).
You may send reports to [our Conduct email](mailto:[email protected]).

If you wish to contact specific maintainers directly, the following have made
themselves available for conduct issues:

- Daira Hopwood (daira at z.cash)
- Sean Bowe (sean at z.cash)
- Jake (jake at zensystem.io)


This Code of Conduct is adapted from the [Contributor Covenant][homepage],
Expand Down
4 changes: 2 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ dnl require autoconf 2.60 (AS_ECHO/AS_ECHO_N)
AC_PREREQ([2.60])
define(_CLIENT_VERSION_MAJOR, 2)
define(_CLIENT_VERSION_MINOR, 0)
define(_CLIENT_VERSION_REVISION, 9)
define(_CLIENT_VERSION_BUILD, 54)
define(_CLIENT_VERSION_REVISION, 10)
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)
Expand Down
2 changes: 1 addition & 1 deletion contrib/debian/control
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Source: zcash
Section: utils
Priority: optional
Maintainer: Zen Blockchain Foundation <admin@zensystem.io>
Maintainer: Zen Blockchain Foundation <info@zensystem.io>
Homepage: https://zensystem.io
Build-Depends: autoconf, automake, bsdmainutils, build-essential,
git, g++-multilib, libc6-dev, libtool,
Expand Down
10 changes: 6 additions & 4 deletions contrib/debian/copyright
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
Format: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?rev=174
Upstream-Name: Zcash
Upstream-Contact: Zcash Company <[email protected]>
Source: https://github.com/zcash/zcash
Upstream-Name: ZenCash
Upstream-Contact: ZenCash Team <[email protected]>
Source: https://github.com/zencashofficial/zen

Files: *
Copyright: 2016-2017, The Zcash developers
Copyright: 2016-2017, The Zen Blockchain Foundation
2016-2017, The Zcash developers
2009-2017, Bitcoin Core 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.
The ZenCash developers are listed at https://zensystem.io/team.

Files: depends/sources/libsodium-*.tar.gz
Copyright: 2013-2016 Frank Denis
Expand Down
2 changes: 1 addition & 1 deletion depends/packages/boost.mk
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ $(package)_cxxflags_linux=-fPIC
endef

define $(package)_preprocess_cmds
echo "using $(boost_toolset_$(host_os)) : : $($(package)_cxx) : <cxxflags>\"$($(package)_cxxflags) $($(package)_cppflags)\" <linkflags>\"$($(package)_ldflags)\" <archiver>\"$(boost_archiver_$(host_os))\" <striper>\"$(host_STRIP)\" <ranlib>\"$(host_RANLIB)\" <rc>\"$(host_WINDRES)\" : ;" > user-config.jam && \
echo "using $(boost_toolset_$(host_os)) : g++ : $($(package)_cxx) : <cxxflags>\"$($(package)_cxxflags) $($(package)_cppflags)\" <linkflags>\"$($(package)_ldflags)\" <archiver>\"ar\" <striper>\"strip\" <ranlib>\"ranlib\" <rc>\"$(host_WINDRES)\" : ;" > user-config.jam && \
patch -p1 < $($(package)_patch_dir)/deprecated_auto_ptr.patch && \
patch -p1 < $($(package)_patch_dir)/include_poll.patch
endef
Expand Down
2 changes: 1 addition & 1 deletion depends/packages/libsnark.mk
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ endef
$(package)_dependencies=libgmp libsodium

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"
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"
endef

define $(package)_stage_cmds
Expand Down
4 changes: 2 additions & 2 deletions depends/packages/openssl.mk
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package=openssl
$(package)_version=1.1.0d
$(package)_version=1.1.0f
$(package)_download_path=https://www.openssl.org/source
$(package)_file_name=$(package)-$($(package)_version).tar.gz
$(package)_sha256_hash=7d5ebb9e89756545c156ff9c13cf2aa6214193b010a468a3bc789c3c28fe60df
$(package)_sha256_hash=12f746f3f2493b2f39da7ecf63d7ee19c6ac9ec6a4fcd8c229da8a522cb12765

define $(package)_set_vars
$(package)_config_env=AR="$($(package)_ar)" RANLIB="$($(package)_ranlib)" CC="$($(package)_cc)"
Expand Down
2 changes: 1 addition & 1 deletion doc/init.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*** Warning: This document has not been updated for Zcash and may be inaccurate. ***
*** Warning: This document has not been updated for Zencash and may be inaccurate. ***

Sample init scripts and service configuration for bitcoind
==========================================================
Expand Down
2 changes: 1 addition & 1 deletion doc/release-process.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Add the newly created release notes to the Git repository:
Update the Debian package changelog:

export DEBVERSION="${ZCASH_RELEASE}"
export DEBEMAIL="${DEBEMAIL:-[email protected]}"
export DEBEMAIL="${DEBEMAIL:-[email protected]}"
export DEBFULLNAME="${DEBFULLNAME:-Zcash Company}"

dch -v $DEBVERSION -D jessie -c contrib/debian/changelog
Expand Down
2 changes: 1 addition & 1 deletion doc/security-warnings.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Zcash has been subjected to a formal third-party security review. For security
announcements, audit results and other general security information, see
https://z.cash/support/security.html

x86-64 Linux Only
64bit OS only
-----------------------

There are [known bugs](https://github.com/scipr-lab/libsnark/issues/26) which
Expand Down
60 changes: 30 additions & 30 deletions doc/tor.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
*** Warning: Do not assume Tor support does the correct thing in Zcash; better Tor support is a future feature goal. ***
*** Warning: Do not assume Tor support does the correct thing in Zen; better Tor support is a future feature goal. ***

TOR SUPPORT IN ZCASH
TOR SUPPORT IN Zen
====================

It is possible to run Zcash as a Tor hidden service, and connect to such services.
It is possible to run Zen as a Tor hidden service, and connect to such services.

The following directions assume you have a Tor proxy running on port 9050. Many distributions default to having a SOCKS proxy listening on port 9050, but others may not. In particular, the Tor Browser Bundle defaults to listening on port 9150. See [Tor Project FAQ:TBBSocksPort](https://www.torproject.org/docs/faq.html.en#TBBSocksPort) for how to properly
configure Tor.


1. Run Zcash behind a Tor proxy
1. Run Zen behind a Tor proxy
-------------------------------

The first step is running Zcash behind a Tor proxy. This will already make all
The first step is running Zen behind a Tor proxy. This will already make all
outgoing connections be anonymized, but more is possible.

-proxy=ip:port Set the proxy server. If SOCKS5 is selected (default), this proxy
Expand All @@ -33,27 +33,27 @@ outgoing connections be anonymized, but more is possible.

In a typical situation, this suffices to run behind a Tor proxy:

./zcashd -proxy=127.0.0.1:9050
./Zend -proxy=127.0.0.1:9050


2. Run a Zcash hidden server
2. Run a Zen hidden server
----------------------------

If you configure your Tor system accordingly, it is possible to make your node also
reachable from the Tor network. Add these lines to your /etc/tor/torrc (or equivalent
config file):

HiddenServiceDir /var/lib/tor/zcash-service/
HiddenServicePort 8233 127.0.0.1:8233
HiddenServicePort 18233 127.0.0.1:18233
HiddenServiceDir /var/lib/tor/zen-service/
HiddenServicePort 9033 127.0.0.1:9033
HiddenServicePort 19033 127.0.0.1:19033

The directory can be different of course, but (both) port numbers should be equal to
your zcashd's P2P listen port (8233 by default).
your Zend's P2P listen port (9033 by default).

-externalip=X You can tell Zcash about its publicly reachable address using
-externalip=X You can tell zend about its publicly reachable address using
this option, and this can be a .onion address. Given the above
configuration, you can find your onion address in
/var/lib/tor/zcash-service/hostname. Onion addresses are given
/var/lib/tor/Zen-service/hostname. Onion addresses are given
preference for your node to advertize itself with, for connections
coming from unroutable addresses (such as 127.0.0.1, where the
Tor proxy typically runs).
Expand All @@ -70,80 +70,80 @@ your zcashd's P2P listen port (8233 by default).

In a typical situation, where you're only reachable via Tor, this should suffice:

./zcashd -proxy=127.0.0.1:9050 -externalip=zctestseie6wxgio.onion -listen
./zend -proxy=127.0.0.1:9050 -externalip=zctestseie6wxgio.onion -listen

(obviously, replace the Onion address with your own). It should be noted that you still
listen on all devices and another node could establish a clearnet connection, when knowing
your address. To mitigate this, additionally bind the address of your Tor proxy:

./bitcoind ... -bind=127.0.0.1
./zend ... -bind=127.0.0.1

If you don't care too much about hiding your node, and want to be reachable on IPv4
as well, use `discover` instead:

./zcashd ... -discover
./zend ... -discover

and open port 8233 on your firewall (or use -upnp).

If you only want to use Tor to reach onion addresses, but not use it as a proxy
for normal IPv4/IPv6 communication, use:

./zcashd -onion=127.0.0.1:9050 -externalip=zctestseie6wxgio.onion -discover
./zend -onion=127.0.0.1:9050 -externalip=zctestseie6wxgio.onion -discover


3. Automatically listen on Tor
--------------------------------

Starting with Tor version 0.2.7.1 it is possible, through Tor's control socket
API, to create and destroy 'ephemeral' hidden services programmatically.
Zcash has been updated to make use of this.
Zen has been updated to make use of this.

This means that if Tor is running (and proper authentication has been configured),
Zcash automatically creates a hidden service to listen on. Zcash will also use Tor
Zen automatically creates a hidden service to listen on. zen will also use Tor
automatically to connect to other .onion nodes if the control socket can be
successfully opened. This will positively affect the number of available .onion
nodes and their usage.

This new feature is enabled by default if Zcash is listening (`-listen`), and
This new feature is enabled by default if Zen is listening (`-listen`), and
requires a Tor connection to work. It can be explicitly disabled with `-listenonion=0`
and, if not disabled, configured using the `-torcontrol` and `-torpassword` settings.
To show verbose debugging information, pass `-debug=tor`.

Connecting to Tor's control socket API requires one of two authentication methods to be
configured. For cookie authentication the user running zcashd must have write access
configured. For cookie authentication the user running Zend must have write access
to the `CookieAuthFile` specified in Tor configuration. In some cases this is
preconfigured and the creation of a hidden service is automatic. If permission problems
are seen with `-debug=tor` they can be resolved by adding both the user running tor and
the user running zcashd to the same group and setting permissions appropriately. On
Debian-based systems the user running zcashd can be added to the debian-tor group,
the user running Zend to the same group and setting permissions appropriately. On
Debian-based systems the user running Zend can be added to the debian-tor group,
which has the appropriate permissions. An alternative authentication method is the use
of the `-torpassword` flag and a `hash-password` which can be enabled and specified in
Tor configuration.


4. Connect to a Zcash hidden server
4. Connect to a Zen hidden server
-----------------------------------

To test your set-up, you might want to try connecting via Tor on a different computer to just a
a single Zcash hidden server. Launch zcashd as follows:
a single Zen hidden server. Launch zend as follows:

./zcashd -onion=127.0.0.1:9050 -connect=zctestseie6wxgio.onion
./zend -onion=127.0.0.1:9050 -connect=zctestseie6wxgio.onion

Now use zcash-cli to verify there is only a single peer connection.
Now use Zen-cli to verify there is only a single peer connection.

zcash-cli getpeerinfo
Zen-cli getpeerinfo

[
{
"id" : 1,
"addr" : "zctestseie6wxgio.onion:18233",
...
"version" : 170002,
"subver" : "/MagicBean:1.0.0/",
"subver" : "/zen:1.0.0/",
...
}
]

To connect to multiple Tor nodes, use:

./zcashd -onion=127.0.0.1:9050 -addnode=zctestseie6wxgio.onion -dnsseed=0 -onlynet=onion
./zend -onion=127.0.0.1:9050 -addnode=zctestseie6wxgio.onion -dnsseed=0 -onlynet=onion
Loading

0 comments on commit 4211b89

Please sign in to comment.