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

Release 0.12.0 #180

Merged
merged 23 commits into from
Jan 9, 2025
Merged

Release 0.12.0 #180

merged 23 commits into from
Jan 9, 2025

Conversation

str4d
Copy link
Contributor

@str4d str4d commented Dec 11, 2024

Tracking PR for the changes being accumulated for the 0.12.0 release.

This PR's branch MUST NOT be rebased, and MUST NOT be squash-merged.

Closes #168.

nuttycom and others added 23 commits December 4, 2024 08:14
This change enables the use of imported UFVKs.
…tadata accessor.

Also, do not attempt to create key source data from the null pointer.
Use UUIDs instead of 32-bit indexes for account identifiers.
Co-authored-by: Daira-Emma Hopwood <daira@jacaranda.org>
Add methods for deriving addresses from UFVK and UIVK values to the `derivation` module.
…cos-13.3

Move off of the deprecated macos-12 builder.
…tion_fix

Fix incorrect Orchard key derivation paths.
…chard_proofs

Update to `orchard` version `5b6cc68b746c4dab37e43d09314da98d5ee99c21`
Signed-off-by: Daira-Emma Hopwood <daira@jacaranda.org>
…ress

Update to released versions of `orchard`, `sapling-crypto` and the `librustzcash` crates.
@nuttycom nuttycom marked this pull request as ready for review December 17, 2024 06:00
Copy link
Contributor Author

@str4d str4d left a comment

Choose a reason for hiding this comment

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

utACK 11b0db0. I didn't closely review the logic (which should have been reviewed in the PRs targeting this release feature branch).

network_id: u32,
) -> *mut FFIBinaryKey {
) -> *mut FfiBoxedSlice {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should have been documented as a change in the changelog.

/// A struct that contains a Zcash unified address, along with the diversifier index used to
/// generate that address.
#[repr(C)]
pub struct FfiAddress {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should have been documented as an addition in the changelog.

///
/// - `ptr` must be non-null and must point to a struct having the layout of [`FfiAddress`].
#[no_mangle]
pub unsafe extern "C" fn zcashlc_free_ffi_address(ptr: *mut FfiAddress) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should have been documented as an addition in the changelog.


UnifiedSpendingKey::from_seed(&network, seed, account)
.map_err(|e| anyhow!("error generating unified spending key from seed: {:?}", e))
.map(move |usk| {
let encoded = usk.to_bytes(Era::Orchard);
Box::into_raw(Box::new(FFIBinaryKey::new(account, encoded)))
FfiBoxedSlice::some(encoded)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Need to document that this method does not use the FfiBoxedSlice::none variant.

seed_fingerprint: [u8; 32],
account_index: u32,
hd_account_index: u32,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changes should have been documented in the changelog.

#[no_mangle]
pub unsafe extern "C" fn zcashlc_get_total_transparent_balance_for_account(
db_data: *const u8,
db_data_len: usize,
network_id: u32,
account: i32,
account_uuid_bytes: *const u8,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Change should have been documented in the changelog.

@@ -1626,7 +1698,7 @@ impl FfiBalance {
/// The sum of this struct's fields is the total balance of the account.
#[repr(C)]
pub struct FfiAccountBalance {
account_id: u32,
account_uuid: [u8; 16],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Change should have been documented in the changelog.

@@ -2433,7 +2495,7 @@ pub unsafe extern "C" fn zcashlc_free_boxed_slice(ptr: *mut FfiBoxedSlice) {
pub unsafe extern "C" fn zcashlc_propose_transfer(
db_data: *const u8,
db_data_len: usize,
account: i32,
account_uuid_bytes: *const u8,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Change should have been documented in the changelog.

@@ -2511,7 +2577,7 @@ pub unsafe extern "C" fn zcashlc_propose_transfer(
pub unsafe extern "C" fn zcashlc_propose_transfer_from_uri(
db_data: *const u8,
db_data_len: usize,
account: i32,
account_uuid_bytes: *const u8,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Change should have been documented in the changelog.

/// - `shielding_threshold` a non-negative shielding threshold amount in zatoshi
/// - Call [`zcashlc_free_boxed_slice`] to free the memory associated with the returned
/// pointer when done using it.
#[no_mangle]
pub unsafe extern "C" fn zcashlc_propose_shielding(
db_data: *const u8,
db_data_len: usize,
account: i32,
account_uuid_bytes: *const u8,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Change should have been documented in the changelog.

@str4d str4d merged commit f2f3f61 into main Jan 9, 2025
1 check failed
@str4d str4d deleted the release/0.12.0 branch January 9, 2025 19:47
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.

Refactor create_proposed_transactions FFI to expose PCZTs
3 participants