Zcash Documentation Release 4.5.1
Total Page:16
File Type:pdf, Size:1020Kb
Zcash Documentation Release 4.5.1 Paige Peterson & Marshall Gaucher Sep 29, 2021 Introduction 1 Zcash Basics 3 1.1 Overview.................................................3 1.2 Zcash Features..............................................3 1.3 Zcash Protocol..............................................4 1.4 Project History..............................................4 2 Community Spaces 7 2.1 Code...................................................7 2.2 Regular Events..............................................7 2.3 Discussion................................................7 2.4 Social Media...............................................8 3 Architecture and Cryptography9 3.1 Current Design..............................................9 3.2 Current Issues.............................................. 10 3.3 Roadmap................................................. 10 3.4 Strategy.................................................. 10 3.5 End Goal................................................. 11 4 Development Best Practices 13 4.1 Development workflow.......................................... 13 4.2 Handling Zcash features......................................... 13 5 Network Upgrade Guide 15 5.1 Canopy.................................................. 15 5.2 Heartwood................................................ 16 5.3 Blossom................................................. 16 5.4 Sapling.................................................. 16 5.5 Overwinter................................................ 18 6 Zcash Full Node and CLI 21 6.1 Install................................................... 21 6.2 Configuration............................................... 22 6.3 Use.................................................... 22 6.4 Upgrading................................................ 22 6.5 References................................................ 23 i 7 Zcash Protocol 25 7.1 Protocol Specs.............................................. 25 7.2 Zcash Improvement Proposals (ZIPs).................................. 25 7.3 Network Upgrade Guide......................................... 25 8 Light Client Development 27 8.1 Lightwalletd............................................... 27 8.2 Android.................................................. 28 8.3 iOS.................................................... 28 8.4 WASM.................................................. 29 8.5 References................................................ 29 9 Zcash Mining Guide 31 9.1 Overview................................................. 31 9.2 Calculating rewards........................................... 32 9.3 Purchasing an ASIC........................................... 32 9.4 ASIC hosting............................................... 33 9.5 ASIC setup................................................ 33 9.6 Joining a mining pool.......................................... 34 9.7 Getting payment............................................. 34 10 Zcash Integration Guide 35 10.1 Integration Path.............................................. 35 10.2 Bitcoin API................................................ 35 10.3 Zcash Payment API........................................... 36 10.4 Contact Us................................................ 36 10.5 References................................................ 36 11 Recommended Wallets 37 12 Funding 39 12.1 ZF Grants................................................. 39 12.2 Major Grants............................................... 39 13 Further Learning 41 13.1 Videos.................................................. 41 13.2 Quick Reads............................................... 41 13.3 Podcasts................................................. 42 13.4 Investment Theses............................................ 42 13.5 Research Papers............................................. 42 14 Developer Tools 43 14.1 Zcashd/Zcash-cli RPC Docs....................................... 43 14.2 Zcash Testnet Guide........................................... 43 14.3 Private Containerized Network...................................... 43 14.4 Block Explorer.............................................. 43 14.5 Ziggurat: Network Testing Suite..................................... 44 ii Zcash Documentation, Release 4.5.1 This is the home for Zcash documentation for end users and developers. Check out our quickstarts, tutorials, API reference, and code examples. Introduction 1 Zcash Documentation, Release 4.5.1 2 Introduction CHAPTER 1 Zcash Basics Zcash is a cryptocurrency that uses advanced applied cryptography to provide enhanced privacy via shielded addresses. Zcash is the first practical application of zk-SNARKs, a specific type of zero-knowledge proof. 1.1 Overview Get a quick dive on Zcash in 8 minutes: 1. Introducing blockchains, Zcash vs Bitcoin, and Zcash’s main feature (2 min) 2. How we define financial privacy, and why financial privacy is important (3 min) 3. How Zcash uses zero-knowledge proofs for financial privacy (2 min) 1.2 Zcash Features This is a quick summary; the Zcash technology page has additional information and examples. Primary features: • Addresses: Zcash has two types of addresses: private (z-addresses) and transparent (t-addresses). Z-addresses start with a “z,” and t-addresses start with a “t.” The two Zcash address types are interoperable. Funds can be transferred between z-addresses and t-addresses. There are privacy implications of shielding or deshielding information through these transactions. Today, most wallets and exchanges exclusively support t-addresses, although support for shielded addresses is available for mobile and desktop wallets. • Transactions: Transactions between two transparent addresses (t-addresses) work just like Bitcoin: the sender, receiver and transaction value are publicly visible. Transactions involving shielded addresses include shielded (z-to-z), shielding (t-to-z), and deshielding (z-to-t), with the z-address getting privacy protections. The most secure transaction is a shielded (z-to-z) one, which encrypts the sender and receiver addresses and transaction amount. However, all transactions appear on the public blockchain, so a transaction is known to have occured and what fees were paid. 3 Zcash Documentation, Release 4.5.1 • Viewing keys: The owner of a z-address can share its transaction details with trusted third parties via a view key–a key that grants read access but not spend authority over the address. This allows for “selective disclosure”, where transactions are auditable but disclosure is under the participant’s control. This allows compliance with payment for auditing, tax regulations, or anti-money laundering rules. Supporting features: • Like Bitcoin, Zcash has a fixed total supply of 21 million units. • Low-fee transactions of .0001 ZEC; default for all transactions, but configurable. • Encrypted memos to pass along messages or other useful data. • Transaction expiration to reduce mempool bloat; default expiry is 40 blocks (50 min). • Multisignature transactions; currently only available for public transactions. 1.3 Zcash Protocol • Units and divisibility: The unit of account of the Zcash system is a ZEC. The ticker symbol used to represent Zcash is also “ZEC”. As a nod to Bitcoin’s creator, a zatoshi is the smallest amount within Zcash representing 0.00000001 ZEC, one hundred millionth of a ZEC. • Funding Structure: Zcash pays out a portion of each block reward to fund protocol development and (for the first year) to pay back investors. During the first four years of Zcash, 10% of the block reward was transferred to the Founders Reward fund and distributed to the Electric Coin Co., Zcash Foundation and initial investors. After network upgrade 4, 8% of the block reward will be transferred to the Dev Fund and managed by a Major Grants Review Committee. • Mining: Originally Zcash could be mined at home, using CPU or GPU machines. As mining hardware evolved, ASIC machines became the preferred mining machine for professional cryptocurrency miners and mining pools. ASICs can be customized for a particular use (such as mining Zcash) and therefore outperformed previous mining hardware such as CPUs and GPUs. Zcash community members voted against ASIC-resistant protocol updates in mid-2018 citing security concerns. The top mining pools for Zcash include Flypool, Nanopool and Slushpool. The next network upgrade, Heartwood includes ZIP 213, which would allow miners to mine directly to a shielded coinbase. • Scalability: Scalability work is in progress. There are several approaches to making blockchains scalable, both at the protocol layer (layer 1) and at the application layer (layer 2). In September 2019, Sean Bowe, researcher at Electric Coin Co., proposed Halo, a novel technique for practical recursive zero-knowledge proofs. ECC researcher Daira Hopwood presented a research proposal for sharding architecture. This proposal calls for the use of sharding, a technique that partitions a database into sections or “shards” to improve the throughput limit, in order to scale to high transaction volumes. 1.4 Project History • Pre-launch: Zcash grew out of “Zerocash/Zerocoin,” an experimental proposal from seven scientists to improve privacy protections in Bitcoin. The Zerocoin company, known today as the Electric Coin Co., raised $3M in funding to develop the initial protocol. • Creation: Zcash launched on October 28, 2016 by Electric Coin Co., a private company founded by Zooko Wilcox. Zcash relies on a novel mathematical proof called a zk-SNARK. “SNARKs