Update zcash_script
to support V5 transactions
#2328
Labels
A-consensus
Area: Consensus rule updates
A-dependencies
Area: Dependency file updates
NU-5
Network Upgrade: NU5 specific tasks
Milestone
Motivation
With the NU5 activation, a new transaction format was introduced (V5). Zebra is currently in the process of adding support for verifying those transactions (#1981). To validate transparent inputs and outputs, Zebra uses the
zcash_script
crate. However, it seems that it doesn't yet support V5 transactions, because it segfaults with a V5 test case.Specifications
The new transaction encoding is specified here.
Designs
Solution
Once the
zcash_script
issue is closed, update Zebra to use the new version.The segmentation fault itself could be caused by calling
zcash_script_verify_precomputed
with anullptr
returned whenzcash_script_new_precomputed_tx
failed to deserialize the V5 transaction, so it would be good to check fornull
after creating the precomputed transaction and returning an error to avoid reaching the segfault.https://github.com/ZcashFoundation/zebra/blob/main/zebra-script/src/lib.rs#L80-L82
Alternatives
We'll need V5 transaction validation for the NU5 activation, and updating
zcash_script
is likely the simplest solution. An alternative could be to write our own verifier, but that will likely require too much effort and time.Related Work
Issue #21 in the
zcash_script
repository tracks the support for V5.The text was updated successfully, but these errors were encountered: