Zcash in Simplified Technical English

This page is the Simplified Technical English version of ZIP 223. The source ZIP is the normative text. Read the writing rules to understand the marked words.

ZIP 223: Reduce Block Target Spacing from 25 to 20 Seconds

ZIP: 223
Title: Reduce Block Target Spacing from 25 to 20 Seconds
Owners: Dev Ojha <dev@valargroup.dev>
        Evan Forbes <evan@valargroup.dev>
Status: Draft
Category: Consensus
Created: 2026-11-04
License: MIT
Discussions-To: <https://forum.zcashcommunity.com/t/proposal-lower-zcash-block-target-spacing-from-25s-to-20s/59035>

Terminology

On this page, STE words are in the place of the BCP 14 key words of the source. Refer to the key word table.

The terms "block chain", "consensus branch" and "network upgrade" have the meanings that are in ZIP 200 [zip-0200]. The character ยง is a reference to a section of the Zcash Protocol Specification [protocol].

Target block spacing
The target interval between blocks for the difficulty adjustment algorithm. The actual interval between blocks changes from block to block.
25-second baseline
The rules after NU7. These rules include the 25-second target block spacing of ZIP 218 and the subsidy definitions of ZIP 237. [zip-0218] [zip-0237]
Orphan block
A valid mined block that does not stay on the selected chain.
Orphan rate
The fraction of all mined blocks that become orphan blocks.
Reach 90%
The mean time from the solution of a block until 90% of the nodes verify the block.
MB
1,000,000 bytes.

Abstract

With this ZIP, the target block spacing decreases from 25 seconds to 20 seconds in a network upgrade after NU7. This ZIP has ZIP 218 as its base. The per-block shielded action limits and the global shielded budget of ZIP 218 decrease by 20%. The values for Orchard-protocol actions decrease from 330 to 264. The value for Sapling inputs and outputs decreases from 300 to 240. [zip-0218] [zip-0259] The block size limit does not change.

With this change, the expected wait for a first confirmation decreases by 20%. These values do not change:

The one exception is that there are 25% more block headers. This ZIP also has adjustments to these items for the new spacing:

With shorter inclusion intervals, more precise information about the timing of transactions can become visible.

Motivation

With a 20-second target, the expected wait for a first confirmation decreases by five seconds. The shielded action limits of ZIP 218 were selected to put a bound on two values [zip-0218]:

When those limits are scaled with the target block spacing, these bounds stay the same. Thus mobile wallets and other light wallets pay only for the additional block headers. This ZIP contains an evaluation of that incremental trade-off, relative to the baseline of ZIP 218.

Privacy Implications

Privacy effects of timing and of anchor depth are in ZIP 218 [zip-0218]. With shorter blocks, observers get more precise timing information. But the information that is visible in each shielded transaction stays the same.

The expected duration of a three-block anchor depth decreases from 75 seconds to 60 seconds. If a rollback goes past the anchor, the transaction becomes invalid. In a replacement transaction that spends the same notes, the same nullifiers are visible. Thus there is a link between the two transactions. Ordinary measurements of orphan blocks are not a bound on rollback depth.

With the smaller per-block action limits, the maximum shielded throughput per unit time stays the same. ZIP 218 has an observation about sustained demand for a pool [zip-0218]. In that condition, transactions can have delays because of the limits, and their timing can become easier to distinguish. This observation continues to apply.

Requirements

Specification

This section applies to the post-NU7 rules of ZIPs 218 and 237. [zip-0218] [zip-0237] Implementations must keep all pre-activation rules at heights below the new activation height.

Activation and target spacing

Define these constants:

\[\mathsf{TwentySecondActivationHeight} : \mathbb{N}\]

\[\mathsf{TwentySecondPoWTargetSpacing} : \mathbb{N} := 20 \text{ seconds}\]

\[\mathsf{TwentySecondSpacingRatio} : \mathbb{Q}_{>0} := 25/20 = 5/4\]

A separate deployment ZIP will contain the value of \(\mathsf{TwentySecondActivationHeight}\) for each network. This value must be strictly greater than the \(\mathsf{NU7ActivationHeight}\) of that network. All NU7 activation constants stay the same.

For a height \(h \in \mathbb{N}\) at or above this activation height, define:

\[\mathsf{PoWTargetSpacing}(h) := \mathsf{TwentySecondPoWTargetSpacing}.\]

For \(h < \mathsf{TwentySecondActivationHeight}\), keep the definition of \(\mathsf{PoWTargetSpacing}\) from ZIP 218. This includes \(\mathsf{PostNU7PoWTargetSpacing}\): it stays 25 seconds.

Difficulty averaging window

After activation, the averaging window of the difficulty adjustment algorithm (DAA) is 128 blocks. This window is in the place of the 102-block window of ZIP 218. With the larger number of blocks, the expected averaging duration stays approximately the same at the shorter target block spacing.

Define:

\[\mathsf{TwentySecondPoWAveragingWindow} : \mathbb{N} := 128.\]

For \(h \geq \mathsf{TwentySecondActivationHeight}\), define:

\[\mathsf{PoWAveragingWindow}(h) := \mathsf{TwentySecondPoWAveragingWindow}.\]

For \(h < \mathsf{TwentySecondActivationHeight}\), keep the averaging window of ZIP 218. This includes the window of 102 blocks after NU7 activation. In the difficulty algorithm, each use of this function has the height of the block under consideration as its input.

When the lookback of the averaging window goes across the activation height, the window includes pre-activation blocks. Implementations must not reset the window at activation. Thus these inputs apply to the difficulty formulas of ZIP 218:

  • A 128-block lookback for \(\mathsf{MeanTarget}(h)\).
  • \(\mathsf{ActualTimespan}(h) = \mathsf{MedianTime}(h) - \mathsf{MedianTime}(h-128)\).
  • \(\mathsf{AveragingWindowTimespan}(h) = 128\times20 = 2{,}560\) seconds.

These items stay the same:

  • The median-time span.
  • The damping factor.
  • The adjustment bounds.
  • The proof-of-work limit.

Implementations must apply the existing difficulty algorithm with these height-dependent inputs from the activation block. There is no separate difficulty reset.

Halving interval and scheduled subsidy

Define:

\[\mathsf{TwentySecondHalvingInterval} : \mathbb{N} := \mathsf{PostNU7HalvingInterval}\cdot 5/4 = 6{,}300{,}000.\]

For the formula that follows, let:

  • \(A_{20} = \mathsf{TwentySecondActivationHeight}\)
  • \(A_7 = \mathsf{NU7ActivationHeight}\)
  • \(A_B = \mathsf{BlossomActivationHeight}\)

These are nonnegative integer heights. For \(h \geq A_{20}\), define:

\[\mathsf{Halving}(h) := \left\lfloor \frac{A_B-\mathsf{SlowStartShift}}{840{,}000} +\frac{A_7-A_B}{1{,}680{,}000} +\frac{A_{20}-A_7}{5{,}040{,}000} +\frac{h-A_{20}}{6{,}300{,}000} \right\rfloor.\]

The denominators are the halving intervals of these periods, in this sequence:

  1. Pre-Blossom.
  2. Post-Blossom.
  3. Post-NU7.
  4. 20-second.

For \(h < A_{20}\), keep the halving function of ZIP 218, with its slow-start cases. Implementations must keep the fractional progress through the halving interval at activation. They must not restart an interval at \(A_{20}\).

For \(h \geq A_{20}\), replace the scheduled subsidy of ZIP 237 with this formula:

\[\mathsf{ScheduledBlockSubsidy}(h) := \left\lfloor \frac{\mathsf{MaxBlockSubsidy}}{2\cdot3\cdot(5/4)\cdot 2^{\mathsf{Halving}(h)}} \right\rfloor.\]

The factors are these spacing ratios:

  • 2 is the Blossom spacing ratio.
  • 3 is the NU7 spacing ratio.
  • \(5/4\) is the 20-second spacing ratio.

The result is a nonnegative integer number of zatoshi. Implementations must use the exact rational ratio \(5/4\) and apply the floor only to the complete expression. If an already-rounded 25-second subsidy is multiplied by \(4/5\), the result can be different.

For example, at halving index 3 the scheduled subsidy changes from 26,041,666 zatoshi to 20,833,333 zatoshi. The floor of \(26{,}041{,}666\times4/5\) is 20,833,332 zatoshi. This result is incorrect.

Integration with ZIP 237

For \(h \geq A_{20}\), change the definition of \(\mathsf{HalvingInterval}(h)\) in ZIP 237 so that its value is \(\mathsf{TwentySecondHalvingInterval}\). For \(h<A_{20}\), keep its earlier cases. Then the existing fraction formula of ZIP 237 has this result:

\[\mathsf{BLOCK\_SUBSIDY\_FRACTION}(h) = \frac{\lfloor 6{,}931{,}680{,}000 / 6{,}300{,}000\rfloor}{10^{10}} = \frac{1100}{10^{10}}.\]

Keep this definition from ZIP 237:

\[\mathsf{BlockSubsidy}(h) := \mathsf{ScheduledBlockSubsidy}(h) + \mathsf{AdditionalBlockSubsidy}(h).\]

Implementations must carry the existing NSM Value Balance through activation. They must not reseed it or recalculate historical balances under the new spacing. The additional-subsidy ceiling and the balance-update rules of ZIP 237 continue to apply.

Open specification item: Define the NSM reissuance trigger for an activation before reissuance starts. The fixed trigger heights of ZIP 259 are based on the 25-second issuance curve. The amended trigger must be based on the 20-second curve and reissuance fraction. Its reference reserve must be based on the cumulative scheduled issuance through \(h-1\), with the integer rounding of each historical era. If reissuance starts before this network upgrade, keep that activated state.

Shielded pool action limits

Define these constants:

\[\mathsf{TwentySecondGlobalShieldedBudget} : \mathbb{N} := 264\]

\[\mathsf{TwentySecondOrchardProtocolBlockActionLimit} : \mathbb{N} := 264\]

\[\mathsf{TwentySecondSaplingBlockIOLimit} : \mathbb{N} := 240\]

Each value is the corresponding constant of ZIP 218 multiplied by \(4/5\) [zip-0218]. For all three constants, this multiplication is exact.

For each block at height \(h \geq A_{20}\), the per-pool limits and the global shielded budget of ZIP 218 must be enforced with these replacements:

  • \(\mathsf{TwentySecondGlobalShieldedBudget}\) in the place of \(\mathsf{GlobalShieldedBudget}\).
  • \(\mathsf{TwentySecondOrchardProtocolBlockActionLimit}\) in the place of \(\mathsf{OrchardProtocolBlockActionLimit}\).
  • \(\mathsf{TwentySecondSaplingBlockIOLimit}\) in the place of \(\mathsf{SaplingBlockIOLimit}\).

That is:

  • \(\sum_{\mathit{tx} \in \mathit{block}} \mathit{nActionsOrchard}(\mathit{tx}) \leq 264\);
  • \(\sum_{\mathit{tx} \in \mathit{block}} \mathit{nActionsIronwood}(\mathit{tx}) \leq 264\);
  • \(\sum_{\mathit{tx} \in \mathit{block}} (\mathit{nSpendsSapling}(\mathit{tx}) + \mathit{nOutputsSapling}(\mathit{tx})) \leq 240\);
  • the shielded cost of the block (with the definition of ZIP 218) is a maximum of 264.

These items do not change:

  • The definition of shielded cost.
  • The per-pool structure of the limits.
  • The 2 MB block size limit.

For blocks at heights \(h < A_{20}\), the limits of ZIP 218 continue to apply. These limits are 330, 330 and 300.

Transactions exceeding a block limit at activation

A transaction cannot be included in any block at a height \(h \geq A_{20}\) if the transaction alone is outside any of these limits. This includes transactions that are inside the limits of ZIP 218, for example a transaction with 300 Orchard actions.

If the candidate next block has a height at or above \(A_{20}\), we recommend that nodes do not admit such a transaction to their mempool. In that condition, we recommend that nodes also do not relay it. We recommend that nodes remove such transactions from their mempool when the height of the candidate next block reaches \(A_{20}\). We recommend that wallets do not create such a transaction for a target height at or above \(A_{20}\).

Minimum difficulty blocks on Testnet

Keep the threshold of \(18 \cdot \mathsf{PoWTargetSpacing}(h)\) seconds from ZIP 218, and evaluate it with the new spacing. Thus, at and after \(A_{20}\), the threshold is \(18 \times 20 = 360\) seconds, and not the 450 seconds of ZIP 218. The minimum-difficulty exception applies to a block only if its timestamp is strictly more than this threshold after the timestamp of the previous block. Thus the exception does not apply after a gap of 360 seconds, but it applies after a gap of 361 seconds. In that case, the nBits value of the block must be equal to \(\mathsf{ToCompact}(\mathsf{PoWLimit})\), as in ZIP 218. This rule has no effect on Mainnet.

The existing timestamp-validity bounds and local-clock tolerances stay the same. Those rules continue to apply to the Testnet minimum-difficulty exception.

Non-consensus node behaviour

When implementations convert a height range to an expected elapsed time, we recommend that they use the target block spacing that applies to each block. The expected time from an accepted tip at height \(a\) to height \(b>a\) is \(\sum_{h=a+1}^{b} \mathsf{PoWTargetSpacing}(h)\). This sum includes the new spacing for the activation block. For policies that are defined as elapsed durations, we recommend that those durations stay the same across activation.

Transaction expiry

We recommend that wallets increase the default expiry delta from 120 blocks to 150 blocks. Select the default from the target height of the transaction. The target height is the next block height after the chain tip. Use 150 when that height is at or above \(A_{20}\). If not, keep the previous default. Calculate the expiry height relative to the target height, as specified in ZIP 218.

We recommend that wallets keep an explicit user-configured delta across activation.

Block-count-based defaults

We recommend that implementations use these post-activation defaults if they expose the corresponding settings. In the table, the duration-based values are the values of ZIP 218 multiplied by \(5/4\). Larger rollback windows are also conformant.

Constant25-second baseline20-second recommendation
MAX_REORG_LENGTHAt least 600At least 750
MAX_BLOCKS_IN_TRANSIT_PER_PEER4860
BLOCK_DOWNLOAD_WINDOW30723840
MIN_BLOCKS_TO_KEEP8641080

The consensus coinbase maturity stays at 100 blocks. With this ZIP, TX_EXPIRING_SOON_THRESHOLD stays at 3 and NETWORK_UPGRADE_PEER_PREFERENCE_BLOCK_PERIOD stays at 1728, as in ZIP 218.

Anchor selection depth

We recommend that wallets keep the recommended anchor depth of 3 blocks from ZIP 315. [zip-0315] The expected duration of this depth changes from 75 seconds to 60 seconds.

Rationale

Capacity and resource costs

The shielded action limits of ZIP 218 were selected for one purpose. With these limits, the worst-case sync bandwidth of light wallets does not increase relative to the pre-NU7 protocol. [zip-0218] If those per-block limits stay the same at 20 seconds, the maximum number of shielded actions per day increases by 25%. In that condition, the worst-case compact sync bandwidth and the trial decryptions also increase by 25%.

Instead, in this ZIP, the limits are multiplied by \(4/5\). Thus the daily maximum values stay the same. All three ZIP 218 values are multiples of 5, thus rounding is not necessary.

The table that follows is based on the compact-field model of ZIP 218, with \(86{,}400/20 = 4{,}320\) blocks per day. This model does not include serialization overhead and transport overhead.

Metric25-second baseline20-second proposal
Blocks per day3,4564,320
Max Orchard + Ironwood actions/block330264
Max Sapling IOs/block300240
Max Orchard + Ironwood actions/day1,140,4801,140,480
Orchard or Ironwood compact BW/day168.79 MB168.79 MB
Sapling compact BW/day120.27 MB120.27 MB
Compact block headers/day0.31 MB0.39 MB
Worst-case total BW/day169.10 MB169.18 MB
Worst-case trial decrypts/day~2.3M~2.3M

The binding constraint continues to be a block that is full of Orchard or Ironwood actions: \(264 \times 148 \times 4{,}320 + 90 \times 4{,}320 = 169.18\textsf{ MB/day}\). The only increase is from the 25% more compact block headers. This increase is approximately 78 kB per day. In the trial decryption count, both internal and external incoming viewing keys are counted, as in ZIP 218. This count is \(2 \times 264 \times 4{,}320 = 2{,}280{,}960\) per account per day, the same as in ZIP 218.

These figures are the worst-case compact sync bandwidth for blocks that are full to the shielded action budget. They are not a daily download requirement for every wallet.

The maximum shielded throughput also stays the same. The limit for two-action Orchard or Ironwood transactions stays at \(\lfloor 264/2 \rfloor / 20 = 6.6\) transactions per second. The limit for four-IO Sapling transactions stays at \(\lfloor 240/4 \rfloor / 20 = 3.0\) transactions per second. These limits are the same as in ZIP 218. The benefit of this ZIP is lower latency, and not more shielded capacity.

The worst-case shielded verification work per block decreases by 20%. But the worst-case shielded verification work per unit time stays approximately the same. With batch verification, some cost is shared across a block. Thus the verification of slightly smaller blocks can be somewhat less efficient per action. Fixed per-block costs increase by 25% per unit time. Examples of these costs are:

  • Header validation.
  • Chain state updates.
  • Propagation round trips.

To sync the blocks that were produced during a given time offline, it is necessary to process 25% more headers.

The 2 MB block size limit stays the same. Thus the maximum transparent data per unit time increases by 25%. This increase has an effect on the bandwidth and the storage of full nodes. It has no effect on light wallets that download only compact blocks.

Orphan blocks and effective propagation time

For ZIP 218, orphan rates were measured on a distributed test network with full 2 MB blocks. [zip-0218] [propagation-report] We repeat that method with 80 miners of equal hash rate in 12 regions:

  • New York
  • San Francisco
  • Toronto
  • London
  • Amsterdam
  • Frankfurt
  • Bangalore
  • Singapore
  • Sydney

Each test block contains two-action Ironwood transactions to the action limit of ZIP 218. The remaining space of the block, to a size of 2 MB, contains transparent transactions.

With Zakura on all nodes, full blocks had these orphan rates:

SpacingOrphan / mined blocksOrphan rate (95% interval)Reach 90%
25 s7 / 3561.97% (0.96โ€“4.00%)0.81 s
20 s11 / 3892.83% (1.59โ€“4.99%)0.69 s

On the devnet of ZIP 218, the measured orphan rate was 4.86% at 25 seconds. The 20-second blocks had a mean of 245 Ironwood actions. The proposed limit is 264. Zakura announced each block to 32 peers immediately, and to the other peers after 500 ms.

To check the test network against Mainnet, we also ran a mixed network at 25 seconds. This network had these nodes:

  • 56 Zakura nodes with the block announcement settings of Zakura 1.8.5.
  • 24 Zebra 7.0.0 nodes.

We selected the current release of each implementation. We also selected a Zebra share that is higher than the Zebra share on Mainnet. On Mainnet, Zebra nodes mined approximately 17% of recent blocks. In ZIP 218, the model of the orphan rate is \(0.55 \times\) reach 90% \(/ T\). With small blocks, the test network agrees with the model and with Mainnet:

NetworkMean block sizeOrphan rateZIP 218 model
Mixed test network66 kB0.66% (2 / 303)0.87%
Mainnet, since the NU7 activation day18 kB0.60โ€“0.86%
Mixed test network2 MB3.78% (13 / 344)3.7%

The Mainnet rates are from two observers. These rates are lower bounds. [zecminer-orphans]

With full blocks, the mixed network had nearly twice the orphan rate of the Zakura-only network at 25 seconds. Part of that difference is because of a behavior of Zakura 1.8.5: it announces each block to every peer at the same time. A change to this behavior in Zakura is in progress.

In our runs with Zebra Andale, we found two other causes. Zebra relays a verified block to a third of its peers. Zebra takes 19 ms to deserialize a 2 MB block, and Zakura takes 2.5 ms.

Before full blocks are common, it is necessary for other node implementations to have these relay optimizations. An important example is Zebra Andale.

Difficulty averaging duration

The 102-block window of ZIP 218 at 25 seconds has an expected duration of 2,550 seconds. The equivalent count at 20 seconds is 127.5 blocks. In this ZIP, this count is rounded up to 128 blocks. The duration is then 2,560 seconds, approximately 0.39% longer.

In this ZIP, the averaging duration stays the same because the mining hash rate can change. If that duration decreases, two items change: the target block spacing, and also the response of the DAA to changes in hash rate.

Issuance and schedule continuity

With the change of the interval, the expected duration of the interval stays the same:

\[6{,}300{,}000\times20=5{,}040{,}000\times25\text{ seconds}.\]

In the halving formula, the progress through the 25-second era is kept. If the unrounded scheduled subsidy is multiplied by \(4/5\), the expected issuance rate before rounding stays the same. Because of integer rounding, the realized schedule is different.

The NSM fraction changes from \(1375/10^{10}\) to \(1100/10^{10}\). This is also a factor of \(4/5\). ZIP 237 has a ceiling and an evolving balance. Because of these, the factor of \(4/5\) is not proof that reissuance per unit of wall-clock time is exactly equal.

Open specification item:

  • Change the funding-stream end heights and the address period calculations in ZIPs 207 and 214 for a second spacing transition. [zip-0207] [zip-0214]
  • Keep the fractional progress through the active address period.
  • Define the integer-boundary rounding.
  • Keep ended streams ended.
  • Make sure that the recipient lists cover every extended period.

For this item, the deployment height and the schedule amendments must be settled together. A retroactive change to NU7 constants is invalid.

Deployment

Deploy this ZIP in a separate network upgrade after NU7. The deployment of NU7 is in ZIP 259. This ZIP is not a replacement for that deployment. [zip-0259] A separate deployment ZIP will contain the activation heights and the consensus branch IDs of this network upgrade.

Before the status of this ZIP changes to Proposed, resolve the specification items for funding streams and for NSM reissuance heights. Complete the analysis of activation and rounding against the selected deployment parameters.

References

[BCP14]
Information on BCP 14
[protocol]
Zcash Protocol Specification
[zip-0200]
ZIP 200: Network Upgrade Mechanism
[zip-0207]
ZIP 207: Funding Streams
[zip-0214]
ZIP 214: Consensus rules for a Zcash Development Fund
[zip-0218]
ZIP 218: 25-second Block Target Spacing
[zip-0237]
ZIP 237: Network Sustainability Mechanism: Halving-Preserving Issuance
[zip-0259]
ZIP 259: Deployment of the NU7 Network Upgrade
[zip-0315]
ZIP 315: Best Practices for Wallet Implementations
[propagation-report]
Zcash Block Time Reduction Appears Safe for NU7 w/ Zebra Only Devnet
[zecminer-orphans]
ZecMiner network orphan watcher