-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parse Sapling data in Transaction Version 5 #1829
Comments
Blocked on #1863 |
I just wanted to highlight this item from the spec which may be relevant here also:
|
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. |
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
"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 (
fake_v5_round_trip
test fails on blocks but not in 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
fake_v5_round_trip
test fails on blocks but not in transactions #2023)Test vectors
zcashd
(or created by us and shared withzcashd
) - Create Sapling-only transaction v5 test vectors #2047The text was updated successfully, but these errors were encountered: