Refactor verification logic into dedicated module and modify verify_issue_bundle function#135
Closed
Refactor verification logic into dedicated module and modify verify_issue_bundle function#135
Conversation
…nd verify_issue_bundle) to a separate module (verification)
…ove SupplyInfo tests as there's no SupplyInfo now
Author
|
Closed in favour #138 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR extracts and reorganizes the verification logic for asset burn and issuance into a new
verificationmodule (and submodules) and modifies theverify_issue_bundlefunction. These new verification modules could be potentially moved to the Zebra repository for further integration.New Verification Module & Folder
verification.rsmodule and averification/folder to house all verification-related logic.Relocation of
burn.rsburn.rsfile (containing thevalidate_bundle_burnfunction) toverification/burn.rs.Refactoring
verify_issue_bundleverify_issue_bundlefunction was moved fromissuance.rstoverification/issuance.rs.get_asset_statemethod (closure/trait) instead of relying on afinalizationset.Removed
supply_info.rsModuleSupplyInfostruct and related tests have been removed entirely, as the verification function (verify_issue_bundle) now returns aHashMapinstead ofSupplyInfo.AssetSupplystruct definition, previously insupply_info.rs, has been moved toissuance.rsfor consistency.Test Updates & Extensions
verificationfolder.verify_issue_bundlesignature (usingget_asset_state).Retention of
verify_supplyinissuance.rsverify_supplymethod remains inissuance.rs, as it is still needed when theIssueBundleis signed in that module.Visibility Fixes in
issuance.rsverify_issue_bundletests have been moved to a separate module, certain fields inIssueBundle,IssueAction, andSignedstructs were madepub(crate)so they can be accessed fromverification/issuance.rs.FIXMEcomments were added to indicate these visibility changes may need revisiting in the future.TODO: Extend the test set in
verification/issuance.rsto verify the correct handling of issued asset states in a global store context.