Skip to content

Add generalization to support OrchardZSA and AssetBase#6

Merged
str4d merged 3 commits intomainfrom
zsa-changes
Jan 22, 2025
Merged

Add generalization to support OrchardZSA and AssetBase#6
str4d merged 3 commits intomainfrom
zsa-changes

Conversation

@str4d
Copy link
Contributor

@str4d str4d commented Jan 22, 2025

Rebase of #2.

Co-authored-by: Dmitry Demin <dmitry@qed-it.com>

## [Unreleased]
### Changed
- **Breaking change:** removed the constants `COMPACT_NOTE_SIZE`,
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be in ### Removed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was going to address all of this in a subsequent PR after getting #2 in, but I guess now that I've been forced to open a separate PR for just that, I can fix the changelog at the same time.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Eh, actually I will still do the changelog rework in a separate PR.

abstract types `NotePlaintextBytes`, `NoteCiphertextBytes`,
`CompactNotePlaintextBytes`, and `CompactNoteCiphertextBytes` to the `Domain`
trait.
- Removed the separate `NotePlaintextBytes` type definition (as it is now an
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be in ### Removed.

array.
- Updated the `enc_ciphertext` method of the `ShieldedOutput` trait to return an
`Option` of a reference instead of a copy.
- Added a new `note_bytes` module with helper trait and struct to deal with note
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be in ### Added.

pub trait NoteBytes: AsRef<[u8]> + AsMut<[u8]> + Clone + Copy {
fn from_slice(bytes: &[u8]) -> Option<Self>;

fn from_slice_with_tag<const TAG_SIZE: usize>(
Copy link
Contributor

Choose a reason for hiding this comment

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

Document this.

daira
daira previously approved these changes Jan 22, 2025
Copy link
Contributor

@daira daira left a comment

Choose a reason for hiding this comment

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

utACK with comments.

Co-authored-by: Daira-Emma Hopwood <daira@jacaranda.org>
Copy link
Contributor

@nuttycom nuttycom left a comment

Choose a reason for hiding this comment

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

utACK cefe7b5 with the proviso that the CHANGELOG and documentation comments need to be addressed in a future PR.

@str4d str4d merged commit 1ab2f34 into main Jan 22, 2025
23 checks passed
@str4d str4d deleted the zsa-changes branch January 22, 2025 21:58
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.

4 participants