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

Modify Orchard proptest implementations to support ZSA #12

Closed

Conversation

dmidem
Copy link

@dmidem dmidem commented Oct 8, 2024

Updates the existing Orchard property-based test implementations to include transaction V6 ZSA fields (burn in ShieldedData and orchard_zsa_issue_data).

Changes:

  • Added EncryptedNoteTest trait for testing purposes.
  • Implemented Arbitrary for orchard::ShieldedData as a generic.
  • Added conversion implementations for BurnItem and IssueData.
  • Generalize v5_strategy/v6_strategy functions to work with V5 and V6 transactions.
  • Refactored transaction strategies to support generics and handle V5 and V6 transactions with ZSA support.

Note: This is draft code that needs to be cleaned, possibly refactored/improved, and FIXMEs resolved.

1. Introduced new type `Burn` that wraps `Vec<BurnItem>`, implemented serialization/deserialization for it - put it
   into `orchard_zsa/burn.rs`, also moved `NoBurn` there from `orchard_flavor_ext.rs` for better code structuring.
2. Renamed the `EncryptedNoteTest` trait to `TestArbitrary` in `orchard_flavor_ext.rs` and used it to constrain
   `BurnType` as well.
3. Renamed `serialize.rs` to `common.rs` in the `orchard_zsa` folder.
4. Refactored transaction generation strategies for V5 and V6 in `transaction/arbitrary.rs` and
  `orchard_zsa/arbitrary.rs` to incorporate the new burn handling and proper issuance handling.
@dmidem
Copy link
Author

dmidem commented Oct 9, 2024

Closed in favor of #13

@dmidem dmidem closed this Oct 9, 2024
@dmidem dmidem deleted the zsa-integration/proptest branch October 15, 2024 06:07
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