Skip to content

Implement bundle burn validation and serialization#30

Closed
dmidem wants to merge 10 commits intozsa1from
burn_read_write_validate
Closed

Implement bundle burn validation and serialization#30
dmidem wants to merge 10 commits intozsa1from
burn_read_write_validate

Conversation

@dmidem
Copy link
Copy Markdown
Collaborator

@dmidem dmidem commented May 15, 2023

This pull request introduces handling of the 'burn' field of the bundle. The changes are split across two new modules: burn_validation and burn_serialization.

Burn Validation
The burn_validation module ensures the correctness of burn operations. Specifically, it validates that each asset to be burned is unique, non-native, and has a non-zero amount.

Burn Serialization
The burn_serialization module is responsible for reading and writing assets and burns from/to a stream.

@what-the-diff
Copy link
Copy Markdown

what-the-diff Bot commented May 15, 2023

PR Summary

  • Added a new module for serialization
    A new module burn_serialization has been added to the orchard component.
  • Introduced functions for reading/writing bundle burn data
    A new function read_bundle_burn() is added for reading, while modifications have been made to existing functions for writing bundle burns.
  • Updated the serialization of version 5 transactions (Sapling)
    The existing function write_v5_bundle() has been modified to support writing bundle burn data into bytes.
  • Created a module for burn validation
    A new module called 'burn-validation' is added with a method that validates whether all assets being burned have unique identifiers, non-zero amounts and aren't native assets themselves. It returns an error or success based on the validation results.

@dmidem dmidem assigned PaulLaux and unassigned PaulLaux May 15, 2023
@dmidem dmidem requested a review from PaulLaux May 15, 2023 17:37
@dmidem
Copy link
Copy Markdown
Collaborator Author

dmidem commented Jun 26, 2023

Closing this in favor of PR #38

@dmidem dmidem closed this Jun 26, 2023
@dmidem dmidem deleted the burn_read_write_validate branch August 23, 2023 12:41
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