Git Product home page Git Product logo

zen's Introduction

Zend

What is Horizen?

Horizen is an inclusive and scalable platform where everyone is empowered and rewarded for their contributions. Horizen's sidechain platform enables real-world applications mapped onto a public blockchain architecture with the largest node network in the industry. Horizen's Sidechain-SDK provides developers with all the necessary components to deploy their own fully customizable blockchains on Horizen's open sidechain protocol, Zendoo.

zend - the Zendoo-powered node implementation for Horizen ($ZEN).

zend is the official Horizen mainchain client, fully supporting Horizen's sidechains system. It implements the Zendoo verifiable Cross-Chain Transfer Protocol (CCTP) that allows the creation of ad-hoc sidechains with independent and customizable business logic.

Horizen Sidechains are fully scalable, secure, and decentralized:

  • The Cross-Chain Transfer Protocol (CCTP) enables coin transfers between the sidechains and the mainchain without knowing their internal structure and without additional software to track them. Those transfers are performed using cryptographically authenticated certificates received from the sidechains.
  • Certificate authentication and validation are achieved through the innovative use of zk-SNARKs. Thanks to this technology, the resulting zero-knowledge proofs have a constant and succinct size. Horizen can verify proofs of arbitrary computations and can remain agnostic of the sidechains' use-cases and rules.
  • This technology makes Horizen's sidechain system trustless.

You can read more about the Zendoo protocol in our whitepaper, and explore a reference sidechain implementation in our Sidechains-SDK.

Top features

INTERACTION

  • RPC interface for general access to data and all available functions

SECURITY

  • Proof-of-Work, the most secure consensus, ensured by one of the largest node networks in the industry
  • Base58 address check, protecting from money getting lost in case of typos
  • 51% attack protection
  • Replay attack protection
  • Sidechains state provability, powered by zk-SNARKs
  • TLS end-to-end encryption - Available for Secure and Super nodes

SCALABILITY

  • Extended RPC interface to create and dispatch sidechain declaration, forward transfers, mainchain backward transfer requests, ceased sidechain withdrawals, and certificates.
  • Sidechain declaration with customizable zk-SNARK verification key
  • Sidechain epoch management with liveness monitoring and ceasing procedure
  • Mainchain backward transfer request support for sidechains, to collect Zen back on a mainchain address
  • Agnostic certificate validation via custom zk-SNARK proof verification (powered by ginger-lib)
  • Secure sidechain validator's key rotation support via custom zk-SNARK proof verification
  • Support for variable epoch lengths (enabling non-ceasable sidechains)

Compatibility

zend only supports 64-bit little-endian systems, it cannot be compiled on different architectures.

Building from source

  1. Get dependencies:

    1. Ubuntu
    sudo apt-get install \
    build-essential pkg-config libc6-dev m4 g++-multilib \
    autoconf libtool ncurses-dev unzip git python \
    zlib1g-dev bsdmainutils automake curl cmake
    

    For a detailed list of dependencies, please refer to the dependencies section.

    1. Mac OS
    xcode-select --install
    brew install \
    autoconf coreutils automake libtool pkg-config cmake
    
    1. Cross compilation for Windows target
    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 cmake
    
  • Install for Linux
git clone https://github.com/HorizenOfficial/zen.git
cd zen
# Build
./zcutil/build.sh -j$(nproc)
# Build for platforms without adx, bmi2 CPU flags
./zcutil/build.sh --legacy-cpu -j$(nproc)
# Fetch key
./zcutil/fetch-params.sh
# Run
./src/zend
  • Install for Mac OS (using clang)
# Build. Add -jN parameter (where N is the number of cpu cores) to speed up compilation.
./zcutil/build-mac-clang.sh
  • Install for Windows (Cross-Compiled, Building on Windows is not currently supported)
sudo update-alternatives --config x86_64-w64-mingw32-g++
Choose the option: /usr/bin/x86_64-w64-mingw32-g++-posix.

export HOST=x86_64-w64-mingw32
./zcutil/build.sh -j$(nproc)

Running Regression Tests

  1. Get dependencies:

    1. Ubuntu
    sudo apt-get install \
    python python-dev python-pip python-setuptools \
    python-wheel python-wheel-common python-zmq
    pip install --upgrade websocket-client requests
    
    1. macOS
    brew install python
    pip install --upgrade pyzmq websocket-client requests
    
  2. Start test suite

    if [[ "$OSTYPE" == "darwin"* ]]; then
      TEST_ARGS="btest gtest sec-hard no-dot-so util-test secp256k1 libsnark univalue rpc --rpc-extended --rpc-exclude=rpcbind_test.py"
    else
      TEST_ARGS="--rpc-extended"
    fi
    export HOST=$(gcc -dumpmachine)
    ./zcutil/fetch-params.sh
    ./qa/zcash/full_test_suite.py ${TEST_ARGS}
    

Security Warnings

See important security warnings in doc/security-warnings.md.

zend is experimental and a work in progress. Use at your own risk.

Need Help?

Help is available at Horizen's Discord #open-a-ticket channel.

Want to Participate in Development?

  • Code review is welcomed!
  • Please submit any identified issues here
  • Enroll in the Horizen Early Adopter Program HEAP to take part in new product and feature testing

Participation in the Horizen project is subject to a Code of Conduct.

License

For license information see the file COPYING.

zen's People

Contributors

a-petrini avatar abi87 avatar alsala avatar bitcartel avatar cozz avatar cronicc avatar daira avatar danieledibenedetto avatar defuse avatar drgora avatar ebfull avatar fanquake avatar franckdg avatar gavinandresen avatar gmaxwell avatar i-alex avatar jackpiri avatar jonasschnelli avatar jtimon avatar laanwj avatar luke-jr avatar marcool94 avatar non-github-bitcoin avatar petertodd avatar pierstab avatar sipa avatar str4d avatar thebluematt avatar theuni avatar zkbot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zen's Issues

24 Branches

We should remove some of the stale branches. I don't want to step on anyone toes, so rather then do it myself I've created this issue.

Please feel free to close it once this is resolved.

Thanks!

zend output

Currently, zend outputs a line telling users to check the ZCash security page for information. This has been removed in zen/master. The commit where it was last changed is 3b0715d#diff-b7702a084eb00fb47f9800fd68271951

I'd like to cherry-pick the changes in (visable here: df9a746), but I think part of the goal was removing the previous devs work from our commit tree.

How should I proceed?

ValidateCertificate should be able to validate certificate chain

I guess zend should be able to verify the certification chain like every other ssl enabled service (httpd, imaps, ...)

Adding the intermediate certificate like described in step 3,4 (https://zencash.atlassian.net/wiki/spaces/ZEN/pages/7537014/Part+6+-+Procure+and+Configure+Certificate) should not be necessary if ValidateCertificate (https://github.com/ZencashOfficial/zen/blob/48bba6a7b46f428b75f4cd925ff91d1f1fd462b2/src/zen/utiltls.cpp#L417) would behave correctly.

A problem which might help with that issue is that zend is currently not providing the entire certificate chain during handshake.
see https://github.com/asbachb/zen/blob/master/src/zen/tlsmanager.cpp#L183

Strange error message

Describe the issue

Please provide a general summary of the issue you're experiencing

https://securenodes2.eu.zensystem.io/nodes/111620/detail

The above node sometimes has downtimes. When looking at the log we see the message "Stat check unable to complete. Unable to get z-addr balance"

Can you reliably reproduce the issue?

If so, please list the steps to reproduce below:

  1. It happens sometimes. Feels random.

Expected behaviour

No such error

Actual behaviour + errors

See the log during the down time.

2018-11-19 23:12:57 UTC -- Stat check: connected to:ts5.eu blocks:415271  peers:9  bal:0.0462  isValidBal:true  queueDepth:0  lastChalBlock:413572  lastExecSec:54.07  
2018-11-19 23:12:57 UTC -- Stats received by ts5.eu
2018-11-19 23:18:54 UTC -- Stat check: connected to:ts5.eu blocks:415273  peers:9  bal:0.0462  isValidBal:true  queueDepth:0  lastChalBlock:413572  lastExecSec:54.07  
2018-11-19 23:18:54 UTC -- Stats received by ts5.eu
2018-11-19 23:24:54 UTC -- Stat check: connected to:ts5.eu blocks:415274  peers:9  bal:0.0462  isValidBal:true  queueDepth:0  lastChalBlock:413572  lastExecSec:54.07  
2018-11-19 23:24:54 UTC -- Stats received by ts5.eu
2018-11-19 23:27:57 UTC -- Start challenge 13674850
Using zchNwq9HmEuek9BjN265hM3LXPwV9c5riB3Lijb9spsiLJcgZEJT7zZgCVSzovzBn4Vg4TK3HDYxcdNZ6LmEr28S5FEK95W for challenge. bal=0.0462
OperationId=opid-6ef6b034-5792-4ea5-9d56-a5ff1a6e26ae
2018-11-19 23:28:07 UTC -- Elapsed challenge time=10  status=executing
2018-11-19 23:28:17 UTC -- Elapsed challenge time=20  status=executing
2018-11-19 23:28:27 UTC -- Elapsed challenge time=30  status=executing
2018-11-19 23:28:37 UTC -- Elapsed challenge time=40  status=executing
2018-11-19 23:28:47 UTC -- Elapsed challenge time=50  status=executing
2018-11-19 23:28:51 UTC -- Challenge submit: success
2018-11-19 23:28:51 UTC -- Challenge result:success seconds:52.26143608
2018-11-19 23:28:51 UTC -- Challenge response received by ts5.eu
2018-11-19 23:28:53 UTC -- Clearing timer
2018-11-19 23:30:54 UTC -- Stat check unable to complete. Unable to get z-addr balance
2018-11-19 23:36:54 UTC -- Stat check: connected to:ts5.eu blocks:415278  peers:9  bal:0.046  isValidBal:false  queueDepth:0  lastChalBlock:415276  lastExecSec:52.26  
2018-11-19 23:36:54 UTC -- Stats received by ts5.eu
2018-11-19 23:36:54 UTC -- Down time logged. See server.
2018-11-19 23:42:54 UTC -- Stat check: connected to:ts5.eu blocks:415278  peers:9  bal:0.046  isValidBal:false  queueDepth:0  lastChalBlock:415276  lastExecSec:52.26  
2018-11-19 23:42:54 UTC -- Stats received by ts5.eu
2018-11-19 23:48:54 UTC -- Stat check: connected to:ts5.eu blocks:415280  peers:9  bal:0.046  isValidBal:false  queueDepth:0  lastChalBlock:415276  lastExecSec:52.26  
2018-11-19 23:48:54 UTC -- Stats received by ts5.eu

Mac OS build doesn't work - Proton

Mac OS build doesn't work, tested on Mac OS HS 10.13.5

-- Build type is "RelWithDebInfo" (has debug symbols)
-- PN_VERSION: 0.17.0 ()
CMake Error at proton-c/CMakeLists.txt:182 (message):
  No atoll API found

related to: --enable-proton

In Zcash upstream they have dropped support for other than Linux binaries.

The partner instant exchange SimpleSwap.io

Hi,

I am Nicolas, the manager at SimpleSwap.io, an instant cryptocurrency exchange.

We present a simple and easy-to-use platform that works without registration and limits and allows users to make swaps in just two clicks.

We successfully support ZEN on our service for a long time and we have been exchanging ZEN for more than 200 coins to our customers. I tried to find contact with your team but without results.

I'm sorry that I invaded here, but maybe you can tell me where I can turn. I would like to make contact so we can have an interaction.

Make listtransactions filterable by address

The listtransactions RPC call is written to filter by accounts, ZEN no longer supports accounts, so this function should be updated to allow filtering by an address passed. z_listtransactions already does this, so maybe some of the work could be copied from there.

Address Indexing

Insight Explorers require Address Indexing support, there's an open PR for this here: #73

Feature: Shared Super Node

Describe the issue

We desired a better support for shared master nodes. Our proposed concept is open for discussion.

We envision that it might be possible that multiple t_addresses can provide each a part of the full collaterale stack for the node. Meaning the inital t_address is no longer a single value rather then a list of t_adresses that will provide the new initial balance to z_address. Rewards shall be split equally.

Expected behaviour

Make shared nodes possible as a network feature

Actual behaviour

shared nodes are only possible via a outside non-enforced agreement between stack holders.

Do we want an issue label for SuperNodes and/or SecureNodes?

While not being strictly relevant to the core Zen software, we're seeing multiple issues created by users for these. Do we want a dedicated label for them? I've created one for now, but can delete it if users don't feel we should have one...

Cannot move zen from private address from before the chainsplit

Original Issue: HorizenOfficial/zen_archived#89

I can't move zen from private address to public address.
I constantly get "18: bad-txns-joinsplit-requirements-not-met" error.

This private address has funds from zclassic.

  1. I copied wallet.dat from zclassic and reindexed. Not working.
  2. I imported private key manually and reindexed. Not working.

Seems like similar issue is already reported at zcash repo.

[
{
"id": "opid-e1add840-8130-4159-b8f5-8db849c32051",
"status": "failed",
"creation_time": 1510901735,
"error": {
"code": -26,
"message": "18: bad-txns-joinsplit-requirements-not-met"
},
"method": "z_sendmany",
"params": {
"fromaddress": "zcKRygHjaJa5YmSRdMKF6J8Sop6SZzimGWnfwMrC57tcZgamHnZ5LviT1uQdCeYqNqHDBTicZZF7eQxrJGy6WCB4QJgrYv3",
"amounts": [
{
"address": "znchfEnbjy29aPhUhHeJM3tNx2Vp7EBpiBX",
"amount": 1
}
],
"minconf": 1,
"fee": 0.0001
}
}
]

configure.ac:28: error: possibly undefined macro: AM_INIT_AUTOMAKE

When running ./zcutil/build.sh I get the following error:

      configure.ac:28: error: possibly undefined macro: AM_INIT_AUTOMAKE
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1

Checking config.log shows me that it fails at:

Running that command manually returns the following:

configure: error: cannot find install-sh, install.sh, or shtool in build-aux "."/build-aux

Building one commit back works fine.

uname -a output:
Linux smrtz-VirtualBox 4.15.0-29-generic #31~16.04.1-Ubuntu SMP Wed Jul 18 08:54:04 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Memory should be freed after SecureNode challenge is complete

Original Issue: HorizenOfficial/zen_archived#86

I initially posted this in the secnodetracker github but was asked to post it here instead.

I have a 2GB Linode with 4GB of swap and I kept getting exceptions so when I checked and zend was using a massive amount of memory (RAM & Swap) whilst it was just sitting there idle.

image

I restarted zend but when it came back up it was using the same amount of memory. I then stopped both zend and the tracker then started them in the same order and now the memory useage is back to an acceptable level

image

So when the next challenge was run the Memory usage jumped back up as expected but stayed there long after the challenge finished.

image

image

This is my node on the tracking site, both the wallet and tracking software are the latest version (zen: 2001050 tracker: 0.0.8).

I'm waiting for the next challenge to see if it happens again, I'll update here when it does..

CA Cert exception false - getinfo shows cert value TRUE

Original Issue: HorizenOfficial/zen_archived#103

Completed setup of the secure node on mainnet and receiving an out of compliance with the tracker.

Zen Tracking System Exception: "cert: could not validate the SSL certificate."

TLS cert reports as valid however the tracker states the node is out of compliance.

The 'transparant' balance for the 42 zen is on a transparent address on swing wallet.

I've re deployed and rebuilt node several times using a hosted VPS. Each time yielding the same outcome.

Cross referenced install using various guides however used the following guide for setup:
https://blockoperations.com/how-to-build-and-operate-a-zencash-secure-node/#securenodetracker

$ zen-cli getnetworkinfo | grep true
"tls_cert_verified": true,
"reachable": true,
"reachable": true,
"limited": true,

zen-cli getinfo
{
"version": 2001051,
"protocolversion": 170002,
"walletversion": 60000,
"balance": 0.00000000,
"blocks": 230758,
"timeoffset": 0,
"connections": 8,
"proxy": "",
"difficulty": 573473.63484937,
"testnet": false,
"keypoololdest": 1514523794,
"keypoolsize": 101,
"paytxfee": 0.00000000,
"relayfee": 0.00000100,
"errors": ""
}

zen-cli z_gettotalbalance
{
"transparent": "0.00",
"private": "1.2498",
"total": "1.2498"
}

[core-upgrade] Integrate all relevant PRs from ZencashOfficial/zen into the latest release of zcash/zcash

Iterate through all the PRs from zencashio/zen and ZenCashOfficial/zen and integrate what is relevant into the latest release of zcash. The final result should be an upgraded zen codebase with the latest upgrades from zcash. Also all code that is ZenCash-specific will be delimited as follow:
// ZEN_MOD_START or # ZEN_MOD_START
{modified_code}
// ZEN_MOD_END or # ZEN_MOD_END

This will help pinpoint ZenCash specific code when onboarding new developers, when merging the latest code from zcash or when debugging a ZenCash-specific issue.

(Windows) Error copying configuration file: basic_ios::clear: iostream error

On Windows 10 machine, daemon trying to create config file like unix folder and exiting daemon.


                    WARNING:

Automatically copying the default config file to ~/.zen/zen.conf.
This is a potential risk, as zend might accidentally compromise
your privacy if there is a default option that you need to change!

       Please restart zend to continue.
       You will not see this warning again.

Error copying configuration file: basic_ios::clear: iostream error

2.0.17-rc1 windows build failing

libtool: link: /mnt/build/depends/x86_64-w64-mingw32/share/../native/bin/ccache x86_64-w64-mingw32-g++ -std=c++11 -Wformat -Wformat-security -Wstack-protector -fstack-protector-all -pipe -O2 -g -fopenmp -fwrapv -fno-strict-aliasing -Wno-builtin-declaration-mismatch -pthread -Wl,--dynamicbase -Wl,--nxcompat -Wl,--high-entropy-va -static -o test/test_bitcoin.exe script/test_test_bitcoin-standard.o test/test_test_bitcoin-arith_uint256_tests.o test/test_test_bitcoin-addrman_tests.o test/test_test_bitcoin-allocator_tests.o test/test_test_bitcoin-base32_tests.o test/test_test_bitcoin-base58_tests.o test/test_test_bitcoin-base64_tests.o test/test_test_bitcoin-bip32_tests.o test/test_test_bitcoin-bloom_tests.o test/test_test_bitcoin-checkblock_tests.o test/test_test_bitcoin-Checkpoints_tests.o test/test_test_bitcoin-coins_tests.o test/test_test_bitcoin-compress_tests.o test/test_test_bitcoin-crypto_tests.o test/test_test_bitcoin-DoS_tests.o test/test_test_bitcoin-equihash_tests.o test/test_test_bitcoin-getarg_tests.o test/test_test_bitcoin-hash_tests.o test/test_test_bitcoin-key_tests.o test/test_test_bitcoin-main_tests.o test/test_test_bitcoin-mempool_tests.o test/test_test_bitcoin-miner_tests.o test/test_test_bitcoin-mruset_tests.o test/test_test_bitcoin-multisig_tests.o test/test_test_bitcoin-netbase_tests.o test/test_test_bitcoin-pmt_tests.o test/test_test_bitcoin-policyestimator_tests.o test/test_test_bitcoin-pow_tests.o test/test_test_bitcoin-raii_event_tests.o test/test_test_bitcoin-reverselock_tests.o test/test_test_bitcoin-rpc_tests.o test/test_test_bitcoin-sanity_tests.o test/test_test_bitcoin-scheduler_tests.o test/test_test_bitcoin-script_P2SH_tests.o test/test_test_bitcoin-script_tests.o test/test_test_bitcoin-scriptnum_tests.o test/test_test_bitcoin-serialize_tests.o test/test_test_bitcoin-sighash_tests.o test/test_test_bitcoin-sigopcount_tests.o test/test_test_bitcoin-skiplist_tests.o test/test_test_bitcoin-test_bitcoin.o test/test_test_bitcoin-timedata_tests.o test/test_test_bitcoin-torcontrol_tests.o test/test_test_bitcoin-transaction_tests.o test/test_test_bitcoin-uint256_tests.o test/test_test_bitcoin-univalue_tests.o test/test_test_bitcoin-util_tests.o test/test_test_bitcoin-sha256compress_tests.o test/test_test_bitcoin-accounting_tests.o wallet/test/test_test_bitcoin-wallet_tests.o  -L/mnt/build/depends/x86_64-w64-mingw32/share/../lib libbitcoin_server.a libbitcoin_cli.a libbitcoin_common.a libbitcoin_util.a crypto/libbitcoin_crypto.a univalue/.libs/libunivalue.a ./leveldb/libleveldb.a ./leveldb/libmemenv.a -lboost_filesystem -lboost_program_options -lboost_thread -lboost_chrono -lboost_unit_test_framework secp256k1/.libs/libsecp256k1.a /mnt/build/depends/x86_64-w64-mingw32/lib/libevent.a -L/mnt/build/depends/x86_64-w64-mingw32/lib libbitcoin_wallet.a -ldb_cxx-6.2 -lssl libzcash.a libzencash.a snark/libsnark.a /mnt/build/depends/x86_64-w64-mingw32/lib/libgmpxx.a /mnt/build/depends/x86_64-w64-mingw32/lib/libgmp.a -lboost_system -lcrypto /mnt/build/depends/x86_64-w64-mingw32/lib/libsodium.a -lrustzcash /mnt/build/depends/x86_64-w64-mingw32/lib/libzmq.a -lssp -lcrypt32 -liphlpapi -lshlwapi -lmswsock -lws2_32 -ladvapi32 -lrpcrt4 -luuid -loleaut32 -lole32 -lcomctl32 -lshell32 -lwinmm -lwinspool -lcomdlg32 -lgdi32 -luser32 -lkernel32 -lmingwthrd -pthread -fopenmp
gtest/test_relayforks.cpp: In member function 'virtual void relayforks_test_relayforks_Test::TestBody()':
gtest/test_relayforks.cpp:174:5: error: 'sleep' was not declared in this scope
     sleep(2);
     ^~~~~
gtest/test_relayforks.cpp:174:5: note: suggested alternatives:
In file included from /mnt/build/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/condition_variable.hpp:9:0,
                 from /mnt/build/depends/x86_64-w64-mingw32/share/../include/boost/thread/condition_variable.hpp:14,
                 from ./sync.h:11,
                 from ./net.h:18,
                 from ./main.h:18,
                 from gtest/test_relayforks.cpp:2:
/mnt/build/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/thread_primitives.hpp:262:25: note:   'boost::detail::win32::sleep'
             inline void sleep(unsigned long milliseconds)
                         ^~~~~
In file included from /mnt/build/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/condition_variable.hpp:10:0,
                 from /mnt/build/depends/x86_64-w64-mingw32/share/../include/boost/thread/condition_variable.hpp:14,
                 from ./sync.h:11,
                 from ./net.h:18,
                 from ./main.h:18,
                 from gtest/test_relayforks.cpp:2:
/mnt/build/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/thread_data.hpp:279:42: note:   'boost::this_thread::sleep'
         inline BOOST_SYMBOL_VISIBLE void sleep(system_time const& abs_time)
                                          ^~~~~
/mnt/build/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/thread_data.hpp:306:44: note:   'boost::this_thread::no_interruption_point::sleep'
           inline BOOST_SYMBOL_VISIBLE void sleep(system_time const& abs_time)
                                            ^~~~~
gtest/test_relayforks.cpp: In member function 'virtual void relayforks_test_checkisonmain_Test::TestBody()':
gtest/test_relayforks.cpp:270:5: error: 'sleep' was not declared in this scope
     sleep(2);
     ^~~~~
gtest/test_relayforks.cpp:270:5: note: suggested alternatives:
In file included from /mnt/build/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/condition_variable.hpp:9:0,
                 from /mnt/build/depends/x86_64-w64-mingw32/share/../include/boost/thread/condition_variable.hpp:14,
                 from ./sync.h:11,
                 from ./net.h:18,
                 from ./main.h:18,
                 from gtest/test_relayforks.cpp:2:
/mnt/build/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/thread_primitives.hpp:262:25: note:   'boost::detail::win32::sleep'
             inline void sleep(unsigned long milliseconds)
                         ^~~~~
In file included from /mnt/build/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/condition_variable.hpp:10:0,
                 from /mnt/build/depends/x86_64-w64-mingw32/share/../include/boost/thread/condition_variable.hpp:14,
                 from ./sync.h:11,
                 from ./net.h:18,
                 from ./main.h:18,
                 from gtest/test_relayforks.cpp:2:
/mnt/build/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/thread_data.hpp:279:42: note:   'boost::this_thread::sleep'
         inline BOOST_SYMBOL_VISIBLE void sleep(system_time const& abs_time)
                                          ^~~~~
/mnt/build/depends/x86_64-w64-mingw32/share/../include/boost/thread/win32/thread_data.hpp:306:44: note:   'boost::this_thread::no_interruption_point::sleep'
           inline BOOST_SYMBOL_VISIBLE void sleep(system_time const& abs_time)
                                            ^~~~~
Makefile:5810: recipe for target 'gtest/zen_gtest-test_relayforks.o' failed
make[2]: *** [gtest/zen_gtest-test_relayforks.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/mnt/build/src'
Makefile:5933: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/mnt/build/src'
Makefile:637: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

Suggested fix, replace sleep() with MilliSleep() from utiltime.

Memory leak after challenge completion

Original Issue: HorizenOfficial/zen_archived#136

Describe the issue

I'm noticing on my secure nodes that whenever a challenge is sent, of course the resident memory usage goes up; but that after the challenge is done (minutes, hours, days) the memory usage stays at around 3 GB instead of dropping back to about 650 MB.

Can you reliably reproduce the issue?

Yes, 100% of the time.

If so, please list the steps to reproduce below:

  1. Launch zend
  2. run htop and view memory usage before challenge
  3. Run a challenge
  4. run htop and view the memory usage after challenge
  5. run htop any arbitrary time after (1 minute, 1 hour, 1 day) and memory usage will still be high.

Expected behaviour

It should go back down to 650 M instead of keeping 2.35 GB (3 G - 650 MB) of memory unavailable for use.

The version of Zen you were using:

2001150 and 2001151

Machine specs:

  • OS name + version: BOTH ubuntu 16.04.9 and Debian 9
  • RAM: 6 GB
  • Disk size: 30 GB
  • Disk Type (HD/SDD): SSD
  • Linux kernel version (uname -a): BOTH Linux zsn12 2.6.32-042stab123.3 #1 SMP Fri May 5 12:29:05 MSK 2017 x86_64 x86_64 x86_64 GNU/Linux AND Linux zsncl01 4.9.0-6-amd64 #1 SMP Debian 4.9.82-1+deb9u3 (2018-03-02) x86_64 GNU/Linux
  • Compiler version (gcc -version): BOTH gcc (Ubuntu 5.4.0-6ubuntu1~16.04.9) 5.4.0 20160609 AND gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516

Stuck blockchain after post HF update from 2.0.11 to 2.0.14-rc1

2.0.11 marks any post HF blocks it receives as invalid in levelDB as they don't pass the old consensus rules. After updating to 2.0.14-rc1 zend fails to sync past the last non HF block.

debug.log

2018-06-10 20:44:23 ERROR: AcceptBlockHeader: block is marked invalid
2018-06-10 20:44:23 ERROR: invalid header received

A reindex would fix this but is an inconvenience, possible solutions:

  • reconsiderblock and invalidateblock RPC calls from bitcoin upstream
  • add a feature to zap all post HF blocks from levelDB

Multiple warnings while building

Continuation of #128

There are multiple issues while building Horizen, and issues with building for Apple and Linux. This issue is to track that.

fetch-params.sh wget --continue failing, slow download speed

Our combination of CDN provider proxied through Cloudflare can lead to slow response times when resuming trusted setup DLs. This is because Cloudflare does not cache large files, on every resume the file needs to be fetched again from the start by Cloudflare before the requested DL range can be satisfied, this can take up to 90s.
PR #162 increases the timeout in wget to 90 seconds and limits retries to 3 instead of 20, if this still fails we fall back to downloading the file from scratch without resume support.

Our CDN provider also does not seem to go beyond 20MiB/s per connection, to saturate gigabit speeds parallel connections have to be utilized.
Aria2 has been added in PR #162 as a DL method with parallel connections and resume support able to saturate gigabit links. Should resume fail in aria2 we fall back to single connection DL from scratch.

Excessive wallet size causes performance and connectivity issues

Original Issue: HorizenOfficial/zen_archived#79
The related issue at zcash/zcash#1749 has been closed. It's likely this issue is no longer applicable in Zen either, more testing is required.

Describe the issue

The wallet on the dev tracking server grew to over 1.4GB due to challenge transactions(~17k) and became an issue when looking up transactions. It was also taking a long time to load on restart and timing out on rpc calls. The wallet had to be replaced but is grower even faster due to additional new nodes. It is estimated the wallet will need to be replace every 10-14 days or sooner at 600 with 1 challenge a day.

Additional detail

Can you reliably reproduce the issue?

Yes by allowing the server's wallet to grow without replacing.

Expected behaviour

Fast loading on restarts, no time outs on rpc calls, fast transaction lookup in the shielded address.

The actual transaction content would not be needed after a challenge is closed.

Suggested solution

@aayanl suggested:
"We can probably add a flag to start dropping transactions after a certain number
Like -retaintransactions=100 to only keep the last 100 transactions in the wallet.dat"

This may be an ideal solution for the tracking servers. No work-around would be needed to replace wallets periodically. This is a potential stumbling block for production deployment.

ARM build fails - libsnark fails to build

build-arm.sh output:

. . .

g++ -o src/algebra/curves/alt_bn128/alt_bn128_g1.o   src/algebra/curves/alt_bn128/alt_bn128_g1.cpp -c -MMD -fPIC -DBINARY_OUTPUT -DNO_PT_COMPRESSION=1 -fstack-protector-all -std=c++11 -Wall -Wextra -Wno-unused-parameter -Wno-comment -Wfatal-errors -O2 -march=x86-64 -DMONTGOMERY_OUTPUT -DCURVE_ALT_BN128 -I/root/zencash/depends/aarch64-unknown-linux-gnu/share/../include -Isrc -DNO_PROCPS -static -DSTATIC -DMULTICORE -fopenmp
g++ -o src/algebra/curves/alt_bn128/alt_bn128_g2.o   src/algebra/curves/alt_bn128/alt_bn128_g2.cpp -c -MMD -fPIC -DBINARY_OUTPUT -DNO_PT_COMPRESSION=1 -fstack-protector-all -std=c++11 -Wall -Wextra -Wno-unused-parameter -Wno-comment -Wfatal-errors -O2 -march=x86-64 -DMONTGOMERY_OUTPUT -DCURVE_ALT_BN128 -I/root/zencash/depends/aarch64-unknown-linux-gnu/share/../include -Isrc -DNO_PROCPS -static -DSTATIC -DMULTICORE -fopenmp
g++ -o src/algebra/curves/alt_bn128/alt_bn128_init.o   src/algebra/curves/alt_bn128/alt_bn128_init.cpp -c -MMD -fPIC -DBINARY_OUTPUT -DNO_PT_COMPRESSION=1 -fstack-protector-all -std=c++11 -Wall -Wextra -Wno-unused-parameter -Wno-comment -Wfatal-errors -O2 -march=x86-64 -DMONTGOMERY_OUTPUT -DCURVE_ALT_BN128 -I/root/zencash/depends/aarch64-unknown-linux-gnu/share/../include -Isrc -DNO_PROCPS -static -DSTATIC -DMULTICORE -fopenmp
g++ -o src/algebra/curves/alt_bn128/alt_bn128_pairing.o   src/algebra/curves/alt_bn128/alt_bn128_pairing.cpp -c -MMD -fPIC -DBINARY_OUTPUT -DNO_PT_COMPRESSION=1 -fstack-protector-all -std=c++11 -Wall -Wextra -Wno-unused-parameter -Wno-comment -Wfatal-errors -O2 -march=x86-64 -DMONTGOMERY_OUTPUT -DCURVE_ALT_BN128 -I/root/zencash/depends/aarch64-unknown-linux-gnu/share/../include -Isrc -DNO_PROCPS -static -DSTATIC -DMULTICORE -fopenmp
src/algebra/curves/alt_bn128/alt_bn128_g1.cpp:1:0: error: unknown value 'x86-64' for -march
 /** @file
 ^

. . .

Alert key needs to be changed.

None of the current team members have a copy of the private key required for sending alerts. What's more, the state of this key is unknown and may be compromised.

A new key is required.

TLS returns 'no peer certificate available' after cert update if zen not restarted

Original Issue: HorizenOfficial/zen_archived#132

Background: The secure nodes install guides did not include a step to restart zen after certificates are automatically refreshed. The server update on March 4-5 with an update to check certs more thoroughly revealed many nodes with expired certs that were not being reported by the tracker app.

After the SSL cert is refreshed zen appears to make connections and still report that it is TLS_certified true.
If a connection via openssl on the command line is made to the node, the result is the following. Once zend is restarted the openssl connection reports all the certs.

CONNECTED(00000003)
4294956672:error:140790E5:SSL routines:ssl23_write:ssl handshake failure:s23_lib.c:177:
---
no peer certificate available
---
No client certificate CA names sent
---
SSL handshake has read 0 bytes and written 308 bytes
---
New, (NONE), Cipher is (NONE)
Secure Renegotiation IS NOT supported
Compression: NONE
Expansion: NONE
No ALPN negotiated
SSL-Session:
    Protocol  : TLSv1.2
    Cipher    : 0000
    Session-ID:
    Session-ID-ctx:
    Master-Key:
    Key-Arg   : None
    PSK identity: None
    PSK identity hint: None
    SRP username: None
    Start Time: 1520829934
    Timeout   : 300 (sec)
    Verify return code: 0 (ok)

The solution has been to add the ability for a secure node to restart after a acme.sh certificate renewal.

Is it possible for zend to refresh the certs and respond properly to a TLS connection without a restart?

Centos 7 Build fails

Describe the issue

I have been building zend on the same vm (centos7) for months now. As of today (master & v2.0.15) the build fails with configure and

checking for visibility attribute... yes
checking for Berkeley DB C++ headers... no
configure: error: libdb_cxx headers missing, Bitcoin Core requires this library for wallet functionality (--disable-wallet to disable wallet functionality)

It is installed:

rpm -qa | grep libdb
libdb4-cxx-4.8.30-13.el7.x86_64
libdb4-4.8.30-13.el7.x86_64
libdb-devel-5.3.21-24.el7.x86_64

Can you reliably reproduce the issue?

If so, please list the steps to reproduce below:

  1. Install Centos7
  2. Download the sources
  3. Compile

Expected behaviour

zend is beeing build.

Actual behaviour + errors

see above.

The version of Zen you were using:

Zen Daemon version v2.0.14 compiled correctly.

Machine specs:

  • OS name + version: Centos 7 (updated)
  • CPU: Intel(R) Xeon(R) CPU E5620
  • RAM: 16gb
  • Disk size: 1tb
  • Disk Type (HD/SDD): hdd
  • Linux kernel version (uname -a): 3.10.0
  • Compiler version (gcc -version): gcc (GCC) 4.8.5

OpenSSL integration

Original Issue: HorizenOfficial/zen_archived#26
The branch TLS_integration doesn't exist in the new repo.

Branch TLS_intergration has a working implementation using self signed certificates.
Todo:

  • allow user to chose certificates
  • allow user to choose to connect to only TLS enabled nodes
  • connect to only TLS enabled nodes with CA signed certificates
  • after making sure most of the network is TLS enabled, disconnect non-TLS nodes unless user allows unencrypted connections

OP_CHECKBLOCKATHEIGHT Errors during fresh sync

Describe the issue

During a fresh sync of the chain, I see many errors in the log output around date 2018-06-19:

script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification fail$d. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 403995$cript/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATH$IGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non$final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp: S$lver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification fai$ed. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 40399$script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKAT$EIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is no$-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp: $olver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification fa$led. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 4039$5script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKA$HEIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is n$n-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp:
Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification f$iled. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 403$95script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCK$THEIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is $on-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp$ Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification $ailed. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 40$995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOC$ATHEIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is
non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cp$: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification
failed. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 4$3995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLO$KATHEIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction i$ non-final. nHeight: 403995script/standard.cpp: Solver: OP_CHECKBLOCKATHEIGHT verification failed. Transaction is non-final. nHeight: 403995ERROR: AcceptToMemoryPool: nonstandard transaction: scriptpubkey

As well as many:

ERROR: AcceptToMemoryPool: joinsplit requirements not met

Can you reliably reproduce the issue?

If so, please list the steps to reproduce below:

  1. Started wallet and saw errors
  2. Deleted chain files ~/.zen/{blocks,cert.pem,chainstate,db.log,debug.log,fee_estimates.dat,key.pem,peers.dat}
  3. Start node, same errors around mid 2018.

Expected behaviour

I expect not to see so many errors during sync

Actual behaviour + errors

Errors as mentioned above

The version of Zen you were using:

Zen Daemon version v2.0.15-9d4cbfa18

Machine specs:

  • OS name + version: Ubuntu 18.04
  • CPU: 12 core
  • RAM: 16GB
  • Disk size: 2TB
  • Disk Type (HD/SDD): HD
  • Linux kernel version (uname -a): Linux 59ea8478bb13 4.16.12-200.fc27.x86_64 #1 SMP Fri May 25 21:10:16 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
  • Compiler version (gcc -version): gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3)

Arch AUR build Seg Fault at block 139200

Original Issue: HorizenOfficial/zen_archived#84
It's unclear if this issue persists, but I'm copying it over to the new repo anyway, and will closes it if it's no longer applicable.

Describe the issue

zend predictably seg faults attempting to process block 139200

Can you reliably reproduce the issue?

  1. Install zencash from Arch Linux AUR
  2. Start zend
  3. Wait until block height reaches 139200
  4. Seg fault

Expected behaviour

Initial sync of block chain from nothing to current live state

Actual behaviour + errors

zend syncs to 139200 then seg faults
No useful output on command line
debug.log contains no errors

The version of Zen you were using:

Zen Daemon version v2.0.10-7a082ad

Machine specs:

  • OS name + version: Arch Linux
  • CPU: AMD Ryzen 7 1700
  • RAM: 16GB + 16GB Swap
  • Disk size: 2TB with ~ 1.5TB free
  • Disk Type (HD/SDD): HDD
  • Linux kernel version: Linux 4.13.8-1-ARCH #1 SMP PREEMPT Wed Oct 18 11:49:44 CEST 2017 x86_64 GNU/Linux
  • Compiler version: gcc 7.2.0

Any extra information that might be useful in the debugging process.

debug.log shows no error, final line:
2017-10-27 00:02:25 UpdateTip: new best=00000001ea53c09a45e3f097ba8f48a4c117b5b368031c4eb2fa02cb5a84c99e height=139200 log2_work=45.637116 tx=355208 date=2017-07-21 19:42:01 progress=0.332129 cache=4.4MiB(1637tx)

Include securenodes and supernodes coinbasetxn in getblocktemplate

As with getblocksubsidy, getblocktemplate needs to return values for securenodes and supernodes.

current example of zen-cli getblocktemplate '{"capabilities": ["coinbasetxn", ""coinbasevalue"]}'

{                                                                                                                                                                                                                                    [16/169]
  "capabilities": [
    "proposal"
  ],
  "version": 536870912,
  "previousblockhash": "00115d0e2554461400a15aee2c060a93ed7c318d12547b9726fe12eb152b2453",
  "transactions": [
  ],
  "coinbasetxn": {
    "data": "01000000010000000000000000000000000000000000000000000000000000000000000000ffffffff05038ff00300ffffffff04c0702734000000001976a9149ba9cf0e780db84a7bf0c2b9dab96391e7e0c48088ac405973070000000017a9148d3468b6686ac59caf9ad94e547a7$
7b09fa102787405973070000000017a914fc1d7f04db5e2c05b051e0decc85effe6bc539d587405973070000000017a9148b85fc1e171a4c7994c088b91d5a75dff9e56cad8700000000",
    "hash": "9a1a7b7b34c487397cef083ab890ac2e4d1e8bd2779d7830f91ba55d1c78cdf6",
    "depends": [
    ],
    "fee": 0,
    "sigops": 1,
    "communityfund": 125000000,
    "required": true
  },
[...]

At least one rpc test would need to be adjusted as well here: https://github.com/ZencashOfficial/zencash/blob/d39015716ec92bfe877314e1b78bbdffb5c05b76/qa/rpc-tests/getblocktemplate.py#L56

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.