FINAL zcash mining specifications


#1

I'd like to use this thread as a net repository or collection for the discussion of ZEC's mining specifications, so it's easy to find and parse in advance of an official statement from Zooko and the development team.

Mining algorithm: As of Zcash alpha release v0.11.2.z2, resolved in Issue #27 the Zcash mining algorithm will be Equihash (white paper here), a new, memory-hard, proof-of-work mining algorithm based on the generalized Birthday Problem and Wagner's algorithm for it. Equihash was created by Alex Biryukov and Dmitry Khovratovich of the University of Luxembourg.

Block time spacing/target spacing: 2.5 minutes, with 12.5 ZEC reward per block. This is as per
github.com/zcash/zcash/issues/142#issuecomment-112935618.

However, to protect against instamining and accusations of miner collusion, the zcash team has decided not to apply the above rate of emission right from the genesis block. Instead, ZEC's emission will be subject to a slow start, where the emission curve will gradually ramp up to the full emission rate of 12.5 ZEC per block over the first 20,000 blocks. If there are further adjustments to the block spacing and reward, they will be in such a way that the following equation always remains true:

{# of slow start blocks} * {full block reward} = 250000

github.com/zcash/zcash/issues/762#issuecomment-213658623

Difficulty adjustment algorithm: Digishield V3, tweaked to use the following trailing-average difficulty window:

(next difficulty) = (last difficulty) x SQRT [ (150 seconds) / (last solve time)

(as per https://github.com/zcash/zcash/issues/147#issuecomment-245140908)

Difficulty adjustment period in blocks: This approximates to every block, as per the above link.

Transaction fee structure: Still TBD via wallet implementations post-1.0 protocol release. Currently exploring a privacy-safe fee selection algorithm. (IE, this won't be a critical element of the 1.0 zerocash release, and can be decided by wallet implementations later.) Assume this is negligible, in that max fees aren't material to a young network and that 0 fees can still be set if a user desires.
github.com/zcash/zcash/issues/398#issuecomment-155587212

Starting reward in ZEC per block: 12.5 ZEC per 2.5-minute spacing. As per
github.com/zcash/zcash/issues/142#issuecomment-112935618

Division of each PoW block reward between miners and zcash team:
- 80% (10 ZEC) to miners, 20% (2.5 ZEC) to zcash team, from genesis block to first halving of the block reward (approximately four years later)
- 100% to miners thereafter
- transaction fees paid 100% to miners throughout
As stated by daira below.

Reward halving period: every ~4 years, as per Bitcoin
github.com/zcash/zcash/issues/142#issuecomment-112935618

Total eventual supply: 21,000,000 (21 million), as per Bitcoin
github.com/zcash/zcash/issues/142#issuecomment-112935618

I look forward to final corrections, if any.


#2

Relevant issues on GitHub:

  • Mining algorithm: #27
  • Difficulty adjustment period: #147
  • Transaction fee structure: #398
  • Starting reward: #137 #142
  • Reward halving period: #142 #143 #188

Note that several of these issues are marked as "Not in 1.0", meaning that they are unlikely to be in the initial release.


#3

Thank you! I'm a Gihub noob. Looking over those now.


#4

Hi @notsofast. You've referred to a 10 minute block time target in bold, referencing https://github.com/zcash/zcash/issues/142#issuecomment-112935618 , but that isn't actually decided yet. The comment refers only to the monetary supply curve.


#5

Thank you for clarifying!

I had bolded that criterion as final as inferred from the 50-ZEC per block starting reward; the approximate 4-year halving period; and the 21M total eventual supply. I assumed that if these three criteria were to be taken as finalized, then 10-minute spacing would be required to make that happen as per Bitcoin, with a natural curve halving every four years down to fee-only blocks.

I suppose if you chose a tighter target spacing than ten minutes, you'd simply halt the block reward completely at 21M total eventual supply. But at a block spacing any shorter than ~4 minutes, you'd hit that 21M total eventual supply cutoff before the reward even had a chance to halve within the designated 4-year halving period.

So it seems most likely to me that if the 10-minute blocktime is not set in stone yet, neither is the reward halving period-- I would assume that the starting reward and total eventual supply are much more important as hard data points from which to set the timing of a smooth emission curve.


#6

I just posted this comment - https://github.com/zcash/zcash/issues/142#issuecomment-192862221 :

To clarify, the starting reward target will be 50 ZEC every 10 minutes, but it hasn't been decided that the target block time will be 10 minutes. Just as an example, if the target block time were 5 minutes, then the starting reward per block would be 25 ZEC (20 ZEC to the miner and 5 ZEC to the founders, in the ~4 years before the first halving). This gives the same money supply curve.

Thanks for pointing out that we needed to clarify this.

(Note that the expected revenue per unit time for a miner with a given work rate is independent of the decision about target block time.)


#7

This is great! Thank you, notsofast, for maintaining this.


#8

Pleasure to be able to involve myself, even if it's just an attempt at packaging the specs as they are hammered out.


How to mine Zcash
#9

This should clarify that it's only in the period (of approximately 4 years) before the first reward halving. After that, miners get the whole block reward. Also, miners always get all of the transaction fees.


#10

Clarification made-- thanks.


#11

You probably want to include information about the mining slow start:
github.com/zcash/zcash/issues/762


#12

Thanks for the update! I love the idea for a mining slow start.


#13

It appears editing of posts is locked after a certain post age. To keep this OP relevant I'll need the ability to edit it indefinitely until zcash is launched-- could I please get a moderator's help unlocking this post for the sake of updating it?

cc: @memymo

EDIT: This has been fixed-- thank you for doing it so promptly!


#14

When can we expect main-net to launch .
Thanks


#15

https://github.com/zcash/zcash/milestones


1 BTC bounty for pure C zcash optimized solver
#16

I would like to offer 1 BTC bounty for a pure C (including any required libs) implementation of the zcash optimized equihash solver.

speed just needs to match the C++ version to qualify


#17

Just curious-- what is the advantage of being able to solve equihash in pure C versus C++?

Does it facilitate porting to GPU or FPGA mining?


#18

Are there going to be any other forms of initial distribution? Proposed mining rate too slow in today's Crypto Economy. Things are moving way faster now then when Bitcoin started. We're now working with Warp speeds. Can we think of a fair Warp grade distribution?


#19

sha256 is not a terribly demanding proof of work so while the Bitcoin network's peta-hash rate is still impressive it's kind of like measuring stellar distances in metres instead of light-years.


#20

Did you get an answer ? I'm on https://bitcointalk.org/index.php?topic=1626185.msg16584694#msg16584694