-
Notifications
You must be signed in to change notification settings - Fork 120
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
Implement Sapling serialization in Transaction V5 #2020
Conversation
Also make sure that serialized bytes match if structs match.
And split out sapling ShieldedData serialization.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks great to me.
let (spend_prefixes, spend_proofs_sigs): (Vec<_>, Vec<_>) = self | ||
.spends() | ||
.cloned() | ||
.map(sapling::Spend::<SharedAnchor>::into_v5_parts) | ||
.map(|(prefix, proof, sig)| (prefix, (proof, sig))) | ||
.unzip(); | ||
let (spend_proofs, spend_sigs) = spend_proofs_sigs.into_iter().unzip(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
let mut spends: Vec<_> = spend_prefixes | ||
.into_iter() | ||
.zip(spend_proofs.into_iter()) | ||
.zip(spend_sigs.into_iter()) | ||
.map(|((prefix, proof), sig)| Spend::<SharedAnchor>::from_v5_parts(prefix, proof, sig)) | ||
.collect(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
zebra_test::init(); | ||
|
||
// we need at least one output to delete all the spends | ||
prop_assume!(shielded_v4.outputs().count() > 0); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Motivation
Transaction V5 is a required change in NU5.
Solution
The code in this pull request has:
Review
@teor2345 can review @oxarbitrage's commits.
@oxarbitrage can review @teor2345's commits.
Related Issues
Part of #1829
Rebased from oxarbitrage#90
Follow Up Work
Redesign Sapling data model for V5 shared anchor and spends #2021
TODO - make tickets:
fake_v5_round_trip
test fails on blocks, but not transactions (re-test on Redesign Sapling data model for V5 shared anchor and spends #2021 first)Orchard in V5 #1979