Getting started - issues

Hey, Anybody can help me to figure out what I need to fix to finish installing the zcash?

I installed ubuntu 14.04 LTS to my Macbook Air. It runs on my USB stick.

Computer Specs:
memory 1.7GB
processor: Intel® Core™2 Duo CPU L9400 @ 1.86GHz × 2
OS typs: 64bit
Disk: 63.1GB

After try and error many times, I could run “./zcutil/build.sh”
It seems like it run successfully.

So I run thoes two test lines, “./qa/zcash/full-test-suite.sh”
and “./qa/pull-tester/rpc-tests.sh”.
It says some error there. I copy and paste it below. I have no idea how to fix. Anybody has any ideas? I will appreciate if anyone can help me.
thanks

aliberalvoluntarist@aliberalvoluntarist-MacBookAir:~/zcash$ ./qa/zcash/full-test-suite.sh

===== PASSED: /home/aliberalvoluntarist/zcash/src/zerocash/tests/utilTest
===== BEGIN: make check || { echo === ./src/test-suite.log === ; cat ./src/test-suite.log ; false ; }
Making check in src
make[1]: Entering directory /home/aliberalvoluntarist/zcash/src' make[2]: Entering directory /home/aliberalvoluntarist/zcash/src’
make check-TESTS check-local
make[3]: Entering directory /home/aliberalvoluntarist/zcash/src' make[4]: Entering directory /home/aliberalvoluntarist/zcash/src’
…/build-aux/test-driver: line 107: 12067 Killed “$@” > $log_file 2>&1
FAIL: test/test_bitcoin
make[5]: Entering directory /home/aliberalvoluntarist/zcash/src' make[6]: Entering directory /home/aliberalvoluntarist/zcash/src’
make[6]: Leaving directory /home/aliberalvoluntarist/zcash/src' make[5]: Leaving directory /home/aliberalvoluntarist/zcash/src’

Testsuite summary for Bitcoin Core 0.11.2

TOTAL: 1

PASS: 0

SKIP: 0

XFAIL: 0

FAIL: 1

XPASS: 0

ERROR: 0

============================================================================
See src/test-suite.log
Please report to Issues · bitcoin/bitcoin · GitHub

make[4]: *** [test-suite.log] Error 1
make[4]: Leaving directory /home/aliberalvoluntarist/zcash/src' make[3]: *** [check-TESTS] Error 2 make[3]: Leaving directory /home/aliberalvoluntarist/zcash/src’
make[2]: *** [check-am] Error 2
make[2]: Leaving directory /home/aliberalvoluntarist/zcash/src' make[1]: *** [check-recursive] Error 1 make[1]: Leaving directory /home/aliberalvoluntarist/zcash/src’
make: *** [check-recursive] Error 1
=== ./src/test-suite.log ===

Bitcoin Core 0.11.2: src/test-suite.log

TOTAL: 1

PASS: 0

SKIP: 0

XFAIL: 0

FAIL: 1

XPASS: 0

ERROR: 0

… contents:: :depth: 2

FAIL: test/test_bitcoin

Running 167 test cases…
(enter) Call to zerocash_pour_ppzksnark_generator [ ] (1461107543.7738s x0.00 from start)
(enter) Call to r1cs_ppzksnark_generator [ ] (1461107559.4958s x0.00 from start)
(enter) Call to r1cs_constraint_system::swap_AB_if_beneficial [ ] (1461107561.2045s x0.00 from start)
(enter) Estimate densities [ ] (1461107561.2046s x0.00 from start)
* Non-zero A-count (estimate): 366346
* Non-zero B-count (estimate): 444178
(leave) Estimate densities [0.5051s x1.00] (1461107561.7096s x0.00 from start)
(enter) Perform the swap [ ] (1461107561.7097s x0.00 from start)
(leave) Perform the swap [0.9162s x1.00] (1461107562.6259s x0.00 from start)
(leave) Call to r1cs_constraint_system::swap_AB_if_beneficial [1.4215s x1.00] (1461107562.6260s x0.00 from start)
(enter) Call to r1cs_to_qap_instance_map_with_evaluation [ ](1461107562.6265s x0.00 from start)
* Selected domain: step_radix2
(enter) Compute evaluations of A, B, C, H at t [ ] (1461107562.9494s x0.00 from start)
(leave) Compute evaluations of A, B, C, H at t [13.9368s x1.00] (1461107576.8862s x0.00 from start)
(leave) Call to r1cs_to_qap_instance_map_with_evaluation [14.2598s x1.00](1461107576.8863s x0.00 from start)
* QAP number of variables: 608730
* QAP pre degree: 658721
* QAP degree: 786432
* QAP number of input variables: 9
(enter) Compute query densities [ ] (1461107576.8891s x0.00 from start)
(leave) Compute query densities [0.0734s x1.00] (1461107576.9624s x0.00 from start)
Choosing window size 17 for 3732781 elements
Choosing window size 15 for 366346 elements
* G1 window: 17
* G2 window: 15
(enter) Generating G1 multiexp table [ ] (1461107578.2595s x0.00 from start)

===== FAILED: make check || { echo === ./src/test-suite.log === ; cat ./src/test-suite.log ; false ; }


aliberalvoluntarist@aliberalvoluntarist-MacBookAir:~/zcash$ ./qa/pull-tester/rpc-tests.sh

=== Running testscript zcpour.py ===
loading proving key from path: /home/aliberalvoluntarist/.zcash-params/regtest/zc-testnet-public-alpha-proving.key
File “/home/aliberalvoluntarist/zcash/qa/rpc-tests/test_framework/test_framework.py”, line 118, in main
self.run_test()
File “/home/aliberalvoluntarist/zcash/qa/rpc-tests/zcpour.py”, line 27, in run_test
pour_result = self.nodes[0].zcrawpour(protect_tx, {}, {zcaddress:39.9}, 40, 0.1)
File “/home/aliberalvoluntarist/zcash/qa/rpc-tests/test_framework/authproxy.py”, line 126, in call
raise JSONRPCException(response[‘error’])
Initializing test directory /tmp/testwJsxzs
JSONRPC error: std::bad_alloc
Stopping nodes
Cleaning up
Failed
!!! FAIL: zcpour.py !!!

=== Running testscript zcpourdoublespend.py ===
loading proving key from path: /home/aliberalvoluntarist/.zcash-params/regtest/zc-testnet-public-alpha-proving.key
File “/home/aliberalvoluntarist/zcash/qa/rpc-tests/test_framework/test_framework.py”, line 118, in main
self.run_test()
File “/home/aliberalvoluntarist/zcash/qa/rpc-tests/zcpourdoublespend.py”, line 59, in run_test
pool[i] = self.nodes[i].zcrawpour(pool[i], {}, {zcaddress:39.9}, 40, 0.1)
File “/home/aliberalvoluntarist/zcash/qa/rpc-tests/test_framework/authproxy.py”, line 126, in call
raise JSONRPCException(response[‘error’])
Initializing test directory /tmp/testbci24l
JSONRPC error: std::bad_alloc
Stopping nodes
Cleaning up
Failed
!!! FAIL: zcpourdoublespend.py !!!

Tests completed: 18
successes 16; failures: 2

Failing tests: zcpour.py zcpourdoublespend.py

It looks to me like you need to start zcashd before running the tests.

danda,

Thanks for the advise. I just run " ./src/zcashd -daemon" then got an error below.What does it tell? It seems like the key is not in right place? I mean it should be in Zcash folder, right?

aliberalvoluntarist@aliberalvoluntarist-MacBookAir:~/zcash$ ./src/zcashd -daemon

Bitcoin server starting


EXCEPTION: St13runtime_error
Could not open verification key file: /home/aliberalvoluntarist/.zcash-params/zc-testnet-public-alpha-verification.key
Please refer to user documentation for installing this file.
bitcoin in AppInit()

On my linux system the keys are in ~/.zcash-params. Here’s the contents:

$ tree ~/.zcash-params/
/home/zcash/.zcash-params/
├── README
├── regtest
│   ├── zc-testnet-public-alpha-proving.key
│   └── zc-testnet-public-alpha-verification.key
└── testnet3
    ├── zc-testnet-public-alpha-proving.key -> ../regtest/zc-testnet-public-alpha-proving.key
    └── zc-testnet-public-alpha-verification.key -> ../regtest/zc-testnet-public-alpha-verification.key

.zcash-params was placed there by the commands:

$ cd zcash
$ ./zcutil/fetch-params.sh

As per the public alpha guide.

Does that help?

Yeah, that was i did.
How can I place a configuration ~/.zcash/bitcoin.conf?

Any good comand to do it?

Type (or paste) the following lines at command-line:

mkdir ~/.zcash
cat > ~/.zcash/bitcoin.conf

the paste the following lines

testnet=1
addnode=alphatestnet.z.cash
rpcuser=username
rpcpassword=password

and finish everything off with a Ctrl-D. You should now have a working configuration.

JanKalin and Danda,

Thank you both. Finally I could run the daemon. When I run the tests, I still get same errors, but I could generate addresses with no problems.

It took for 5 days for me to reach in this point. :grin: I have almost no knowledge about Linux, so installing Linux to Osx was kind a challenge. Command lines on Terminal is definitely a big barrier for people like me. But I surprised that I was enjoying learning new things. The process reminds me using Mac in 15 years ago when I was young. It always crashed and I have to spend time to figure out problems, but it was fun time to do new things. Now everything gets so easier so I can waste time watching Nefliex.:stuck_out_tongue:

Any how, My problme was that I didn’t make “.zcash/bitcoin.conf?” in a zcash holder and I didn’t know how to use mkdir and cat commands.

When I run the tests, I still get same errors, but I could generate addresses with no problems.

The instruction below JanKalin made should be included in the alpha guide.

Type (or paste) the following lines at command-line:

mkdir ~/.zcash
cat > ~/.zcash/bitcoin.conf

the paste the following lines

testnet=1
addnode=alphatestnet.z.cash
rpcuser=username
rpcpassword=password

and finish everything off with a Ctrl-D. You should now have a working configuration.

1 Like

normally the ~/.zcash folder and the bitcoin.conf should be created automatically the first time that zcashd is executed. I don’t know why that was not the case for you.

Hi all,

I get the same error:
EXCEPTION: St13runtime_error
Could not open verification key file: /home/threnody/.zcash-params/zc-testnet-public-alpha-verification.key
Please refer to user documentation for installing this file.
bitcoin in AppInit()

The content of the /home/threnody/.zcash-params is:
`threnody@threnody-VirtualBox:~/.zcash-params$ tree
.
├── README
├── regtest
│ ├── zc-testnet-public-alpha-proving.key
│ └── zc-testnet-public-alpha-verification.key
└── testnet3
├── zc-testnet-public-alpha-proving.key → …/regtest/zc-testnet-public-alpha-proving.key
└── zc-testnet-public-alpha-verification.key → …/regtest/zc-testnet-public-alpha-verification.key

it seems the zc-testnet-public-alpha-verification.key is in the testnet3 folder. However it is looking one folder up. Should I move the files to the upper directory? Looking for a solution.

Thanks,

Has anyone tested Zcash with new Ubuntu 16.04 ? I’m considering to upgrade the OS but not sure if it is compatible with Zcash.

It looks like it is trying to load the key from the top level directory instead of the testnet3 directory.

Make sure that your .zcash/bitcoin.conf contains the line:

testnet=1

I’m also stuck getting this error when I try to run the daemon. I have made the bitcoin.conf folder with the testnet=1. For the rpcuser = username and rpcpassword=password I’m not sure what a rpcuser is or what password to use.

Nice Catch @Dilla I did a clean install just to be safe and now I have finally got the Bitcoin server running! :smile_cat:

The error regarding the verification key is an unfortunate one; it’s not that the parameters are in the wrong place, but that you had mainnet enabled.

Can you please elaborate @ebfull ? is the status of mainnet something we should check the status of before running the daemon?

Also as a side question, what is the best practice for stopping/pausing/re-starting zcash? is the kill -STOP then -CONT command useful?

thanks for the help

mainnet isn’t supported yet, and if you try to load with mainnet (by omitting testnet=1 or regtest=1) you will run into an unrelated error. As for signal handling, not sure, but since we’re based on Bitcoin you might find a similar answer elsewhere.