Skip to content

Pczt without domain#168

Merged
alexeykoren merged 6 commits intozsa1from
pczt-without-domain
Jul 1, 2025
Merged

Pczt without domain#168
alexeykoren merged 6 commits intozsa1from
pczt-without-domain

Conversation

@alexeykoren
Copy link

This PR removes generic type parameter from Orchard PCZT bundle simplifying the flow in librustzcash

@what-the-diff
Copy link

what-the-diff bot commented Jun 30, 2025

PR Summary

  • Simplified code by removing 'OrchardDomainCommon' and 'TransmittedNoteCiphertext'

    • The builder.rs file was adjusted where references to OrchardDomainCommon and TransmittedNoteCiphertext were removed. This simplifies the structure and makes the code more readable.
  • Shifted from complex generic types to simple, non-generic types

    • In many files, such as builder.rs, issuance.rs, pczt.rs and others, functions and structs that earlier used complex generic types have been simplified. Now, instead of dealing with a higher-level abstraction, a direct non-generic type is used.
  • Introduced new marker type 'EffectsOnly' in issuance.rs

    • New marker type EffectsOnly has been added, which apply to bundles that don't carry any authorizing data. This helps in differentiating them from other types of bundles.
  • Added conversion logic using PcztTransmittedNoteCiphertext

    • Conversion logic code using PcztTransmittedNoteCiphertext was added in builder.rs which helps in adapting with existing note ciphertext structures.
  • Revised parsing logic in parse.rs

    • Changes in parse.rs to modify parsing logic has been introduced to sync up with other structural changes in the code.
  • Modification in implementation

    • Code modifications were done in prover.rs, signer.rs, and pczt to simplify implementations of bundles and actions. It moderates the function signatures to align with the changes.
  • Streamlined Bundle and Updater in updater.rs

    • Changes made in updater.rs saw the simplification of Bundle and Updater by omitting the generic parameterization, leading to a cleaner and more straightforward overall structure.
  • Harmonized the structure for verification methods in verify.rs

    • The verification methods in verify.rs have been refactored to remove generic type parameters for structs. This ensures cohesion with the revised, non-generic structure used across various files.

Through these changes, the code is more readable, manageable, and easier to debug, thereby improving the overall maintainability and performance.

@alexeykoren alexeykoren reopened this Jun 30, 2025
@alexeykoren alexeykoren requested a review from PaulLaux June 30, 2025 13:35
Copy link
Collaborator

@PaulLaux PaulLaux left a comment

Choose a reason for hiding this comment

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

added some changes needed. The approach is accepted overall.

@alexeykoren alexeykoren merged commit cbcdb71 into zsa1 Jul 1, 2025
17 checks passed
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.

3 participants