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

Murisi/masp test vectors #2421

Closed
wants to merge 6 commits into from
Closed

Murisi/masp test vectors #2421

wants to merge 6 commits into from

Conversation

murisi
Copy link
Collaborator

@murisi murisi commented Jan 22, 2024

Describe your changes

Implemented the random generation of MASP test vectors and slightly altered MASP-related transaction sections to facilitate the printing of shielded amounts with correct denominations. More specifically, the changes are as follows:

  • Used proptest to generate random shielding, shielded, and deshielding MASP transactions
  • Implemented a MASP TxProver to aid constructing these transactions with the following properties:
    • It is faster than LocalTxProver since it does not generate any zero-knowledge proofs
    • It is more correct than MockTxProver since it generates binding signatures that the hardware wallet will check
  • Improved the formatting of MASP transactions by using the new denomination information
  • Modified the AssetType derivation to be parameterized by a token's token::Denomination
    • Needed for hardware wallets to safely display and sign shielded denominated amounts
    • Modified the MaspTxBuilder supplied to hardware wallets to include token::Denomination in the preimages

Indicate on which release or other PRs this topic is based on

#2371

Checklist before merging to draft

  • I have added a changelog
  • Git history is in acceptable state

@murisi murisi force-pushed the murisi/masp-test-vectors branch from 75076bd to 65569c4 Compare January 22, 2024 14:40
@murisi murisi mentioned this pull request Jan 22, 2024
@murisi murisi marked this pull request as ready for review January 22, 2024 15:46
@murisi murisi force-pushed the murisi/masp-test-vectors branch from 5b71e91 to fe6d6b6 Compare January 23, 2024 08:32
core/src/types/masp.rs Outdated Show resolved Hide resolved
Copy link
Member

@batconjurer batconjurer left a comment

Choose a reason for hiding this comment

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

Overall looks fine. I'm somehow hung up on the name PreAssetType, but really that's minor.

@murisi murisi force-pushed the murisi/masp-test-vectors branch from fe6d6b6 to 18f9278 Compare January 23, 2024 13:34
@murisi murisi closed this Jan 23, 2024
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