Add generalization to support OrchardZSA and AssetBase#1
Conversation
| impl fmt::Debug for EphemeralKeyBytes { | ||
| fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { | ||
| struct HexFmt<'b>(&'b [u8]); | ||
| impl<'b> fmt::Debug for HexFmt<'b> { | ||
| fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { | ||
| f.write_char('"')?; | ||
| for b in self.0 { | ||
| f.write_fmt(format_args!("{:02x}", b))?; | ||
| } | ||
| f.write_char('"') | ||
| } | ||
| } | ||
|
|
||
| f.debug_tuple("EphemeralKeyBytes") | ||
| .field(&HexFmt(&self.0)) | ||
| .finish() | ||
| } | ||
| } |
There was a problem hiding this comment.
It turns out this change was made in the zcash/librustzcash PR zcash/librustzcash#926 by @str4d, which was merged on 2023-09-01. However, we only merged zcash/librustzcash changes into our QED-it/librustzcash fork until 2023-06-06. So, I guess we can upgrade our QED-it/librustzcash from zcash/librustzcash upstream, and then I will recopy zcash_note_encryption from QED-it/librustzcash here and recreate the PR. That would allow us to track the changes correctly.
There was a problem hiding this comment.
Done. Instead of implementing the suggestion above, I cherry-picked the missed commit for zcash_note_encryption from zcash/librustzcash.
|
Also, please add link in the description to our version of librustzcash that implements this change. |
…rustzcash (it was missed in QED-it/librustzcash)
This PR updates the
zsa1branch to integrate our modifications ofzcash_note_encryptioncrate made in thezsa1branch of thelibrustzcashrepository. The Zcash team recently organized thezcash_note_encryptioncrate into a standalone repository, so we align our codebase with this structural change.The only change in this PR is the inclusion of the updated
srcfolder from thezcash_note_encryptioncrate of our fork of thelibrustzcashrepository: https://github.com/QED-it/librustzcash/tree/zsa1/components/zcash_note_encryption