Release: Zakura 1.9.0


We have released Zakura 1.9.0, one of our largest single releases. It prepares for the Mainnet deployment of P2Pv2, improves orphan rates following activation of NU7, and several other performance improvements for the Zcash network.
- P2Pv2 is coming. We've landed various improvements for P2Pv2 and legacy P2P. We have new mempool, handshake and QUIC implementations. (Our new handshakes are post-quantum!) We also added settings that keep an operator's own nodes connected and exempt from bans, and settings to advertise your node ID if you're a miner. Restarted nodes get their peers back.
- Orphan rates are dropping, again. We've landed numerous optimizations: block announcements gossip far faster to peers (removing 12s of relay delay in many common cases), new blocks validate and commit faster, and miners get block templates sooner.
- Sprout verification is optional. NU7 has activated, so there aren't new Sprout transactions to verify.
Every earlier release halts in about a week, so we recommend that all node operators update now. This post describes everything that has changed since 1.8.0, including the changes that shipped in 1.8.x releases.
This release migrates the node's database on first start, and most operators don't need to do anything. Transaction history moves out of RocksDB into append-only files in the background while the node follows the chain tip. The only requirement is free disk space: about 11 GB on a Mainnet archive node, which is the default. Read Transaction Storage before updating if you back up the node with RocksDB checkpoints or hard links, run read-only RPC secondaries, or may need to go back to an earlier release.
Faster Block Relay
After NU7 activated and block spacing fell to 25 seconds, we measured relayed blocks leaving a Zakura node in 3-second steps: some peers heard about a block as soon as the node committed it, others 3, 6, 9, or 12 seconds later. On a Mainnet node with about 280 peers the mean delay was about 7 seconds, more than a quarter of the block interval.
The cause was the announcement pacing we added in 1.7.0. Each block was announced to a limited window of peers, and a peer gave up its place only once it had downloaded the block or 3 seconds had passed. Near the chain tip most peers already have the block and never request it, so they held their places for the full 3 seconds while everyone else waited.
Announcements are now scheduled when the broadcast starts and do not depend on what other peers do. The first group of peers hears immediately: 64 peers for blocks up to 100 KiB, falling to 32 for blocks of 1.5 MiB and larger. Every other peer hears 500 ms later, which gives the first group time to pass the block on, so fewer of the remaining peers download it from the same node. Our 80-node stressnet ran this schedule when it measured a 1.97% orphan rate mining full 2 MB blocks every 25 seconds.
The related changes:
- Mined blocks reach the first peers without a request. Peers that hear a block announcement spend a round trip requesting the block. Mining nodes now send a new block along with its announcement to the peers in the first group that also run 1.9.0, which saves that round trip on the first hop. Other peers, including Zebra and zcashd nodes, are announced to as before. Relays can push the blocks they forward with
network.push_relayed_blocks, which is off by default because it sends a full copy to peers that may already have the block. - Relayed blocks go to the nearest peers first. They are now announced in order of measured round-trip time, as locally mined blocks already were, with every fourth announcement going to a random peer. Peers that announced the block to us are skipped.
- Blocks are announced the moment they are committed. Every tip change previously waited about 1 ms for a possible locally submitted block, at every relay hop. Mined blocks are announced directly from the committed state, without waiting for the submitting RPC call to resume.
- Legacy connections send each message immediately. Nagle's algorithm was holding small messages back by up to about 40 ms whenever both nodes were sending to each other. Between two hosts with an 82 ms round trip, a node that learned of a block over a new connection built a template on it in 515 ms instead of 1,109 ms.
- One slow peer no longer delays transaction gossip. Each batch of transaction announcements waited for every peer in the previous batch to finish, which could add up to 6 seconds per hop.
- Nodes can ask a second peer for a block. Nodes request a new block from the first peer that announces it. For a node in Singapore that peer is almost always in North America or Europe, and a closer peer usually announces the same block tens of milliseconds later. With
[network.block_download_score_and_hedge]enabled, the node tracks how quickly each legacy peer answers, asks the announcer it expects to answer soonest, and sends one backup request when another announcer should deliver sooner or the first request stalls. Over about 200 Mainnet blocks, the median time for a Singapore node to receive a new block fell from 358 ms to 137 ms. The option is off by default. - New connections can be warmed up for full blocks. With
network.tcp_warmup.enabled, the node sends each new legacy peer two padded pings, 2.4 MB in all, so that TCP can grow the connection's send window before a block needs it. The option is off by default and needsnet.ipv4.tcp_slow_start_after_idle = 0. - The schedule is configurable. The new
[network]settingsadvert_window_small_block,advert_window_full_block, andadvert_delayset the two group sizes and the delay.
Faster Block Validation
This release includes the work we previewed in the 1.8.0 announcement and goes further:
- Committing a mined block takes up to 52% less time. When a pool validates a block template as a proposal, the node builds the chain state that follows the block. Committing the mined block now reuses that state instead of building it again. In our benchmarks, a 1.9 MB transparent block commits in 42 ms instead of 87 ms, and a mixed one in 32 ms instead of 54 ms.
- Busy transparent addresses no longer slow every commit. Committing a block copied the full output history of each transparent address it paid, a cost that grew with the chain for mining, pool payout, and exchange addresses. Histories are now shared between chain snapshots. In our benchmarks this cut the time to build new work after the node's own block from 4.3 ms to 1.8 ms, and after a peer's block on a settled connection from 10.4 ms to 5.3 ms, the two measurements where Zebra Ándale led in our 1.8.0 comparison. Ándale made the same change.
- Blocks with many transparent inputs verify faster. Verification now reads each spent output once instead of twice: in a replay of 32,860 consecutive Mainnet blocks, the blocks with 256 or more transparent inputs took 4.36 seconds in total, down from 9.10. It also skips signature-hash digests that only shielded or v5 transactions use, and starts its parallel script checks sooner.
- Mixed blocks verify their proofs alongside the transparent checks. Shielded transactions are dispatched first, and partially filled proof batches flush as soon as the block's shielded transactions are queued instead of after every transaction has started. New 250 kB mixed blocks verify in about 27% less time. Orchard proofs are also verified in batches of up to 128 actions instead of 64, which verifies new 1.9 MB Orchard blocks in about 11% less time.
- Decoding shielded blocks does less curve arithmetic. Each Sapling spend's
rkis decompressed once instead of twice. Decoding a 2 MB block with as many shielded components as NU7 allows takes 9.5 ms instead of 14.3 ms on x86-64. Orchard action points are also decompressed in batches, and Sapling point checks batch their field inversions. - Output-heavy blocks use far less memory. In a stress test of blocks with 60,000 transparent outputs each, peak memory fell from 6.0 GB to 1.7 GB, and adding the blocks to the chain took 2.2 seconds instead of 8.2.
- Each new block costs a node at the chain tip less CPU. Copying the in-memory chains for a new block no longer visits every block and index partition: on a Mainnet node, the thread that saves blocks spent 2.1 ms of CPU per block, down from 3.9 ms. That thread also no longer re-reads recent headers from the database when it already holds them in memory.
- The Common libraries are updated to 5.4.0, with faster Orchard and Halo 2 proof verification, RedPallas signature verification, point decompression, and multiscalar multiplication.
Mining & Mempool
- Long polls answer a new tip immediately. One mining pool reported a block where the
getblocktemplatelong poll did not wake them before their own tip probe saw the block. Long polls sent with an older tip's ID were waiting for the mempool to catch up and for a full template; they now get coinbase-only work on the new tip right away. Over eight hours on Mainnet, the 99th percentile for these answers fell from 75 ms to 6 ms. - Block backups no longer compete with template building. The on-disk backup of recent blocks rewrote a block's file once for every extra chain that held it, so with side chains present a node rewrote hundreds of files each time a block arrived, just as miners ask for new work. On a Mainnet node this took about half of the CPU the node used around each new block. With the fix, the median time from a new block to a full template fell from about 1.3 ms to 0.7 ms.
- Pool relays can pass on a block before they validate it. Pools that submit a solved block to several of their own nodes waited for each node to repeat validation before it relayed the block. The new
/submittrustedblockendpoint, enabled withrpc.enable_trusted_block_submission, makes the block available to peers first; the relay still validates it before accepting it into its own chain. Miners can also upload the unsolved block while mining and send only the solved header afterwards. On three geographically distributed test relays, a 1.92 MB block prepared this way reached a peer a median of 55 ms sooner than one sent as a proposal. Submit only blocks that a full node you trust has validated, because peers can ban a relay that sends an invalid block. - Mining pools can peer with each other directly. With
mining.miner_mesh, which is off by default, a pool's block templates name its node in the coinbase, or a public relay listed inmining.miner_mesh_gatewayswhen the node that builds templates is private. Mining nodes on our experimental P2Pv2 stack count the nodes named in the last two days of blocks and keep connections to as many as ten of the most active, in addition to their ordinary peers. The newgetminermeshinfoRPC reports what a node has counted and connected to. - Equal-work ties break by announcement order. Since 1.7.0 a node stays on whichever of two equal-work tips it received first, which let a small block overtake a larger one that was announced earlier. Blocks now keep their place from the moment a peer announces them, as long as the block itself arrives within 2 seconds. Nodes still prefer a block they mined themselves. This changes which tip a node mines on, not consensus.
- Template transaction selection is deterministic.
getblocktemplatenow selects transactions by ancestor-package fee per cost instead of by weighted random draw. The same mempool always produces the same template, a high-fee child can bring its parents in with it, and low-fee transactions are included last instead of getting a random chance. Selection stops after 1,000 packages in a row do not fit, which can leave space unused. This departs from ZIP 317's block production algorithm; it changes mining policy, not consensus. - Templates pick up new transactions sooner. Long polls check the mempool every 2 seconds instead of every 5, and templates paid to a transparent address are built without a hand-off to another thread. Mempool cleanup after each block finds mined, conflicting, and expired transactions through indexes instead of scanning the pool.
- Transactions are requested from a peer that has them. When every peer that had announced a transaction was busy, the node asked another peer, which usually had not seen the transaction yet and answered
notfound, and the download failed. Requests now wait up to 2 seconds for one of the announcing peers. - Mining RPCs spend less time on encoding. Block and transaction hex goes through a SIMD codec, and request bodies are parsed once. For a 2 MB block on x86-64, encoding a template's transactions takes about 2 ms instead of 7, and decoding a
submitblockrequest 0.6 ms instead of 2. getstandardfeerecommends 1,000 zatoshis per logical action, up from 400. Wallets that use it will pay more. The fee the mempool accepts is unchanged at 400.
Peer Connections
Nodes that restart redial their old peers about half a minute later, but full listeners give a freed seat to the next dialer within seconds. Across ten Mainnet restarts on November 14, only 179 of the 546 peers our nodes had dialed were back within three minutes, and 286 of the 367 that were lost were full listeners that had given the seat away. Both ends of a connection now help restore it:
- Listeners hold a seat for a peer that restarts. When an inbound peer that was connected for two hours disconnects, the listener reserves its seat for that IP address for three minutes. At most a tenth of the inbound limit is held at once.
- Nodes redial the peers they just lost. For five minutes after an outbound connection that lasted at least ten minutes ends, the node dials that peer ahead of other candidates, so a restarted listener gets back the peers that had dialed it.
- Startup connects to peers faster. The node starts up to 50 connection attempts at once instead of spacing them 100 ms apart; on a Mainnet node, the network stage of startup fell from about 12.7 seconds to 6 seconds or less. The peer cache keeps only peers that answered within the last three hours, and a restarted node dials it when every seed DNS lookup fails instead of retrying DNS forever.
network.unconditional_peerskeeps your own nodes connected. Peers listed in this new setting are never scored or banned, so tip lag or a bug cannot get an operator's own nodes, miners, or sidecars banned. Entries that name a single address or a DNS name are dialed and redialed whenever no connection to them is open, with connection slots reserved beyond the normal limits. DNS names can be pinned to a node ID, which requiresnetwork.p2p_stack = "dual", so that a changed DNS answer earns no exemption. Only list peers you trust.- Pruned nodes can be found again. Pruned nodes did not advertise
NODE_NETWORK, and Zakura, Zebra, and zcashd dial only addresses that do, so pruned nodes were never discovered or reconnected to. They advertise it again, along with an experimentalNODE_PRUNEDflag that updated nodes use to prefer other peers while still syncing. Older nodes ignore the flag and may ask a pruned node for a block it has deleted, which it answers withnotfound.
P2Pv2 Improvements
Our experimental P2Pv2 stack now has a post-quantum handshake. Peers agree on session keys with X25519MLKEM1024, a hybrid of X25519 and ML-KEM-1024, so traffic recorded today stays secret from a later quantum computer. Each handshake is signed with both Ed25519 and ML-DSA-65 and accepted only when both signatures verify, and discovery records carry both signatures too. Handshakes still complete in one round trip.
Every node's ID changes, because an ID now commits to both of the node's public keys. Key files stay the same, and zakurad replaces the old IDs of the built-in seeds at startup and rewrites them in the config file. Any other zakura.bootstrap_peers entry, and any node ID pinned in network.unconditional_peers, needs the peer's new ID, which each node prints when it starts. The native protocol version advances, so 1.9.0 reaches earlier releases only over the legacy Zcash protocol, and a node that runs only P2Pv2 loses its peers on earlier releases until they update. Later releases can add a signature key without another break: a node that gains a key still answers to the ID it had before.
This release also extends the resource budgets the stack gained in 1.7.0 and fixes several ways a peer could hold more than its share:
- Every stream kind has its own memory share on each connection. When a stream kind's consumers fall behind, the node pauses that kind's readers or senders on that connection instead of holding more memory. No budget spans connections, so one peer's traffic cannot pause another's. Frames the node has read but still holds count against the peer's QUIC receive window.
- Generated configs need a larger
peer_memory_budget_bytes. Each connection's budget now includes those receive shares, so the default rises from 8 GiB to 17 GiB, which admits 92 ordinary connections and ten more held for mining gateways.zakurad generatewrote the old 8 GiB value into config files, where it now admits 42 P2Pv2 connections, and a budget of 4 GiB or less stops a node that runs P2Pv2 from starting. Raise the value to at least 17 GiB, or delete the line to use the default. - Inbound peers cannot crowd out the node's own dials. Peers that dial in hold at most three quarters of the connection and handshake slots, and each global IPv6 /64 counts as one host toward the per-IP limits.
- Handshake attempts are rate limited. Inbound handshakes share a node-wide rate of 24 starts a second, with part of it held back for addresses that have not used their own share, so a few busy addresses cannot shut the rest out. Each handshake must finish within 10 seconds, and a slow peer now loses only the stalled session instead of its whole connection.
- New tips are announced within about a second, instead of waiting up to 30 seconds for the next status message. On a three-node test network, blocks reached P2Pv2 peers 0.2 to 0.6 seconds after they were mined instead of 24 to 25 seconds.
- Nodes remember their P2Pv2 peers across restarts. The discovery book lived only in memory, so a restarted node began again from its bootstrap peers. It is now saved every five minutes and at shutdown, and every saved record is verified again when it is loaded. The file follows
network.cache_dir. - Header sync and discovery close more gaps. Header sync keeps a peer's penalties when the peer replaces its session or reconnects, bounds the state it holds per peer identity, and no longer shuts the node down over a storage job that had already finished. It also takes equal offers in the order they arrive, so peers that reconnect under new keys or overstate their chain work cannot keep an honest peer's headers from being requested. Discovery confirms only the addresses it has authenticated, and a backward clock step across a restart no longer leaves peers dialing the node's previous addresses.
- Nodes that run P2Pv2 use a new mempool. Legacy transaction gossip has no byte-rate limits and no per-peer request caps.
tx-relay, a new P2Pv2 service, limits transaction announcements by size, serves a peer only the transactions it was told about, and feeds a new mempool built for it. Under a transaction flood from 92 peers in our load tests, legacy gossip delivered 8 of about 1,470 block announcements; withtx-relay, none were dropped. Testnet and Regtest nodes run both stacks by default and switch to the new mempool, while Mainnet nodes keep the existing one unless they enable P2Pv2. Setting[mempool] implementation = "classic"restores it. - BPv1 block propagation can be switched on. Blocks travel between nodes as whole bodies, and each relay waits for the full body before forwarding it. With
[network.zakura.bpv1] enabled = true, a miner commits to an erasure-coded form of its block in the coinbase, and nodes forward each part of at most 64 KiB as soon as they have verified it. BPv1 is off by default, and nodes without it behave as before.
Transaction Storage
Finalized transaction bodies make up about 95% of an archive node's state and never change, but they were stored in RocksDB, which rewrites its data as it compacts. They now move into append-only static files in the state directory, as in Reth. In a benchmark sync of about 120,000 Mainnet blocks, the node wrote 24% fewer bytes per block and RocksDB stalled writes 18 times instead of 129, in the same total time.
The state database format advances to 32.0.0. The first start upgrades an existing database in place and then moves its history in the background while the node follows the chain tip; a full Mainnet archive took 40 minutes. What changes for operators:
- Leave about 11 GB free on a Mainnet archive node. Archive is the default storage mode. The static files sit beside the old RocksDB data until RocksDB frees it; pruned nodes move only the blocks they retain, so they need less. If a write fails, for example on a full disk, the move stops and nothing is lost. Free some space and restart
zakuradto resume it. - Earlier releases cannot open an upgraded database. Older
zakuradbinaries do not see it, and they start a fresh sync from genesis beside it. Going back without that sync takes a backup made before the upgrade. - Backups must include the
static_filesdirectory. RocksDB checkpoints no longer hold finalized transaction bodies. Copy the whole state directory withzakuradstopped, or take a filesystem snapshot, and do not hard link static files into a restore. Read-only RPC secondaries must be upgraded together with their primary and stopped aroundzakurad rollback-state. - Former archive nodes stop serving pruned transactions. Pruned nodes that started as archive nodes kept serving old transactions below their pruning height. After the first move they treat those transactions as pruned.
Sprout Verification Is Optional
NU7 no longer permits Sprout JoinSplits, so the Sprout verifier is needed only to fully verify pre-NU7 blocks above the last checkpoint, and the bundled Mainnet and Testnet checkpoints now extend past NU7. Default and release builds therefore leave out Sprout JoinSplit proof and signature verification and no longer build the Sprout note commitment tree. They still sync both networks from genesis. Building with --features sprout restores the verifier; without it, a node that is asked to verify a pre-NU7 JoinSplit stalls instead of forking. The mempool also rejects JoinSplits by policy. Once a build without sprout has skipped a block's Sprout commitments, a build with sprout refuses to open that database until its tip is past NU7 and the last checkpoint.
Security
- Oversized blocks and transactions are rejected before they are parsed. Anything larger than the 2,000,000-byte block size limit, from a peer or an RPC request, is refused up front. This does not change which blocks are valid.
- Chain-ineligible transactions no longer reach the proof verifiers. The mempool rejects transactions with unknown shielded anchors or already-spent nullifiers before submitting their proofs to the verifiers it shares with block validation.
- Misbehaving peers are banned as soon as their score reaches the threshold. Reports on the legacy stack were batched for up to five seconds and could be dropped while the address book was busy, so some misbehaving peers were never banned. Scores now add up per IP address across ports.
- Peers cannot inflate the metrics page. The
errorlabel ofzakura.net.in.errorsand thereasonlabel ofmempool.failed.verify.tasks.totalnow name an error kind instead of the full message, andzcash.net.peers.cachedrops itsremote_iplabel; update dashboards and alerts that match on them. The metrics endpoint also serves at most 16 connections at once and closes idle ones, so silent clients cannot exhaust the node's file descriptors. - Requests and replies have tighter limits. Replies to
getblocksfrom legacy peers keep at most 500 block hashes instead of up to 50,000, the indexer gRPC API refuses request messages over 4,096 bytes instead of buffering up to 4 MiB, and blocks that spend the same transparent output twice are rejected before any other transaction verification. - Memory held for legacy peers and state reads is bounded. Blocking state reads are admitted against a node-wide limit that reserves capacity for chain-tip reads, and decoded legacy messages share byte budgets until they are handed on. When a read is refused for capacity,
getdataanswersnotfound, andgetblockheaderandgetblockreturn a retryable error.
Other Changes
zakuradstops in about 10 seconds. On Mainnet, repeated database format checks at shutdown ran into the 20-second timeout, which cut the shutdown off. The check now runs once, after the last block commit.- Archive nodes sync faster. RocksDB's background flush and compaction pool is sized from the available CPU cores instead of its default of two jobs, which removes write stalls during archive-mode initial sync. In a 30,000-block Mainnet archive sync benchmark, throughput rose from about 100 blocks per second to more than 175.
- Idle nodes use less CPU. Keeping peer address metrics current was the largest single CPU cost of a node at the chain tip, 37% of the total on a Mainnet node running only the legacy stack; an update no longer recounts the whole address book. Our experimental P2Pv2 stack also stopped re-checking the keys of authenticated peers on every discovery message, which took 4 to 5% of a Mainnet node's CPU.
- Serving blocks costs less CPU. Legacy message checksums now use vector instructions on CPUs that lack SHA extensions. On such a Mainnet node, serving old blocks to syncing peers took 32% less CPU per MB. Checksums of large blocks are also computed once, before the first peer requests the block, and reused for every peer that does.
- Pruned nodes no longer download blocks they already finalized. Before requesting an announced block, a node checked whether it still stored the block, which a pruned node does not. Peers that are still syncing announce old blocks constantly, and each announcement cost a download of up to 2 MB. Every pruned Mainnet node we observed had made hundreds to about two thousand of these downloads.
- Windows nodes keep their database across a format upgrade. On Windows, a node that updated across a database format change ignored its existing database and synced from genesis.
- State tools are
zakuradsubcommands. The standalonezakura-prune-stateandzakura-rollback-statebinaries are no longer shipped, including in the Docker image.zakurad prune-stateandzakurad rollback-statetake the same arguments but start from the loadedzakura.toml; pass--cache-dirto choose the state directory explicitly. - Managed
zcashddownloads use the system CA bundle, or the bundle named bySSL_CERT_FILE, instead of a root list compiled intozakurad. Hosts that letzcashdcompatibility mode downloadzcashdneed CA certificates installed, for example theca-certificatespackage. eMudhra roots are never trusted, even when the system bundle includes them. zcashdsidecars no longer reconnect in a loop at the chain tip. Emptygetheadersrequests now get an emptyheadersreply instead of no reply.- RPC changes.
getblockandgetrawtransactionat verbosity 0 return stored bytes without decoding and re-serializing them.getblockheaderand verbosegetblockreturn error -1 with the original message when the state service fails, instead of reporting the block as missing.getblockchaininfoand verbosegetblockreport the NSM value balance as annsmValueBalanceobject in the shape of avaluePoolsentry, as Zebra does. The indexer gRPC API addsGetTransaction, andrpc.allow_unauthenticated_admin, off by default, permitsinvalidateblock,reconsiderblock, andpreciousblockwithout cookie authentication for operators who restrict access with a firewall. - Scripts should wait for
mempool activated. The node logs this line once its mempool answers requests. With the new mempool,activating mempoolmarks only the decision to turn the mempool on, so a script that callsgetblocktemplateright after it can be refused. - Log lines are plain text.
tracing.use_colorandtracing.force_use_colornow control only the startup screen-clear and logo. - More of the node can be traced. With
network.zakura.trace_dirset, new JSONL trace tables record each stage from a new best tip to thegetblocktemplateresponse, mempool activity, and legacy block gossip. The optional loopback-only/tracesendpoint serves the tables to collectors. - Custom Testnets compute NU7 reissuance as Zebra does. Reissuance now scales to custom halving intervals. Existing custom NU7 chains need a coordinated deployment and a reset or migration; Mainnet and Testnet are unaffected.
End of Support
Mainnet zakurad nodes running 1.9.0 support Mainnet through height 3,660,343 and halt above it (estimated 2026-12-10), five days after 1.8.0's halt; upgrade warnings begin three days earlier.
Updating
You can update using our signed release binaries or by upgrading the zakura crate to 1.9.0 via Cargo. See the download page for installation and verification instructions.