Skip to content
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

Add generalization to support OrchardZSA and AssetBase #1

Merged
merged 6 commits into from
Dec 19, 2023

Conversation

dmidem
Copy link

@dmidem dmidem commented Nov 29, 2023

This PR updates the zsa1 branch to integrate our modifications of zcash_note_encryption crate made in the zsa1 branch of the librustzcash repository. The Zcash team recently organized the zcash_note_encryption crate 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 src folder from the zcash_note_encryption crate of our fork of the librustzcash repository: https://github.com/QED-it/librustzcash/tree/zsa1/components/zcash_note_encryption

@dmidem dmidem requested a review from PaulLaux November 29, 2023 09:50
src/lib.rs Outdated
Comment on lines 80 to 97
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()
}
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this was removed?

Copy link
Author

@dmidem dmidem Dec 11, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Instead of implementing the suggestion above, I cherry-picked the missed commit for zcash_note_encryption from zcash/librustzcash.

@PaulLaux
Copy link

Also, please add link in the description to our version of librustzcash that implements this change.

@PaulLaux PaulLaux changed the title Syncing zsa1 branch with upstream changes of zcash_note_encryption crate from zsa1 branch of librustzcash repo Add generalization to support OrchardZSA and AssetBase Dec 18, 2023
@dmidem dmidem merged commit e14dab6 into zsa1 Dec 19, 2023
@dmidem dmidem deleted the update_from_librustzcash_zsa1 branch December 19, 2023 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants