-
Notifications
You must be signed in to change notification settings - Fork 250
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 ZIP 302 structured memos #668
base: main
Are you sure you want to change the base?
Conversation
4edf9fe
to
e7a12ea
Compare
Force-pushed to fix a bug and CI lints. |
/// A Sapling return address. | ||
ReturnAddress(PaymentAddress), |
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.
IIRC I copied this type code from some existing implementation of structured memos. It was Sapling-specific then, but we can easily expand its definition to be any valid recipient address encoding.
Note that this uses a byte encoding rather than a string encoding for more efficient packing, so we may need to consider how this interacts with Unified Addresses (which now exist). We don't need to serialize the network of the address, as that is implicit in the transaction (via the chain in which it is mined), so can just be provided by the caller if they want to take the address and encode it as a string.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #668 +/- ##
==========================================
- Coverage 75.70% 75.08% -0.63%
==========================================
Files 103 105 +2
Lines 10535 10666 +131
==========================================
+ Hits 7976 8009 +33
- Misses 2559 2657 +98 ☔ View full report in Codecov by Sentry. |
Implements zcash/zips#638.