We are pleased to announce the release of Zebra 7.1.0. It fixes ten security advisories, most of which closed ways another node on the network (a peer) could stop a Zebra node from catching up with the chain, or make it run out of memory. It also adds sync and memory diagnostics, automatic peer recovery, and clearer errors. Upgrading from 7.0.0 needs no resync.
Who Needs to Act
- Node operators, including miners and mining pools: upgrade now. Before you do, see Upgrading.
- Wallet, exchange, and
lightwalletdoperators: upgrade now. One advisory let concurrent address balance requests run a node out of memory. - Developers using Zebra’s Rust crates: this release has breaking API changes. See Library Users.
- ZEC holders and wallet users: there is nothing to do.
Security Advisories
Several of these issues affect only initial sync, when a new node downloads and checks the chain to catch up with the network. The others affect nodes that are already in sync, so every node should upgrade.
GHSA-j8gf-c4rj-6jv5: Blocks Dense With Transparent Outputs Exhaust Node Memory
Zebra keeps its most recent blocks in memory, so it can switch to a competing branch of the chain if one overtakes it. Each branch kept its own copy of that data, so a run of blocks filled with transparent (unshielded) outputs could run a node out of memory again on every restart. Branches now share the data, and Zebra now limits how much of it can build up (see Upgrading). Thanks to Foundry Digital for reporting this issue.
GHSA-m44m-9r8r-r64j: Forged Blocks Could Halt Sync at the Checkpoint Handoff
A peer could send forged blocks at the point where initial sync switches from checkpoints (known block hashes that ship with Zebra) to full validation, which halted initial sync. Zebra now rejects those blocks and bans the peer. Thanks to @unusualbyte for reporting this issue.
GHSA-g9rc-89v4-hhvf: Rewritten Coinbase Height Stops Initial Sync
GHSA-hvw5-x88g-2q8w: Checkpoint Queue Indexed by a Rewritable Height
A peer could serve a block with a rewritten height (its position in the chain) that Zebra didn’t reject, which could stop initial sync. Zebra now checks that a block’s contents match its header before trusting the height, bans the peer, and asks another peer for the block. Thanks to @x15-eth and @SphereDonout for reporting these issues.
GHSA-hj54-2mfv-4xg8: Address Balance Requests Could Run the Node Out of Memory
Each transparent address balance request, through the getaddressbalance RPC or lightwalletd, copied all of the node’s recent blocks. Many requests at once, for example through a public wallet service, could run the node out of memory. Balance requests now read only the data they need, and getaddressutxos and getaddresstxids requests no longer copy every recent UTXO and transaction of the requested addresses. Thanks to @saxenism for reporting this issue.
GHSA-vw2c-5w35-x5q6: Known Block Hashes Restarted Sync Rounds
A peer could make Zebra abandon its current round of block downloads and start over, again and again, by including blocks Zebra already had in its reply, which could stop sync. Zebra now skips those blocks and keeps the rest. Thanks to @AnticsDecoded for reporting this issue.
GHSA-8qxv-5f2c-452c: Unbounded Queues of Unverifiable Blocks
Blocks waiting for checkpoint verification, or for their parent block, were kept without a memory limit, even after Zebra stopped waiting for them. Both queues now have limits, and sync requests a block it still needs again if it was dropped. Thanks to @Maakai123, @DanielDerefaka, and @SphereDonout for reporting this issue.
GHSA-7jvw-68q7-xfh4: Forged Queued Block Got an Honest Peer Banned
A peer that sent a forged copy of a block first could get the honest peer that sent the real block banned, without being penalized itself. Zebra now holds each peer responsible for the block it sent. Thanks to @x15-eth for reporting this issue.
GHSA-423j-2vj4-j5x4: Script Verification of Nonstandard Transactions
The mempool, where unconfirmed transactions wait to be mined, verified every signature in a transaction before checking that it was within the standard limit of 4,000 signature operations. A peer could keep the node busy with transactions it would reject anyway. The mempool now checks the limit first. Block validation is unchanged. Thanks to @janneh2000 for reporting this issue.
GHSA-2wx4-g5cf-32pf: Rejected Transactions Still Added Proof Verification Work
The mempool started verifying a transaction’s zero knowledge proofs before the cheaper checks against the chain, so transactions it went on to reject still slowed down the proof verification that block validation also uses. The mempool now runs the cheaper checks first. Thanks to @Nathanbyarugaba and @SphereDonout for reporting these issues.
Other Security Improvements
- Sync is harder to stall: one peer can no longer fill a node’s download queue, an invalid block no longer cancels unrelated downloads, and stalled verification waits time out.
- The mempool rejects transactions with nonstandard outputs, such as dust or oversized
OP_RETURNdata, before verifying their scripts and proofs. - The health endpoint and block requests from peers have tighter limits on the connections and memory they can use.
- Misbehaving peers’ scores are no longer lost under load (#11796).
Breaking Changes
Node Operators
The experimental elasticsearch feature is removed. If you built zebrad with it, remove elasticsearch_url, elasticsearch_username, and elasticsearch_password from the [state] section of your config, or it won’t load (#12176). Official builds never had this feature.
Library Users
Every library crate except tower-batch-control and tower-fallback gets a new major version. Recent blocks now share their indexes between chain branches, which changes zebra-chain value balance methods and removes several zebra-state Chain APIs. New error variants need handling in exhaustive matches. Upgrade zebra-chain together with the crates that depend on it. Each crate’s CHANGELOG.md lists its new version and the full API changes.
New Features and Fixes
- Sync stall diagnosis: when sync restarts, Zebra logs why, and new
sync.restart.count,sync.block.error.count, andsync.downloads.oldest_age_secondsmetrics show where it is stuck (#11900). - New sync signals:
sync.block.error.countcounts blocks dropped from a full verification queue under thequeue_fullkind, andsync.restart.countcounts sync rounds where the chain tip doesn’t advance for 8 minutes under thesync_step_timeoutreason (#12472). - Memory metrics: new metrics report the process’s memory use and the size of its recent block data, including
state.memory.index.entries. - Peer recovery: a node left with no outbound peers and no peer addresses to try now retries its DNS seeders and its configured and saved peers, at most every 5 minutes, instead of waiting for a restart, and starts from its saved peers if DNS fails at startup (#11807).
- Clearer errors: RPC requests without valid credentials get an HTTP 401 response (#11797), and a database that can’t be opened shows the real cause (#11933).
- Sentry: error reports now carry stack traces, so existing issues may reappear as new ones (#11855).
The release notes and the crate changelogs list every change.
Upgrading
Get the release from GitHub, crates.io, or Docker Hub as zfnd/zebra:7.1.0. Upgrading from 7.0.0 needs no migration or resync. If you are upgrading from 6.x, read the 7.0.0 release notes first.
This release is supported until around December 10, 2026. After that, zebrad stops itself, and it starts warning about a week before, so plan to move to the next release by then.
If you use the health endpoint, it now serves one request per connection, closes connections that don’t send their request headers within 5 seconds, and keeps at most 32 connections open.
Memory and chain reorganizations. Zebra keeps up to 1,000 recent blocks in memory, so it can follow a chain reorganization (a switch to a competing branch) that deep. This release limits their indexes to 6,200,000 entries on Mainnet and 2,000,000 on test networks. Ordinary Mainnet blocks don’t reach the limit. If unusually dense blocks do, Zebra keeps at least 100 recent blocks, and until the dense blocks are finalized (permanently written to disk) it can’t follow a reorganization deeper than the blocks it kept. zcashd doesn’t reorganize more than 99 blocks. At the limit, recent blocks use about 5 to 6 GB, and during initial sync, blocks waiting for checkpoint verification can use about 4 GB more, so we recommend 16 GB of RAM, as in Zebra’s system requirements.
Thank You to Our Contributors
This release was made possible by the work of @alchemydc, @andres-pcg, @Anirudh-712, @arcayne, @arya2, @conradoplg, @gustavovalverde, @jvff, @kriss39, @oxarbitrage, @Ravan002, @robustfengbin, @upbqdn, and @zacheryasc. Thank you for your continued contributions to Zebra.
Zebra is the Zcash Foundation’s independent, Rust-based implementation of the Zcash protocol. Learn more at github.com/ZcashFoundation/zebra.