The Zcash ArboretumI–IX The Complete Arboretum
Contents
PDF
Theme

8 NU7: 25-second blocks and bounded shielded work

This section describes the ZIP-259 draft, a proposal rather than a deployed upgrade, which combines four changes: shorter blocks with limits on shielded work (ZIP-218), removal of 60% of transaction fees from circulation (ZIP-235), reissuance that preserves the halving schedule — periodic divisions of scheduled subsidy by two (ZIP-237) — and rejection of version 4 transactions (ZIP-2003). Three amendments adjust the existing funding streams: Revision 3 of ZIP-214 rescales their end heights to the new spacing (Section 8.7), Revision 2 of ZIP-207 rescales the periods for which each recipient address is used, and ZIP-2008 changes one stream’s recipient address. The activation height, denoted A, must be a multiple of three (Revision 3 of ZIP-214). At the source boundary of Section 1.1, ZIP-259 sets A=4,465,026 on Testnet and leaves the Mainnet value unassigned.

NU7 introduces no new transaction format: versions 5 and 6 remain available. Their signatures nevertheless commit to a consensus branch identifier, a value identifying the network upgrade’s rules. An unchanged encoding therefore does not make a pre-NU7 signature valid under NU7. Disabling version 4 also disables spending funds in Sprout, an older shielded pool, because the newer formats cannot represent its transfers; it does not transfer their value to a reserve or remove it from the supply.

8.1 Chain selection and the tie-break

The most-work rule of Definition 2.2, which compares the sum of the blocks’ work rather than their count, is unchanged. Changing target spacing changes neither the work definition nor this ordering.

Remark 8.1 (The implementation tie-break).

The specification and Rosenfeld’s model prefer, at equal cumulative work, the leaf received first. Zebra applies the same rule from version 6.4.0, released on 23 September 2026: of two chains with equal work it keeps the one whose leaf it received first, and compares leaf hashes only between leaves whose receipt times it cannot order. A tying branch that reaches a node after the public leaf therefore does not displace it there, as the strict-overtake boundary z=−1 assumes. Earlier versions broke every equal-work tie by the larger leaf hash. Under that rule an attacker could release a tying private branch whose leaf hash won; the boundary z=−1 does not count that success, so for those versions r(q,n) is a lower bound when only the tie-break is replaced, the other assumptions held fixed. Under either rule the tie-break concerns local chain choice, not the validity of a block, and r(q,n) remains exact only for the stated model: changing difficulty and rollback limits also change the deployed success event (Remarks 8.2 and 8.3).

8.2 Difficulty adjustment

Assumption 4.2 fixes difficulty; Zcash retargets after every block. In ZIP-218, the NU7 target spacing is 25 seconds and the target-averaging window is 102 blocks. The timestamps determining the adjustment still come from the branch being evaluated, including on an attacker’s private branch.

Write N=102 for the target-averaging window and T=N⋅25=2,550 seconds for its nominal timespan.

The specification’s §7.7.3 defines the rest of the calculation. For a block height h, let m(h) be the median timestamp of the eleven preceding blocks: their sixth-smallest timestamp. Let t¯(h) be the mean target of the N blocks preceding h: the sum of their targets divided by N. Define the observed and damped timespans by

a⁢(h) =m⁢(h)−m⁢(h−N),
d⁢(h) =T+trunc⁡(a⁢(h)−T4),

where trunc discards the fractional part towards zero. The bounded timespan c(h) is d(h) clamped between ⌊0.84T⌋ and ⌊1.32T⌋: values below the lower endpoint are replaced by that endpoint, and similarly above the upper endpoint. The maximum target 𝖯𝗈𝖶𝖫𝗂𝗆𝗂𝗍 is 2243−1 on Mainnet and 2251−1 on Testnet (§5.3). The target calculation is

t⁢(h)=min⁡(𝖯𝗈𝖶𝖫𝗂𝗆𝗂𝗍,⌊t¯⁢(h)T⌋⁢c⁢(h)),

followed by the compact encoding defined in the specification’s §7.7.4. The order of the floor and multiplication matters. At NU7 the clamp endpoints are 2,142 and 3,366 seconds; the eleven-timestamp median, fourfold damping, and target cap are unchanged.

Activation does not reset the accumulated work or multiply the target by three in a single operation. The averaging window of the first NU7 blocks still covers pre-NU7 history and adjust through the same bounded rule. Likewise, the timestamp rules do not shrink with the target spacing: a timestamp must exceed the median of the preceding eleven and be at most 90 minutes above it (§7.6). A further check, not a consensus rule, rejects received blocks more than two hours ahead of the validator’s clock. Testnet’s exceptional minimum-difficulty rule sets a block’s target to 𝖯𝗈𝖶𝖫𝗂𝗆𝗂𝗍 when its timestamp exceeds its predecessor’s by strictly more than a threshold. At the Testnet NU7 activation height the threshold changes from six to eighteen target spacings, so it remains 18⋅25=6⋅75=450 seconds: a gap of 450 seconds does not qualify, one of 451 seconds does (ZIP-218, §“Minimum difficulty blocks on Testnet”). This exception does not apply to Mainnet.

Remark 8.2 (What per-block retargeting changes).

The averaging window, damping, and clamp constrain the adjustment but do not prove that two forked branches retain close targets. Work per block moves inversely with the target; a branch’s timestamps can change both its future block rate and the work carried by each block. Equal expected work production does not make the probability of an eventual overtake independent of these jump sizes. Consequently, the probability tables are an equal-work baseline, not an exact analysis of private branches whose difficulty schedules diverge.

8.3 Equihash and the memoryless model

Zcash’s proof of work is Equihash with parameters n=200, k=9 (specification §7.7, §7.7.1; the algorithm is Biryukov and Khovratovich’s, ePrint 2015/946), but the difficulty test a block must also pass is a separate later step: “[t]he difficulty filter is unchanged from Bitcoin, and is calculated using SHA-256d on the whole block header (including solutionSize and solution)”, required to be at most 𝖳𝗈𝖳𝖺𝗋𝗀𝖾𝗍(nBits) (§7.7.2). Each candidate Equihash solution therefore yields a new header whose SHA-256d hash is tested against the target. Treating distinct headers as independent trials is the usual random-function model for SHA-256d, not a property asserted by the specification; under that model these are the Bernoulli trials of Remark 3.7.

The specification nowhere asserts progress-freeness — the argument is this volume’s, not a citation. What Equihash changes is the granularity: candidates arrive in batches, one batch per memory-hard solver run. Progress within a run is discarded when a competing block arrives. Under independent identically distributed runs, the number of runs until an accepted header is geometric; replacing those discrete completion times by an exponential clock is a further approximation, coarse within one run and good only when a run is short relative to the target spacing: 25 seconds in the NU7 draft. Run duration is implementation- and hardware-dependent and is not quantified here. A proof of work whose solve time is comparable to the spacing would make block discovery visibly non-exponential and move the attribution sequence away from that of Proposition 3.4.

8.4 Rollback limits, coinbase maturity, and finality

Consensus does not impose a maximum reorganisation depth. ZIP-218 recommends a node-local 600-block rollback window: at the target spacing this is 600⋅25=15,000 seconds, or 250 minutes. Such a limit bounds the history that a node automatically reverses; it is not a proof that older blocks cannot be replaced by a higher-work valid chain. Following a branch outside that retained history requires different local state or operator intervention. Actual node implementations may choose a different window.

Remark 8.3 (Effect of a rollback limit).

A finite rollback policy truncates some paths to eventual overtake, so the unlimited-rollback probability r(q,n) is not the exact failure probability of a node enforcing that policy. A limit is also not global agreement: different nodes may stop on different sides of a long split. The specification’s §3.3 adds a separate requirement for validators that risk Mainnet funds or display transaction information: their chain must include the activation block of the most recent settled network upgrade. That socially anchored checkpoint is distinct from probabilistic finality.

A transparent output records its value and destination in cleartext. The consensus maturity rule prevents spending such an output of a coinbase until the spending block is at least 100 heights later (§7.1.2). ZIP-218 keeps that count, a nominal 100⋅25=2,500 seconds. Coinbase outputs placed directly in a shielded pool do not have this transparent maturity restriction. A 600-block rollback window can therefore reverse an already mature coinbase: maturity permits spending, not finality.

In the model, maturity is a confirmation count fixed by consensus. A spend can enter a block only once the coinbase’s block has 100 confirmations on the chain that the spend extends. A private branch forked below the coinbase block, under the conventions of Theorem 5.2, therefore removes a newly mature output from the best chain with probability r(q,100). Computed by script, r(0.3,100)≈3.68×10−9, r(0.4,100)≈0.432%, and r(0.45,100)≈15.7%. The count is ample against a 30% attacker and weak near one half, where, as for every fixed count, r(q,100) tends to 1 (proof of Proposition 6.2).

8.5 Wallet confirmation policy

A wallet can distinguish trusted outputs that its own transaction handling can recreate after a rollback from an untrusted external payment that may require the sender to pay again. The draft ZIP-315 recommends three confirmations for the former and ten for the latter, and exempts the shielding of transparent funds from its three-confirmation minimum. The examined wallet backend follows both, allowing zero-confirmation shielding by default. These choices are not consensus rules.

Table 1 quantifies their modelled trade-off: three confirmations assign a 10% attacker risk 1.712%, while ten assign the same attacker about 0.0008% and a 20% attacker about 0.316%. The count remains a (q,ε) policy, not a guarantee.

The anchor is the note-commitment-tree root against which a spend proves membership (Crypto Guide, §Privacy-preserving membership via zero-knowledge paths). ZIP-218 keeps at three blocks the anchor depth that ZIP-315 recommends. ZIP-218 also recommends a transaction-expiry delta of 120 blocks, a nominal 120⋅25=3,000 seconds, without overriding an explicitly configured expiry delta. ZIP-218 does not prescribe dividing every confirmation count by three.

Table 5 collects the safeguards of Sections 8.2 to 8.5. Four are consensus rules, which decide block validity; the rollback window is node policy, and the confirmation counts and anchor depth are wallet policy, which govern only a node’s or a wallet’s own conduct. Every value is specified, in the protocol specification or in a draft ZIP at the source boundary of Section 1.1; none is designed but unspecified.

Safeguard Value At 25 s Standing Model assumption
Difficulty adjustment every block; window N=102 (17 before NU7); damping 4; clamps ⌊0.84⁢T⌋ and ⌊1.32⁢T⌋ T=2,550 s; clamps 2,142 and 3,366 s consensus, §7.7.3; N=102 draft ZIP-218 constant difficulty (Assumption 4.2), replaced (Remark 8.2)
Timestamp bounds above the median of the 11 preceding timestamps; at most 90 min above it 216 spacings consensus, §7.6 constant difficulty: bounds the timestamps that set a branch’s targets
Proof of work Equihash (200,9), then SHA-256d header hash at most the target — consensus, §7.7.1, §7.7.2 exponential clocks (Remark 3.7), coarsened by solver runs
Rollback window 600 blocks 250 min node policy: §3.3 permits one; draft ZIP-218 unlimited rollback (Remark 8.3)
Coinbase maturity 100 blocks, transparent outputs 41.7 min consensus, §7.1.2; kept by draft ZIP-218 none; fixes n=100
Wallet confirmations 3 trusted, 10 untrusted 75, 250 s wallet policy, draft ZIP-315 none; a choice of (q,ε)
Anchor depth 3 blocks 75 s wallet policy, draft ZIP-315 and ZIP-218 none; outside the race
Table 5: The NU7 safeguards. Durations are nominal, at 25 seconds per block (the draft ZIP-218 spacing), and computed by script; § numbers are the protocol specification’s; “draft” marks a ZIP of Draft status.

8.6 A block budget for shielded work

A byte limit does not directly bound the computational work inside a block. The 2,000,000-byte limit must therefore be considered alongside the 25-second target spacing and the costs of shielded validation and wallet scanning. ZIP-218 adds limits on the shielded components that drive this work.

An Orchard Action pairs one spend slot with one output slot; dummy slots allow either side to carry no real transfer. Ironwood is the newer shielded pool using the same Action structure (ZIP-229). The older Sapling shielded pool counts spends and outputs separately; its cryptographic construction is not needed for this accounting.

Let O and I count Orchard and Ironwood Actions in a block, let S count Sapling spends plus outputs, and let J count Sprout transfers (JoinSplits), each of which creates two notes. ZIP-218 bounds each pool and charges all of them to one shared budget, 𝖦𝗅𝗈𝖻𝖺𝗅𝖲𝗁𝗂𝖾𝗅𝖽𝖾𝖽𝖡𝗎𝖽𝗀𝖾𝗍=330:

O≤330,I≤330,S≤300,J≤0,O+I+S+2⁢J≤330.

The final inequality is shared across pools: their separate maxima cannot all be filled in one block. For example, O=100, I=200, S=30 exhausts the shared budget; increasing I to 201 violates it even though each per-pool limit still holds. The Sprout bound of zero restates what the rejection of version 4 already enforces, since only that format represents Sprout transfers.

At two Actions per transaction, Orchard and Ironwood transactions together fit at most 165 per block under this budget, or a nominal 165/25=6.6 transactions per second. This is a capacity calculation under a specified transaction shape, not a measured throughput guarantee. Transparent components remain subject to the byte limit rather than this shielded-action budget.

8.7 Scheduled issuance with shorter blocks

A zatoshi is the atomic currency unit: 1 ZEC equals 108 zatoshi. A halving divides the scheduled subsidy by two. Retaining its nominal wall-clock interval while tripling block frequency requires both three times as many blocks per interval and one third of the subsidy per block. ZIP-218 therefore changes the full interval from 1,680,000 to L=5,040,000 blocks. These earlier intervals are needed to compute progress at activation, not to supply an alternative rule. The change preserves expected timing, not exact calendar dates, because actual block times remain random.

The halving count after activation retains the progress already made towards the next halving. Let HB be the Blossom activation height: 653,600 on Mainnet and 584,000 on Testnet. Before Blossom, halvings were separated by 840,000 blocks; the initial slow-start schedule, which ramps up the subsidy during the first 20,000 blocks, contributes a shift of 10,000 blocks. These constants and the maximum subsidy M=1,250,000,000 zatoshi are defined in the specification’s §5.3 and §7.8. For a height h≥A, the draft’s halving count and scheduled subsidy sh, measured in zatoshi, are

k⁢(h) =⌊HB−10,000840,000+A−HB1,680,000+h−A5,040,000⌋, (4)
sh =⌊M2⋅3⋅2k⁢(h)⌋. (5)

The factors 2 and 3 account separately for Blossom’s and NU7’s spacing changes. If activation occurs during the second-halving era, k(h)=2 gives sh=52,083,333 zatoshi, or 0.52083333 ZEC, until the next halving; k(h)=3 gives 26,041,666 zatoshi.

The old Mainnet third-halving height H3=4,406,400 is therefore not the NU7 third-halving height if A<H3. Converting the remaining interval gives

H3NU7=A+3⁢(H3−A)=13,219,200−2⁢A.

On Testnet, where H3=4,476,000 and A=4,465,026, the same conversion gives H3NU7=4,497,948; the Mainnet value awaits the Mainnet activation height.

Retiming the halving function does not by itself retime a funding stream whose end is a literal block height. Revision 3 of ZIP-214 supplies that change: the two streams that end at the old third halving, of 8% and 12% of the block subsidy, end at H3NU7 instead. Each stream receives the floor of its share, so at sh=52,083,333 they receive 4,166,666 and 6,249,999 zatoshi, and the miner subsidy, the remainder (specification §7.8), is 41,666,668 zatoshi per block.

8.8 The NSM reserve and delayed reissuance

The Network Sustainability Mechanism (NSM) separates temporarily removed funds from the still-unissued scheduled subsidy. In ZIP-237, the issued supply Vh is the total value recorded in the chain’s value pools after block h. Each pool is a separately tracked balance for one part of the protocol; tracking a shielded pool’s total does not reveal the values of its individual notes. The NSM reserve Rh, which ZIP-237 calls the NSM Value Balance, records value removed from circulation and not yet reissued. The reserve is public consensus state, not a spendable pool or an account with a spending key. In particular, it is not 21 million ZEC minus the issued supply: that larger difference also includes future scheduled issuance.

The initial reserve recovers the historical subsidy and fees that miners left unclaimed before NU6. Since ZIP-236, a coinbase must account for its full available value, so that historical shortfall is fixed. The draft defines the seed RA−1 as total scheduled issuance through the last pre-NU6 block minus issued supply there, and states the measured values: 36,858,445,520 zatoshi (about 368.58 ZEC) on Mainnet, through height 2,726,399, and 55,768,414,957 zatoshi on Testnet, through height 2,975,999.

Let dh be the number of zatoshi removed from circulation in block h. NU7 deploys one removal mechanism, ZIP-235; ZIP-259 excludes the voluntary removal of ZIP-233. With Fh the total fee paid by the non-coinbase transactions of block h,

dh=⌊6⁢Fh10⌋,

computed once from the block’s total fee. The coinbase’s total input value (specification §7.1.2) counts Fh−dh in place of Fh, and since ZIP-236 requires the coinbase to claim exactly its total input value, the miner receives exactly Fh−dh; no transaction field states dh. The rounding favours the miner and is applied once: two fees of 1 zatoshi remove ⌊12/10⌋=1 zatoshi, where rounding each transaction’s share would remove none.

With L=5,040,000 blocks per halving interval, the draft selects the reissuance fraction

f=⌊6,931,680,000/L⌋1010=13751010.

Reissuance starts at a height D that ZIP-237 derives from the scheduled subsidy alone, independently of actual removals. Let Ch be cumulative scheduled issuance through height h, with the pre-NU7 subsidies below A and sh from A, and let H3NU7 and H4NU7 be the heights at which k(h) of equation (4) first reaches 3 and 4. Then D is the least h with max(A,H3NU7+1)≤h<H4NU7 and

⌈f⁢(2.1⋅1015−Ch−1)⌉<sh,

the first block at which reissuing the fraction f of the cap’s unissued remainder, rounded up, would pay less than the scheduled subsidy; the cap 2.1⋅1015 zatoshi is 21 million ZEC. In that range sh=26,041,666 is constant, so C grows by that amount per block and the condition reads

2.1⋅1015−Ch−1≤⌊26,041,665⋅10101375⌋=189,393,927,272,727.

Let H2 be the pre-NU7 second-halving height: 2,726,400 on Mainnet and 2,796,000 on Testnet. If A lies between H2 and the pre-NU7 third halving H3, the remainder after block H3NU7 is 262,499,975,638,334−(A−H2) zatoshi, and for every multiple of three in that range the condition first holds 2,807,274 blocks after H3NU7, both figures computed by script. Hence

D=H3NU7+2,807,274,

about 2.2 years of 25-second blocks after the third halving: 7,305,222 on Testnet, as ZIP-259 records, and 16,026,474−2A on Mainnet, unassigned with A.

The additional subsidy uh, total block subsidy bh, and reserve update are

uh ={0,h<D,⌈f⁢Rh−1⌉,h≥D, (6)
bh =sh+uh,Rh=Rh−1−uh+dh. (7)

All amounts are integers in zatoshi. Reissuance uses the previous block’s reserve, so a removal in the current block cannot finance its own additional subsidy. Before D, removals accumulate without payout. After D, a positive reserve pays at least one zatoshi: because R is an integer and 0<f<1, one has 1≤⌈fR⌉≤R for R>0. The draft rejects a negative reserve; it does not silently clamp it to zero.

For a small exact example, take Rh−1=100,000,000 zatoshi (1 ZEC) and h≥D. The additional subsidy is ⌈13.75⌉=14 zatoshi. Without a new removal the reserve becomes 99,999,986; with a same-block removal of another 1 ZEC it becomes 199,999,986, but the current payout remains 14. Because no payout precedes D and dh≥0, the seed bounds the first payout from below: ⌈1375⋅36,858,445,520/1010⌉=5,069 zatoshi on Mainnet and 7,669 on Testnet. Fees removed between A and D raise it.

Why this preserves supply and halvings.

Transfers between ordinary value pools cancel in their total. A block increases that total by its subsidy and reduces it by its removals:

Vh−Vh−1=sh+uh−dh,(Vh+Rh)−(Vh−1+Rh−1)=sh.

The second identity follows by adding the reserve update; reissuance moves value between the two ledgers without creating a second copy. Scheduled issuance retains its halvings, with the reserve paying an additional amount on top. Funding streams, wherever active, take their prescribed fractions of the total subsidy bh, not only sh. The resulting subsidy depends on prior chain state as well as height.

Without integer rounding and new removals, the recurrence becomes Rh+j=(1−f)jRh, so keeping about half the reserve after L blocks requires f=1−2−1/L≈(ln2)/L. The draft implements an integer-scaled approximation with numerator 1375: (1−1375/1010)5,040,000≈0.50007. This is a half-life of the reserve without new contributions, not a new halving rule for the scheduled subsidy; small reserves depart from the smooth curve because every positive payout rounds up.