On June 17, 6pm UTC, shielded transactions submitted to the Zcash community elevated dramatically. Because of this, third get together wallets have skilled decrease efficiency. The community remained, and nonetheless stays, steady and operational, and transactions are being processed usually.
The ECC core workforce labored over the Fourth of July vacation to implement a brand new batch validation algorithm to additional scale back verification time by one other 80%. Their efforts noticed launch zcashd 5.1.0 go reside.
Abstract
This launch is primarily focused at enhancing the validation efficiency of Sapling and Orchard transactions in addition to an incremental enchancment to the scan efficiency of post-NU5 blocks. The discharge additionally made enhancements to getblocktemplate efficiency and added Orchard info to getrawtransaction and decoderawtransaction. We’ll proceed to handle remaining scan efficiency points in subsequent releases.
Notable adjustments
Sooner block validation for Sapling and Orchard transactions
Block validation in zcashd is a principally single-threaded course of, resulting from how the chain replace logic inherited from Bitcoin Core is written. Nevertheless, sure extra computationally intensive checks are carried out extra effectively than checking every little thing individually:
- ECDSA signatures on clear inputs are checked by way of multithreading.
- RedPallas signatures on Orchard actions are checked by way of batch validation.
As of this launch, zcashd applies these strategies to extra Sapling and Orchard parts:
- RedJubjub signatures on Sapling Spends are checked by way of batch validation.
- Groth16 proofs for Sapling Spends and Outputs are checked by way of batch validation and multithreading.
- Halo 2 proofs for Orchard Actions are checked by way of batch validation and multithreading.
This reduces worst-case block validation occasions for noticed historic blocks by round 80% on a Ryzen 9 5950X CPU.
The variety of threads used for checking Groth16 and Halo 2 proofs (in addition to for creating them when spending funds) might be set by way of the RAYON_NUM_THREADS surroundings variable.
Choice dealing with
- A brand new
-preferredtxversionargument permits the node to preferentially create transactions of a specified model, if a transaction doesn’t comprise parts that necessitate creation with a selected model. For instance, setting-preferredtxversion=4will trigger the node to create V4 transactions each time the transaction doesn’t comprise Orchard parts. This may be useful if recipients of transactions are prone to be utilizing legacy wallets that haven’t but been upgraded to assist parsing V5 transactions.
RPC interface
- The
getblocktemplateRPC technique now skips proof and signature checks on templates it creates, as these templates solely embody transactions which have beforehand been checked when being added to the mempool. - The
getrawtransactionanddecoderawtransactionRPC strategies now embody particulars about Orchard actions inside transactions.
Pockets
- Rescan efficiency of post-NU5 blocks has been barely improved (general rescan time for a single-account pockets decreases by round 6% on a Ryzen 9 5950X). Additional enhancements will likely be carried out in future releases to assist mitigate the impact of blocks filled with shielded outputs.
- The
CWallet::UpdatedTransactionsign is now not known as whereas holding thecs_mainlock. This fixes a difficulty the place RPCs might block for lengthy durations of time onzcashdnodes with massive wallets. Downstream code forks which have reconnected theNotifyTransactionChangedpockets sign ought to pay attention to this alteration, and never rely there on entry to globals protected bycs_main. - Some
zcashd 5.0.0nodes would shut down a while after begin with the errorThreadNotifyWallets: Did not learn block X whereas notifying wallets of block disconnects. zcashdnow makes an attempt to rectify the state of affairs, and in any other case will inform the consumer earlier than shutting down {that a} reindex is required.
Deprecated
As of this launch, the next beforehand deprecated options are disabled by default, however could also be reenabled utilizing -allowdeprecated=<function>.
- The
dumpwalletRPC technique is disabled. It could be reenabled withallowdeprecated=dumpwallet. dumpwalletshouldn’t be used; it’s unsafe for backup functions because it doesn’t return any key info for keys used to derive shielded addresses. Usez_exportwalletas a substitute.
As of this launch, the next options are deprecated, however stay out there by default. These options could also be disabled by setting -allowdeprecated=none. After at the least 3 minor-version releases, these options will likely be disabled by default and the next flags to -allowdeprecated will likely be required to allow their continued use:
wallettxvjoinsplit– controls availability of the deprecatedvjoinsplitattribute returned by thegettransactionRPC technique.
The Zcash Schedule web page has been up to date to replicate the 5.1.0 launch.






