Closed teor2345 closed 3 years ago
I just wanted to highlight this item from the spec which may be relevant here also:
For a v5 transaction, vbalanceSapling is implicitly zero if the transaction has no Spend descriptions or Output descriptions.
I just wanted to highlight this item from the spec which may be relevant here also:
For a v5 transaction, vbalanceSapling is implicitly zero if the transaction has no Spend descriptions or Output descriptions.
Thanks Pili, that was a bug in the draft PR, I've added a comment at https://github.com/ZcashFoundation/zebra/pull/1860/files#r595643213
I just wanted to highlight this item from the spec which may be relevant here also:
For a v5 transaction, vbalanceSapling is implicitly zero if the transaction has no Spend descriptions or Output descriptions.
Thanks Pili, that was a bug in the draft PR, I've added a comment at https://github.com/ZcashFoundation/zebra/pull/1860/files#r595643213
These was actually also a missing related Orchard spec rule as well:
I've opened #1917 to implement those rules, and I'll also update the transaction RFC.
I opened #2023 and #2047 for follow-up, so we can close this ticket now.
Is your feature request related to a problem?
In #1824, we parse the transaction header and transparent data for transaction version 5.
Transaction version 5 also contains Sapling data, which we need to parse:
Describe the solution you'd like
Implementation
Spend
Implement serialization and deserialization for:
Spend<PerSpendAnchor>
(moved from the pre-RFCSpend
)SpendPrefixInTransactionV5
(new)redjubjub::Signature<redjubjub::SpendAuth>
(new - for v5 spend auth sig arrays)Test
Arbitrary
Spend
(both variants):Output
Implement serialization and trusted vector deserialization for:
OutputInTransactionV4
(moved fromOutput
)OutputPrefixInTransactionV5
(new)Test
Arbitrary
Output
(both transaction versions):ShieldedData
Documentation
Implement serialization and deserialization for:
Option<sapling::ShieldedData<SharedAnchor>>
Option<sprout::JoinSplitData>
at https://github.com/ZcashFoundation/zebra/blob/main/zebra-chain/src/transaction/serialize.rs#L34Test
Arbitrary
Option<sapling::ShieldedData<SharedAnchor>>
Test manual implementations:
PartialEq
impl forShieldedData<SharedAnchor>
ShieldedData<PerSpendAnchor>
tests in https://github.com/ZcashFoundation/zebra/blob/main/zebra-chain/src/sapling/tests/prop.rsShieldedData<SharedAnchor>
has serialization impls, so it doesn't need to be wrapped in a transaction for serializationTransaction
sprout_nullifiers
sapling_nullifiers
Test
Arbitrary
Transaction::V5
Cleanups and Refactoring
Testing
Test round-trip serialization and deserialization for transaction v4 and v5 (without orchard)
Unit tests
zebra_consensus::transaction::Verifier
zebra_consensus::transaction::Verifier
Test vectors
[x] "Fake" Sapling-only and Sapling/Transparent v5 transactions based on
zebra_test::vectors::block::BLOCKS
V4
toV5
formatwork out why these tests fail on blocks, but not transactions (#2023)
transaction v5 sapling-only test vectors from
zcashd
(or created by us and shared withzcashd
)Describe alternatives you've considered
This is a required change for
NU5
.Follow Up Tasks
"Fake" Sapling-only and Sapling/Transparent v5 transactions based on
zebra_test::vectors::block::BLOCKS
Test vectors
zcashd
(or created by us and shared withzcashd
) - #2047