Skip to content

Bring in refactor of the crate#3

Merged
str4d merged 1 commit intomasterfrom
generalized-refactor
Dec 5, 2023
Merged

Bring in refactor of the crate#3
str4d merged 1 commit intomasterfrom
generalized-refactor

Conversation

@str4d
Copy link
Collaborator

@str4d str4d commented Dec 5, 2023

This refactor was performed over several years. The protocol-specific logic now lives in protocol-specific crates, and this crate provides the common shared types and functions.

Source: https://github.com/zcash/librustzcash
Rev: zcash/librustzcash@5aa0e6c

@str4d str4d added this to the 0.1 milestone Dec 5, 2023
This was referenced Dec 5, 2023
@str4d str4d force-pushed the generalized-refactor branch from a5c72c9 to 1b8745b Compare December 5, 2023 17:12
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. All comments are non-blocking.

u128_bytes[0..11].copy_from_slice(&di.0[..]);
u128::from_le_bytes(u128_bytes).try_into()
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider adding TryFrom<DiversifierIndex> for u64 and From<DiversifierIndex> for u128.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Opened #7.

0xff, 0xff, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
]);
assert_matches!(u32::try_from(too_big), Err(_));
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider adding more tests, in particular for DiversifierIndex::increment.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Opened #8.

@str4d str4d force-pushed the generalized-refactor branch from 1b8745b to 94b2378 Compare December 5, 2023 17:45
This refactor was performed over several years. The protocol-specific
logic now lives in protocol-specific crates, and this crate provides the
common shared types and functions.

Source: https://github.com/zcash/librustzcash
Rev: zcash/librustzcash@5aa0e6c
@str4d str4d force-pushed the generalized-refactor branch from 94b2378 to 69adc6d Compare December 5, 2023 18:08
@str4d
Copy link
Collaborator Author

str4d commented Dec 5, 2023

Force-pushed to add a missing dev-dependency and fix the commit message.

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