zCash is a new decentralised digital cryptocurrency which uses a part of Bitcoin’s code and aims to provide better privacy of transactions by allowing either transparent addresses (t-addresses) or zero-knowledge proof addresses (z-addresses). zCash uses the equihash algorithm which was built to be GPU-optimized and resistant to ASIC processing. Mining on CPU is also possible, albeit with a considerably lesser efficiency.
Note that this article is purely from my point of view, you should as always look for multiple information sources and cross the data. Also, I will not go into why you should prefer this cryptocurrency over another one, whether it makes sense or not to mine.
Three things will dictate your approach to mining: your hardware capabilities, your operating system(s) and your technical abilities.
Cryptocurrency mining is a power-hungry and resource-intensive activity. There is a cost incurred in electrical power and if you intend to mine for anything else than for pure scientific interest you will have to ensure that your operation is cost-effective, i.e. that your power consumption costs and hardware costs are counterbalanced by sufficient horsepower. You may want to look at a system that is power-effective, in fact most professional miners operate so-called “mining rigs” (i.e. bare-bone systems primarily designed for mining operations) where the graphic adapters are slightly under-clocked to reduce power consumption while maintaining acceptable hash power.
In general, CPU mining is not cost-efficient and if you are looking at building a dedicated mining rig, most specialists out there will advise to save on the CPU to better invest money in efficient graphic adapters.
In terms of graphic adapters, unless you are a millionaire you are looking at a GPU that delivers the best bang for the buck. In my case, I decided to settle for an AMD RX480 based card, specifically the Asus ROG Strix RX480 with 8 GB RAM. Your budget and mileage may vary, in my case decision factors were (pure hashing capabilities aside) the overall build quality, number of fans and noise levels. You may not want to run a GPU-intensive operation on a card that is not properly cooled. The ability to over-clock or under-clock your card will also be a decisive factor.
Consider also that the specialised mining software is not always available on all of the OS platforms and some miners may be optimised for a specific type of GPU. Generally, avoid older cards and if you are on Nvidia especially card with a Compute Capability below SM 5.0 as most miners require SM 5.0 or above to mine efficiently (Maxwell or Pascal architectures). Make sure to read the various forums about driver versions since that may influence the mining efficiency as well.
For a list of graphic adapters and their zCash operation range, check out this page which has some indicative information. Look at fields such as “Payback”. You’re looking at getting hardware that mines efficiently, cost-effectively and within your budget.
Your OS may dictate what miners you can use, what drivers and so on. From a purely official standpoint zCash is supported only on Linux. But it’s also possible to mine on MacOS as well as Windows, through various experimental ports. If you are looking at building a mining rig, Linux is definitely recommended. Personally, I mine on one MacOS device and on two Windows devices.
While mining is not complicated in itself, the tools to be used are made by passionate people who are deeply into technology and their use may seem obscure to the newcomer. What needs to be understood first is how this whole thing runs: how to mine, with which tools, where do I get the ZEC (zCash currency code) sent etc. You should be aware that each tool has its own configuration method, whatever runs on Windows/Mac is experimental and likely to be unsupported.
Also, if you do not know what you are doing you could put your system at risk. Be especially cautious when downloading miners, I recommend you get them directly from github and steer clear of forum links if possible. Note that miners are often classified by anti-malware and antivirus programs as risk/malicious items, even if they are not harmful per se. Favor open-source miners over proprietary code, although the best miners are often closed source. You may have to make trade-offs.
Finally, if you’re the DYI type, ensure you don’t kill yourself in electricity hazards and take all the appropriate security measures. Consider environmental constraints such as noise, cooling, etc.
Mining: Miners & Pools
Solo Mining or Pool Mining
First of all, you have to decide if you want to run for solo mining or if you want to participate in a pool. Solo mining means that you are on your own and that you will attempt to resolve blocks only with your compute power. Needless to say this option is valid only if you have considerable GPU compute power at hand.
For mere mortals, pool mining is the best alternative. Your compute power is aggregated with the total compute power of all the other miners in a given pool and this gives more chances of success when resolving blocks. The earnings are then split according to the contributions you made to the pool. The pool operator deducts a fee for their operation costs and the credit is assigned to your user. After a certain balance threshold has been met (usually 0.001 ZEC) you will have the ability to cash out earnings to a t-address (note that t-addresses are reusable to receive multiple payments). Most pools have an automatic transfer feature where credits are automatically sent to your t-adress after your balance has hit a certain threshold.
Mining pools work with the concept of “workers”. A worker is a unique source that you use for mining, to which an account and a password are associated. You can see below how I have set my workers, for example.
If you’re the generous kind, you can also donate to your pool i.e. contribute a fraction of your earnings to support their operational costs.
Nothing comes for free and in the case of zCash, you should be aware that the founding company awards themselves a 20% fee on any new block that is mined. You will pay transfer fees as well when you send and receive ZEC (these fees reward the miners who process the blocks).
Miner & pool fees
All miners are not created equal. Some developers invest a lot of time in creating performant, highly optimised miners that get the best out of your hardware. You can see a five-fold increase in GPU mining if you use the right miner. This comes at a price, some of these miners will use a portion of your mining time to retribute the developer. Usually, that would be something in the range of 60-90 seconds of mining time per mining hour. During this time lapse, results will be sent to the developer’s own mining pool or zCash address. In my opinion that’s a fair price to pay.
You will also pay fees to your pool when you mine (some pools may have a no-fee policy but I’m quite skeptical about it). Again, use cryptocompare.com to get an idea.
Choosing a miner
While the default installation (wallet + zcashd daemon) allows you to mine, I strongly advise against it. The default miner is not optimised and it would be a waste of time and energy. If you intend by all means to run a zCash node, feel free to do so! But do not use the mining option.
To select a miner, you will have to consider which hardware you use and which OS you are running. There is no rule of thumb here, but here are some hints:
- Do not use an “all purpose” miner unless your OS platform gives you no choice (hello MacOS)
- Prefer highly optimised miners for GPU mining (Optiminer, Claymore work well with AMD chipsets)
- Consider that high-performance miners will incur a developer fee
- Consider if the miner will pay you in ZEC or BTC (Bitcoin) – most miners will pay in ZEC but nicehash is known to reward in BTC
In terms of GPU mining, you should always experiment with the miner settings to find our optimal hashrate and Sols/s (solutions per second) output. In zCash, what matters is the Sols/s output as this will directly influence how much cryptocurrency you generate. Each miner uses different solving methods. If you use nheqminer and have a modern Nvidia card, the djezo solver may work if your SM version is 5.0 or above, otherwise you’ll have to fall back to the tromp solver.
Look at it as a trial-and-error process. Seek for help in the forums and do not assume that you’ve reached the best configuration until you get more and more acquainted with the tools & terminology. I thought I was having good results with the RX480 and the genoil miner at 45 Sols/s, after I was told to use optiminer you can imagine my surprise when achieving consistently 250 Sols/s! With no other tweaking whatsoever.
Mining is resource-intensive, you want to make sure that you are getting optimal use of your system, especially if it’s not dedicated to mining and you work on it as well. If your system is powerful enough and you are using the system for office/browsing, let the GPU miner run in the background – you can also add an extra CPU miner to run on half of your CPU cores as a supplement. If you intend to play games or work on resource intensive programs, it’s best to stop mining and resume after you are done.
Ensure your system is clean, well aerated, in a moderate temperature environment to avoid any unnecessary strain on the hardware. Ensure you have quality components at all levels. Whenever possible, favor quiet cooling systems.
When mining to a pool, check if they support your miner, they may have specific URL/port settings based on the miner you use.
The reward of mining is the generation of zCash cryptocurrency (ZEC). This cryptocurrency needs to be stored somewhere and for this purpose we have wallets.
The only official wallet is the zCash wallet and it runs only on Linux. There is an experimental port on Windows called zCash4win which bundles the zcash daemon and the wallet (a Java application). I’ve set it up both manually (before zCash4win release) and then through the zCash4win installer with equal success. This option is in theory the best one if you want to fully manage your own wallet but it also means you have to run a full zCash node.
If you’re the security conscious type and want to secure your ZECs, you may want to have an offline system where you store your ZECs as well. This discussion is however out of this article’s scope.
I personally use Jaxx as this provides me with the ability to use the wallet across devices (note: Jaxx’s wallet works on iOS but due to Apple policies on cryptocurrencies ZEC is not yet accepted in the App Store). An update: we were informed on 16-Feb-17 by Jaxx.io that their lightweight wallet should not be used to direct mining payments to it until they will advise otherwise. I am therefore likely to direct mining payments to my local zCash full node / wallet.
Stats and numbers for geeks
So, with all of that said, you may want to know what I am doing and how it looks like. I have currently three systems on which I am mining:
- A custom-build desktop, sporting a Core i5-4690S, 8 GB RAM and an ASUS ROG RX480 Strix with 8 GB RAM
- An early 2015 13.3″ Retina MacBook Pro, sporting a Core i5-5257U, 8 GB RAM and the Intel Iris 6100 adapter
- A 2012 Dell XPS L702x, sporting a Core i7-2670QM, 8 GB RAM and an Nvidia GT-555M with 3 GB RAM
- Desktop: Single Core: 4000+, Multicore: 10000+, OpenCL: 129997 (no, there is no typo here)
- MacBook Pro: Single Core: 3213, Multicore: 5536, OpenCL: 16266
- Dell L702X: Single Core: 3006, Multicore: 9018, OpenCL: 12808
I use .bat files to trigger the mining operations and have several of these based on the mining intensity. I generally separate GPU from CPU mining to ensure I can mine as modularly as I want. For example, I have a script that mines using all four CPU cores on the desktop (during sleep or away hours) and another one that mines using only two cores during regular hours.
Also, because I have three systems and I separate CPU and GPU I have to set up multiple workers on the pool to which I participate. Having multiple workers is important to ensure that the jobs being sent from the pool to your worker are not processed or messed up by another worker. Having multiple workers also allows you to compare their efficiency.
The picture below gives an overview of my mining stats (I am using the zec.suprnova.cc pool):
As you can see above, I have one worker for GPU (optiminer) and one worker for CPU (nheqminer) on the Desktop. On the mac, I use an experimental nheqminer version with the tromp solver through a single worker. On the L702x, I have one worker for the GPU and two workers for the CPU (each worker uses 2 CPU cores). Because the Nvidia GT555M has SM 2.1, nheqminer defaults to the tromp resolver and this one is not really optimized for older cards. However using EWBF (a closed source miner) has given better results (threefold compared to nheqminer). You many want to handle EWBF cautiously as Windows Defender will attempt to eradicate it and sees it as a malware.
I consider zCash mining primarily as a fun and hobby activity, even though in light of Bitcoin’s rise this could have some financial impact as well. I’m interested in cryptocurrencies and in technology so it’s interesting for me to be there at the inception of this project. Let’s see how this goes along and I hope this guide will be a fun diversion to my many data center related posts (which are due to resume very soon!)