发新帖

Zcash Beta Guide 使用指南

牛来了 8月前 911

Welcome! This guide is intended to get you running on the Zcash Beta testnet, including build, test, and RPC instructions for sending/receiving testnet currency, a.k.a.

"TAZ". 欢迎!本指南的目的是让你运行 Zcash Beta1 测试版,包括构建,测试和发送/接收testnet货币(又名“TAZ”)的RPC说明。


最新测试版本(beta2)官方指南:

https://github.com/zcash/zcash/wiki/Beta-Guide 

z9-proving.key文件下载(群文件共享中下载):

请加QQ群:304390133


A quick note on terminology 术语 


Currency: Zcash testnet currency is called TAZ. It has no value. The testnet is frequently reset, so you'll lose any TAZ each time. 

币:Zcas测试网络的币称为TAZ。测试网络经常重置,产生的币没任何价值。 


Addresses: Zcash has two kinds of address: a z-addr is a fully private address that uses the zero-knowledge proving system to protect transaction and balance privacy. A t-addr (aka "transparent address") is similar to a Bitcoin address.

地址:Zcash有两种地址:Z-addr,基于零知识证明系统来保护交易(“私有密钥”)。T-addr(“公开密钥”)类似比特币地址。


Requirements 硬件要求 


Zcash currently only works on Linux. It is also recommended that your hardware has at least 4GB of memory (or up to 8GB for the test suite) and a few GB of free storage space. 

Zcash预计2016年10月28日正式发布,目前仍然是测试网络。Zcash同时支持CPU和GPU挖矿,但现在只能在Linux系统上用CPU挖矿,内存至少需要4GB(若运行测试套件需要高达8GB的内存)和几个GB的可用存储空间。


The interfaces are a commandline client, zcash-cli and a Remote Procedure Call (RPC) interface, which is documented here: 

zcash-CLI和远程过程调用(RPC)接口,此命令行客户端请参考: 

https://github.com/zcash/zcash/blob/v1.0.0-beta1/doc/payment-api.md 


Get Started 入门


First install the dependencies. On Debian/Ubuntu-based systems: 

安装依赖环境(Windows用户会懵圈,姑且理解为安装相关程序吧),Debian或buntu系统请输入(注: “\”号为隔行符,复制整段时去掉即可):

 

$ 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


On Fedora-based systems:

 Fedora系统请输入: 


$ sudo dnf install \   

     git pkgconfig automake autoconf ncurses-devel python wget \

     gtest-devel gcc gcc-c++ libtool patch 


Fetch our repository with git and run fetch-params.sh like so: 

使用 git 工具获取代码库(将zcash的代码复制到本机),并执行fetch-params.sh,如下:


 $ git clone https://github.com/zcash/zcash.git //复制代码到本机

 $ cd zcash/ //进入代码目录

 $ git checkout v1.0.0-beta1 //切换到beta1版本分支 

 $ ./zcutil/fetch-params.sh //执行命令 


This will fetch our Beta 1 proving and verifying keys and place them into ~/.zcash-params/. These keys are just under 911MB in size, so it may take some time to download them. The keys still use "z9" filenames since they have not changed for the Beta 1 release. 

执行fetch-params.sh 获取Beta1测试版的验证密钥(会下载 z9-proving.key 这个文件,大小为911M,若外网访问慢的盆友,请到群里下载)。

并将其放置在 〜/.zcash-PARAMS/ 文件夹下(此文件夹是隐藏的,Ubuntu下通过菜单>查看>显示隐藏文件或Ctrl+H调出来),分别放置新建regtesttestnet3文件夹下。


 仍然使用“z9”的文件名,是因为在Beta 1版中key文件通用。



The message printed by git checkout about a "detached head" is normal and does not indicate a problem. 

执行 git checkout 出现”detached head”(中文显示“分离的头”)消息时,是正常的,请忽略。


Upgrading? 升级 


If you're upgrading from a previous release, try these commands instead:

如果你从以前的版本升级(升级前考虑冲突,建议停止当前挖矿或重启系统),尝试这些命令:


$ cd zcash/ //进入代码目录 

$ make clean //清除之前编译的可执行文件及配置文件 

$ git fetch origin //从远程获取最新版本到本地 

$ git checkout v1.0.0-beta1 //切换到beta1版本分支 

$ ./zcutil/fetch-params.sh //执行命令


Since Beta 1 resets the testnet block chain, you will also need to recursively delete your testnet3 directory, like this: 

Beta1测试版重置了网络区块数据,执行如下命令删除testnet3目录(注: Ubuntu路径为 /home/你的用户名/.zcash/ 同时这个文件夹也是隐藏的)或重命名:


$ rm -rf ~/.zcash/testnet3




It is not necessary to delete the ~/.zcash-params directory. 

注意:没有必要删除 〜/.zcash-PARAMS目录。


Compiling 编译 


Ensure you have successfully installed all system package dependencies as described above. Then run the build, e.g.: 

确保已成功安装如上所述所有系统软件包的依赖关系。然后运行构建,例如: ***特别提示:很多盆友这一步骤出错,无法开启挖矿,原因没有编译成功,请重新执行升级环节中的每一步骤,通过 make clean 清除之前编译的可执行文件及配置文件,再执行此环节。 


$ ./zcutil/build.sh -j$(nproc) //若没NPROC,替换为CPU核数。如:-j4


This should compile our dependencies and build zcashd. (Note: if you don't have nproc, then substitute the number of your processors.) 

通过编译,构建zcash,挖矿程序能否成功开启,编译很关键(注意:如果你没有NPROC,那么替换CPU的核数。)


Testing 测试


The tests take a while to run and may require up to 8GB of RAM. If you would rather get started right away, you can skip to the next section. If you want to run the tests to make sure Zcash is working, run: 


$ ./qa/zcash/full-test-suite.sh 


You can also run the RPC tests, which take much longer: 


$ ./qa/pull-tester/rpc-tests.sh 


The tests need a lot of memory to run successfully. An out-of-memory error will usually cause a FAIL or ERROR outcome with "std::bad_alloc" somewhere in the output. 


Running 运行


Create the ~/.zcash directory using mkdir -p ~/.zcash. Then place a configuration file at~/.zcash/zcash.conf with the following contents (you don't need to modify anything):


建立一个配置文件,运行命令: 


$ mkdir ~/.zcash 

$ nano ~/.zcash/zcash.conf //nano为Linux文本编辑命令 


在配置文件中输入一下信息: 


testnet=1 

addnode=betatestnet.z.cash 

rpcuser=username 

rpcpassword=password 

gen=1 //这项官方文档没说明,加上后CPU全线程工作,姑且理解为全核数 


Now, run the daemon!

开始挖矿,运行下面命令:


$ ./src/zcashd -daemon


You should be able to use the RPC after it finishes loading. Here's a quick way to test: 

过一段时间后,运行下面命令,查看你的节点信息。 


$ ./src/zcash-cli getinfo //查看节点信息 

$ ./src/zcash-cli getmininginfo //获取挖矿信息 

$ ./src/zcash-cli getwalletinfo //获取钱包信息




NOTE: If you are familiar with bitcoind's RPC interface, you can use many of those calls to send TAZ testcoins between t-addr addresses, but we do not support and do not recommend you use the 'Accounts' feature which has been deprecated in bitcoind.


停止及再次挖矿,输入: 


$ ./src/zcash-cli setgenerate false //停止挖矿 

$ ./src/zcash-cli setgenerate true //再次挖矿 


查看您挖到的币(每次挖到的币地址不同,原因何在?),输入: 


$ ./src/zcash-cli listtransactions


中文翻译至此,下面是高阶应用了,实在无能为力了!!!!!




***题外:复制blockhash值,到http://explorer.z.cash/ 查询,包括确认数,给开发团队的奖励等等,更精彩等您!



最新回复 (0)
返回
发新帖
牛来了
主题数
16
帖子数
0
注册排名
63