Zebra 6.1.0: New getstandardfee RPC and 4 Safety Fixes
We’re releasing Zebra 6.1.0 right now. This launch provides a brand new getstandardfee RPC and fixes 4 safety points affecting block verification, node liveness, and mining. There aren’t any consensus adjustments. All node operators are inspired to improve.
New Options
getstandardfee RPC
A brand new getstandardfee RPC returns the ZIP-317 marginal charge, giving wallets and different purchasers a direct solution to question the present customary charge. The worth can also be uncovered to Rust customers as transaction::zip317::MARGINAL_FEE. (#10717)
Safety Advisories
GHSA-95m2-vx53-v2jw: getblocktemplate Can Produce Outsized, Invalid Blocks (Low)
When Zebra constructed a block template, its ZIP-317 transaction selector budgeted mempool transactions towards the total most block dimension whereas reserving house just for the coinbase transaction, not for the serialized block header or the transaction-count area, each of which depend towards the restrict (roughly 1,490 bytes on Mainnet and Testnet). If the chosen transactions stuffed that margin, the assembled block exceeded the consensus dimension restrict, so a miner would carry out proof-of-work on a block that each node rejects, losing the work; an attacker capable of place legitimate, selectable transactions in a sufferer miner’s mempool might intentionally form templates into the affected vary. Non-mining nodes had been unaffected, and since outsized blocks are appropriately rejected there was no consensus divergence. Zebra now reserves the network-specific header dimension and the utmost transaction-count width earlier than choosing transactions, so templates keep throughout the restrict. Because of @ebfull of Venture Tachyon for reporting this problem by way of coordinated disclosure.
GHSA-g7c4-2w6c-cr3r: Unattributed Pushed-Transaction Failures Enable Batch-Verification Poisoning (Reasonable)
When a immediately pushed mempool transaction failed verification, Zebra didn’t document the sending peer’s tackle on the failure, so the peer was by no means misbehavior-scored or banned. As a result of Orchard proof verification runs by a process-global batch verifier shared by mempool and block verification, a peer might repeatedly push transactions carrying invalid Orchard proofs without charge, forcing every shared batch onto the sluggish per-proof path, together with trustworthy proofs from block processing batched alongside, and sustaining a measured block-processing slowdown for so long as the visitors continued. There was no crash, consensus divergence, or state corruption. Zebra now attributes pushed-transaction verification failures to the sending peer so the prevailing misbehavior scoring can ban it. This closes the verification-failure attribution hole left by the admission-accounting repair in GHSA-m9xx-8rcj-vmgp. Because of @ebfull of Venture Tachyon and @ValarDragon of Valar Group for reporting this problem by way of coordinated disclosure.
GHSA-4g24-549m-hp75: Quadratic Clear Worth Test in Block Verification (Reasonable)
Throughout contextual verification, Zebra checked the remaining clear worth of each non-coinbase transaction by cloning and changing your complete block-level spent-output map as soon as per transaction, turning a linear examine into quadratic work. A block close to the scale restrict full of minimal single-input transactions (as much as roughly 26,000) might take over 52 seconds to validate on quick {hardware}. As a result of the affected code runs solely after proof-of-work checks cross, triggering it requires a validly mined block (produced immediately or by seeding the mempool for an trustworthy miner), which bounds the assault to a one-time, self-clearing stall per block with no crash, consensus divergence, or state corruption. Zebra now passes every transaction solely the outputs it spends, making the examine linear in complete inputs. Because of @ebfull of Venture Tachyon and @ValarDragon of Valar Group for reporting this problem.
GHSA-8gxx-hc65-vv82: Chain Stall by way of Stale parent_error_map Entry (Reasonable)
When a block failed contextual verification, Zebra recorded its hash in an in-memory map and propagated that failure to any baby block whose mother or father was within the map, however entries had been solely eliminated by a set dimension restrict or a restart, by no means when the canonical block at that hash later dedicated efficiently. Utilizing the identical ZIP-244 coinbase-malleability primitive as GHSA-4m69-67m6-prqp, an unauthenticated peer that received the propagation race might get a poisoned block sharing a canonical block’s hash rejected first, so the canonical successor was then rejected towards the stale entry, stalling the node at that top for roughly 41 hours per set off and repeatable on every new block. The stall cleared on restart, with no crash, consensus divergence, or state corruption. Zebra now removes a hash from the map when the canonical block at that hash commits efficiently. Because of @deedim for reporting this problem, together with a deterministic proof of idea and evaluation of its relationship to GHSA-4m69-67m6-prqp.
Thank You to Our Contributors
This launch was made attainable by the work of @aphelionz, @evan-forbes, @jvff, @oxarbitrage, @upbqdn, and @weifanglab. Thanks to your continued contributions to Zebra.
Zebra is the Zcash Basis’s unbiased, Rust-based implementation of the Zcash protocol. Be taught extra at github.com/ZcashFoundation/zebra.
