体验篇 - Zcash

编译

git clone https://github.com/zcash/zcash.git
cd zcash/
git checkout v2.0.7-2
./zcutil/fetch-params.sh
./zcutil/build.sh -j$(nproc)
mkdir -p ~/.zcash
echo "addnode=testnet.z.cash" >~/.zcash/zcash.conf
echo 'gen=1' >> ~/.zcash/zcash.conf
echo "genproclimit=-1" >> ~/.zcash/zcash.conf

启动

./src/zcashd -regtest
./src/zcash-cli -regtest getinfo

T地址

./src/zcash-cli -regtest getnewaddress
./src/zcash-cli -regtest getaddressesbyaccount ""

Z地址

./src/zcash-cli -regtest z_getnewaddress
./src/zcash-cli -regtest z_listaddresses

生产一个区块

./src/zcash-cli -regtest z_generate 1

发送所有余额到Z地址

./src/zcash-cli -regtest  z_shieldcoinbase "*"  "zregtestsapling1sczhhfwx8879nq7...lcg8v"

转账

./src/zcash-cli -regtest z_sendmany "$ZADDR" "[{
     \"amount\": 0.8, \"address\": \"$FRIEND\"}]"
./src/zcash-cli -regtest z_getoperationresult

zcash.conf

#acctive
addnode=testnet.z.cash
gen=1
genproclimit=-1
regtest=0
nuparams=5ba81b19:1
nuparams=76b809bb:1

你可能感兴趣的:(体验篇,#,零知识证明,#,隐私计算,zcash,零知识证明,零币)