-
Notifications
You must be signed in to change notification settings - Fork 106
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
V5 transaction rfc #1886
V5 transaction rfc #1886
Conversation
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.
Looks good for a first draft, I have a bunch of suggestions.
} | ||
``` | ||
|
||
Where `Action` is defined as [Action definition](https://github.com/ZcashFoundation/zebra/blob/68c12d045b63ed49dd1963dd2dc22eb991f3998c/zebra-chain/src/orchard/action.rs#L18-L41). |
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.
Link need to change after #1885 merges.
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.
I made a bunch of suggestions to complete the RFC, and also found a few bugs.
Let's get @dconnolly to check this, and then I think we're done.
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.
I'm good with this RFC, I just need some cryptography API design advice from @dconnolly.
This comment has been minimized.
This comment has been minimized.
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.
So one thing we can do is instead of naming the structs or types as Sapling or V4/V5, we can namespace them in the module tree, so we could havezebra_chain::transaction::v5::ShieldedData We could represent ShieldedData as enum variants, alá Transaction::V4/V5, and it would use things like zebra_chain::orchard::Action.
I don't think we need OutputV4 and OutputV5, we can use the same sapling::Output type in both ShieldedData::V4 and ShieldedData::V5.
The Spends having the anchor moving around looks like yes we need a different one for v5. I wonder if we can have a sapling::Spend as an enum instead of a different type, similar to how we have Transaction as an enum with different variants, so we can have sapling::Spend::V4/V5.
@oxarbitrage @yaahc @teor2345 what do you think? Basically consolidates @oxarbitrage's design into enum variants vs separate types
I think enum variants are a good design. We can replace the trait part of the old design with methods on the enum. |
This comment has been minimized.
This comment has been minimized.
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.
This is fine with me
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.
Looks great.
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.
Design alternative: distinguish shared and per spend anchors
Since |
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.
There are no blocking changes left, and we've all approved the RFC. Merging.
Summary
Please copy the RFC summary over here.
Propose a design for V5 transactions. Open for discussion.
More information
Feature Name:
my_feature
Start Date: YYYY-MM-DD
Design PR: ZcashFoundation/zebra#0000
Zebra Issue: ZcashFoundation/zebra#1863
Document
Rendered.
Zebra Team Approval
Everyone on the Zebra team should review design RFCs: